diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/bitstream_converter.cc | 8 | ||||
-rw-r--r-- | media/filters/bitstream_converter.h | 4 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.cc | 8 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.h | 4 | ||||
-rw-r--r-- | media/filters/ffmpeg_video_decoder.cc | 4 | ||||
-rw-r--r-- | media/filters/ffmpeg_video_decoder.h | 2 | ||||
-rw-r--r-- | media/filters/omx_video_decoder.cc | 4 | ||||
-rw-r--r-- | media/filters/omx_video_decoder.h | 2 | ||||
-rw-r--r-- | media/video/ffmpeg_video_decode_engine.cc | 8 | ||||
-rw-r--r-- | media/video/ffmpeg_video_decode_engine.h | 6 | ||||
-rw-r--r-- | media/video/omx_video_decode_engine.cc | 4 | ||||
-rw-r--r-- | media/video/omx_video_decode_engine.h | 2 |
12 files changed, 45 insertions, 11 deletions
diff --git a/media/filters/bitstream_converter.cc b/media/filters/bitstream_converter.cc index 45a19ab..a64f2a9 100644 --- a/media/filters/bitstream_converter.cc +++ b/media/filters/bitstream_converter.cc @@ -9,6 +9,14 @@ namespace media { +bool IdentityBitstreamConverter::Initialize() { + return true; +} + +bool IdentityBitstreamConverter::ConvertPacket(AVPacket* packet) { + return true; +} + FFmpegBitstreamConverter::FFmpegBitstreamConverter( const std::string& filter_name, AVCodecContext* stream_context) diff --git a/media/filters/bitstream_converter.h b/media/filters/bitstream_converter.h index 4f6a0d7..f19e3f2 100644 --- a/media/filters/bitstream_converter.h +++ b/media/filters/bitstream_converter.h @@ -41,8 +41,8 @@ class IdentityBitstreamConverter : public BitstreamConverter { IdentityBitstreamConverter() {} virtual ~IdentityBitstreamConverter() {} - virtual bool Initialize() { return true; } - virtual bool ConvertPacket(AVPacket* packet) { return true; } + virtual bool Initialize(); + virtual bool ConvertPacket(AVPacket* packet); private: DISALLOW_COPY_AND_ASSIGN(IdentityBitstreamConverter); diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index 3024050..7c4f763 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -149,6 +149,10 @@ void FFmpegDemuxerStream::Stop() { stopped_ = true; } +base::TimeDelta FFmpegDemuxerStream::duration() { + return duration_; +} + const MediaFormat& FFmpegDemuxerStream::media_format() { return media_format_; } @@ -219,6 +223,10 @@ void FFmpegDemuxerStream::EnableBitstreamConverter() { } } +AVStream* FFmpegDemuxerStream::GetAVStream() { + return stream_; +} + // static base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp( const AVRational& time_base, int64 timestamp) { diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h index 023f4ad..8187b17 100644 --- a/media/filters/ffmpeg_demuxer.h +++ b/media/filters/ffmpeg_demuxer.h @@ -69,7 +69,7 @@ class FFmpegDemuxerStream : public DemuxerStream, public AVStreamProvider { virtual void Stop(); // Returns the duration of this stream. - virtual base::TimeDelta duration() { return duration_; } + virtual base::TimeDelta duration(); // DemuxerStream implementation. virtual const MediaFormat& media_format(); @@ -78,7 +78,7 @@ class FFmpegDemuxerStream : public DemuxerStream, public AVStreamProvider { virtual void EnableBitstreamConverter(); // AVStreamProvider implementation. - virtual AVStream* GetAVStream() { return stream_; } + virtual AVStream* GetAVStream(); diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc index 1629e78..b3c21b944 100644 --- a/media/filters/ffmpeg_video_decoder.cc +++ b/media/filters/ffmpeg_video_decoder.cc @@ -291,6 +291,10 @@ void FFmpegVideoDecoder::OnReadCompleteTask(scoped_refptr<Buffer> buffer) { decode_engine_->ConsumeVideoSample(buffer); } +const MediaFormat& FFmpegVideoDecoder::media_format() { + return media_format_; +} + void FFmpegVideoDecoder::ProduceVideoFrame( scoped_refptr<VideoFrame> video_frame) { if (MessageLoop::current() != message_loop()) { diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h index 550c592..617dfc1 100644 --- a/media/filters/ffmpeg_video_decoder.h +++ b/media/filters/ffmpeg_video_decoder.h @@ -37,7 +37,7 @@ class FFmpegVideoDecoder : public VideoDecoder, // Decoder implementation. virtual void Initialize(DemuxerStream* demuxer_stream, FilterCallback* callback); - virtual const MediaFormat& media_format() { return media_format_; } + virtual const MediaFormat& media_format(); virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> video_frame); virtual bool ProvidesBuffer(); diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc index d8fbf04..15ba4f1 100644 --- a/media/filters/omx_video_decoder.cc +++ b/media/filters/omx_video_decoder.cc @@ -220,6 +220,10 @@ bool OmxVideoDecoder::ProvidesBuffer() { return info_.provides_buffers; } +const MediaFormat& OmxVideoDecoder::media_format() { + return media_format_; +} + void OmxVideoDecoder::DemuxCompleteTask(Buffer* buffer) { // We simply delicate the buffer to the right message loop. scoped_refptr<Buffer> ref_buffer = buffer; diff --git a/media/filters/omx_video_decoder.h b/media/filters/omx_video_decoder.h index 1814c29..7eb8504 100644 --- a/media/filters/omx_video_decoder.h +++ b/media/filters/omx_video_decoder.h @@ -33,7 +33,7 @@ class OmxVideoDecoder : public VideoDecoder, virtual void Seek(base::TimeDelta time, FilterCallback* callback); virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); virtual bool ProvidesBuffer(); - virtual const MediaFormat& media_format() { return media_format_; } + virtual const MediaFormat& media_format(); private: // VideoDecodeEngine::EventHandler interface. diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc index a2009f4..f52cf16 100644 --- a/media/video/ffmpeg_video_decode_engine.cc +++ b/media/video/ffmpeg_video_decode_engine.cc @@ -331,6 +331,14 @@ void FFmpegVideoDecodeEngine::Seek() { event_handler_->OnSeekComplete(); } +AVCodecContext* FFmpegVideoDecodeEngine::codec_context() const { + return codec_context_; +} + +void FFmpegVideoDecodeEngine::SetCodecContextForTest(AVCodecContext* context) { + codec_context_ = context; +} + void FFmpegVideoDecodeEngine::ReadInput() { DCHECK_EQ(output_eos_reached_, false); pending_input_buffers_++; diff --git a/media/video/ffmpeg_video_decode_engine.h b/media/video/ffmpeg_video_decode_engine.h index a7ce4e4..53baa54 100644 --- a/media/video/ffmpeg_video_decode_engine.h +++ b/media/video/ffmpeg_video_decode_engine.h @@ -36,11 +36,9 @@ class FFmpegVideoDecodeEngine : public VideoDecodeEngine { virtual void Flush(); virtual void Seek(); - virtual AVCodecContext* codec_context() const { return codec_context_; } + virtual AVCodecContext* codec_context() const; - virtual void SetCodecContextForTest(AVCodecContext* context) { - codec_context_ = context; - } + virtual void SetCodecContextForTest(AVCodecContext* context); VideoFrame::Format GetSurfaceFormat() const; private: diff --git a/media/video/omx_video_decode_engine.cc b/media/video/omx_video_decode_engine.cc index 1ffdf40..9ca3089 100644 --- a/media/video/omx_video_decode_engine.cc +++ b/media/video/omx_video_decode_engine.cc @@ -276,6 +276,10 @@ void OmxVideoDecodeEngine::Seek() { event_handler_->OnSeekComplete(); } +int OmxVideoDecodeEngine::current_omx_spec_version() const { + return 0x00000101; +} + VideoFrame::Format OmxVideoDecodeEngine::GetSurfaceFormat() const { // TODO(jiesun): Both OmxHeaderType and EGLImage surface type could have // different surface formats. diff --git a/media/video/omx_video_decode_engine.h b/media/video/omx_video_decode_engine.h index 86cabe9..9a6c0a7 100644 --- a/media/video/omx_video_decode_engine.h +++ b/media/video/omx_video_decode_engine.h @@ -36,7 +36,7 @@ class OmxVideoDecodeEngine : public VideoDecodeEngine { virtual void Seek(); // Subclass can provide a different value. - virtual int current_omx_spec_version() const { return 0x00000101; } + virtual int current_omx_spec_version() const; private: enum OmxIlState { |