Bug 1168674: [ogg] P7. Properly mark overridden methods. r?gerald
MozReview-Commit-ID: 5aICN1aQwgC
--- a/dom/media/ogg/OggCodecState.h
+++ b/dom/media/ogg/OggCodecState.h
@@ -246,30 +246,30 @@ protected:
uint32_t aLength);
};
class VorbisState : public OggCodecState {
public:
explicit VorbisState(ogg_page* aBosPage);
virtual ~VorbisState();
- CodecType GetType() { return TYPE_VORBIS; }
- bool DecodeHeader(ogg_packet* aPacket);
- int64_t Time(int64_t granulepos);
- int64_t PacketDuration(ogg_packet* aPacket);
- bool Init();
- nsresult Reset();
- bool IsHeader(ogg_packet* aPacket);
- nsresult PageIn(ogg_page* aPage);
+ CodecType GetType() override { return TYPE_VORBIS; }
+ bool DecodeHeader(ogg_packet* aPacket) override;
+ int64_t Time(int64_t granulepos) override;
+ int64_t PacketDuration(ogg_packet* aPacket) override;
+ bool Init() override;
+ nsresult Reset() override;
+ bool IsHeader(ogg_packet* aPacket) override;
+ nsresult PageIn(ogg_page* aPage) override;
// Return a hash table with tag metadata.
- MetadataTags* GetTags();
+ MetadataTags* GetTags() override;
// Returns the end time that a granulepos represents.
- static int64_t Time(vorbis_info* aInfo, int64_t aGranulePos);
+ static int64_t Time(vorbis_info* aInfo, int64_t aGranulePos);
vorbis_info mInfo;
vorbis_comment mComment;
vorbis_dsp_state mDsp;
vorbis_block mBlock;
private:
@@ -320,25 +320,25 @@ int TheoraVersion(th_info* info,
unsigned char min,
unsigned char sub);
class TheoraState : public OggCodecState {
public:
explicit TheoraState(ogg_page* aBosPage);
virtual ~TheoraState();
- CodecType GetType() { return TYPE_THEORA; }
- bool DecodeHeader(ogg_packet* aPacket);
- int64_t Time(int64_t granulepos);
- int64_t StartTime(int64_t granulepos);
- int64_t PacketDuration(ogg_packet* aPacket);
- bool Init();
- bool IsHeader(ogg_packet* aPacket);
- bool IsKeyframe(ogg_packet* aPacket);
- nsresult PageIn(ogg_page* aPage);
+ CodecType GetType() override { return TYPE_THEORA; }
+ bool DecodeHeader(ogg_packet* aPacket) override;
+ int64_t Time(int64_t granulepos) override;
+ int64_t StartTime(int64_t granulepos) override;
+ int64_t PacketDuration(ogg_packet* aPacket) override;
+ bool Init() override;
+ bool IsHeader(ogg_packet* aPacket) override;
+ bool IsKeyframe(ogg_packet* aPacket) override;
+ nsresult PageIn(ogg_page* aPage) override;
// Returns the maximum number of microseconds which a keyframe can be offset
// from any given interframe.
int64_t MaxKeyframeOffset();
// Returns the end time that a granulepos represents.
static int64_t Time(th_info* aInfo, int64_t aGranulePos);
@@ -360,25 +360,25 @@ private:
};
class OpusState : public OggCodecState {
public:
explicit OpusState(ogg_page* aBosPage);
virtual ~OpusState();
- CodecType GetType() { return TYPE_OPUS; }
- bool DecodeHeader(ogg_packet* aPacket);
- int64_t Time(int64_t aGranulepos);
- int64_t PacketDuration(ogg_packet* aPacket);
- bool Init();
- nsresult Reset();
+ CodecType GetType() override { return TYPE_OPUS; }
+ bool DecodeHeader(ogg_packet* aPacket) override;
+ int64_t Time(int64_t aGranulepos) override;
+ int64_t PacketDuration(ogg_packet* aPacket) override;
+ bool Init() override;
+ nsresult Reset() override;
nsresult Reset(bool aStart);
- bool IsHeader(ogg_packet* aPacket);
- nsresult PageIn(ogg_page* aPage);
+ bool IsHeader(ogg_packet* aPacket) override;
+ nsresult PageIn(ogg_page* aPage) override;
// Returns the end time that a granulepos represents.
static int64_t Time(int aPreSkip, int64_t aGranulepos);
// Various fields from the Ogg Opus header.
int mRate; // Sample rate the decoder uses (always 48 kHz).
int mChannels; // Number of channels the stream encodes.
uint16_t mPreSkip; // Number of samples to strip after decoder reset.
@@ -392,17 +392,17 @@ public:
OpusMSDecoder* mDecoder;
int mSkip; // Number of samples left to trim before playback.
// Granule position (end sample) of the last decoded Opus packet. This is
// used to calculate the amount we should trim from the last packet.
int64_t mPrevPacketGranulepos;
// Construct and return a table of tags from the metadata header.
- MetadataTags* GetTags();
+ MetadataTags* GetTags() override;
private:
// Reconstructs the granulepos of Opus packets stored in the
// mUnstamped array. mUnstamped must be filled with consecutive packets from
// the stream, with the last packet having a known granulepos. Using this
// known granulepos, and the known frame numbers, we recover the granulepos
// of all frames in the array. This enables us to determine their timestamps.
@@ -443,21 +443,21 @@ typedef struct {
class SkeletonState : public OggCodecState {
public:
explicit SkeletonState(ogg_page* aBosPage);
~SkeletonState();
nsClassHashtable<nsUint32HashKey, MessageField> mMsgFieldStore;
- CodecType GetType() { return TYPE_SKELETON; }
- bool DecodeHeader(ogg_packet* aPacket);
- int64_t Time(int64_t granulepos) { return -1; }
- bool Init() { return true; }
- bool IsHeader(ogg_packet* aPacket) { return true; }
+ CodecType GetType() override { return TYPE_SKELETON; }
+ bool DecodeHeader(ogg_packet* aPacket) override;
+ int64_t Time(int64_t granulepos) override { return -1; }
+ bool Init() override { return true; }
+ bool IsHeader(ogg_packet* aPacket) override { return true; }
// Return true if the given time (in milliseconds) is within
// the presentation time defined in the skeleton track.
bool IsPresentable(int64_t aTime) { return aTime >= mPresentationTime; }
// Stores the offset of the page on which a keyframe starts,
// and its presentation time.
class nsKeyPoint {