| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ | 5 #ifndef MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ |
| 6 #define MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ | 6 #define MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "media/ffmpeg/ffmpeg_common.h" | 11 #include "media/ffmpeg/ffmpeg_common.h" |
| 12 #include "media/video/video_decode_engine.h" | 12 #include "media/video/video_decode_engine.h" |
| 13 | 13 |
| 14 // FFmpeg types. | 14 // FFmpeg types. |
| 15 struct AVCodecContext; | 15 struct AVCodecContext; |
| 16 struct AVFrame; | 16 struct AVFrame; |
| 17 | 17 |
| 18 namespace media { | 18 namespace media { |
| 19 | 19 |
| 20 class MEDIA_EXPORT FFmpegVideoDecodeEngine : public VideoDecodeEngine { | 20 class MEDIA_EXPORT FFmpegVideoDecodeEngine : public VideoDecodeEngine { |
| 21 public: | 21 public: |
| 22 FFmpegVideoDecodeEngine(); | 22 FFmpegVideoDecodeEngine(); |
| 23 virtual ~FFmpegVideoDecodeEngine(); | 23 virtual ~FFmpegVideoDecodeEngine(); |
| 24 | 24 |
| 25 // Implementation of the VideoDecodeEngine Interface. | 25 // Implementation of the VideoDecodeEngine Interface. |
| 26 virtual void Initialize(MessageLoop* message_loop, | 26 virtual void Initialize(VideoDecodeEngine::EventHandler* event_handler, |
| 27 VideoDecodeEngine::EventHandler* event_handler, | |
| 28 VideoDecodeContext* context, | |
| 29 const VideoDecoderConfig& config); | 27 const VideoDecoderConfig& config); |
| 30 virtual void ConsumeVideoSample(scoped_refptr<Buffer> buffer); | 28 virtual void ConsumeVideoSample(scoped_refptr<Buffer> buffer); |
| 31 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); | 29 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); |
| 32 virtual void Uninitialize(); | 30 virtual void Uninitialize(); |
| 33 virtual void Flush(); | 31 virtual void Flush(); |
| 34 virtual void Seek(); | 32 virtual void Seek(); |
| 35 | 33 |
| 36 private: | 34 private: |
| 37 void DecodeFrame(scoped_refptr<Buffer> buffer); | 35 void DecodeFrame(scoped_refptr<Buffer> buffer); |
| 38 void ReadInput(); | 36 void ReadInput(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 64 | 62 |
| 65 // Whether flush operation is pending. | 63 // Whether flush operation is pending. |
| 66 bool flush_pending_; | 64 bool flush_pending_; |
| 67 | 65 |
| 68 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecodeEngine); | 66 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecodeEngine); |
| 69 }; | 67 }; |
| 70 | 68 |
| 71 } // namespace media | 69 } // namespace media |
| 72 | 70 |
| 73 #endif // MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ | 71 #endif // MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ |
| OLD | NEW |