Allow MediaRecorder "stop" event dispatch when tracks end, even if still in MediaTrackGraph
Categories
(Core :: Audio/Video: Recording, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox73 | --- | wontfix |
firefox74 | --- | wontfix |
firefox75 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
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
Assignee | ||
Comment 1•5 years ago
•
|
||
(In reply to Karl Tomlinson (:karlt) from comment #0)
That's true as far as the fact that
MediaEncoder::Shutdown()
gets called, but resolution of the promise it returns andEncoderListener::Shutdown()
are blocked onMediaEncoder::AudioTrackListener::mShutdownPromise
,
The first promise in the chain returned from MediaEncoder::Shutdown()
is waiting for the listeners to be removed from their tracks.
Removal of listeners from tracks would be triggered from MediaEncoder::Stop()
from MediaEncoder::Cancel()
after Session::Shutdown()
after Session::DoSessionEndTask()
after Session::MediaEncoderShutdown()
from Session::EncoderListener::Shutdown()
, which is not called until the promise resolves.
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
IsShutdown() is replaced with a AssertShutdownCalled() because testing
mShutdownPromise would race if the timing of Shutdown() is not known.
Depends on D65066
Updated•5 years ago
|
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3a0f667c0908
https://hg.mozilla.org/mozilla-central/rev/9f768142ce40
Updated•5 years ago
|
Updated•5 years ago
|
Description
•