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

Side by Side Diff: ppapi/api/private/pp_content_decryptor.idl

Issue 11087044: Generalize Pepper CDM API decrypt and decode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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
« no previous file with comments | « no previous file | ppapi/api/private/ppp_content_decryptor_private.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 6 /**
7 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information 7 * The <code>PP_DecryptTrackingInfo</code> struct contains necessary information
8 * that can be used to associate the decrypted block with a decrypt request 8 * that can be used to associate the decrypted block with a decrypt request
9 * and/or an input block. 9 * and/or an input block.
10 */ 10 */
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 /** 127 /**
128 * <code>PP_VideoCodec</code> contains video codec type constants. 128 * <code>PP_VideoCodec</code> contains video codec type constants.
129 */ 129 */
130 [assert_size(4)] 130 [assert_size(4)]
131 enum PP_VideoCodec { 131 enum PP_VideoCodec {
132 PP_VIDEOCODEC_UNKNOWN = 0, 132 PP_VIDEOCODEC_UNKNOWN = 0,
133 PP_VIDEOCODEC_VP8 = 1 133 PP_VIDEOCODEC_VP8 = 1
134 }; 134 };
135 135
136 /** 136 /**
137 * <code>PP_EncryptedVideoFrameInfo</code> contains the information required
138 * to decrypt and decode a video frame.
139 * TODO(tomfinegan): Revisit necessity of including format information in this
140 * struct once we decide how to implement video decoder initialization.
141 */
142 [assert_size(256)]
143 struct PP_EncryptedVideoFrameInfo {
144 /**
145 * The decoded video frame format.
146 */
147 PP_DecryptedFrameFormat format;
148
149 /**
150 * The video frame codec type.
151 */
152 PP_VideoCodec codec;
153
154 /**
155 * Video frame width in pixels.
156 */
157 int32_t width;
158
159 /**
160 * Video frame height in pixels.
161 */
162 int32_t height;
163
164 /**
165 * Information required to decrypt the frame.
166 */
167 PP_EncryptedBlockInfo encryption_info;
168 };
169
170 /**
171 * The <code>PP_DecryptResult</code> enum contains decryption and decoding 137 * The <code>PP_DecryptResult</code> enum contains decryption and decoding
172 * result constants. 138 * result constants.
173 */ 139 */
174 [assert_size(4)] 140 [assert_size(4)]
175 enum PP_DecryptResult { 141 enum PP_DecryptResult {
176 /** The decryption (and/or decoding) operation finished successfully. */ 142 /** The decryption (and/or decoding) operation finished successfully. */
177 PP_DECRYPTRESULT_SUCCESS = 0, 143 PP_DECRYPTRESULT_SUCCESS = 0,
178 /** The decryptor did not have the necessary decryption key. */ 144 /** The decryptor did not have the necessary decryption key. */
179 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, 145 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1,
180 /** An unexpected error happened during decryption. */ 146 /** An unexpected error happened during decryption. */
181 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, 147 PP_DECRYPTRESULT_DECRYPT_ERROR = 2,
182 /** An unexpected error happened during decoding. */ 148 /** An unexpected error happened during decoding. */
183 PP_DECRYPTRESULT_DECODE_ERROR = 3 149 PP_DECRYPTRESULT_DECODE_ERROR = 3
184 }; 150 };
185 151
186 /** 152 /**
187 * <code>PP_DecryptedBlockInfo</code> struct contains the decryption result and 153 * <code>PP_DecryptedBlockInfo</code> struct contains the decryption result and
188 * tracking info associated with the decrypted block. 154 * tracking info associated with the decrypted block.
189 */ 155 */
190 [assert_size(24)] 156 [assert_size(24)]
191 struct PP_DecryptedBlockInfo { 157 struct PP_DecryptedBlockInfo {
192 /** 158 /**
193 * Result of the decryption (and/or decoding) operation. 159 * Result of the decryption (and/or decoding) operation.
194 */ 160 */
195 PP_DecryptResult result; 161 PP_DecryptResult result;
196 162
197 /** 163 /**
198 * 4-byte padding to make the size of <code>PP_DecryptedBlockInfo</code> 164 * 4-byte padding to make the size of <code>PP_DecryptedBlockInfo</code>
199 * a multiple of 8 bytes and make sure |tracking_info| starts on an 8-byte 165 * a multiple of 8 bytes, and ensure consistent size on all targets. This
200 * boundary. The value of this field should not be used. 166 * value should never be used.
201 */ 167 */
202 uint32_t padding; 168 uint32_t padding;
203 169
204 /** 170 /**
205 * Information needed by the client to track the block to be decrypted. 171 * Information needed by the client to track the block to be decrypted.
206 */ 172 */
207 PP_DecryptTrackingInfo tracking_info; 173 PP_DecryptTrackingInfo tracking_info;
208 }; 174 };
209 175
210 /** 176 /**
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 }; 282 };
317 283
318 /** 284 /**
319 * <code>PP_DecryptorStreamType</code> contains stream type constants. 285 * <code>PP_DecryptorStreamType</code> contains stream type constants.
320 */ 286 */
321 [assert_size(4)] 287 [assert_size(4)]
322 enum PP_DecryptorStreamType { 288 enum PP_DecryptorStreamType {
323 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, 289 PP_DECRYPTORSTREAMTYPE_AUDIO = 0,
324 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 290 PP_DECRYPTORSTREAMTYPE_VIDEO = 1
325 }; 291 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/api/private/ppp_content_decryptor_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698