mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1240411: P4. Clean up readers headers. r=cpearce
Remove redundant virtual keyword and add missing override if any.
This commit is contained in:
parent
da8d71f0b7
commit
c6b5313233
@ -17,15 +17,10 @@ class AndroidMediaDecoder : public MediaDecoder
|
||||
public:
|
||||
AndroidMediaDecoder(MediaDecoderOwner* aOwner, const nsACString& aType);
|
||||
|
||||
nsresult GetContentType(nsACString& aType) const {
|
||||
aType = mType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual MediaDecoder* Clone(MediaDecoderOwner* aOwner) {
|
||||
MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
return new AndroidMediaDecoder(aOwner, mType);
|
||||
}
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine();
|
||||
MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -42,18 +42,15 @@ public:
|
||||
AndroidMediaReader(AbstractMediaDecoder* aDecoder,
|
||||
const nsACString& aContentType);
|
||||
|
||||
virtual nsresult ResetDecode();
|
||||
nsresult ResetDecode() override;
|
||||
|
||||
virtual bool DecodeAudioData();
|
||||
virtual bool DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
int64_t aTimeThreshold);
|
||||
bool DecodeAudioData() override;
|
||||
bool DecodeVideoFrame(bool &aKeyframeSkip, int64_t aTimeThreshold) override;
|
||||
|
||||
virtual nsresult ReadMetadata(MediaInfo* aInfo,
|
||||
MetadataTags** aTags);
|
||||
virtual RefPtr<SeekPromise>
|
||||
Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override;
|
||||
RefPtr<SeekPromise> Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
|
||||
virtual RefPtr<ShutdownPromise> Shutdown() override;
|
||||
RefPtr<ShutdownPromise> Shutdown() override;
|
||||
|
||||
class ImageBufferCallback : public MPAPI::BufferCallback {
|
||||
typedef mozilla::layers::Image Image;
|
||||
|
@ -16,14 +16,14 @@ class MP4Decoder : public MediaDecoder
|
||||
public:
|
||||
explicit MP4Decoder(MediaDecoderOwner* aOwner);
|
||||
|
||||
virtual MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
if (!IsEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
return new MP4Decoder(aOwner);
|
||||
}
|
||||
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
|
||||
// Returns true if aMIMEType is a type that we think we can render with the
|
||||
// a MP4 platform decoder backend. If aCodecs is non emtpy, it is filled
|
||||
|
@ -34,21 +34,21 @@ public:
|
||||
UniquePtr<TrackInfo>&& aInfo,
|
||||
const nsTArray<mp4_demuxer::Index::Indice>& indices);
|
||||
|
||||
virtual UniquePtr<TrackInfo> GetInfo() const override;
|
||||
UniquePtr<TrackInfo> GetInfo() const override;
|
||||
|
||||
virtual RefPtr<SeekPromise> Seek(media::TimeUnit aTime) override;
|
||||
RefPtr<SeekPromise> Seek(media::TimeUnit aTime) override;
|
||||
|
||||
virtual RefPtr<SamplesPromise> GetSamples(int32_t aNumSamples = 1) override;
|
||||
RefPtr<SamplesPromise> GetSamples(int32_t aNumSamples = 1) override;
|
||||
|
||||
virtual void Reset() override;
|
||||
void Reset() override;
|
||||
|
||||
virtual nsresult GetNextRandomAccessPoint(media::TimeUnit* aTime) override;
|
||||
nsresult GetNextRandomAccessPoint(media::TimeUnit* aTime) override;
|
||||
|
||||
RefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(media::TimeUnit aTimeThreshold) override;
|
||||
|
||||
virtual media::TimeIntervals GetBuffered() override;
|
||||
media::TimeIntervals GetBuffered() override;
|
||||
|
||||
virtual void BreakCycles() override;
|
||||
void BreakCycles() override;
|
||||
|
||||
private:
|
||||
friend class MP4Demuxer;
|
||||
|
@ -27,22 +27,22 @@ class MP4Demuxer : public MediaDataDemuxer
|
||||
public:
|
||||
explicit MP4Demuxer(MediaResource* aResource);
|
||||
|
||||
virtual RefPtr<InitPromise> Init() override;
|
||||
RefPtr<InitPromise> Init() override;
|
||||
|
||||
virtual bool HasTrackType(TrackInfo::TrackType aType) const override;
|
||||
bool HasTrackType(TrackInfo::TrackType aType) const override;
|
||||
|
||||
virtual uint32_t GetNumberTracks(TrackInfo::TrackType aType) const override;
|
||||
uint32_t GetNumberTracks(TrackInfo::TrackType aType) const override;
|
||||
|
||||
virtual already_AddRefed<MediaTrackDemuxer> GetTrackDemuxer(TrackInfo::TrackType aType,
|
||||
uint32_t aTrackNumber) override;
|
||||
already_AddRefed<MediaTrackDemuxer> GetTrackDemuxer(TrackInfo::TrackType aType,
|
||||
uint32_t aTrackNumber) override;
|
||||
|
||||
virtual bool IsSeekable() const override;
|
||||
bool IsSeekable() const override;
|
||||
|
||||
virtual UniquePtr<EncryptionInfo> GetCrypto() override;
|
||||
UniquePtr<EncryptionInfo> GetCrypto() override;
|
||||
|
||||
virtual void NotifyDataArrived() override;
|
||||
void NotifyDataArrived() override;
|
||||
|
||||
virtual void NotifyDataRemoved() override;
|
||||
void NotifyDataRemoved() override;
|
||||
|
||||
private:
|
||||
friend class MP4TrackDemuxer;
|
||||
|
@ -24,11 +24,11 @@ public:
|
||||
explicit MP4Stream(MediaResource* aResource);
|
||||
virtual ~MP4Stream();
|
||||
bool BlockingReadIntoCache(int64_t aOffset, size_t aCount, Monitor* aToUnlock);
|
||||
virtual bool ReadAt(int64_t aOffset, void* aBuffer, size_t aCount,
|
||||
size_t* aBytesRead) override;
|
||||
virtual bool CachedReadAt(int64_t aOffset, void* aBuffer, size_t aCount,
|
||||
size_t* aBytesRead) override;
|
||||
virtual bool Length(int64_t* aSize) override;
|
||||
bool ReadAt(int64_t aOffset, void* aBuffer, size_t aCount,
|
||||
size_t* aBytesRead) override;
|
||||
bool CachedReadAt(int64_t aOffset, void* aBuffer, size_t aCount,
|
||||
size_t* aBytesRead) override;
|
||||
bool Length(int64_t* aSize) override;
|
||||
|
||||
struct ReadRecord {
|
||||
ReadRecord(int64_t aOffset, size_t aCount) : mOffset(aOffset), mCount(aCount) {}
|
||||
|
@ -19,13 +19,13 @@ public:
|
||||
, mShutdownBit(false)
|
||||
{}
|
||||
|
||||
virtual MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
if (!IsOggEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
return new OggDecoder(aOwner);
|
||||
}
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
|
||||
// For yucky legacy reasons, the ogg decoder needs to do a cross-thread read
|
||||
// to check for shutdown while it hogs its own task queue. We don't want to
|
||||
|
@ -50,21 +50,18 @@ protected:
|
||||
~OggReader();
|
||||
|
||||
public:
|
||||
virtual nsresult Init() override;
|
||||
virtual nsresult ResetDecode() override;
|
||||
virtual bool DecodeAudioData() override;
|
||||
nsresult Init() override;
|
||||
nsresult ResetDecode() override;
|
||||
bool DecodeAudioData() 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) override;
|
||||
bool DecodeVideoFrame(bool &aKeyframeSkip, int64_t aTimeThreshold) override;
|
||||
|
||||
virtual nsresult ReadMetadata(MediaInfo* aInfo,
|
||||
MetadataTags** aTags) override;
|
||||
virtual RefPtr<SeekPromise>
|
||||
Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
virtual media::TimeIntervals GetBuffered() override;
|
||||
nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override;
|
||||
RefPtr<SeekPromise> Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
media::TimeIntervals GetBuffered() override;
|
||||
|
||||
private:
|
||||
bool HasAudio() {
|
||||
|
@ -13,13 +13,13 @@ class RawDecoder : public MediaDecoder
|
||||
{
|
||||
public:
|
||||
explicit RawDecoder(MediaDecoderOwner* aOwner) : MediaDecoder(aOwner) {}
|
||||
virtual MediaDecoder* Clone(MediaDecoderOwner* aOwner) {
|
||||
MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
if (!IsRawEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
return new RawDecoder(aOwner);
|
||||
}
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine();
|
||||
MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -20,18 +20,17 @@ protected:
|
||||
~RawReader();
|
||||
|
||||
public:
|
||||
virtual nsresult ResetDecode() override;
|
||||
virtual bool DecodeAudioData() override;
|
||||
nsresult ResetDecode() override;
|
||||
bool DecodeAudioData() override;
|
||||
|
||||
virtual bool DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
int64_t aTimeThreshold) override;
|
||||
bool DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
int64_t aTimeThreshold) override;
|
||||
|
||||
virtual nsresult ReadMetadata(MediaInfo* aInfo,
|
||||
MetadataTags** aTags) override;
|
||||
virtual RefPtr<SeekPromise>
|
||||
Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
nsresult ReadMetadata(MediaInfo* aInfo,
|
||||
MetadataTags** aTags) override;
|
||||
RefPtr<SeekPromise> Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
|
||||
virtual media::TimeIntervals GetBuffered() override;
|
||||
media::TimeIntervals GetBuffered() override;
|
||||
|
||||
private:
|
||||
bool ReadFromResource(uint8_t *aBuf, uint32_t aLength);
|
||||
|
@ -25,13 +25,13 @@ class WaveDecoder : public MediaDecoder
|
||||
{
|
||||
public:
|
||||
explicit WaveDecoder(MediaDecoderOwner* aOwner) : MediaDecoder(aOwner) {}
|
||||
virtual MediaDecoder* Clone(MediaDecoderOwner* aOwner) {
|
||||
MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
if (!IsWaveEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
return new WaveDecoder(aOwner);
|
||||
}
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine();
|
||||
MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -22,16 +22,14 @@ protected:
|
||||
~WaveReader();
|
||||
|
||||
public:
|
||||
virtual bool DecodeAudioData() override;
|
||||
virtual bool DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
int64_t aTimeThreshold) override;
|
||||
bool DecodeAudioData() override;
|
||||
bool DecodeVideoFrame(bool &aKeyframeSkip,
|
||||
int64_t aTimeThreshold) override;
|
||||
|
||||
virtual nsresult ReadMetadata(MediaInfo* aInfo,
|
||||
MetadataTags** aTags) override;
|
||||
virtual RefPtr<SeekPromise>
|
||||
Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override;
|
||||
RefPtr<SeekPromise> Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
|
||||
virtual media::TimeIntervals GetBuffered() override;
|
||||
media::TimeIntervals GetBuffered() override;
|
||||
|
||||
private:
|
||||
bool ReadAll(char* aBuf, int64_t aSize, int64_t* aBytesRead = nullptr);
|
||||
|
@ -14,13 +14,13 @@ class WebMDecoder : public MediaDecoder
|
||||
{
|
||||
public:
|
||||
explicit WebMDecoder(MediaDecoderOwner* aOwner) : MediaDecoder(aOwner) {}
|
||||
virtual MediaDecoder* Clone(MediaDecoderOwner* aOwner) {
|
||||
MediaDecoder* Clone(MediaDecoderOwner* aOwner) override {
|
||||
if (!IsWebMEnabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
return new WebMDecoder(aOwner);
|
||||
}
|
||||
virtual MediaDecoderStateMachine* CreateStateMachine();
|
||||
MediaDecoderStateMachine* CreateStateMachine() override;
|
||||
|
||||
// Returns true if the WebM backend is preffed on.
|
||||
static bool IsEnabled();
|
||||
|
@ -108,10 +108,10 @@ public:
|
||||
nsresult Reset();
|
||||
|
||||
// Pushes a packet to the front of the audio packet queue.
|
||||
virtual void PushAudioPacket(NesteggPacketHolder* aItem);
|
||||
void PushAudioPacket(NesteggPacketHolder* aItem);
|
||||
|
||||
// Pushes a packet to the front of the video packet queue.
|
||||
virtual void PushVideoPacket(NesteggPacketHolder* aItem);
|
||||
void PushVideoPacket(NesteggPacketHolder* aItem);
|
||||
|
||||
// Public accessor for nestegg callbacks
|
||||
MediaResourceIndex* GetResource()
|
||||
@ -140,7 +140,7 @@ private:
|
||||
void NotifyDataRemoved() override;
|
||||
void EnsureUpToDateIndex();
|
||||
media::TimeIntervals GetBuffered();
|
||||
virtual nsresult SeekInternal(const media::TimeUnit& aTarget);
|
||||
nsresult SeekInternal(const media::TimeUnit& aTarget);
|
||||
|
||||
// Read a packet from the nestegg file. Returns nullptr if all packets for
|
||||
// the particular track have been read. Pass TrackInfo::kVideoTrack or
|
||||
|
Loading…
Reference in New Issue
Block a user