mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1237616 - Remove the aForceBuffering arugment from MediaDecoder::Resume(). r=cpearce.
This commit is contained in:
parent
8810bde2ef
commit
4627500b49
@ -2184,7 +2184,7 @@ void HTMLMediaElement::StopSuspendingAfterFirstFrame()
|
||||
return;
|
||||
mSuspendedAfterFirstFrame = false;
|
||||
if (mDecoder) {
|
||||
mDecoder->Resume(true);
|
||||
mDecoder->Resume();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4191,7 +4191,7 @@ void HTMLMediaElement::SuspendOrResumeElement(bool aPauseElement, bool aSuspendE
|
||||
MOZ_ASSERT(!mMediaKeys);
|
||||
#endif
|
||||
if (mDecoder) {
|
||||
mDecoder->Resume(false);
|
||||
mDecoder->Resume();
|
||||
if (!mPaused && !mDecoder->IsEndedOrShutdown()) {
|
||||
mDecoder->Play();
|
||||
}
|
||||
@ -4891,7 +4891,7 @@ HTMLMediaElement::SetMediaKeys(mozilla::dom::MediaKeys* aMediaKeys,
|
||||
if (mDecoder) {
|
||||
// We don't support swapping out the MediaKeys once we've started to
|
||||
// setup the playback pipeline. Note this also means we don't need to worry
|
||||
// about handling disassociating the MediaKeys from the MediaDecoder.
|
||||
// about handling disassociating the MediaKeys from the MediaDecoder.
|
||||
promise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR,
|
||||
NS_LITERAL_CSTRING("Can't change MediaKeys on HTMLMediaElement after load has started"));
|
||||
return promise.forget();
|
||||
|
@ -1411,17 +1411,12 @@ MediaDecoder::Suspend()
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoder::Resume(bool aForceBuffering)
|
||||
MediaDecoder::Resume()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (mResource) {
|
||||
mResource->Resume();
|
||||
}
|
||||
if (aForceBuffering) {
|
||||
if (mDecoderStateMachine) {
|
||||
mDecoderStateMachine->DispatchStartBuffering();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -501,10 +501,8 @@ public:
|
||||
// media element when it is restored from the bfcache, or when we need
|
||||
// to stop throttling the download. Call on the main thread only.
|
||||
// The download will only actually resume once as many Resume calls
|
||||
// have been made as Suspend calls. When aForceBuffering is true,
|
||||
// we force the decoder to go into buffering state before resuming
|
||||
// playback.
|
||||
virtual void Resume(bool aForceBuffering);
|
||||
// have been made as Suspend calls.
|
||||
virtual void Resume();
|
||||
|
||||
// Moves any existing channel loads into or out of background. Background
|
||||
// loads don't block the load event. This is called when we stop or restart
|
||||
|
@ -170,13 +170,6 @@ public:
|
||||
|
||||
RefPtr<ShutdownPromise> BeginShutdown();
|
||||
|
||||
void DispatchStartBuffering()
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> runnable =
|
||||
NS_NewRunnableMethod(this, &MediaDecoderStateMachine::StartBuffering);
|
||||
OwnerThread()->Dispatch(runnable.forget());
|
||||
}
|
||||
|
||||
// Notifies the state machine that should minimize the number of samples
|
||||
// decoded we preroll, until playback starts. The first time playback starts
|
||||
// the state machine is free to return to prerolling normally. Note
|
||||
|
Loading…
Reference in New Issue
Block a user