mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
Bug 1296531 - Remove MediaStream blocking logic from HTMLMediaElement. r=jesup
MediaStreamGraph only implements the blocking notifications for SourceMediaStreams, but the MediaStream that gets attached as srcObject on a media element is always a TrackUnionStream. Hence, this code is unused and can be removed. MozReview-Commit-ID: 6DKtCGNsZec --HG-- extra : rebase_source : 0b3b7156a9e2e70933edadcc0a59c8fa81d49913
This commit is contained in:
parent
5cc68fed94
commit
5e6a6af6f3
@ -4892,7 +4892,6 @@ public:
|
||||
WatchTarget(aName),
|
||||
mElement(aElement),
|
||||
mHaveCurrentData(false),
|
||||
mBlocked(false),
|
||||
mFinished(false),
|
||||
mMutex(aName),
|
||||
mPendingNotifyOutput(false)
|
||||
@ -4910,21 +4909,9 @@ public:
|
||||
if (!mElement || !mHaveCurrentData || mFinished) {
|
||||
return MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE;
|
||||
}
|
||||
return mBlocked
|
||||
? MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE_BUFFERING
|
||||
: MediaDecoderOwner::NEXT_FRAME_AVAILABLE;
|
||||
return MediaDecoderOwner::NEXT_FRAME_AVAILABLE;
|
||||
}
|
||||
|
||||
void DoNotifyBlocked()
|
||||
{
|
||||
mBlocked = true;
|
||||
NotifyWatchers();
|
||||
}
|
||||
void DoNotifyUnblocked()
|
||||
{
|
||||
mBlocked = false;
|
||||
NotifyWatchers();
|
||||
}
|
||||
void DoNotifyOutput()
|
||||
{
|
||||
{
|
||||
@ -4949,22 +4936,6 @@ public:
|
||||
|
||||
// These notifications run on the media graph thread so we need to
|
||||
// dispatch events to the main thread.
|
||||
virtual void NotifyBlockingChanged(MediaStreamGraph* aGraph, Blocking aBlocked) override
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> event;
|
||||
if (aBlocked == BLOCKED) {
|
||||
event = NewRunnableMethod(
|
||||
"dom::HTMLMediaElement::StreamListener::DoNotifyBlocked",
|
||||
this,
|
||||
&StreamListener::DoNotifyBlocked);
|
||||
} else {
|
||||
event = NewRunnableMethod(
|
||||
"dom::HTMLMediaElement::StreamListener::DoNotifyUnblocked",
|
||||
this,
|
||||
&StreamListener::DoNotifyUnblocked);
|
||||
}
|
||||
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
|
||||
}
|
||||
virtual void NotifyHasCurrentData(MediaStreamGraph* aGraph) override
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
@ -4991,7 +4962,6 @@ private:
|
||||
// These fields may only be accessed on the main thread
|
||||
HTMLMediaElement* mElement;
|
||||
bool mHaveCurrentData;
|
||||
bool mBlocked;
|
||||
bool mFinished;
|
||||
|
||||
// mMutex protects the fields below; they can be accessed on any thread
|
||||
|
Loading…
Reference in New Issue
Block a user