| Index: media/video/ffmpeg_video_decode_engine.h
|
| diff --git a/media/video/ffmpeg_video_decode_engine.h b/media/video/ffmpeg_video_decode_engine.h
|
| index 3ac74118056ffe743d0b371290fe01bd344a0b30..7c94017f3980e58699331916ded15ef5b907dae1 100644
|
| --- a/media/video/ffmpeg_video_decode_engine.h
|
| +++ b/media/video/ffmpeg_video_decode_engine.h
|
| @@ -5,13 +5,9 @@
|
| #ifndef MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_
|
| #define MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_
|
|
|
| -#include <deque>
|
| -
|
| -#include "base/memory/scoped_ptr.h"
|
| -#include "media/ffmpeg/ffmpeg_common.h"
|
| +#include "base/compiler_specific.h"
|
| #include "media/video/video_decode_engine.h"
|
|
|
| -// FFmpeg types.
|
| struct AVCodecContext;
|
| struct AVFrame;
|
|
|
| @@ -22,47 +18,24 @@ class MEDIA_EXPORT FFmpegVideoDecodeEngine : public VideoDecodeEngine {
|
| FFmpegVideoDecodeEngine();
|
| virtual ~FFmpegVideoDecodeEngine();
|
|
|
| - // Implementation of the VideoDecodeEngine Interface.
|
| - virtual void Initialize(VideoDecodeEngine::EventHandler* event_handler,
|
| - const VideoDecoderConfig& config);
|
| - virtual void ConsumeVideoSample(scoped_refptr<Buffer> buffer);
|
| - virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame);
|
| - virtual void Uninitialize();
|
| - virtual void Flush();
|
| - virtual void Seek();
|
| + // VideoDecodeEngine implementation.
|
| + virtual bool Initialize(const VideoDecoderConfig& config) OVERRIDE;
|
| + virtual void Uninitialize() OVERRIDE;
|
| + virtual bool Decode(scoped_refptr<Buffer> buffer,
|
| + scoped_refptr<VideoFrame>* video_frame) OVERRIDE;
|
| + virtual void Flush() OVERRIDE;
|
|
|
| private:
|
| - void DecodeFrame(scoped_refptr<Buffer> buffer);
|
| - void ReadInput();
|
| - void TryToFinishPendingFlush();
|
| + // Reallocates the video frame if format or dimensions differ.
|
| + void ReallocateVideoFrameIfNecessary(scoped_refptr<VideoFrame>* video_frame);
|
|
|
| AVCodecContext* codec_context_;
|
| - scoped_ptr_malloc<AVFrame, ScopedPtrAVFree> av_frame_;
|
| - VideoDecodeEngine::EventHandler* event_handler_;
|
| + AVFrame* av_frame_;
|
|
|
| // Frame rate of the video.
|
| int frame_rate_numerator_;
|
| int frame_rate_denominator_;
|
|
|
| - // Indicate how many buffers are pending on input port of this filter:
|
| - // Increment when engine receive one input packet from demuxer;
|
| - // Decrement when engine send one input packet to demuxer;
|
| - int pending_input_buffers_;
|
| -
|
| - // Indicate how many buffers are pending on output port of this filter:
|
| - // Increment when engine receive one output frame from renderer;
|
| - // Decrement when engine send one output frame to renderer;
|
| - int pending_output_buffers_;
|
| -
|
| - // Whether end of stream had been reached at output side.
|
| - bool output_eos_reached_;
|
| -
|
| - // Used when direct rendering is disabled to hold available output buffers.
|
| - std::deque<scoped_refptr<VideoFrame> > frame_queue_available_;
|
| -
|
| - // Whether flush operation is pending.
|
| - bool flush_pending_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecodeEngine);
|
| };
|
|
|
|
|