Bug 1616175 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

https://searchfox.org/mozilla-central/rev/0439db3a39faddb90197a87cc184c57dcbf0a770/dom/media/encoder/MediaEncoder.h#102
says "When all input tracks end, the MediaEncoder will automatically stop and shut down."

That's true as far as the fact that `MediaEncoder::Shutdown()` gets called, but resolution of the promise it returns and `EncoderListener::Shutdown()` are blocked on `MediaEncoder::AudioTrackListener::mShutdownPromise`, which waits for removal of its MediaTrack from the graph.

For bug 1596655, I would like the `MediaTrack` for `AudioDestinationNode` to remain the the graph well after the track ends.  The blocked `EncoderListener` shutdown means that the "stop" event is not dispatched to the `MediaRecorder` until the `AudioDestinationNode` is destroyed.

This appears to be a consequence of a change in behavior introduced in https://hg.mozilla.org/mozilla-central/rev/509719f98963a8f1c2663dac01279a734d30e71a
https://searchfox.org/mozilla-central/rev/0439db3a39faddb90197a87cc184c57dcbf0a770/dom/media/encoder/MediaEncoder.h#102
says "When all input tracks end, the MediaEncoder will automatically stop and shut down."

That's true as far as the fact that `MediaEncoder::Shutdown()` gets called, but resolution of the promise it returns and `EncoderListener::Shutdown()` are blocked on `MediaEncoder::AudioTrackListener::mShutdownPromise`, which waits for removal of its MediaTrack from the graph.

For bug 1596655, I would like the `MediaTrack` for `AudioDestinationNode` to remain in the graph well after the track ends.  The blocked `EncoderListener` shutdown means that the "stop" event is not dispatched to the `MediaRecorder` until the `AudioDestinationNode` is destroyed.

This appears to be a consequence of a change in behavior introduced in https://hg.mozilla.org/mozilla-central/rev/509719f98963a8f1c2663dac01279a734d30e71a

Back to Bug 1616175 Comment 0