Closed Bug 1735253 Opened 3 years ago Closed 2 years ago

Switch AudioCallbackDriver if the MediaTrack with the max channel changes

Categories

(Core :: Audio/Video: MediaStreamGraph, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: chunmin, Assigned: chunmin)

Details

Attachments

(5 files)

Suppose we have two AudioInputTracks. Track A is 1-channel and the Track B is 2-channel. Regardless of the opening order of the tracks, we will have a 2-channel AudioCallbackDriver with ReevaluateInputDevice()'s help [1]. However, in the current code [2], if track B is closed before track A, the AudioCallbackDriver stays uncanged. We won't switch to a new 1-channel AudioCallbackDriver. We will keep using the old 2-channel one. We should change to a 1-channel AudioCallbackDriver in this case.

[1] https://searchfox.org/mozilla-central/rev/2c4b830b924f42283632b70f39a60fd36433dd4d/dom/media/MediaTrackGraph.cpp#1220
[2] https://searchfox.org/mozilla-central/rev/2c4b830b924f42283632b70f39a60fd36433dd4d/dom/media/MediaTrackGraph.cpp#915-920

MockCubebStream's input channel count should be set by its parameters
for its input-side instead of a fixed constant value predefined in
MockCubeb.

Depends on D128421

Expose the destroyed stream in MockCubeb via MediaEventSource interface
so StreamDestroyEvent()'s caller have a way to check if the destroyed
stream is the expected one.

Attachment #9245578 - Attachment description: WIP: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed → Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed
Attachment #9245578 - Attachment description: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed → WIP: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed
Attachment #9245822 - Attachment description: Bug 1735253 - Expose destroyed stream in MockCubeb via MediaEventSource → WIP: Bug 1735253 - Expose destroyed stream in MockCubeb via MediaEventSource
Attachment #9245821 - Attachment description: Bug 1735253 - Set MochCubeb's input channel by parameters → WIP: Bug 1735253 - Set MochCubeb's input channel by parameters
Attachment #9245578 - Attachment description: WIP: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed → Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed
Attachment #9245822 - Attachment description: WIP: Bug 1735253 - Expose destroyed stream in MockCubeb via MediaEventSource → Bug 1735253 - Expose destroyed stream in MockCubeb via MediaEventSource
Attachment #9245821 - Attachment description: WIP: Bug 1735253 - Set MochCubeb's input channel by parameters → Bug 1735253 - Set MochCubeb's input channel by parameters
Attachment #9245821 - Attachment description: Bug 1735253 - Set MochCubeb's input channel by parameters → Bug 1735253 - Set MockCubeb's input channel by parameters
Attachment #9245578 - Attachment description: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed → WIP: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed
Attachment #9245578 - Attachment description: WIP: Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed → Bug 1735253 - Switch GraphDriver when the MediaTrack with the max channel is closed

If the max input channel count is changed in OpenAudioInputImpl, we
need a new AudioCallbackDriver

Depends on D128422

Summary: Switch AudioCallbackDriver if the MediaTrack with the max channel is closed → Switch AudioCallbackDriver if the MediaTrack with the max channel changes

Add a test for AudioInputProcessing::SetRequestedInputChannelCount

Attachment #9247606 - Attachment description: Bug 1735253 - Add test for SetRequestedInputChannelCount → Bug 1735253 - Add a test for SetRequestedInputChannelCount
Pushed by cchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4d1c33e22f15
Switch GraphDriver when the MediaTrack with the max channel is closed r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/3baf00ec0434
Expose destroyed stream in MockCubeb via MediaEventSource r=padenot,pehrsons
https://hg.mozilla.org/integration/autoland/rev/3712d309915d
Set MockCubeb's input channel by parameters r=padenot,pehrsons
https://hg.mozilla.org/integration/autoland/rev/78c347ec4800
Switch GraphDriver when a new MediaTrack with max channel is opened r=pehrsons
https://hg.mozilla.org/integration/autoland/rev/8b7003a89ed9
Add a test for SetRequestedInputChannelCount r=pehrsons
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: