From 1fa4d0508db188d2c7e815b259d6d796097ea120 Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Tue, 10 Feb 2015 11:59:20 +1300 Subject: [PATCH] Bug 1130923 - Remove some DASHDecoder remnants: RestrictedAccessMonitor and GetByteRangeForSeek. r=cpearce --- dom/media/MediaDecoder.cpp | 2 +- dom/media/MediaDecoder.h | 43 +++----------------------------------- 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index f640fd3d1209..1105f30044e1 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -1551,7 +1551,7 @@ bool MediaDecoder::OnDecodeThread() const { } ReentrantMonitor& MediaDecoder::GetReentrantMonitor() { - return mReentrantMonitor.GetReentrantMonitor(); + return mReentrantMonitor; } ImageContainer* MediaDecoder::GetImageContainer() diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index 78ea2272667a..9c80585afe01 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -346,14 +346,6 @@ public: // the seek target. virtual nsresult Seek(double aTime, SeekTarget::Type aSeekType); - // Enables decoders to supply an enclosing byte range for a seek offset. - // E.g. used by ChannelMediaResource to download a whole cluster for - // DASH-WebM. - virtual nsresult GetByteRangeForSeek(int64_t const aOffset, - MediaByteRange &aByteRange) { - return NS_ERROR_NOT_AVAILABLE; - } - // Initialize state machine and schedule it. nsresult InitializeStateMachine(MediaDecoder* aCloneDonor); @@ -1082,40 +1074,11 @@ protected: // Media data resource. nsRefPtr mResource; +private: // |ReentrantMonitor| for detecting when the video play state changes. A call // to |Wait| on this monitor will block the thread until the next state - // change. - // Using a wrapper class to restrict direct access to the |ReentrantMonitor| - // object. Subclasses may override |MediaDecoder|::|GetReentrantMonitor| - // e.g. |DASHRepDecoder|::|GetReentrantMonitor| returns the monitor in the - // main |DASHDecoder| object. In this case, directly accessing the - // member variable mReentrantMonitor in |DASHRepDecoder| is wrong. - // The wrapper |RestrictedAccessMonitor| restricts use to the getter - // function rather than the object itself. -private: - class RestrictedAccessMonitor - { - public: - explicit RestrictedAccessMonitor(const char* aName) : - mReentrantMonitor(aName) - { - MOZ_COUNT_CTOR(RestrictedAccessMonitor); - } - ~RestrictedAccessMonitor() - { - MOZ_COUNT_DTOR(RestrictedAccessMonitor); - } - - // Returns a ref to the reentrant monitor - ReentrantMonitor& GetReentrantMonitor() { - return mReentrantMonitor; - } - private: - ReentrantMonitor mReentrantMonitor; - }; - - // The |RestrictedAccessMonitor| member object. - RestrictedAccessMonitor mReentrantMonitor; + // change. Explicitly private for force access via GetReentrantMonitor. + ReentrantMonitor mReentrantMonitor; #ifdef MOZ_EME nsRefPtr mProxy;