| 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" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 virtual void Initialize(MessageLoop* message_loop, | 26 virtual void Initialize(MessageLoop* message_loop, |
| 27 VideoDecodeEngine::EventHandler* event_handler, | 27 VideoDecodeEngine::EventHandler* event_handler, |
| 28 VideoDecodeContext* context, | 28 VideoDecodeContext* context, |
| 29 const VideoDecoderConfig& config); | 29 const VideoDecoderConfig& config); |
| 30 virtual void ConsumeVideoSample(scoped_refptr<Buffer> buffer); | 30 virtual void ConsumeVideoSample(scoped_refptr<Buffer> buffer); |
| 31 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); | 31 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); |
| 32 virtual void Uninitialize(); | 32 virtual void Uninitialize(); |
| 33 virtual void Flush(); | 33 virtual void Flush(); |
| 34 virtual void Seek(); | 34 virtual void Seek(); |
| 35 | 35 |
| 36 VideoFrame::Format GetSurfaceFormat() const; |
| 37 |
| 36 private: | 38 private: |
| 37 void DecodeFrame(scoped_refptr<Buffer> buffer); | 39 void DecodeFrame(scoped_refptr<Buffer> buffer); |
| 38 void ReadInput(); | 40 void ReadInput(); |
| 39 void TryToFinishPendingFlush(); | 41 void TryToFinishPendingFlush(); |
| 40 | 42 |
| 41 AVCodecContext* codec_context_; | 43 AVCodecContext* codec_context_; |
| 42 scoped_ptr_malloc<AVFrame, ScopedPtrAVFree> av_frame_; | 44 scoped_ptr_malloc<AVFrame, ScopedPtrAVFree> av_frame_; |
| 43 VideoDecodeEngine::EventHandler* event_handler_; | 45 VideoDecodeEngine::EventHandler* event_handler_; |
| 44 | 46 |
| 45 // Frame rate of the video. | 47 // Frame rate of the video. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 64 | 66 |
| 65 // Whether flush operation is pending. | 67 // Whether flush operation is pending. |
| 66 bool flush_pending_; | 68 bool flush_pending_; |
| 67 | 69 |
| 68 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecodeEngine); | 70 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecodeEngine); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 } // namespace media | 73 } // namespace media |
| 72 | 74 |
| 73 #endif // MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ | 75 #endif // MEDIA_VIDEO_FFMPEG_VIDEO_DECODE_ENGINE_H_ |
| OLD | NEW |