зеркало из https://github.com/mozilla/gecko-dev.git
Bug 960057 - When an HTMLMediaElement outputs to a MediaStream, make sure to install the refill callback in any case. r=roc DONTBUILD
This commit is contained in:
Родитель
8185373937
Коммит
77fe8ccc32
|
@ -659,10 +659,14 @@ void MediaDecoderStateMachine::SendStreamData()
|
|||
if (mInfo.HasAudio()) {
|
||||
AudioSegment* audio = new AudioSegment();
|
||||
mediaStream->AddTrack(TRACK_AUDIO, mInfo.mAudio.mRate, 0, audio);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(TRACK_AUDIO,
|
||||
GetStateMachineThread(), GetWakeDecoderRunnable());
|
||||
}
|
||||
if (mInfo.HasVideo()) {
|
||||
VideoSegment* video = new VideoSegment();
|
||||
mediaStream->AddTrack(TRACK_VIDEO, RATE_VIDEO, 0, video);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(TRACK_VIDEO,
|
||||
GetStateMachineThread(), GetWakeDecoderRunnable());
|
||||
}
|
||||
stream->mStreamInitialized = true;
|
||||
}
|
||||
|
|
|
@ -2200,7 +2200,9 @@ SourceMediaStream::DispatchWhenNotEnoughBuffered(TrackID aID,
|
|||
}
|
||||
|
||||
if (data->mHaveEnough) {
|
||||
if (data->mDispatchWhenNotEnough.IsEmpty()) {
|
||||
data->mDispatchWhenNotEnough.AppendElement()->Init(aSignalThread, aSignalRunnable);
|
||||
}
|
||||
} else {
|
||||
aSignalThread->Dispatch(aSignalRunnable, 0);
|
||||
}
|
||||
|
|
|
@ -672,7 +672,7 @@ public:
|
|||
* Ensures that aSignalRunnable will be dispatched to aSignalThread
|
||||
* when we don't have enough buffered data in the track (which could be
|
||||
* immediately). Will dispatch the runnable immediately if the track
|
||||
* does not exist.
|
||||
* does not exist. No op if a runnable is already present for this track.
|
||||
*/
|
||||
void DispatchWhenNotEnoughBuffered(TrackID aID,
|
||||
nsIThread* aSignalThread, nsIRunnable* aSignalRunnable);
|
||||
|
|
Загрузка…
Ссылка в новой задаче