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 /* From dev/ppp_video_decoder_dev.idl modified Tue Oct 11 10:01:39 2011. */ | 6 /* From dev/ppp_video_decoder_dev.idl modified Wed Jan 11 14:58:58 2012. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ |
9 #define PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ | 9 #define PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ |
10 | 10 |
11 #include "ppapi/c/dev/pp_video_dev.h" | 11 #include "ppapi/c/dev/pp_video_dev.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_size.h" | 15 #include "ppapi/c/pp_size.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
17 | 17 |
18 #define PPP_VIDEODECODER_DEV_INTERFACE_0_9 "PPP_VideoDecoder(Dev);0.9" | 18 #define PPP_VIDEODECODER_DEV_INTERFACE_0_9 "PPP_VideoDecoder(Dev);0.9" |
19 #define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_9 | 19 #define PPP_VIDEODECODER_DEV_INTERFACE_0_10 "PPP_VideoDecoder(Dev);0.10" |
| 20 #define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_10 |
20 | 21 |
21 /** | 22 /** |
22 * @file | 23 * @file |
23 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. | 24 * This file defines the <code>PPP_VideoDecoder_Dev</code> interface. |
24 */ | 25 */ |
25 | 26 |
26 | 27 |
27 /** | 28 /** |
28 * @addtogroup Interfaces | 29 * @addtogroup Interfaces |
29 * @{ | 30 * @{ |
30 */ | 31 */ |
31 /** | 32 /** |
32 * PPP_VideoDecoder_Dev structure contains the function pointers that the | 33 * PPP_VideoDecoder_Dev structure contains the function pointers that the |
33 * plugin MUST implement to provide services needed by the video decoder | 34 * plugin MUST implement to provide services needed by the video decoder |
34 * implementation. | 35 * implementation. |
35 * | 36 * |
36 * See PPB_VideoDecoder_Dev for general usage tips. | 37 * See PPB_VideoDecoder_Dev for general usage tips. |
37 */ | 38 */ |
38 struct PPP_VideoDecoder_Dev_0_9 { | 39 struct PPP_VideoDecoder_Dev_0_10 { |
39 /** | 40 /** |
40 * Callback function to provide buffers for the decoded output pictures. If | 41 * Callback function to provide buffers for the decoded output pictures. If |
41 * succeeds plugin must provide buffers through AssignPictureBuffers function | 42 * succeeds plugin must provide buffers through AssignPictureBuffers function |
42 * to the API. If |req_num_of_bufs| matching exactly the specification | 43 * to the API. If |req_num_of_bufs| matching exactly the specification |
43 * given in the parameters cannot be allocated decoder should be destroyed. | 44 * given in the parameters cannot be allocated decoder should be destroyed. |
44 * | 45 * |
45 * Decoding will not proceed until buffers have been provided. | 46 * Decoding will not proceed until buffers have been provided. |
46 * | 47 * |
47 * Parameters: | 48 * Parameters: |
48 * |instance| the plugin instance to which the callback is responding. | 49 * |instance| the plugin instance to which the callback is responding. |
(...skipping 24 matching lines...) Expand all Loading... |
73 * | 74 * |
74 * Parameters: | 75 * Parameters: |
75 * |instance| the plugin instance to which the callback is responding. | 76 * |instance| the plugin instance to which the callback is responding. |
76 * |decoder| the PPB_VideoDecoder_Dev resource. | 77 * |decoder| the PPB_VideoDecoder_Dev resource. |
77 * |picture| is the picture that is ready. | 78 * |picture| is the picture that is ready. |
78 */ | 79 */ |
79 void (*PictureReady)(PP_Instance instance, | 80 void (*PictureReady)(PP_Instance instance, |
80 PP_Resource decoder, | 81 PP_Resource decoder, |
81 const struct PP_Picture_Dev* picture); | 82 const struct PP_Picture_Dev* picture); |
82 /** | 83 /** |
83 * Callback function to tell the plugin that decoder has decoded end of stream | |
84 * marker and output all the pictures that should be displayed from the | |
85 * stream. | |
86 * | |
87 * Parameters: | |
88 * |instance| the plugin instance to which the callback is responding. | |
89 * |decoder| the PPB_VideoDecoder_Dev resource. | |
90 */ | |
91 void (*EndOfStream)(PP_Instance instance, PP_Resource decoder); | |
92 /** | |
93 * Error handler callback for decoder to deliver information about detected | 84 * Error handler callback for decoder to deliver information about detected |
94 * errors to the plugin. | 85 * errors to the plugin. |
95 * | 86 * |
96 * Parameters: | 87 * Parameters: |
97 * |instance| the plugin instance to which the callback is responding. | 88 * |instance| the plugin instance to which the callback is responding. |
98 * |decoder| the PPB_VideoDecoder_Dev resource. | 89 * |decoder| the PPB_VideoDecoder_Dev resource. |
99 * |error| error is the enumeration specifying the error. | 90 * |error| error is the enumeration specifying the error. |
100 */ | 91 */ |
101 void (*NotifyError)(PP_Instance instance, | 92 void (*NotifyError)(PP_Instance instance, |
102 PP_Resource decoder, | 93 PP_Resource decoder, |
103 PP_VideoDecodeError_Dev error); | 94 PP_VideoDecodeError_Dev error); |
104 }; | 95 }; |
105 | 96 |
106 typedef struct PPP_VideoDecoder_Dev_0_9 PPP_VideoDecoder_Dev; | 97 typedef struct PPP_VideoDecoder_Dev_0_10 PPP_VideoDecoder_Dev; |
| 98 |
| 99 struct PPP_VideoDecoder_Dev_0_9 { |
| 100 void (*ProvidePictureBuffers)(PP_Instance instance, |
| 101 PP_Resource decoder, |
| 102 uint32_t req_num_of_bufs, |
| 103 const struct PP_Size* dimensions); |
| 104 void (*DismissPictureBuffer)(PP_Instance instance, |
| 105 PP_Resource decoder, |
| 106 int32_t picture_buffer_id); |
| 107 void (*PictureReady)(PP_Instance instance, |
| 108 PP_Resource decoder, |
| 109 const struct PP_Picture_Dev* picture); |
| 110 void (*EndOfStream)(PP_Instance instance, PP_Resource decoder); |
| 111 void (*NotifyError)(PP_Instance instance, |
| 112 PP_Resource decoder, |
| 113 PP_VideoDecodeError_Dev error); |
| 114 }; |
107 /** | 115 /** |
108 * @} | 116 * @} |
109 */ | 117 */ |
110 | 118 |
111 #endif /* PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ */ | 119 #endif /* PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_ */ |
112 | 120 |
OLD | NEW |