Bug 1380234. P3 - remove AbstractMediaDecoder::CompositorUpdatedEvent() and its users.
MozReview-Commit-ID: JioS7MC5qFh
--- a/dom/media/AbstractMediaDecoder.h
+++ b/dom/media/AbstractMediaDecoder.h
@@ -41,26 +41,16 @@ typedef nsDataHashtable<nsCStringHashKey
class AbstractMediaDecoder : public nsIObserver
{
public:
// Increments the parsed, decoded and dropped frame counters by the passed in
// counts.
// Can be called on any thread.
virtual void NotifyDecodedFrames(const FrameStatisticsData& aStats) = 0;
- // Returns an event that will be notified when the owning document changes state
- // and we might have a new compositor. If this new compositor requires us to
- // recreate our decoders, then we expect the existing decoderis to return an
- // error independently of this.
- virtual MediaEventSource<RefPtr<layers::KnowsCompositor>>*
- CompositorUpdatedEvent()
- {
- return nullptr;
- }
-
// Notify the media decoder that a decryption key is required before emitting
// further output. This only needs to be overridden for decoders that expect
// encryption, such as the MediaSource decoder.
virtual void NotifyWaitingForKey() { }
// Return an event that will be notified when a decoder is waiting for a
// decryption key before it can return more output.
virtual MediaEventSource<void>* WaitingForKeyEvent()
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -539,36 +539,31 @@ private:
// state machine. Call on the main thread only.
void MetadataLoaded(UniquePtr<MediaInfo> aInfo,
UniquePtr<MetadataTags> aTags,
MediaDecoderEventVisibility aEventVisibility);
// Called when the owner's activity changed.
void NotifyCompositor();
- MediaEventSource<RefPtr<layers::KnowsCompositor>>*
- CompositorUpdatedEvent() override { return &mCompositorUpdatedEvent; }
-
void OnPlaybackEvent(MediaEventType aEvent);
void OnPlaybackErrorEvent(const MediaResult& aError);
void OnDecoderDoctorEvent(DecoderDoctorEvent aEvent);
void OnMediaNotSeekable()
{
mMediaSeekable = false;
}
void FinishShutdown();
void ConnectMirrors(MediaDecoderStateMachine* aObject);
void DisconnectMirrors();
- MediaEventProducer<RefPtr<layers::KnowsCompositor>> mCompositorUpdatedEvent;
-
// The state machine object for handling the decoding. It is safe to
// call methods of this object from other threads. Its internal data
// is synchronised on a monitor. The lifetime of this object is
// after mPlayState is LOADING and before mPlayState is SHUTDOWN. It
// is safe to access it during this period.
//
// Explicitly prievate to force access via accessors.
RefPtr<MediaDecoderStateMachine> mDecoderStateMachine;
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -1157,17 +1157,16 @@ MediaFormatReader::Shutdown()
mVideo.mTrackDemuxer = nullptr;
mVideo.ResetState();
ShutdownDecoder(TrackInfo::kVideoTrack);
}
mShutdownPromisePool->Track(mDemuxer->Shutdown());
mDemuxer = nullptr;
- mCompositorUpdatedListener.DisconnectIfExists();
mOnTrackWaitingForKeyListener.Disconnect();
mShutdown = true;
return mShutdownPromisePool->Shutdown()
->Then(OwnerThread(), __func__, this,
&MediaFormatReader::TearDownDecoders,
&MediaFormatReader::TearDownDecoders);
}
--- a/dom/media/MediaFormatReader.h
+++ b/dom/media/MediaFormatReader.h
@@ -542,17 +542,16 @@ private:
void SetNullDecode(TrackType aTrack, bool aIsNullDecode);
class DecoderFactory;
UniquePtr<DecoderFactory> mDecoderFactory;
class ShutdownPromisePool;
UniquePtr<ShutdownPromisePool> mShutdownPromisePool;
- MediaEventListener mCompositorUpdatedListener;
MediaEventListener mOnTrackWaitingForKeyListener;
void OnFirstDemuxCompleted(TrackInfo::TrackType aType,
RefPtr<MediaTrackDemuxer::SamplesHolder> aSamples);
void OnFirstDemuxFailed(TrackInfo::TrackType aType, const MediaResult& aError);
void MaybeResolveMetadataPromise();