| 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>PPP_VideoDecoder_Dev</code> interface. | 7 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. |
| 8 */ | 8 */ |
| 9 label Chrome { | 9 label Chrome { |
| 10 M14 = 0.9, | |
| 11 M18 = 0.10, | |
| 12 M21 = 0.11 | 10 M21 = 0.11 |
| 13 }; | 11 }; |
| 14 | 12 |
| 15 /** | 13 /** |
| 16 * PPP_VideoDecoder_Dev structure contains the function pointers that the | 14 * PPP_VideoDecoder_Dev structure contains the function pointers that the |
| 17 * plugin MUST implement to provide services needed by the video decoder | 15 * plugin MUST implement to provide services needed by the video decoder |
| 18 * implementation. | 16 * implementation. |
| 19 * | 17 * |
| 20 * See PPB_VideoDecoder_Dev for general usage tips. | 18 * See PPB_VideoDecoder_Dev for general usage tips. |
| 21 */ | 19 */ |
| 22 interface PPP_VideoDecoder_Dev { | 20 interface PPP_VideoDecoder_Dev { |
| 23 /** | 21 /** |
| 24 * Callback function to provide buffers for the decoded output pictures. If | 22 * Callback function to provide buffers for the decoded output pictures. If |
| 25 * succeeds plugin must provide buffers through AssignPictureBuffers function | 23 * succeeds plugin must provide buffers through AssignPictureBuffers function |
| 26 * to the API. If |req_num_of_bufs| matching exactly the specification | 24 * to the API. If |req_num_of_bufs| matching exactly the specification |
| 27 * given in the parameters cannot be allocated decoder should be destroyed. | 25 * given in the parameters cannot be allocated decoder should be destroyed. |
| 28 * | 26 * |
| 29 * Decoding will not proceed until buffers have been provided. | 27 * Decoding will not proceed until buffers have been provided. |
| 30 * | 28 * |
| 31 * Parameters: | 29 * Parameters: |
| 32 * |instance| the plugin instance to which the callback is responding. | 30 * |instance| the plugin instance to which the callback is responding. |
| 33 * |decoder| the PPB_VideoDecoder_Dev resource. | 31 * |decoder| the PPB_VideoDecoder_Dev resource. |
| 34 * |req_num_of_bufs| tells how many buffers are needed by the decoder. | 32 * |req_num_of_bufs| tells how many buffers are needed by the decoder. |
| 35 * |dimensions| tells the dimensions of the buffer to allocate. | 33 * |dimensions| tells the dimensions of the buffer to allocate. |
| 36 */ | 34 * |texture_target| the type of texture used. Sample targets in use are |
| 37 [deprecate=0.11] | 35 * TEXTURE_2D (most platforms) and TEXTURE_EXTERNAL_OES (on ARM). |
| 38 void ProvidePictureBuffers( | |
| 39 [in] PP_Instance instance, | |
| 40 [in] PP_Resource decoder, | |
| 41 [in] uint32_t req_num_of_bufs, | |
| 42 [in] PP_Size dimensions); | |
| 43 | |
| 44 /** | |
| 45 * Callback function to provide buffers for the decoded output pictures. If | |
| 46 * succeeds plugin must provide buffers through AssignPictureBuffers function | |
| 47 * to the API. If |req_num_of_bufs| matching exactly the specification | |
| 48 * given in the parameters cannot be allocated decoder should be destroyed. | |
| 49 * | |
| 50 * Decoding will not proceed until buffers have been provided. | |
| 51 * | |
| 52 * Parameters: | |
| 53 * |instance| the plugin instance to which the callback is responding. | |
| 54 * |decoder| the PPB_VideoDecoder_Dev resource. | |
| 55 * |req_num_of_bufs| tells how many buffers are needed by the decoder. | |
| 56 * |dimensions| tells the dimensions of the buffer to allocate. | |
| 57 * |texture_target| the type of texture used. | |
| 58 */ | 36 */ |
| 59 [version=0.11] | 37 [version=0.11] |
| 60 void ProvidePictureBuffers( | 38 void ProvidePictureBuffers( |
| 61 [in] PP_Instance instance, | 39 [in] PP_Instance instance, |
| 62 [in] PP_Resource decoder, | 40 [in] PP_Resource decoder, |
| 63 [in] uint32_t req_num_of_bufs, | 41 [in] uint32_t req_num_of_bufs, |
| 64 [in] PP_Size dimensions, | 42 [in] PP_Size dimensions, |
| 65 [in] uint32_t texture_target); | 43 [in] uint32_t texture_target); |
| 66 | 44 |
| 67 /** | 45 /** |
| (...skipping 19 matching lines...) Expand all Loading... |
| 87 * |instance| the plugin instance to which the callback is responding. | 65 * |instance| the plugin instance to which the callback is responding. |
| 88 * |decoder| the PPB_VideoDecoder_Dev resource. | 66 * |decoder| the PPB_VideoDecoder_Dev resource. |
| 89 * |picture| is the picture that is ready. | 67 * |picture| is the picture that is ready. |
| 90 */ | 68 */ |
| 91 void PictureReady( | 69 void PictureReady( |
| 92 [in] PP_Instance instance, | 70 [in] PP_Instance instance, |
| 93 [in] PP_Resource decoder, | 71 [in] PP_Resource decoder, |
| 94 [in] PP_Picture_Dev picture); | 72 [in] PP_Picture_Dev picture); |
| 95 | 73 |
| 96 /** | 74 /** |
| 97 * Callback function to tell the plugin that decoder has decoded end of stream | |
| 98 * marker and output all the pictures that should be displayed from the | |
| 99 * stream. | |
| 100 * | |
| 101 * Parameters: | |
| 102 * |instance| the plugin instance to which the callback is responding. | |
| 103 * |decoder| the PPB_VideoDecoder_Dev resource. | |
| 104 */ | |
| 105 [deprecate=0.10] | |
| 106 void EndOfStream( | |
| 107 [in] PP_Instance instance, | |
| 108 [in] PP_Resource decoder); | |
| 109 | |
| 110 /** | |
| 111 * Error handler callback for decoder to deliver information about detected | 75 * Error handler callback for decoder to deliver information about detected |
| 112 * errors to the plugin. | 76 * errors to the plugin. |
| 113 * | 77 * |
| 114 * Parameters: | 78 * Parameters: |
| 115 * |instance| the plugin instance to which the callback is responding. | 79 * |instance| the plugin instance to which the callback is responding. |
| 116 * |decoder| the PPB_VideoDecoder_Dev resource. | 80 * |decoder| the PPB_VideoDecoder_Dev resource. |
| 117 * |error| error is the enumeration specifying the error. | 81 * |error| error is the enumeration specifying the error. |
| 118 */ | 82 */ |
| 119 void NotifyError( | 83 void NotifyError( |
| 120 [in] PP_Instance instance, | 84 [in] PP_Instance instance, |
| 121 [in] PP_Resource decoder, | 85 [in] PP_Resource decoder, |
| 122 [in] PP_VideoDecodeError_Dev error); | 86 [in] PP_VideoDecodeError_Dev error); |
| 123 }; | 87 }; |
| OLD | NEW |