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

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: Set PPP interface version to 0.2 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 Mon Sep 17 09:50:39 2012. */ 6 /* From private/pp_content_decryptor.idl modified Mon Oct 01 18:51:53 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 */
162 struct PP_EncryptedVideoFrameInfo {
163 /**
164 * The decoded video frame format.
165 */
166 PP_DecryptedFrameFormat format;
167 /**
168 * The video frame codec type.
169 */
170 PP_VideoCodec codec;
171 /**
172 * Video frame width in pixels.
173 */
174 int32_t width;
175 /**
176 * Video frame height in pixels.
177 */
178 int32_t height;
179 /**
180 * Information required to decrypt the frame.
181 */
182 struct PP_EncryptedBlockInfo encryption_info;
183 };
184 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_EncryptedVideoFrameInfo, 256);
185 /**
186 * @}
187 */
188
189 /**
190 * @addtogroup Enums
191 * @{
192 */
193 /**
132 * The <code>PP_DecryptResult</code> enum contains decryption and decoding 194 * The <code>PP_DecryptResult</code> enum contains decryption and decoding
133 * result constants. 195 * result constants.
134 */ 196 */
135 typedef enum { 197 typedef enum {
136 /** The decryption (and/or decoding) operation finished successfully. */ 198 /** The decryption (and/or decoding) operation finished successfully. */
137 PP_DECRYPTRESULT_SUCCESS = 0, 199 PP_DECRYPTRESULT_SUCCESS = 0,
138 /** The decryptor did not have the necessary decryption key. */ 200 /** The decryptor did not have the necessary decryption key. */
139 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, 201 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1,
140 /** An unexpected error happened during decryption. */ 202 /** An unexpected error happened during decryption. */
141 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, 203 PP_DECRYPTRESULT_DECRYPT_ERROR = 2,
(...skipping 28 matching lines...) Expand all
170 */ 232 */
171 uint32_t padding; 233 uint32_t padding;
172 }; 234 };
173 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedBlockInfo, 24); 235 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DecryptedBlockInfo, 24);
174 /** 236 /**
175 * @} 237 * @}
176 */ 238 */
177 239
178 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */ 240 #endif /* PPAPI_C_PRIVATE_PP_CONTENT_DECRYPTOR_H_ */
179 241
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698