Bug 1289004. Part 1 - Constify and devirtualize some functions. r?cpearce.
MozReview-Commit-ID: 8f14ekpinCR
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -477,17 +477,17 @@ MediaDecoder::SetInfinite(bool aInfinite
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!mShuttingDown);
mInfiniteStream = aInfinite;
DurationChanged();
}
bool
-MediaDecoder::IsInfinite()
+MediaDecoder::IsInfinite() const
{
MOZ_ASSERT(NS_IsMainThread());
return mInfiniteStream;
}
MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
: mWatchManager(this, AbstractThread::MainThread())
, mDormantSupported(false)
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -215,34 +215,34 @@ public:
virtual void AddOutputStream(ProcessedMediaStream* aStream, bool aFinishWhenEnded);
// Remove an output stream added with AddOutputStream.
virtual void RemoveOutputStream(MediaStream* aStream);
// Return the duration of the video in seconds.
virtual double GetDuration();
// Return true if the stream is infinite (see SetInfinite).
- virtual bool IsInfinite();
+ bool IsInfinite() const;
// Called by MediaResource when some data has been received.
// Call on the main thread only.
virtual void NotifyBytesDownloaded();
// Called as data arrives on the stream and is read into the cache. Called
// on the main thread only.
void NotifyDataArrived();
// Return true if we are currently seeking in the media resource.
// Call on the main thread only.
- virtual bool IsSeeking() const;
+ bool IsSeeking() const;
// Return true if the decoder has reached the end of playback or the decoder
// has shutdown.
// Call on the main thread only.
- virtual bool IsEndedOrShutdown() const;
+ bool IsEndedOrShutdown() const;
// Return true if the MediaDecoderOwner's error attribute is not null.
// If the MediaDecoder is shutting down, OwnerHasError will return true.
bool OwnerHasError() const;
already_AddRefed<GMPCrashHelper> GetCrashHelper() override;
protected: