Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: ppapi/c/private/pp_content_decryptor.h

Issue 11023004: Update PPP side of Pepper CDM API to support video decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, CQ'ing. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 private/pp_content_decryptor.idl modified Wed Oct 3 12:52:47 2012. */ 6 /* From private/pp_content_decryptor.idl modified Wed Oct 3 16:16:49 2012. */
7 7
8 #ifndef PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ 8 #ifndef PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_
9 #define PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ 9 #define PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_
10 10
11 #include "ppapi/c/pp_macros.h" 11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_stdint.h" 12 #include "ppapi/c/pp_stdint.h"
13 13
14 /** 14 /**
15 * @file 15 * @file
16 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information 16 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 240); 122 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedBlockInfo, 240);
123 /** 123 /**
124 * @} 124 * @}
125 */ 125 */
126 126
127 /** 127 /**
128 * @addtogroup Enums 128 * @addtogroup Enums
129 * @{ 129 * @{
130 */ 130 */
131 /** 131 /**
132 * <code>PP_DecryptedFrameFormat</code> contains video frame formats.
133 */
134 typedef enum {
135 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0,
136 PP_DECRYPTEDFRAMEFORMAT_EMPTY = 1,
137 PP_DECRYPTEDFRAMEFORMAT_YV12 = 2,
138 PP_DECRYPTEDFRAMEFORMAT_I420 = 3
139 } PP_DecryptedFrameFormat;
140 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFrameFormat, 4);
141
142 /**
143 * <code>PP_VideoCodec</code> contains video codec type constants.
144 */
145 typedef enum {
146 PP_VIDEOCODEC_UNKNOWN = 0,
147 PP_VIDEOCODEC_VP8 = 1
148 } PP_VideoCodec;
149 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoCodec, 4);
150 /**
151 * @}
152 */
153
154 /**
155 * @addtogroup Structs
156 * @{
157 */
158 /**
159 * <code>PP_EncryptedVideoFrameInfo</code> contains the information required
160 * to decrypt and decode a video frame.
161 * TODO(tomfinegan): Revisit necessity of including format information in this
162 * struct once we decide how to implement video decoder initialization.
163 */
164 struct PP_EncryptedVideoFrameInfo {
165 /**
166 * The decoded video frame format.
167 */
168 PP_DecryptedFrameFormat format;
169 /**
170 * The video frame codec type.
171 */
172 PP_VideoCodec codec;
173 /**
174 * Video frame width in pixels.
175 */
176 int32_t width;
177 /**
178 * Video frame height in pixels.
179 */
180 int32_t height;
181 /**
182 * Information required to decrypt the frame.
183 */
184 struct PP_EncryptedBlockInfo encryption_info;
185 };
186 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedVideoFrameInfo, 256);
187 /**
188 * @}
189 */
190
191 /**
192 * @addtogroup Enums
193 * @{
194 */
195 /**
132 * The <code>PP_DecryptResult</code> enum contains decryption and decoding 196 * The <code>PP_DecryptResult</code> enum contains decryption and decoding
133 * result constants. 197 * result constants.
134 */ 198 */
135 typedef enum { 199 typedef enum {
136 /** The decryption (and/or decoding) operation finished successfully. */ 200 /** The decryption (and/or decoding) operation finished successfully. */
137 PP_DECRYPTRESULT_SUCCESS = 0, 201 PP_DECRYPTRESULT_SUCCESS = 0,
138 /** The decryptor did not have the necessary decryption key. */ 202 /** The decryptor did not have the necessary decryption key. */
139 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, 203 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1,
140 /** An unexpected error happened during decryption. */ 204 /** An unexpected error happened during decryption. */
141 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, 205 PP_DECRYPTRESULT_DECRYPT_ERROR = 2,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedBlockInfo, 24); 238 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedBlockInfo, 24);
175 /** 239 /**
176 * @} 240 * @}
177 */ 241 */
178 242
179 /** 243 /**
180 * @addtogroup Enums 244 * @addtogroup Enums
181 * @{ 245 * @{
182 */ 246 */
183 /** 247 /**
184 * <code>PP_DecryptedFrameFormat</code> contains video frame formats.
185 */
186 typedef enum {
187 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0,
188 PP_DECRYPTEDFRAMEFORMAT_EMPTY = 1,
189 PP_DECRYPTEDFRAMEFORMAT_YV12 = 2,
190 PP_DECRYPTEDFRAMEFORMAT_I420 = 3
191 } PP_DecryptedFrameFormat;
192 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFrameFormat, 4);
193
194 /**
195 * <code>PP_DecryptedFramePlanes</code> provides YUV plane index values for 248 * <code>PP_DecryptedFramePlanes</code> provides YUV plane index values for
196 * accessing plane offsets stored in <code>PP_DecryptedFrameInfo</code>. 249 * accessing plane offsets stored in <code>PP_DecryptedFrameInfo</code>.
197 */ 250 */
198 typedef enum { 251 typedef enum {
199 PP_DECRYPTEDFRAMEPLANES_Y = 0, 252 PP_DECRYPTEDFRAMEPLANES_Y = 0,
200 PP_DECRYPTEDFRAMEPLANES_U = 1, 253 PP_DECRYPTEDFRAMEPLANES_U = 1,
201 PP_DECRYPTEDFRAMEPLANES_V = 2 254 PP_DECRYPTEDFRAMEPLANES_V = 2
202 } PP_DecryptedFramePlanes; 255 } PP_DecryptedFramePlanes;
203 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFramePlanes, 4); 256 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DecryptedFramePlanes, 4);
204 /** 257 /**
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 */ 297 */
245 struct PP_DecryptTrackingInfo tracking_info; 298 struct PP_DecryptTrackingInfo tracking_info;
246 }; 299 };
247 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedFrameInfo, 56); 300 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedFrameInfo, 56);
248 /** 301 /**
249 * @} 302 * @}
250 */ 303 */
251 304
252 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ 305 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */
253 306
OLDNEW
« no previous file with comments | « ppapi/api/private/ppp_content_decryptor_private.idl ('k') | ppapi/c/private/ppp_content_decryptor_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698