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_0_7 "PPB_VideoDecoder(Dev);0.7" | 12 #define PPB_VIDEODECODER_DEV_INTERFACE_0_8 "PPB_VideoDecoder(Dev);0.8" |
13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_7 | 13 #define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_8 |
14 | 14 |
15 // Video decoder interface. | 15 // Video decoder interface. |
16 // | 16 // |
17 // Basic usage: | 17 // Basic usage: |
18 // 1. Use GetConfigs() to query potential configurations. Configuration | 18 // 1. Use GetConfigs() to query potential configurations. Configuration |
19 // information includes: | 19 // information includes: |
20 // a. Bitstream format. | 20 // a. Bitstream format. |
21 // b. Output picture format. | 21 // b. Output picture format. |
22 // c. Output picture buffer storage type. | 22 // c. Output picture buffer storage type. |
23 // 2. Select configuration that suits you and Create() the decoder with the | 23 // 2. Select configuration that suits you and Create() the decoder with the |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 // Creates a video decoder with requested |decoder_config|. | 124 // Creates a video decoder with requested |decoder_config|. |
125 // |input_format| in |decoder_config| specifies the format of input access | 125 // |input_format| in |decoder_config| specifies the format of input access |
126 // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required. | 126 // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required. |
127 // Plugin has the option to specify codec profile/level and other | 127 // Plugin has the option to specify codec profile/level and other |
128 // information such as PP_VIDEOKEY_ACCELERATION, to let browser choose | 128 // information such as PP_VIDEOKEY_ACCELERATION, to let browser choose |
129 // the most appropriate decoder. | 129 // the most appropriate decoder. |
130 // | 130 // |
131 // Parameters: | 131 // Parameters: |
132 // |instance| pointer to the plugin instance. | 132 // |instance| pointer to the plugin instance. |
133 // |dec_config| the configuration which to use to initialize the decoder. | 133 // |dec_config| the configuration which to use to initialize the decoder. |
134 // |callback| called after initialize is complete. | |
134 // | 135 // |
135 // The created decoder is returned as PP_Resource. NULL means failure. | 136 // The created decoder is returned as PP_Resource. NULL means failure. |
136 PP_Resource (*Create)(PP_Instance instance, | 137 PP_Resource (*Create)(PP_Instance instance, |
Ami GONE FROM CHROMIUM
2011/05/23 21:39:02
Update C++ API as well.
| |
137 PP_VideoConfigElement* dec_config); | 138 PP_VideoConfigElement* dec_config, |
139 struct PP_CompletionCallback callback); | |
138 | 140 |
139 // Tests whether |resource| is a video decoder created through Create | 141 // Tests whether |resource| is a video decoder created through Create |
140 // function of this interface. | 142 // function of this interface. |
141 // | 143 // |
142 // Parameters: | 144 // Parameters: |
143 // |resource| is handle to resource to test. | 145 // |resource| is handle to resource to test. |
144 // | 146 // |
145 // Returns true if is a video decoder, false otherwise. | 147 // Returns true if is a video decoder, false otherwise. |
146 PP_Bool (*IsVideoDecoder)(PP_Resource resource); | 148 PP_Bool (*IsVideoDecoder)(PP_Resource resource); |
147 | 149 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
241 // |callback| is one-time callback that will be called once the abortion | 243 // |callback| is one-time callback that will be called once the abortion |
242 // request has been completed. | 244 // request has been completed. |
243 // | 245 // |
244 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to | 246 // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to |
245 // abort is rejected by the decoder. | 247 // abort is rejected by the decoder. |
246 PP_Bool (*Abort)(PP_Resource video_decoder, | 248 PP_Bool (*Abort)(PP_Resource video_decoder, |
247 struct PP_CompletionCallback callback); | 249 struct PP_CompletionCallback callback); |
248 }; | 250 }; |
249 | 251 |
250 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ | 252 #endif /* PPAPI_C_DEV_PPB_VIDEO_DECODER_DEV_H_ */ |
OLD | NEW |