Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/pp_video_dev.h" | 8 #include "ppapi/c/dev/pp_video_dev.h" |
| 9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
| 11 | 11 |
| 12 #define PPB_VIDEODECODER_DEV_INTERFACE "PPB_VideoDecoder(Dev);0.5" | 12 #define PPB_VIDEODECODER_DEV_INTERFACE "PPB_VideoDecoder(Dev);0.5" |
|
piman
2011/04/26 20:48:07
Drive-by: please bump the version if you change th
Ami GONE FROM CHROMIUM
2011/04/26 23:01:57
Is 0.10 greater or smaller than 0.9? If smaller (
vrk (LEFT CHROMIUM)
2011/04/27 00:40:33
Done.
| |
| 13 | 13 |
| 14 // Video decoder interface. | 14 // Video decoder interface. |
| 15 // | 15 // |
| 16 // Basic usage: | 16 // Basic usage: |
| 17 // 1. Use GetConfigs() to query potential configurations. Configuration | 17 // 1. Use GetConfigs() to query potential configurations. Configuration |
| 18 // information includes: | 18 // information includes: |
| 19 // a. Bitstream format. | 19 // a. Bitstream format. |
| 20 // b. Output picture format. | 20 // b. Output picture format. |
| 21 // c. Output picture buffer storage type. | 21 // c. Output picture buffer storage type. |
| 22 // 2. Select configuration that suits you and Create() the decoder with the | 22 // 2. Select configuration that suits you and Create() the decoder with the |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 // AssignPictureBuffer should only get called in response to | 136 // AssignPictureBuffer should only get called in response to |
| 137 // ProvidePictureBuffer? | 137 // ProvidePictureBuffer? |
| 138 // | 138 // |
| 139 // Parameters: | 139 // Parameters: |
| 140 // |video_decoder| is the previously created handle to the decoder instance. | 140 // |video_decoder| is the previously created handle to the decoder instance. |
| 141 // |no_of_buffers| how many buffers are behind picture buffer pointer. | 141 // |no_of_buffers| how many buffers are behind picture buffer pointer. |
| 142 // |picture_buffer| contains the reference to the picture buffer that was | 142 // |picture_buffer| contains the reference to the picture buffer that was |
| 143 // processed. | 143 // processed. |
| 144 void (*AssignPictureBuffer)(PP_Resource video_decoder, | 144 void (*AssignPictureBuffer)(PP_Resource video_decoder, |
| 145 uint32_t no_of_buffers, | 145 uint32_t no_of_buffers, |
| 146 union PP_PictureData_Dev* picture_buffer); | 146 struct PP_PictureBuffer_Dev* picture_buffers); |
| 147 | 147 |
| 148 // Tells the decoder to reuse given picture buffer. Typical use of this | 148 // Tells the decoder to reuse given picture buffer. Typical use of this |
| 149 // function is to call from PictureReady callback to recycle picture buffer | 149 // function is to call from PictureReady callback to recycle picture buffer |
| 150 // back to the decoder after blitting the image so that decoder can use the | 150 // back to the decoder after blitting the image so that decoder can use the |
| 151 // image for output again. | 151 // image for output again. |
| 152 // | 152 // |
| 153 // The decoder will ignore any picture buffer not previously provided via | 153 // The decoder will ignore any picture buffer not previously provided via |
| 154 // AssignPictureBuffer. | 154 // AssignPictureBuffer. |
| 155 // | 155 // |
| 156 // TODO(vmr): figure out how the sync will be handled with command buffer as | 156 // TODO(vmr): figure out how the sync will be handled with command buffer as |
| 157 // there will be possibly lag due to command buffer implementation | 157 // there will be possibly lag due to command buffer implementation |
| 158 // to actual GL swap. At that moment decoder may have already taken | 158 // to actual GL swap. At that moment decoder may have already taken |
| 159 // the GL textures for writing output again. | 159 // the GL textures for writing output again. |
| 160 // | 160 // |
| 161 // Parameters: | 161 // Parameters: |
| 162 // |video_decoder| is the previously created handle to the decoder instance. | 162 // |video_decoder| is the previously created handle to the decoder instance. |
| 163 // |picture_buffer| contains the reference to the picture buffer that was | 163 // |picture_buffer| contains the reference to the picture buffer that was |
| 164 // processed. | 164 // processed. |
| 165 void (*ReusePictureBuffer)(PP_Resource video_decoder, | 165 void (*ReusePictureBuffer)(PP_Resource video_decoder, |
| 166 union PP_PictureData_Dev* picture_buffer); | 166 int32_t picture_buffer_id); |
| 167 | 167 |
| 168 // Dispatches flushing request to the decoder to flush both input and output | 168 // Dispatches flushing request to the decoder to flush both input and output |
| 169 // buffers. Successful flushing will result in output of the pictures and | 169 // buffers. Successful flushing will result in output of the pictures and |
| 170 // buffers held inside the decoder and returning of bitstream buffers using | 170 // buffers held inside the decoder and returning of bitstream buffers using |
| 171 // the callbacks implemented by the plug-in. Once done with flushing, the | 171 // the callbacks implemented by the plug-in. Once done with flushing, the |
| 172 // decode will call the |callback|. | 172 // decode will call the |callback|. |
| 173 // | 173 // |
| 174 // Parameters: | 174 // Parameters: |
| 175 // |video_decoder| is the previously created handle to the decoder instance. | 175 // |video_decoder| is the previously created handle to the decoder instance. |
| 176 // |callback| is one-time callback that will be called once the flushing | 176 // |callback| is one-time callback that will be called once the flushing |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 192 // |callback| is one-time callback that will be called once the abortion | 192 // |callback| is one-time callback that will be called once the abortion |
| 193 // request has been completed. | 193 // request has been completed. |
| 194 // | 194 // |
| 195 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to | 195 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to |
| 196 // abort is rejected by the decoder. | 196 // abort is rejected by the decoder. |
| 197 PP_Bool (*Abort)(PP_Resource video_decoder, | 197 PP_Bool (*Abort)(PP_Resource video_decoder, |
| 198 struct PP_CompletionCallback callback); | 198 struct PP_CompletionCallback callback); |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ | 201 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ |
| OLD | NEW |