| 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 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPB_VideoDecoder_Dev</code> interface. | 7 * This file defines the <code>PPB_VideoDecoder_Dev</code> interface. |
| 8 */ | 8 */ |
| 9 label Chrome { | 9 label Chrome { |
| 10 M14 = 0.16 | 10 M21 = 0.17 |
| 11 }; | 11 }; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * Video decoder interface. | 14 * Video decoder interface. |
| 15 * | 15 * |
| 16 * Typical usage: | 16 * Typical usage: |
| 17 * - Use Create() to create & configure a new PPB_VideoDecoder_Dev resource. | 17 * - Use Create() to create & configure a new PPB_VideoDecoder_Dev resource. |
| 18 * - Call Decode() to decode some video data. | 18 * - Call Decode() to decode some video data. |
| 19 * - Receive ProvidePictureBuffers callback | 19 * - Receive ProvidePictureBuffers callback |
| 20 * - Supply the decoder with textures using AssignPictureBuffers. | 20 * - Supply the decoder with textures using AssignPictureBuffers. |
| 21 * - Receive PictureReady callbacks | 21 * - Receive PictureReady callbacks |
| 22 * - Hand the textures back to the decoder using ReusePictureBuffer. | 22 * - Hand the textures back to the decoder using ReusePictureBuffer. |
| 23 * - To signal EOS to the decoder: call Flush() and wait for NotifyFlushDone | 23 * - To signal EOS to the decoder: call Flush() and wait for NotifyFlushDone |
| 24 * callback. | 24 * callback. |
| 25 * - To reset the decoder (e.g. to implement Seek): call Reset() and wait for | 25 * - To reset the decoder (e.g. to implement Seek): call Reset() and wait for |
| 26 * NotifyResetDone callback. | 26 * NotifyResetDone callback. |
| 27 * - To tear down the decoder call Destroy(). | 27 * - To tear down the decoder call Destroy(). |
| 28 * | 28 * |
| 29 * See PPP_VideoDecoder_Dev for the notifications the decoder may send the | 29 * See PPP_VideoDecoder_Dev for the notifications the decoder may send the |
| 30 * plugin. | 30 * plugin. |
| 31 */ | 31 */ |
| 32 interface PPB_VideoDecoder_Dev { | 32 interface PPB_VideoDecoder_Dev { |
| 33 /** | 33 /** |
| 34 * Creates & initializes a video decoder. | 34 * Creates & initializes a video decoder. |
| 35 * | 35 * |
| 36 * Parameters: | 36 * Parameters: |
| 37 * |instance| pointer to the plugin instance. | 37 * |instance| pointer to the plugin instance. |
| 38 * |context| a PPB_Graphics3D resource in which decoding will happen. | 38 * |context| a PPB_Graphics3D resource in which decoding will happen. |
| 39 * |profile| the video stream's format profile. | 39 * |profile| the video stream's format profile. |
| 40 * |frame_size| the width and height of the video frame. This parameter is |
| 41 * optional and can be set to 0,0. |
| 42 * |extra_data| is the byte data required to initialize video decoders, for |
| 43 * example the H.264 AAVC data. This parameter is optional and can be set |
| 44 * to an empty array. |
| 45 * |extra_data_size| the size of the extra_data array. |
| 40 * | 46 * |
| 41 * The created decoder is returned as PP_Resource. 0 means failure. | 47 * The created decoder is returned as PP_Resource. 0 means failure. |
| 42 */ | 48 */ |
| 43 PP_Resource Create( | 49 PP_Resource Create( |
| 44 [in] PP_Instance instance, | 50 [in] PP_Instance instance, |
| 45 [in] PP_Resource context, | 51 [in] PP_Resource context, |
| 46 [in] PP_VideoDecoder_Profile profile); | 52 [in] PP_VideoDecoder_Profile profile, |
| 53 [in] PP_Size frame_size, |
| 54 [in, size_as=extra_data_size] uint8_t[] extra_data, |
| 55 [in] uint32_t extra_data_size); |
| 47 | 56 |
| 48 /** | 57 /** |
| 49 * Tests whether |resource| is a video decoder created through Create | 58 * Tests whether |resource| is a video decoder created through Create |
| 50 * function of this interface. | 59 * function of this interface. |
| 51 * | 60 * |
| 52 * Parameters: | 61 * Parameters: |
| 53 * |resource| is handle to resource to test. | 62 * |resource| is handle to resource to test. |
| 54 * | 63 * |
| 55 * Returns true if is a video decoder, false otherwise. | 64 * Returns true if is a video decoder, false otherwise. |
| 56 */ | 65 */ |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 * may be freed asynchronously, after this method returns no more callbacks | 154 * may be freed asynchronously, after this method returns no more callbacks |
| 146 * will be made on the client. Any resources held by the client at that point | 155 * will be made on the client. Any resources held by the client at that point |
| 147 * may be freed. | 156 * may be freed. |
| 148 * | 157 * |
| 149 * Parameters: | 158 * Parameters: |
| 150 * |video_decoder| is the previously created handle to the decoder resource. | 159 * |video_decoder| is the previously created handle to the decoder resource. |
| 151 */ | 160 */ |
| 152 void Destroy( | 161 void Destroy( |
| 153 [in] PP_Resource video_decoder); | 162 [in] PP_Resource video_decoder); |
| 154 }; | 163 }; |
| OLD | NEW |