Content process hang while waiting for MediaStreamGraph messages executed

RESOLVED DUPLICATE of bug 1392930

Status

()

Core
Audio/Video: MediaStreamGraph
P2
normal
Rank:
20
RESOLVED DUPLICATE of bug 1392930
7 months ago
6 months ago

People

(Reporter: mchiang, Assigned: padenot)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Steps:

1) Choose a PC or laptop without any built-in audio input device (microphone). In my case, I use a PC running Windows 7.
2) Plug in a USB mic or USB webcam with mic
3) Connect to https://webrtc.github.io/samples/src/content/getusermedia/audio/ and run gUM
4) Remove the USB mic during gUM streaming
5) Close Firefox

MediaStreamGraph is driven by AudioCallbackDriver / cubeb (when audio track exists). When the external microphone is removed and there is no other input device, cubeb won't drive MediaStreamGraph anymore. The upcoming messages appended to MSG won't be executed.

This can lead to different kind of problems depending on the upcoming operation.
For example, if the user tries to close Firefox, all messages appended in the below functions will not be executed.

MediaStream::RemoveVideoOutput
MediaStream::RemoveListener
MediaStreamGraphImpl::CloseAudioInput
MediaStream::RemoveTrackListener
MediaInputPort::Destroy()
MediaStream::Destroy()

Content process will hang on NS_ProcessNextEvent(nsIThread* aThread, bool aMayWait)
(Assignee)

Updated

7 months ago
Rank: 20
Component: WebRTC: Audio/Video → Audio/Video: MediaStreamGraph
Priority: -- → P2
(Assignee)

Updated

7 months ago
Assignee: nobody → padenot
(Assignee)

Comment 1

6 months ago
Munro, would you be able to try this when bug 1392930 lands? It should be fixed.
Depends on: 1392930
Flags: needinfo?(mchiang)
Hi Paul,

It seems that this patch addresses the issue of audio output device switch.
Is it also helpful for input device case? (no further callback from AudioCallbackDriver / cubeb if the last input device is disconnected.)

Anyway, I will give it a try.
Flags: needinfo?(mchiang) → needinfo?(padenot)
(Assignee)

Comment 3

6 months ago
Yes, this works for input and output.
Flags: needinfo?(padenot)
It works! Fantastic!
(Assignee)

Updated

6 months ago
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1392930
You need to log in before you can comment on or make changes to this bug.