зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1100803 - Re-create a decoded media stream if necessary. r=roc
This commit is contained in:
Родитель
bf3526619d
Коммит
50d890e0f7
|
@ -266,6 +266,14 @@ MediaDecoder::DecodedStreamGraphListener::NotifyEvent(MediaStreamGraph* aGraph,
|
|||
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
|
||||
}
|
||||
}
|
||||
|
||||
void MediaDecoder::RecreateDecodedStreamIfNecessary(int64_t aStartTimeUSecs)
|
||||
{
|
||||
if (mInitialAudioCaptured) {
|
||||
RecreateDecodedStream(aStartTimeUSecs);
|
||||
}
|
||||
}
|
||||
|
||||
void MediaDecoder::DestroyDecodedStream()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
|
|
@ -851,6 +851,9 @@ public:
|
|||
// The decoder monitor must be held.
|
||||
bool IsLogicallyPlaying();
|
||||
|
||||
// Re-create a decoded stream if audio being captured
|
||||
void RecreateDecodedStreamIfNecessary(int64_t aStartTimeUSecs);
|
||||
|
||||
#ifdef MOZ_EME
|
||||
// This takes the decoder monitor.
|
||||
virtual nsresult SetCDMProxy(CDMProxy* aProxy) MOZ_OVERRIDE;
|
||||
|
|
|
@ -1624,9 +1624,7 @@ MediaDecoderStateMachine::StartSeek(const SeekTarget& aTarget)
|
|||
|
||||
DECODER_LOG("Changed state to SEEKING (to %lld)", mSeekTarget.mTime);
|
||||
SetState(DECODER_STATE_SEEKING);
|
||||
if (mDecoder->GetDecodedStream()) {
|
||||
mDecoder->RecreateDecodedStream(seekTime - mStartTime);
|
||||
}
|
||||
mDecoder->RecreateDecodedStreamIfNecessary(seekTime - mStartTime);
|
||||
ScheduleStateMachine();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче