OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual ~Client() {} | 90 virtual ~Client() {} |
91 }; | 91 }; |
92 | 92 |
93 // Video decoder functions. | 93 // Video decoder functions. |
94 | 94 |
95 // Initializes the video decoder with specific configuration. Called once per | 95 // Initializes the video decoder with specific configuration. Called once per |
96 // decoder construction. This call is synchronous and returns true iff | 96 // decoder construction. This call is synchronous and returns true iff |
97 // initialization is successful. | 97 // initialization is successful. |
98 // Parameters: | 98 // Parameters: |
99 // |profile| is the video stream's format profile. | 99 // |profile| is the video stream's format profile. |
| 100 // |min_picture_count| is the minimum number of picture buffers needed for |
| 101 // playback. The decoder should allocate at least this number. |
100 // |client| is the client of this video decoder. The provided pointer must | 102 // |client| is the client of this video decoder. The provided pointer must |
101 // be valid until Destroy() is called. | 103 // be valid until Destroy() is called. |
102 virtual bool Initialize(VideoCodecProfile profile, Client* client) = 0; | 104 virtual bool Initialize( |
| 105 VideoCodecProfile profile, |
| 106 uint32 min_picture_count, |
| 107 Client* client) = 0; |
103 | 108 |
104 // Decodes given bitstream buffer that contains at most one frame. Once | 109 // Decodes given bitstream buffer that contains at most one frame. Once |
105 // decoder is done with processing |bitstream_buffer| it will call | 110 // decoder is done with processing |bitstream_buffer| it will call |
106 // NotifyEndOfBitstreamBuffer() with the bitstream buffer id. | 111 // NotifyEndOfBitstreamBuffer() with the bitstream buffer id. |
107 // Parameters: | 112 // Parameters: |
108 // |bitstream_buffer| is the input bitstream that is sent for decoding. | 113 // |bitstream_buffer| is the input bitstream that is sent for decoding. |
109 virtual void Decode(const BitstreamBuffer& bitstream_buffer) = 0; | 114 virtual void Decode(const BitstreamBuffer& bitstream_buffer) = 0; |
110 | 115 |
111 // Assigns a set of texture-backed picture buffers to the video decoder. | 116 // Assigns a set of texture-backed picture buffers to the video decoder. |
112 // | 117 // |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // uses "Destroy()" instead of trying to use the destructor. | 182 // uses "Destroy()" instead of trying to use the destructor. |
178 template <> | 183 template <> |
179 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { | 184 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { |
180 public: | 185 public: |
181 void operator()(void* video_decode_accelerator) const; | 186 void operator()(void* video_decode_accelerator) const; |
182 }; | 187 }; |
183 | 188 |
184 } // namespace base | 189 } // namespace base |
185 | 190 |
186 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 191 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |