diff --git a/dom/media/AudioStreamTrack.h b/dom/media/AudioStreamTrack.h index 780ada1ad14b..400745943dbb 100644 --- a/dom/media/AudioStreamTrack.h +++ b/dom/media/AudioStreamTrack.h @@ -19,10 +19,10 @@ public: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; - virtual AudioStreamTrack* AsAudioStreamTrack() { return this; } + virtual AudioStreamTrack* AsAudioStreamTrack() MOZ_OVERRIDE { return this; } // WebIDL - virtual void GetKind(nsAString& aKind) { aKind.AssignLiteral("audio"); } + virtual void GetKind(nsAString& aKind) MOZ_OVERRIDE { aKind.AssignLiteral("audio"); } }; } diff --git a/dom/media/BufferMediaResource.h b/dom/media/BufferMediaResource.h index 9e8844f111b6..b69b931b372a 100644 --- a/dom/media/BufferMediaResource.h +++ b/dom/media/BufferMediaResource.h @@ -40,26 +40,26 @@ protected: } private: - virtual nsresult Close() { return NS_OK; } - virtual void Suspend(bool aCloseImmediately) {} - virtual void Resume() {} + virtual nsresult Close() MOZ_OVERRIDE { return NS_OK; } + virtual void Suspend(bool aCloseImmediately) MOZ_OVERRIDE {} + virtual void Resume() MOZ_OVERRIDE {} // Get the current principal for the channel - virtual already_AddRefed GetCurrentPrincipal() + virtual already_AddRefed GetCurrentPrincipal() MOZ_OVERRIDE { nsCOMPtr principal = mPrincipal; return principal.forget(); } - virtual bool CanClone() { return false; } - virtual already_AddRefed CloneData(MediaDecoder* aDecoder) + virtual bool CanClone() MOZ_OVERRIDE { return false; } + virtual already_AddRefed CloneData(MediaDecoder* aDecoder) MOZ_OVERRIDE { return nullptr; } // These methods are called off the main thread. // The mode is initially MODE_PLAYBACK. - virtual void SetReadMode(MediaCacheStream::ReadMode aMode) {} - virtual void SetPlaybackRate(uint32_t aBytesPerSecond) {} - virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes) + virtual void SetReadMode(MediaCacheStream::ReadMode aMode) MOZ_OVERRIDE {} + virtual void SetPlaybackRate(uint32_t aBytesPerSecond) MOZ_OVERRIDE {} + virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes) MOZ_OVERRIDE { *aBytes = std::min(mLength - mOffset, aCount); memcpy(aBuffer, mBuffer + mOffset, *aBytes); @@ -68,13 +68,13 @@ private: return NS_OK; } virtual nsresult ReadAt(int64_t aOffset, char* aBuffer, - uint32_t aCount, uint32_t* aBytes) + uint32_t aCount, uint32_t* aBytes) MOZ_OVERRIDE { nsresult rv = Seek(nsISeekableStream::NS_SEEK_SET, aOffset); if (NS_FAILED(rv)) return rv; return Read(aBuffer, aCount, aBytes); } - virtual nsresult Seek(int32_t aWhence, int64_t aOffset) + virtual nsresult Seek(int32_t aWhence, int64_t aOffset) MOZ_OVERRIDE { MOZ_ASSERT(aOffset <= UINT32_MAX); switch (aWhence) { @@ -100,22 +100,20 @@ private: return NS_OK; } - virtual void StartSeekingForMetadata() {} - virtual void EndSeekingForMetadata() {} - virtual int64_t Tell() { return mOffset; } + virtual int64_t Tell() MOZ_OVERRIDE { return mOffset; } - virtual void Pin() {} - virtual void Unpin() {} - virtual double GetDownloadRate(bool* aIsReliable) { *aIsReliable = false; return 0.; } - virtual int64_t GetLength() { return mLength; } - virtual int64_t GetNextCachedData(int64_t aOffset) { return aOffset; } - virtual int64_t GetCachedDataEnd(int64_t aOffset) { return mLength; } - virtual bool IsDataCachedToEndOfResource(int64_t aOffset) { return true; } - virtual bool IsSuspendedByCache() { return false; } - virtual bool IsSuspended() { return false; } + virtual void Pin() MOZ_OVERRIDE {} + virtual void Unpin() MOZ_OVERRIDE {} + virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { *aIsReliable = false; return 0.; } + virtual int64_t GetLength() MOZ_OVERRIDE { return mLength; } + virtual int64_t GetNextCachedData(int64_t aOffset) MOZ_OVERRIDE { return aOffset; } + virtual int64_t GetCachedDataEnd(int64_t aOffset) MOZ_OVERRIDE { return mLength; } + virtual bool IsDataCachedToEndOfResource(int64_t aOffset) MOZ_OVERRIDE { return true; } + virtual bool IsSuspendedByCache() MOZ_OVERRIDE { return false; } + virtual bool IsSuspended() MOZ_OVERRIDE { return false; } virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, - uint32_t aCount) + uint32_t aCount) MOZ_OVERRIDE { if (aOffset < 0) { return NS_ERROR_FAILURE; @@ -126,12 +124,12 @@ private: return NS_OK; } - virtual nsresult Open(nsIStreamListener** aStreamListener) + virtual nsresult Open(nsIStreamListener** aStreamListener) MOZ_OVERRIDE { return NS_ERROR_FAILURE; } - virtual nsresult GetCachedRanges(nsTArray& aRanges) + virtual nsresult GetCachedRanges(nsTArray& aRanges) MOZ_OVERRIDE { aRanges.AppendElement(MediaByteRange(0, mLength)); return NS_OK; diff --git a/dom/media/GraphDriver.h b/dom/media/GraphDriver.h index 578e47f8325b..f90f89146939 100644 --- a/dom/media/GraphDriver.h +++ b/dom/media/GraphDriver.h @@ -266,7 +266,7 @@ public: */ void RunThread(); friend class MediaStreamGraphInitThreadRunnable; - uint32_t IterationDuration() { + virtual uint32_t IterationDuration() MOZ_OVERRIDE { return MEDIA_GRAPH_TARGET_PERIOD_MS; } @@ -312,7 +312,7 @@ public: virtual void WaitForNextIteration() MOZ_OVERRIDE; virtual void WakeUp() MOZ_OVERRIDE; virtual TimeStamp GetCurrentTimeStamp() MOZ_OVERRIDE; - virtual OfflineClockDriver* AsOfflineClockDriver() { + virtual OfflineClockDriver* AsOfflineClockDriver() MOZ_OVERRIDE { return this; } @@ -378,7 +378,7 @@ public: void StateCallback(cubeb_state aState); /* This is an approximation of the number of millisecond there are between two * iterations of the graph. */ - uint32_t IterationDuration(); + virtual uint32_t IterationDuration() MOZ_OVERRIDE; /* This function gets called when the graph has produced the audio frames for * this iteration. */ @@ -388,7 +388,7 @@ public: uint32_t aFrames, uint32_t aSampleRate) MOZ_OVERRIDE; - virtual AudioCallbackDriver* AsAudioCallbackDriver() { + virtual AudioCallbackDriver* AsAudioCallbackDriver() MOZ_OVERRIDE { return this; } diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index bcb439dd9a1f..2a1408b88e21 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -616,7 +616,7 @@ public: virtual bool IsMediaSeekable() MOZ_FINAL MOZ_OVERRIDE; // Returns true if seeking is supported on a transport level (e.g. the server // supports range requests, we are playing a file, etc.). - virtual bool IsTransportSeekable(); + virtual bool IsTransportSeekable() MOZ_OVERRIDE; // Return the time ranges that can be seeked into. virtual nsresult GetSeekable(dom::TimeRanges* aSeekable); @@ -749,7 +749,7 @@ public: // or equal to aPublishTime. void QueueMetadata(int64_t aPublishTime, nsAutoPtr aInfo, - nsAutoPtr aTags); + nsAutoPtr aTags) MOZ_OVERRIDE; int64_t GetSeekTime() { return mRequestedSeekTarget.mTime; } void ResetSeekTime() { mRequestedSeekTarget.Reset(); } @@ -775,11 +775,11 @@ public: // Called when the metadata from the media file has been loaded by the // state machine. Call on the main thread only. virtual void MetadataLoaded(nsAutoPtr aInfo, - nsAutoPtr aTags); + nsAutoPtr aTags) MOZ_OVERRIDE; // Called when the first audio and/or video from the media file has been loaded // by the state machine. Call on the main thread only. - virtual void FirstFrameLoaded(nsAutoPtr aInfo); + virtual void FirstFrameLoaded(nsAutoPtr aInfo) MOZ_OVERRIDE; // Called from MetadataLoaded(). Creates audio tracks and adds them to its // owner's audio track list, and implies to video tracks respectively. diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index ae8fbf70de65..d948ce1d9097 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -597,7 +597,7 @@ public: } } - virtual void Stop() + virtual void Stop() MOZ_OVERRIDE { if (mSourceStream) { mSourceStream->EndAllTrackAndFinish(); @@ -608,7 +608,7 @@ public: // single-source trackunion like we have here, the TrackUnion will assign trackids // that match the source's trackids, so we can avoid needing a mapping function. // XXX This will not handle more complex cases well. - virtual void StopTrack(TrackID aTrackID) + virtual void StopTrack(TrackID aTrackID) MOZ_OVERRIDE { if (mSourceStream) { mSourceStream->EndTrack(aTrackID); @@ -681,12 +681,12 @@ public: GetStream()->AsProcessedStream()->ForwardTrackEnabled(aID, aEnabled); } - virtual DOMLocalMediaStream* AsDOMLocalMediaStream() + virtual DOMLocalMediaStream* AsDOMLocalMediaStream() MOZ_OVERRIDE { return this; } - virtual MediaEngineSource* GetMediaEngine(TrackID aTrackID) + virtual MediaEngineSource* GetMediaEngine(TrackID aTrackID) MOZ_OVERRIDE { // MediaEngine supports only one video and on video track now and TrackID is // fixed in MediaEngine. diff --git a/dom/media/MediaPromise.h b/dom/media/MediaPromise.h index d51a6d55be25..d1262f60192f 100644 --- a/dom/media/MediaPromise.h +++ b/dom/media/MediaPromise.h @@ -220,12 +220,12 @@ protected: } protected: - virtual void DoResolve(ResolveValueType aResolveValue) + virtual void DoResolve(ResolveValueType aResolveValue) MOZ_OVERRIDE { InvokeCallbackMethod(mThisVal.get(), mResolveMethod, aResolveValue); } - virtual void DoReject(RejectValueType aRejectValue) + virtual void DoReject(RejectValueType aRejectValue) MOZ_OVERRIDE { InvokeCallbackMethod(mThisVal.get(), mRejectMethod, aRejectValue); } diff --git a/dom/media/MediaRecorder.cpp b/dom/media/MediaRecorder.cpp index d2725d914c48..a6c0acea12a7 100644 --- a/dom/media/MediaRecorder.cpp +++ b/dom/media/MediaRecorder.cpp @@ -73,7 +73,7 @@ public: NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport, - nsISupports* aData, bool aAnonymize) + nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE { int64_t amount = 0; RecordersArray& recorders = GetRecorders(); @@ -651,7 +651,7 @@ private: } } - NS_IMETHODIMP Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) + NS_IMETHODIMP Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) MOZ_OVERRIDE { MOZ_ASSERT(NS_IsMainThread()); LOG(PR_LOG_DEBUG, ("Session.Observe XPCOM_SHUTDOWN %p", this)); diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index 8028420b388a..59b753627e4f 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -1199,60 +1199,60 @@ public: } // Main thread - virtual nsresult Open(nsIStreamListener** aStreamListener); - virtual nsresult Close(); - virtual void Suspend(bool aCloseImmediately) {} - virtual void Resume() {} - virtual already_AddRefed GetCurrentPrincipal(); - virtual bool CanClone(); - virtual already_AddRefed CloneData(MediaDecoder* aDecoder); - virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount); + virtual nsresult Open(nsIStreamListener** aStreamListener) MOZ_OVERRIDE; + virtual nsresult Close() MOZ_OVERRIDE; + virtual void Suspend(bool aCloseImmediately) MOZ_OVERRIDE {} + virtual void Resume() MOZ_OVERRIDE {} + virtual already_AddRefed GetCurrentPrincipal() MOZ_OVERRIDE; + virtual bool CanClone() MOZ_OVERRIDE; + virtual already_AddRefed CloneData(MediaDecoder* aDecoder) MOZ_OVERRIDE; + virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) MOZ_OVERRIDE; // These methods are called off the main thread. // Other thread - virtual void SetReadMode(MediaCacheStream::ReadMode aMode) {} - virtual void SetPlaybackRate(uint32_t aBytesPerSecond) {} - virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes); + virtual void SetReadMode(MediaCacheStream::ReadMode aMode) MOZ_OVERRIDE {} + virtual void SetPlaybackRate(uint32_t aBytesPerSecond) MOZ_OVERRIDE {} + virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes) MOZ_OVERRIDE; virtual nsresult ReadAt(int64_t aOffset, char* aBuffer, - uint32_t aCount, uint32_t* aBytes); - virtual nsresult Seek(int32_t aWhence, int64_t aOffset); - virtual int64_t Tell(); + uint32_t aCount, uint32_t* aBytes) MOZ_OVERRIDE; + virtual nsresult Seek(int32_t aWhence, int64_t aOffset) MOZ_OVERRIDE; + virtual int64_t Tell() MOZ_OVERRIDE; // Any thread - virtual void Pin() {} - virtual void Unpin() {} - virtual double GetDownloadRate(bool* aIsReliable) + virtual void Pin() MOZ_OVERRIDE {} + virtual void Unpin() MOZ_OVERRIDE {} + virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE { // The data's all already here *aIsReliable = true; return 100*1024*1024; // arbitray, use 100MB/s } - virtual int64_t GetLength() { + virtual int64_t GetLength() MOZ_OVERRIDE { MutexAutoLock lock(mLock); EnsureSizeInitialized(); return mSizeInitialized ? mSize : 0; } - virtual int64_t GetNextCachedData(int64_t aOffset) + virtual int64_t GetNextCachedData(int64_t aOffset) MOZ_OVERRIDE { MutexAutoLock lock(mLock); EnsureSizeInitialized(); return (aOffset < mSize) ? aOffset : -1; } - virtual int64_t GetCachedDataEnd(int64_t aOffset) { + virtual int64_t GetCachedDataEnd(int64_t aOffset) MOZ_OVERRIDE { MutexAutoLock lock(mLock); EnsureSizeInitialized(); return std::max(aOffset, mSize); } - virtual bool IsDataCachedToEndOfResource(int64_t aOffset) { return true; } - virtual bool IsSuspendedByCache() { return true; } - virtual bool IsSuspended() { return true; } + virtual bool IsDataCachedToEndOfResource(int64_t aOffset) MOZ_OVERRIDE { return true; } + virtual bool IsSuspendedByCache() MOZ_OVERRIDE { return true; } + virtual bool IsSuspended() MOZ_OVERRIDE { return true; } virtual bool IsTransportSeekable() MOZ_OVERRIDE { return true; } - nsresult GetCachedRanges(nsTArray& aRanges); + nsresult GetCachedRanges(nsTArray& aRanges) MOZ_OVERRIDE; virtual size_t SizeOfExcludingThis( MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index b1d2a3051c26..f867e8828b10 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -430,7 +430,7 @@ private: class BaseMediaResource : public MediaResource { public: - virtual nsIURI* URI() const { return mURI; } + virtual nsIURI* URI() const MOZ_OVERRIDE { return mURI; } virtual void SetLoadInBackground(bool aLoadInBackground) MOZ_OVERRIDE; virtual size_t SizeOfExcludingThis( @@ -564,15 +564,15 @@ public: virtual void NotifyLastByteRange() MOZ_OVERRIDE; // Main thread - virtual nsresult Open(nsIStreamListener** aStreamListener); - virtual nsresult Close(); - virtual void Suspend(bool aCloseImmediately); - virtual void Resume(); - virtual already_AddRefed GetCurrentPrincipal(); + virtual nsresult Open(nsIStreamListener** aStreamListener) MOZ_OVERRIDE; + virtual nsresult Close() MOZ_OVERRIDE; + virtual void Suspend(bool aCloseImmediately) MOZ_OVERRIDE; + virtual void Resume() MOZ_OVERRIDE; + virtual already_AddRefed GetCurrentPrincipal() MOZ_OVERRIDE; // Return true if the stream has been closed. bool IsClosed() const { return mCacheStream.IsClosed(); } - virtual bool CanClone(); - virtual already_AddRefed CloneData(MediaDecoder* aDecoder); + virtual bool CanClone() MOZ_OVERRIDE; + virtual already_AddRefed CloneData(MediaDecoder* aDecoder) MOZ_OVERRIDE; // Set statistics to be recorded to the object passed in. If not called, // |ChannelMediaResource| will create it's own statistics objects in |Open|. void RecordStatisticsTo(MediaChannelStatistics *aStatistics) MOZ_OVERRIDE { @@ -582,28 +582,28 @@ public: mChannelStatistics = aStatistics; } } - virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount); - virtual void EnsureCacheUpToDate(); + virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) MOZ_OVERRIDE; + virtual void EnsureCacheUpToDate() MOZ_OVERRIDE; // Other thread - virtual void SetReadMode(MediaCacheStream::ReadMode aMode); - virtual void SetPlaybackRate(uint32_t aBytesPerSecond); - virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes); + virtual void SetReadMode(MediaCacheStream::ReadMode aMode) MOZ_OVERRIDE; + virtual void SetPlaybackRate(uint32_t aBytesPerSecond) MOZ_OVERRIDE; + virtual nsresult Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes) MOZ_OVERRIDE; virtual nsresult ReadAt(int64_t offset, char* aBuffer, - uint32_t aCount, uint32_t* aBytes); - virtual nsresult Seek(int32_t aWhence, int64_t aOffset); - virtual int64_t Tell(); + uint32_t aCount, uint32_t* aBytes) MOZ_OVERRIDE; + virtual nsresult Seek(int32_t aWhence, int64_t aOffset) MOZ_OVERRIDE; + virtual int64_t Tell() MOZ_OVERRIDE; // Any thread - virtual void Pin(); - virtual void Unpin(); - virtual double GetDownloadRate(bool* aIsReliable); - virtual int64_t GetLength(); - virtual int64_t GetNextCachedData(int64_t aOffset); - virtual int64_t GetCachedDataEnd(int64_t aOffset); - virtual bool IsDataCachedToEndOfResource(int64_t aOffset); - virtual bool IsSuspendedByCache(); - virtual bool IsSuspended(); + virtual void Pin() MOZ_OVERRIDE; + virtual void Unpin() MOZ_OVERRIDE; + virtual double GetDownloadRate(bool* aIsReliable) MOZ_OVERRIDE; + virtual int64_t GetLength() MOZ_OVERRIDE; + virtual int64_t GetNextCachedData(int64_t aOffset) MOZ_OVERRIDE; + virtual int64_t GetCachedDataEnd(int64_t aOffset) MOZ_OVERRIDE; + virtual bool IsDataCachedToEndOfResource(int64_t aOffset) MOZ_OVERRIDE; + virtual bool IsSuspendedByCache() MOZ_OVERRIDE; + virtual bool IsSuspended() MOZ_OVERRIDE; virtual bool IsTransportSeekable() MOZ_OVERRIDE; virtual size_t SizeOfExcludingThis( @@ -645,7 +645,7 @@ public: }; friend class Listener; - nsresult GetCachedRanges(nsTArray& aRanges); + virtual nsresult GetCachedRanges(nsTArray& aRanges) MOZ_OVERRIDE; protected: // These are called on the main thread by Listener. diff --git a/dom/media/MediaSegment.h b/dom/media/MediaSegment.h index db1977fa86e8..5c656ceecc6a 100644 --- a/dom/media/MediaSegment.h +++ b/dom/media/MediaSegment.h @@ -143,11 +143,11 @@ protected: */ template class MediaSegmentBase : public MediaSegment { public: - virtual MediaSegment* CreateEmptyClone() const + virtual MediaSegment* CreateEmptyClone() const MOZ_OVERRIDE { return new C(); } - virtual void AppendFrom(MediaSegment* aSource) + virtual void AppendFrom(MediaSegment* aSource) MOZ_OVERRIDE { NS_ASSERTION(aSource->GetType() == C::StaticType(), "Wrong type"); AppendFromInternal(static_cast(aSource)); @@ -157,7 +157,7 @@ public: AppendFromInternal(aSource); } virtual void AppendSlice(const MediaSegment& aSource, - StreamTime aStart, StreamTime aEnd) + StreamTime aStart, StreamTime aEnd) MOZ_OVERRIDE { NS_ASSERTION(aSource.GetType() == C::StaticType(), "Wrong type"); AppendSliceInternal(static_cast(aSource), aStart, aEnd); @@ -170,7 +170,7 @@ public: * Replace the first aDuration ticks with null media data, because the data * will not be required again. */ - virtual void ForgetUpTo(StreamTime aDuration) + virtual void ForgetUpTo(StreamTime aDuration) MOZ_OVERRIDE { if (mChunks.IsEmpty() || aDuration <= 0) { return; @@ -188,7 +188,7 @@ public: mChunks.InsertElementAt(0)->SetNull(aDuration); mDuration += aDuration; } - virtual void FlushAfter(StreamTime aNewEnd) + virtual void FlushAfter(StreamTime aNewEnd) MOZ_OVERRIDE { if (mChunks.IsEmpty()) { return; @@ -211,7 +211,7 @@ public: } mDuration = aNewEnd; } - virtual void InsertNullDataAtStart(StreamTime aDuration) + virtual void InsertNullDataAtStart(StreamTime aDuration) MOZ_OVERRIDE { if (aDuration <= 0) { return; @@ -226,7 +226,7 @@ public: #endif mDuration += aDuration; } - virtual void AppendNullData(StreamTime aDuration) + virtual void AppendNullData(StreamTime aDuration) MOZ_OVERRIDE { if (aDuration <= 0) { return; @@ -238,7 +238,7 @@ public: } mDuration += aDuration; } - virtual void ReplaceWithDisabled() + virtual void ReplaceWithDisabled() MOZ_OVERRIDE { if (GetType() != AUDIO) { MOZ_CRASH("Disabling unknown segment type"); @@ -247,7 +247,7 @@ public: Clear(); AppendNullData(duration); } - virtual void Clear() + virtual void Clear() MOZ_OVERRIDE { mDuration = 0; mChunks.Clear(); diff --git a/dom/media/MediaStreamGraph.h b/dom/media/MediaStreamGraph.h index e38e11379e36..958dd3e40cc5 100644 --- a/dom/media/MediaStreamGraph.h +++ b/dom/media/MediaStreamGraph.h @@ -693,10 +693,10 @@ public: mNeedsMixing(false) {} - virtual SourceMediaStream* AsSourceStream() { return this; } + virtual SourceMediaStream* AsSourceStream() MOZ_OVERRIDE { return this; } // Media graph thread only - virtual void DestroyImpl(); + virtual void DestroyImpl() MOZ_OVERRIDE; // Call these on any thread. /** @@ -1069,7 +1069,7 @@ public: */ void SetAutofinish(bool aAutofinish); - virtual ProcessedMediaStream* AsProcessedStream() { return this; } + virtual ProcessedMediaStream* AsProcessedStream() MOZ_OVERRIDE { return this; } friend class MediaStreamGraphImpl; @@ -1087,7 +1087,7 @@ public: { return mInputs.Length(); } - virtual void DestroyImpl(); + virtual void DestroyImpl() MOZ_OVERRIDE; /** * This gets called after we've computed the blocking states for all * streams (mBlocked is up to date up to mStateComputedTime). diff --git a/dom/media/SharedThreadPool.h b/dom/media/SharedThreadPool.h index d02eed33059c..eb595626654f 100644 --- a/dom/media/SharedThreadPool.h +++ b/dom/media/SharedThreadPool.h @@ -43,9 +43,9 @@ public: // the shared pool singleton when the refcount drops to 0. The addref/release // are implemented using locking, so it's not recommended that you use them // in a tight loop. - NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr); - NS_IMETHOD_(MozExternalRefCountType) AddRef(void); - NS_IMETHOD_(MozExternalRefCountType) Release(void); + NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE; + NS_IMETHOD_(MozExternalRefCountType) AddRef(void) MOZ_OVERRIDE; + NS_IMETHOD_(MozExternalRefCountType) Release(void) MOZ_OVERRIDE; // Forward behaviour to wrapped thread pool implementation. NS_FORWARD_SAFE_NSITHREADPOOL(mPool); diff --git a/dom/media/VideoStreamTrack.h b/dom/media/VideoStreamTrack.h index 9ef367f3bf57..99426fb26213 100644 --- a/dom/media/VideoStreamTrack.h +++ b/dom/media/VideoStreamTrack.h @@ -19,10 +19,10 @@ public: virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE; - virtual VideoStreamTrack* AsVideoStreamTrack() { return this; } + virtual VideoStreamTrack* AsVideoStreamTrack() MOZ_OVERRIDE { return this; } // WebIDL - virtual void GetKind(nsAString& aKind) { aKind.AssignLiteral("video"); } + virtual void GetKind(nsAString& aKind) MOZ_OVERRIDE { aKind.AssignLiteral("video"); } }; } diff --git a/dom/media/encoder/OpusTrackEncoder.h b/dom/media/encoder/OpusTrackEncoder.h index b321703ddf2c..808ed75c4204 100644 --- a/dom/media/encoder/OpusTrackEncoder.h +++ b/dom/media/encoder/OpusTrackEncoder.h @@ -37,7 +37,7 @@ public: nsresult GetEncodedTrack(EncodedFrameContainer& aData) MOZ_OVERRIDE; protected: - int GetPacketDuration(); + int GetPacketDuration() MOZ_OVERRIDE; nsresult Init(int aChannels, int aSamplingRate) MOZ_OVERRIDE; diff --git a/dom/media/fmp4/MP4Decoder.h b/dom/media/fmp4/MP4Decoder.h index 0cffec1f60c3..a4328111883f 100644 --- a/dom/media/fmp4/MP4Decoder.h +++ b/dom/media/fmp4/MP4Decoder.h @@ -15,14 +15,14 @@ class MP4Decoder : public MediaDecoder { public: - virtual MediaDecoder* Clone() { + virtual MediaDecoder* Clone() MOZ_OVERRIDE { if (!IsEnabled()) { return nullptr; } return new MP4Decoder(); } - virtual MediaDecoderStateMachine* CreateStateMachine(); + virtual MediaDecoderStateMachine* CreateStateMachine() MOZ_OVERRIDE; #ifdef MOZ_EME virtual nsresult SetCDMProxy(CDMProxy* aProxy) MOZ_OVERRIDE; diff --git a/dom/media/gmp/GMPDecryptorChild.h b/dom/media/gmp/GMPDecryptorChild.h index cd098674f00b..64d3379d7fb1 100644 --- a/dom/media/gmp/GMPDecryptorChild.h +++ b/dom/media/gmp/GMPDecryptorChild.h @@ -111,7 +111,7 @@ private: virtual bool RecvDecrypt(const uint32_t& aId, const nsTArray& aBuffer, - const GMPDecryptionData& aMetadata); + const GMPDecryptionData& aMetadata) MOZ_OVERRIDE; // Resolve/reject promise on completion. virtual bool RecvSetServerCertificate(const uint32_t& aPromiseId, diff --git a/dom/media/mediasource/MediaSourceReader.h b/dom/media/mediasource/MediaSourceReader.h index 9e5a64b0cc90..a5e757a744a7 100644 --- a/dom/media/mediasource/MediaSourceReader.h +++ b/dom/media/mediasource/MediaSourceReader.h @@ -88,7 +88,7 @@ public: // through. bool UseBufferingHeuristics() MOZ_OVERRIDE { return false; } - bool IsMediaSeekable() { return true; } + bool IsMediaSeekable() MOZ_OVERRIDE { return true; } nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) MOZ_OVERRIDE; void ReadUpdatedMetadata(MediaInfo* aInfo) MOZ_OVERRIDE; @@ -108,7 +108,7 @@ public: nsRefPtr Shutdown() MOZ_OVERRIDE; - virtual void BreakCycles(); + virtual void BreakCycles() MOZ_OVERRIDE; bool IsShutdown() { diff --git a/dom/media/mediasource/SourceBufferDecoder.h b/dom/media/mediasource/SourceBufferDecoder.h index 0b9d859f4716..6931298ff522 100644 --- a/dom/media/mediasource/SourceBufferDecoder.h +++ b/dom/media/mediasource/SourceBufferDecoder.h @@ -101,7 +101,7 @@ public: } #ifdef MOZ_EME - virtual nsresult SetCDMProxy(CDMProxy* aProxy) + virtual nsresult SetCDMProxy(CDMProxy* aProxy) MOZ_OVERRIDE { MOZ_ASSERT(NS_IsMainThread()); ReentrantMonitorAutoEnter mon(GetReentrantMonitor()); diff --git a/dom/media/ogg/OggReader.h b/dom/media/ogg/OggReader.h index d318ac2d5c57..b50a8938774c 100644 --- a/dom/media/ogg/OggReader.h +++ b/dom/media/ogg/OggReader.h @@ -54,30 +54,30 @@ protected: ~OggReader(); public: - virtual nsresult Init(MediaDecoderReader* aCloneDonor); - virtual nsresult ResetDecode(); - virtual bool DecodeAudioData(); + virtual nsresult Init(MediaDecoderReader* aCloneDonor) MOZ_OVERRIDE; + virtual nsresult ResetDecode() MOZ_OVERRIDE; + virtual bool DecodeAudioData() MOZ_OVERRIDE; // If the Theora granulepos has not been captured, it may read several packets // until one with a granulepos has been captured, to ensure that all packets // read have valid time info. virtual bool DecodeVideoFrame(bool &aKeyframeSkip, - int64_t aTimeThreshold); + int64_t aTimeThreshold) MOZ_OVERRIDE; - virtual bool HasAudio() { + virtual bool HasAudio() MOZ_OVERRIDE { return (mVorbisState != 0 && mVorbisState->mActive) || (mOpusState != 0 && mOpusState->mActive); } - virtual bool HasVideo() { + virtual bool HasVideo() MOZ_OVERRIDE { return mTheoraState != 0 && mTheoraState->mActive; } virtual nsresult ReadMetadata(MediaInfo* aInfo, - MetadataTags** aTags); + MetadataTags** aTags) MOZ_OVERRIDE; virtual nsRefPtr Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime) MOZ_OVERRIDE; - virtual nsresult GetBuffered(dom::TimeRanges* aBuffered); + virtual nsresult GetBuffered(dom::TimeRanges* aBuffered) MOZ_OVERRIDE; virtual bool IsMediaSeekable() MOZ_OVERRIDE; diff --git a/dom/media/raw/RawReader.h b/dom/media/raw/RawReader.h index 935c48fee72e..cc19cd1fe1e8 100644 --- a/dom/media/raw/RawReader.h +++ b/dom/media/raw/RawReader.h @@ -20,29 +20,29 @@ protected: ~RawReader(); public: - virtual nsresult Init(MediaDecoderReader* aCloneDonor); - virtual nsresult ResetDecode(); - virtual bool DecodeAudioData(); + virtual nsresult Init(MediaDecoderReader* aCloneDonor) MOZ_OVERRIDE; + virtual nsresult ResetDecode() MOZ_OVERRIDE; + virtual bool DecodeAudioData() MOZ_OVERRIDE; virtual bool DecodeVideoFrame(bool &aKeyframeSkip, - int64_t aTimeThreshold); + int64_t aTimeThreshold) MOZ_OVERRIDE; - virtual bool HasAudio() + virtual bool HasAudio() MOZ_OVERRIDE { return false; } - virtual bool HasVideo() + virtual bool HasVideo() MOZ_OVERRIDE { return true; } virtual nsresult ReadMetadata(MediaInfo* aInfo, - MetadataTags** aTags); + MetadataTags** aTags) MOZ_OVERRIDE; virtual nsRefPtr Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime) MOZ_OVERRIDE; - virtual nsresult GetBuffered(dom::TimeRanges* aBuffered); + virtual nsresult GetBuffered(dom::TimeRanges* aBuffered) MOZ_OVERRIDE; virtual bool IsMediaSeekable() MOZ_OVERRIDE; diff --git a/dom/media/wave/WaveReader.h b/dom/media/wave/WaveReader.h index 037fc73df4c3..690b2eec1b33 100644 --- a/dom/media/wave/WaveReader.h +++ b/dom/media/wave/WaveReader.h @@ -26,32 +26,27 @@ protected: ~WaveReader(); public: - virtual nsresult Init(MediaDecoderReader* aCloneDonor); - virtual bool DecodeAudioData(); + virtual nsresult Init(MediaDecoderReader* aCloneDonor) MOZ_OVERRIDE; + virtual bool DecodeAudioData() MOZ_OVERRIDE; virtual bool DecodeVideoFrame(bool &aKeyframeSkip, - int64_t aTimeThreshold); + int64_t aTimeThreshold) MOZ_OVERRIDE; - virtual bool HasAudio() + virtual bool HasAudio() MOZ_OVERRIDE { return true; } - virtual bool HasVideo() + virtual bool HasVideo() MOZ_OVERRIDE { return false; } virtual nsresult ReadMetadata(MediaInfo* aInfo, - MetadataTags** aTags); + MetadataTags** aTags) MOZ_OVERRIDE; virtual nsRefPtr Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime) MOZ_OVERRIDE; - virtual nsresult GetBuffered(dom::TimeRanges* aBuffered); - - // To seek in a buffered range, we just have to seek the stream. - virtual bool IsSeekableInBufferedRanges() { - return true; - } + virtual nsresult GetBuffered(dom::TimeRanges* aBuffered) MOZ_OVERRIDE; virtual bool IsMediaSeekable() MOZ_OVERRIDE; diff --git a/dom/media/webm/WebMReader.h b/dom/media/webm/WebMReader.h index e636595f26d8..a14dce9f3244 100644 --- a/dom/media/webm/WebMReader.h +++ b/dom/media/webm/WebMReader.h @@ -134,34 +134,34 @@ protected: public: virtual nsRefPtr Shutdown() MOZ_OVERRIDE; - virtual nsresult Init(MediaDecoderReader* aCloneDonor); - virtual nsresult ResetDecode(); - virtual bool DecodeAudioData(); + virtual nsresult Init(MediaDecoderReader* aCloneDonor) MOZ_OVERRIDE; + virtual nsresult ResetDecode() MOZ_OVERRIDE; + virtual bool DecodeAudioData() MOZ_OVERRIDE; virtual bool DecodeVideoFrame(bool &aKeyframeSkip, - int64_t aTimeThreshold); + int64_t aTimeThreshold) MOZ_OVERRIDE; - virtual bool HasAudio() + virtual bool HasAudio() MOZ_OVERRIDE { NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread."); return mHasAudio; } - virtual bool HasVideo() + virtual bool HasVideo() MOZ_OVERRIDE { NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread."); return mHasVideo; } virtual nsresult ReadMetadata(MediaInfo* aInfo, - MetadataTags** aTags); + MetadataTags** aTags) MOZ_OVERRIDE; virtual nsRefPtr Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime) MOZ_OVERRIDE; - virtual nsresult GetBuffered(dom::TimeRanges* aBuffered); + virtual nsresult GetBuffered(dom::TimeRanges* aBuffered) MOZ_OVERRIDE; virtual void NotifyDataArrived(const char* aBuffer, uint32_t aLength, - int64_t aOffset); - virtual int64_t GetEvictionOffset(double aTime); + int64_t aOffset) MOZ_OVERRIDE; + virtual int64_t GetEvictionOffset(double aTime) MOZ_OVERRIDE; virtual bool IsMediaSeekable() MOZ_OVERRIDE; diff --git a/dom/media/webrtc/MediaEngineCameraVideoSource.h b/dom/media/webrtc/MediaEngineCameraVideoSource.h index d2aec9576bbb..ce493960a4ca 100644 --- a/dom/media/webrtc/MediaEngineCameraVideoSource.h +++ b/dom/media/webrtc/MediaEngineCameraVideoSource.h @@ -49,7 +49,7 @@ public: return false; } - virtual const MediaSourceType GetMediaSource() { + virtual const MediaSourceType GetMediaSource() MOZ_OVERRIDE { return MediaSourceType::Camera; } diff --git a/dom/media/webrtc/MediaEngineDefault.h b/dom/media/webrtc/MediaEngineDefault.h index efb6b05eb784..064423439abf 100644 --- a/dom/media/webrtc/MediaEngineDefault.h +++ b/dom/media/webrtc/MediaEngineDefault.h @@ -37,38 +37,38 @@ class MediaEngineDefaultVideoSource : public nsITimerCallback, public: MediaEngineDefaultVideoSource(); - virtual void GetName(nsAString&); - virtual void GetUUID(nsAString&); + virtual void GetName(nsAString&) MOZ_OVERRIDE; + virtual void GetUUID(nsAString&) MOZ_OVERRIDE; virtual nsresult Allocate(const VideoTrackConstraintsN &aConstraints, - const MediaEnginePrefs &aPrefs); - virtual nsresult Deallocate(); - virtual nsresult Start(SourceMediaStream*, TrackID); - virtual nsresult Stop(SourceMediaStream*, TrackID); - virtual void SetDirectListeners(bool aHasDirectListeners) {}; + const MediaEnginePrefs &aPrefs) MOZ_OVERRIDE; + virtual nsresult Deallocate() MOZ_OVERRIDE; + virtual nsresult Start(SourceMediaStream*, TrackID) MOZ_OVERRIDE; + virtual nsresult Stop(SourceMediaStream*, TrackID) MOZ_OVERRIDE; + virtual void SetDirectListeners(bool aHasDirectListeners) MOZ_OVERRIDE {}; virtual nsresult Config(bool aEchoOn, uint32_t aEcho, bool aAgcOn, uint32_t aAGC, bool aNoiseOn, uint32_t aNoise, - int32_t aPlayoutDelay) { return NS_OK; }; + int32_t aPlayoutDelay) MOZ_OVERRIDE { return NS_OK; }; virtual void NotifyPull(MediaStreamGraph* aGraph, SourceMediaStream *aSource, TrackID aId, StreamTime aDesiredTime) MOZ_OVERRIDE; virtual bool SatisfiesConstraintSets( - const nsTArray& aConstraintSets) + const nsTArray& aConstraintSets) MOZ_OVERRIDE { return true; } - virtual bool IsFake() { + virtual bool IsFake() MOZ_OVERRIDE { return true; } - virtual const MediaSourceType GetMediaSource() { + virtual const MediaSourceType GetMediaSource() MOZ_OVERRIDE { return MediaSourceType::Camera; } - virtual nsresult TakePhoto(PhotoCallback* aCallback) + virtual nsresult TakePhoto(PhotoCallback* aCallback) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; } @@ -105,33 +105,33 @@ class MediaEngineDefaultAudioSource : public nsITimerCallback, public: MediaEngineDefaultAudioSource(); - virtual void GetName(nsAString&); - virtual void GetUUID(nsAString&); + virtual void GetName(nsAString&) MOZ_OVERRIDE; + virtual void GetUUID(nsAString&) MOZ_OVERRIDE; virtual nsresult Allocate(const AudioTrackConstraintsN &aConstraints, - const MediaEnginePrefs &aPrefs); - virtual nsresult Deallocate(); - virtual nsresult Start(SourceMediaStream*, TrackID); - virtual nsresult Stop(SourceMediaStream*, TrackID); - virtual void SetDirectListeners(bool aHasDirectListeners) {}; + const MediaEnginePrefs &aPrefs) MOZ_OVERRIDE; + virtual nsresult Deallocate() MOZ_OVERRIDE; + virtual nsresult Start(SourceMediaStream*, TrackID) MOZ_OVERRIDE; + virtual nsresult Stop(SourceMediaStream*, TrackID) MOZ_OVERRIDE; + virtual void SetDirectListeners(bool aHasDirectListeners) MOZ_OVERRIDE {}; virtual nsresult Config(bool aEchoOn, uint32_t aEcho, bool aAgcOn, uint32_t aAGC, bool aNoiseOn, uint32_t aNoise, - int32_t aPlayoutDelay) { return NS_OK; }; + int32_t aPlayoutDelay) MOZ_OVERRIDE { return NS_OK; }; virtual void NotifyPull(MediaStreamGraph* aGraph, SourceMediaStream *aSource, TrackID aId, StreamTime aDesiredTime) MOZ_OVERRIDE {} - virtual bool IsFake() { + virtual bool IsFake() MOZ_OVERRIDE { return true; } - virtual const MediaSourceType GetMediaSource() { + virtual const MediaSourceType GetMediaSource() MOZ_OVERRIDE { return MediaSourceType::Microphone; } - virtual nsresult TakePhoto(PhotoCallback* aCallback) + virtual nsresult TakePhoto(PhotoCallback* aCallback) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/dom/media/webrtc/MediaEngineWebRTC.h b/dom/media/webrtc/MediaEngineWebRTC.h index 7ebb9d99992b..5d0958089b6b 100644 --- a/dom/media/webrtc/MediaEngineWebRTC.h +++ b/dom/media/webrtc/MediaEngineWebRTC.h @@ -65,18 +65,18 @@ public: NS_DECL_THREADSAFE_ISUPPORTS // ViEExternalRenderer. - virtual int FrameSizeChange(unsigned int w, unsigned int h, unsigned int streams); + virtual int FrameSizeChange(unsigned int w, unsigned int h, unsigned int streams) MOZ_OVERRIDE; virtual int DeliverFrame(unsigned char* buffer, int size, uint32_t time_stamp, int64_t render_time, - void *handle); + void *handle) MOZ_OVERRIDE; /** * Does DeliverFrame() support a null buffer and non-null handle * (video texture)? * XXX Investigate! Especially for Android/B2G */ - virtual bool IsTextureSupported() { return false; } + virtual bool IsTextureSupported() MOZ_OVERRIDE { return false; } MediaEngineWebRTCVideoSource(webrtc::VideoEngine* aVideoEnginePtr, int aIndex, MediaSourceType aMediaSource = MediaSourceType::Camera) @@ -90,19 +90,19 @@ public: } virtual nsresult Allocate(const VideoTrackConstraintsN& aConstraints, - const MediaEnginePrefs& aPrefs); - virtual nsresult Deallocate(); - virtual nsresult Start(SourceMediaStream*, TrackID); - virtual nsresult Stop(SourceMediaStream*, TrackID); + const MediaEnginePrefs& aPrefs) MOZ_OVERRIDE; + virtual nsresult Deallocate() MOZ_OVERRIDE; + virtual nsresult Start(SourceMediaStream*, TrackID) MOZ_OVERRIDE; + virtual nsresult Stop(SourceMediaStream*, TrackID) MOZ_OVERRIDE; virtual void NotifyPull(MediaStreamGraph* aGraph, SourceMediaStream* aSource, TrackID aId, StreamTime aDesiredTime) MOZ_OVERRIDE; - virtual const MediaSourceType GetMediaSource() { + virtual const MediaSourceType GetMediaSource() MOZ_OVERRIDE { return mMediaSource; } - virtual nsresult TakePhoto(PhotoCallback* aCallback) + virtual nsresult TakePhoto(PhotoCallback* aCallback) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; } @@ -110,7 +110,7 @@ public: void Refresh(int aIndex); bool SatisfiesConstraintSets( - const nsTArray& aConstraintSets); + const nsTArray& aConstraintSets) MOZ_OVERRIDE; protected: ~MediaEngineWebRTCVideoSource() { Shutdown(); } @@ -162,34 +162,34 @@ public: Init(); } - virtual void GetName(nsAString& aName); - virtual void GetUUID(nsAString& aUUID); + virtual void GetName(nsAString& aName) MOZ_OVERRIDE; + virtual void GetUUID(nsAString& aUUID) MOZ_OVERRIDE; virtual nsresult Allocate(const AudioTrackConstraintsN& aConstraints, - const MediaEnginePrefs& aPrefs); - virtual nsresult Deallocate(); - virtual nsresult Start(SourceMediaStream* aStream, TrackID aID); - virtual nsresult Stop(SourceMediaStream* aSource, TrackID aID); - virtual void SetDirectListeners(bool aHasDirectListeners) {}; + const MediaEnginePrefs& aPrefs) MOZ_OVERRIDE; + virtual nsresult Deallocate() MOZ_OVERRIDE; + virtual nsresult Start(SourceMediaStream* aStream, TrackID aID) MOZ_OVERRIDE; + virtual nsresult Stop(SourceMediaStream* aSource, TrackID aID) MOZ_OVERRIDE; + virtual void SetDirectListeners(bool aHasDirectListeners) MOZ_OVERRIDE {}; virtual nsresult Config(bool aEchoOn, uint32_t aEcho, bool aAgcOn, uint32_t aAGC, bool aNoiseOn, uint32_t aNoise, - int32_t aPlayoutDelay); + int32_t aPlayoutDelay) MOZ_OVERRIDE; virtual void NotifyPull(MediaStreamGraph* aGraph, SourceMediaStream* aSource, TrackID aId, StreamTime aDesiredTime) MOZ_OVERRIDE; - virtual bool IsFake() { + virtual bool IsFake() MOZ_OVERRIDE { return false; } - virtual const MediaSourceType GetMediaSource() { + virtual const MediaSourceType GetMediaSource() MOZ_OVERRIDE { return MediaSourceType::Microphone; } - virtual nsresult TakePhoto(PhotoCallback* aCallback) + virtual nsresult TakePhoto(PhotoCallback* aCallback) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; } @@ -197,7 +197,7 @@ public: // VoEMediaProcess. void Process(int channel, webrtc::ProcessingTypes type, int16_t audio10ms[], int length, - int samplingFreq, bool isStereo); + int samplingFreq, bool isStereo) MOZ_OVERRIDE; NS_DECL_THREADSAFE_ISUPPORTS