OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_FILTERS_VIDEO_DECODE_ENGINE_H_ | 5 #ifndef MEDIA_FILTERS_VIDEO_DECODE_ENGINE_H_ |
6 #define MEDIA_FILTERS_VIDEO_DECODE_ENGINE_H_ | 6 #define MEDIA_FILTERS_VIDEO_DECODE_ENGINE_H_ |
7 | 7 |
8 #include "media/base/buffers.h" // For VideoSurface. | 8 #include "media/base/video_frame.h" |
9 | 9 |
10 // FFmpeg types. | 10 // FFmpeg types. |
11 // | 11 // |
12 // TODO(ajwong): Try to cut the dependency on the FFmpeg types. | 12 // TODO(ajwong): Try to cut the dependency on the FFmpeg types. |
13 struct AVFrame; | 13 struct AVFrame; |
14 struct AVStream; | 14 struct AVStream; |
15 | 15 |
16 class Task; | 16 class Task; |
17 | 17 |
18 namespace media { | 18 namespace media { |
(...skipping 22 matching lines...) Expand all Loading... |
41 // TODO(ajwong): Should this function just allocate a new yuv_frame and return | 41 // TODO(ajwong): Should this function just allocate a new yuv_frame and return |
42 // it via a "GetNextFrame()" method or similar? | 42 // it via a "GetNextFrame()" method or similar? |
43 virtual void DecodeFrame(const Buffer& buffer, AVFrame* yuv_frame, | 43 virtual void DecodeFrame(const Buffer& buffer, AVFrame* yuv_frame, |
44 bool* got_result, Task* done_cb) = 0; | 44 bool* got_result, Task* done_cb) = 0; |
45 | 45 |
46 // Flushes the decode engine of any buffered input packets. | 46 // Flushes the decode engine of any buffered input packets. |
47 virtual void Flush(Task* done_cb) = 0; | 47 virtual void Flush(Task* done_cb) = 0; |
48 | 48 |
49 // Returns the VideoSurface::Format of the resulting |yuv_frame| from | 49 // Returns the VideoSurface::Format of the resulting |yuv_frame| from |
50 // DecodeFrame(). | 50 // DecodeFrame(). |
51 virtual VideoSurface::Format GetSurfaceFormat() const = 0; | 51 virtual VideoFrame::Format GetSurfaceFormat() const = 0; |
52 | 52 |
53 // Returns the current state of the decode engine. | 53 // Returns the current state of the decode engine. |
54 virtual State state() const = 0; | 54 virtual State state() const = 0; |
55 | 55 |
56 }; | 56 }; |
57 | 57 |
58 } // namespace media | 58 } // namespace media |
59 | 59 |
60 #endif // MEDIA_FILTERS_VIDEO_DECODE_ENGINE_H_ | 60 #endif // MEDIA_FILTERS_VIDEO_DECODE_ENGINE_H_ |
OLD | NEW |