OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 bool QueueInput(); | 159 bool QueueInput(); |
160 | 160 |
161 // Dequeues output from |media_codec_| and feeds the decoded frame to the | 161 // Dequeues output from |media_codec_| and feeds the decoded frame to the |
162 // client. Returns a hint about whether calling again might produce | 162 // client. Returns a hint about whether calling again might produce |
163 // more output. | 163 // more output. |
164 bool DequeueOutput(); | 164 bool DequeueOutput(); |
165 | 165 |
166 // Requests picture buffers from the client. | 166 // Requests picture buffers from the client. |
167 void RequestPictureBuffers(); | 167 void RequestPictureBuffers(); |
168 | 168 |
| 169 // Decode the content in the |bitstream_buffer|. Note that a |
| 170 // |bitstream_buffer| of id as -1 indicates a flush command. |
| 171 void DecodeBuffer(const media::BitstreamBuffer& bitstream_buffer); |
| 172 |
169 // This callback is called after CDM obtained a MediaCrypto object. | 173 // This callback is called after CDM obtained a MediaCrypto object. |
170 void OnMediaCryptoReady(media::MediaDrmBridge::JavaObjectPtr media_crypto, | 174 void OnMediaCryptoReady(media::MediaDrmBridge::JavaObjectPtr media_crypto, |
171 bool needs_protected_surface); | 175 bool needs_protected_surface); |
172 | 176 |
173 // This callback is called when a new key is added to CDM. | 177 // This callback is called when a new key is added to CDM. |
174 void OnKeyAdded(); | 178 void OnKeyAdded(); |
175 | 179 |
176 // Notifies the client of the CDM setting result. | 180 // Notifies the client of the CDM setting result. |
177 void NotifyCdmAttached(bool success); | 181 void NotifyCdmAttached(bool success); |
178 | 182 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 326 |
323 // WeakPtrFactory for posting tasks back to |this|. | 327 // WeakPtrFactory for posting tasks back to |this|. |
324 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 328 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |
325 | 329 |
326 friend class AndroidVideoDecodeAcceleratorTest; | 330 friend class AndroidVideoDecodeAcceleratorTest; |
327 }; | 331 }; |
328 | 332 |
329 } // namespace content | 333 } // namespace content |
330 | 334 |
331 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ | 335 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |