Bug 1378304. P4 - remove AbstractMediaDecoder::GetResource().
MozReview-Commit-ID: KjHJyfxYwA6
--- a/dom/media/AbstractMediaDecoder.h
+++ b/dom/media/AbstractMediaDecoder.h
@@ -36,20 +36,16 @@ typedef nsDataHashtable<nsCStringHashKey
/**
* The AbstractMediaDecoder class describes the public interface for a media decoder
* and is used by the MediaReader classes.
*/
class AbstractMediaDecoder : public nsIObserver
{
public:
- // Get the current MediaResource being used. Its URI will be returned
- // by currentSrc. Returns what was passed to Load(), if Load() has been called.
- virtual MediaResource* GetResource() const = 0;
-
// 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;
virtual AbstractCanonical<media::NullableTimeUnit>* CanonicalDurationOrNull()
{
return nullptr;
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -133,20 +133,17 @@ public:
// Get the current MediaResource being used.
// Note: The MediaResource is refcounted, but it outlives the MediaDecoder,
// so it's OK to use the reference returned by this function without
// refcounting, *unless* you need to store and use the reference after the
// MediaDecoder has been destroyed. You might need to do this if you're
// wrapping the MediaResource in some kind of byte stream interface to be
// passed to a platform decoder.
- MediaResource* GetResource() const final override
- {
- return mResource;
- }
+ MediaResource* GetResource() const { return mResource; }
// Return the principal of the current URI being played or downloaded.
virtual already_AddRefed<nsIPrincipal> GetCurrentPrincipal();
// Return the time position in the video stream being
// played measured in seconds.
virtual double GetCurrentTime();
--- a/dom/media/webaudio/BufferDecoder.cpp
+++ b/dom/media/webaudio/BufferDecoder.cpp
@@ -28,22 +28,16 @@ BufferDecoder::~BufferDecoder()
void
BufferDecoder::BeginDecoding(TaskQueue* aTaskQueueIdentity)
{
MOZ_ASSERT(!mTaskQueueIdentity && aTaskQueueIdentity);
mTaskQueueIdentity = aTaskQueueIdentity;
}
-MediaResource*
-BufferDecoder::GetResource() const
-{
- return mResource;
-}
-
void
BufferDecoder::NotifyDecodedFrames(const FrameStatisticsData& aStats)
{
// ignore
}
VideoFrameContainer*
BufferDecoder::GetVideoFrameContainer()
--- a/dom/media/webaudio/BufferDecoder.h
+++ b/dom/media/webaudio/BufferDecoder.h
@@ -27,18 +27,16 @@ public:
explicit BufferDecoder(MediaResource* aResource,
AbstractThread* aMainThread);
NS_DECL_THREADSAFE_ISUPPORTS
// This has to be called before decoding begins
void BeginDecoding(TaskQueue* aTaskQueueIdentity);
- MediaResource* GetResource() const final override;
-
void NotifyDecodedFrames(const FrameStatisticsData& aStats) final override;
VideoFrameContainer* GetVideoFrameContainer() final override;
layers::ImageContainer* GetImageContainer() final override;
MediaDecoderOwner* GetOwner() const final override;
AbstractThread* AbstractMainThread() const final override;