Bug 196606

Summary: [GStreamer][WebRTC] An audio track should be muted when capture is interrupted by the OS.
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebRTCAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, eric.carlson, ews-watchlist, glenn, hta, jer.noble, peng.liu6, philipj, pnormand, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch none

Description Michael Catanzaro 2019-04-04 08:59:25 PDT
An audio track should be muted when capture is interrupted by the OS, as implemented for Apple in r237837
Comment 1 Philippe Normand 2021-04-11 09:14:20 PDT
*** Bug 222569 has been marked as a duplicate of this bug. ***
Comment 2 Philippe Normand 2021-04-12 01:32:07 PDT
Created attachment 425724 [details]
Patch
Comment 3 Xabier Rodríguez Calvar 2021-04-12 03:56:36 PDT
Comment on attachment 425724 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425724&action=review

> Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:56
> +    bool interrupted() const final;

isInterrupted

> Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp:188
> +    gboolean drop;

isDropping

> Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp:193
> +void GStreamerCapturer::setInterrupted(bool interrupted)

isInterrupted.

> Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp:143
> +void MockRealtimeAudioSourceGStreamer::setInterruptedForTesting(bool interrupted)

isInterrupted

> Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:48
> +    bool interrupted() const final { return m_interrupted; };

isInterrupted

> Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:56
> +    bool m_interrupted { false };

m_isInterrupted
Comment 4 Philippe Normand 2021-04-12 08:50:47 PDT
Comment on attachment 425724 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425724&action=review

>> Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:56
>> +    bool interrupted() const final;
> 
> isInterrupted

This is part of the RealtimeMediaSource interface, I'm not going to rename it in this patch :)
Comment 5 Philippe Normand 2021-04-12 08:51:08 PDT
Created attachment 425751 [details]
Patch
Comment 6 EWS 2021-04-12 10:18:35 PDT
Committed r275827 (236397@main): <https://commits.webkit.org/236397@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425751 [details].
Comment 7 Radar WebKit Bug Importer 2021-04-12 10:19:18 PDT
<rdar://problem/76544696>