зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1204419: P3. Remove now unused MediaDecoderReader functions. r=cpearce
This commit is contained in:
Родитель
eb81f3580e
Коммит
82279827e6
|
@ -280,7 +280,6 @@ public:
|
|||
|
||||
// Notify the reader that data from the resource was evicted (MediaSource only)
|
||||
virtual void NotifyDataRemoved() {}
|
||||
virtual int64_t GetEvictionOffset(double aTime) { return -1; }
|
||||
|
||||
virtual MediaQueue<AudioData>& AudioQueue() { return mAudioQueue; }
|
||||
virtual MediaQueue<VideoData>& VideoQueue() { return mVideoQueue; }
|
||||
|
|
|
@ -1585,22 +1585,6 @@ MediaFormatReader::OnAudioSeekCompleted(media::TimeUnit aTime)
|
|||
mSeekPromise.Resolve(aTime.ToMicroseconds(), __func__);
|
||||
}
|
||||
|
||||
int64_t
|
||||
MediaFormatReader::GetEvictionOffset(double aTime)
|
||||
{
|
||||
int64_t audioOffset;
|
||||
int64_t videoOffset;
|
||||
if (NS_IsMainThread()) {
|
||||
audioOffset = HasAudio() ? mAudioTrackDemuxer->GetEvictionOffset(media::TimeUnit::FromSeconds(aTime)) : INT64_MAX;
|
||||
videoOffset = HasVideo() ? mVideoTrackDemuxer->GetEvictionOffset(media::TimeUnit::FromSeconds(aTime)) : INT64_MAX;
|
||||
} else {
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
audioOffset = HasAudio() ? mAudio.mTrackDemuxer->GetEvictionOffset(media::TimeUnit::FromSeconds(aTime)) : INT64_MAX;
|
||||
videoOffset = HasVideo() ? mVideo.mTrackDemuxer->GetEvictionOffset(media::TimeUnit::FromSeconds(aTime)) : INT64_MAX;
|
||||
}
|
||||
return std::min(audioOffset, videoOffset);
|
||||
}
|
||||
|
||||
media::TimeIntervals
|
||||
MediaFormatReader::GetBuffered()
|
||||
{
|
||||
|
|
|
@ -61,7 +61,6 @@ public:
|
|||
return mSeekable;
|
||||
}
|
||||
|
||||
int64_t GetEvictionOffset(double aTime) override;
|
||||
protected:
|
||||
void NotifyDataArrivedInternal(uint32_t aLength, int64_t aOffset) override;
|
||||
public:
|
||||
|
|
|
@ -849,16 +849,6 @@ void WebMReader::NotifyDataArrivedInternal(uint32_t aLength, int64_t aOffset)
|
|||
mBufferedState->NotifyDataArrived(bytes->Elements(), aLength, aOffset);
|
||||
}
|
||||
|
||||
int64_t WebMReader::GetEvictionOffset(double aTime)
|
||||
{
|
||||
int64_t offset;
|
||||
if (!mBufferedState->GetOffsetForTime(aTime * NS_PER_S, &offset)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
int WebMReader::GetVideoCodec()
|
||||
{
|
||||
return mVideoCodec;
|
||||
|
|
|
@ -98,7 +98,6 @@ public:
|
|||
Seek(int64_t aTime, int64_t aEndTime) override;
|
||||
|
||||
virtual media::TimeIntervals GetBuffered() override;
|
||||
virtual int64_t GetEvictionOffset(double aTime) override;
|
||||
|
||||
virtual bool IsMediaSeekable() override;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче