| Index: media/filters/ffmpeg_video_decoder.h
|
| diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
|
| index ea2372304fdc0cd0d9f78865adae02c83a158b46..972010b26e41897abfcf163b3603d2b667447832 100644
|
| --- a/media/filters/ffmpeg_video_decoder.h
|
| +++ b/media/filters/ffmpeg_video_decoder.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
|
| #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
|
|
|
| +#include <deque>
|
| +
|
| #include "base/gtest_prod_util.h"
|
| #include "base/time.h"
|
| #include "media/base/factory.h"
|
| @@ -33,6 +35,7 @@ class FFmpegVideoDecoder : public VideoDecoder,
|
| // MediaFilter implementation.
|
| virtual void Stop(FilterCallback* callback);
|
| virtual void Seek(base::TimeDelta time, FilterCallback* callback);
|
| + virtual void Pause(FilterCallback* callback);
|
| virtual void Flush(FilterCallback* callback);
|
|
|
| // Decoder implementation.
|
| @@ -77,6 +80,8 @@ class FFmpegVideoDecoder : public VideoDecoder,
|
| kNormal,
|
| kFlushCodec,
|
| kDecodeFinished,
|
| + kPausing,
|
| + kFlushing,
|
| kStopped
|
| };
|
|
|
| @@ -88,6 +93,9 @@ class FFmpegVideoDecoder : public VideoDecoder,
|
| // this with OnReadComplete
|
| void OnReadCompleteTask(scoped_refptr<Buffer> buffer);
|
|
|
| + // Flush the output buffers that we had held in Paused state.
|
| + void FlushBuffers();
|
| +
|
| // Attempt to get the PTS and Duration for this frame by examining the time
|
| // info provided via packet stream (stored in |pts_heap|), or the info
|
| // written into the AVFrame itself. If no data is available in either, then
|
| @@ -115,17 +123,14 @@ class FFmpegVideoDecoder : public VideoDecoder,
|
| DecoderState state_;
|
| scoped_refptr<VideoDecodeEngine> decode_engine_;
|
|
|
| - // Tracks the number of asynchronous reads issued to |demuxer_stream_|.
|
| - // Using size_t since it is always compared against deque::size().
|
| - size_t pending_reads_;
|
| - // Tracks the number of asynchronous reads issued from renderer.
|
| - size_t pending_requests_;
|
| -
|
| scoped_ptr<FilterCallback> initialize_callback_;
|
| scoped_ptr<FilterCallback> uninitialize_callback_;
|
| scoped_ptr<FilterCallback> flush_callback_;
|
| scoped_ptr<FilterCallback> seek_callback_;
|
|
|
| + // Hold video frames when flush happens.
|
| + std::deque<scoped_refptr<VideoFrame> > frame_queue_flushed_;
|
| +
|
| VideoCodecInfo info_;
|
|
|
| // Pointer to the demuxer stream that will feed us compressed buffers.
|
|
|