Chromium Code Reviews| 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 /** | 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 uint32_t iv_size; | 107 uint32_t iv_size; |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * Subsample information of the block to be decrypted. | 110 * Subsample information of the block to be decrypted. |
| 111 */ | 111 */ |
| 112 PP_DecryptSubsampleDescription[16] subsamples; | 112 PP_DecryptSubsampleDescription[16] subsamples; |
| 113 uint32_t num_subsamples; | 113 uint32_t num_subsamples; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 /** | 116 /** |
| 117 * <code>PP_StreamType</code> contains stream type constants. | |
| 118 */ | |
| 119 [assert_size(4)] | |
| 120 enum PP_StreamType { | |
| 121 PP_STREAMTYPE_UNKNOWN = 0, | |
| 122 PP_STREAMTYPE_AUDIO = 1, | |
| 123 PP_STREAMTYPE_VIDEO = 2 | |
| 124 }; | |
| 125 | |
| 126 /** | |
| 127 * <code>PP_EncryptedMediaInfo</code> contains the information required to | |
| 128 * decrypt and decode media data. | |
| 129 */ | |
| 130 [assert_size(248)] | |
| 131 struct PP_EncryptedMediaInfo { | |
| 132 /** | |
| 133 * Media type of the encrypted data. | |
| 134 */ | |
| 135 PP_StreamType media_type; | |
| 136 | |
| 137 /** | |
| 138 * 4-byte padding to make the size of <code>PP_EncryptedMediaInfo</code> | |
| 139 * a multiple of 8 bytes, and ensure consistent size on all targets. | |
| 140 */ | |
| 141 uint32_t padding; | |
| 142 | |
| 143 /** | |
| 144 * Information required to decrypt the media. | |
| 145 */ | |
| 146 PP_EncryptedBlockInfo encryption_info; | |
| 147 }; | |
| 148 | |
| 149 /** | |
| 117 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 150 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
| 118 */ | 151 */ |
| 119 [assert_size(4)] | 152 [assert_size(4)] |
| 120 enum PP_DecryptedFrameFormat { | 153 enum PP_DecryptedFrameFormat { |
| 121 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, | 154 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, |
| 122 PP_DECRYPTEDFRAMEFORMAT_EMPTY = 1, | 155 PP_DECRYPTEDFRAMEFORMAT_EMPTY = 1, |
| 123 PP_DECRYPTEDFRAMEFORMAT_YV12 = 2, | 156 PP_DECRYPTEDFRAMEFORMAT_YV12 = 2, |
| 124 PP_DECRYPTEDFRAMEFORMAT_I420 = 3 | 157 PP_DECRYPTEDFRAMEFORMAT_I420 = 3 |
| 125 }; | 158 }; |
| 126 | 159 |
| 127 /** | 160 /** |
| 128 * <code>PP_VideoCodec</code> contains video codec type constants. | 161 * <code>PP_VideoCodec</code> contains video codec type constants. |
| 129 */ | 162 */ |
| 130 [assert_size(4)] | 163 [assert_size(4)] |
| 131 enum PP_VideoCodec { | 164 enum PP_VideoCodec { |
| 132 PP_VIDEOCODEC_UNKNOWN = 0, | 165 PP_VIDEOCODEC_UNKNOWN = 0, |
| 133 PP_VIDEOCODEC_VP8 = 1 | 166 PP_VIDEOCODEC_VP8 = 1 |
| 134 }; | 167 }; |
| 135 | 168 |
| 136 /** | 169 /** |
| 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 | 170 * The <code>PP_DecryptResult</code> enum contains decryption and decoding |
| 172 * result constants. | 171 * result constants. |
| 173 */ | 172 */ |
| 174 [assert_size(4)] | 173 [assert_size(4)] |
| 175 enum PP_DecryptResult { | 174 enum PP_DecryptResult { |
| 176 /** The decryption (and/or decoding) operation finished successfully. */ | 175 /** The decryption (and/or decoding) operation finished successfully. */ |
| 177 PP_DECRYPTRESULT_SUCCESS = 0, | 176 PP_DECRYPTRESULT_SUCCESS = 0, |
| 178 /** The decryptor did not have the necessary decryption key. */ | 177 /** The decryptor did not have the necessary decryption key. */ |
| 179 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, | 178 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, |
| 180 /** An unexpected error happened during decryption. */ | 179 /** An unexpected error happened during decryption. */ |
| 181 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, | 180 PP_DECRYPTRESULT_DECRYPT_ERROR = 2, |
| 182 /** An unexpected error happened during decoding. */ | 181 /** An unexpected error happened during decoding. */ |
| 183 PP_DECRYPTRESULT_DECODE_ERROR = 3 | 182 PP_DECRYPTRESULT_DECODE_ERROR = 3 |
| 184 }; | 183 }; |
| 185 | 184 |
| 186 /** | 185 /** |
| 187 * <code>PP_DecryptedBlockInfo</code> struct contains the decryption result and | 186 * <code>PP_DecryptedBlockInfo</code> struct contains the decryption result and |
| 188 * tracking info associated with the decrypted block. | 187 * tracking info associated with the decrypted block. |
| 189 */ | 188 */ |
| 190 [assert_size(24)] | 189 [assert_size(24)] |
| 191 struct PP_DecryptedBlockInfo { | 190 struct PP_DecryptedBlockInfo { |
| 192 /** | 191 /** |
| 193 * Result of the decryption (and/or decoding) operation. | 192 * Result of the decryption (and/or decoding) operation. |
| 194 */ | 193 */ |
| 195 PP_DecryptResult result; | 194 PP_DecryptResult result; |
| 196 | 195 |
| 197 /** | 196 /** |
| 198 * 4-byte padding to make the size of <code>PP_DecryptedBlockInfo</code> | 197 * 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 | 198 * a multiple of 8 bytes, and ensure consistent size on all targets. |
|
Ami GONE FROM CHROMIUM
2012/10/10 18:06:45
you dropped the comment that clarifies the content
Tom Finegan
2012/10/10 20:02:51
Fixed.
| |
| 200 * boundary. The value of this field should not be used. | |
| 201 */ | 199 */ |
| 202 uint32_t padding; | 200 uint32_t padding; |
| 203 | 201 |
| 204 /** | 202 /** |
| 205 * Information needed by the client to track the block to be decrypted. | 203 * Information needed by the client to track the block to be decrypted. |
| 206 */ | 204 */ |
| 207 PP_DecryptTrackingInfo tracking_info; | 205 PP_DecryptTrackingInfo tracking_info; |
| 208 }; | 206 }; |
| 209 | 207 |
| 210 /** | 208 /** |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 /** | 251 /** |
| 254 * Height of the video frame, in pixels. | 252 * Height of the video frame, in pixels. |
| 255 */ | 253 */ |
| 256 int32_t height; | 254 int32_t height; |
| 257 | 255 |
| 258 /** | 256 /** |
| 259 * Information needed by the client to track the decrypted frame. | 257 * Information needed by the client to track the decrypted frame. |
| 260 */ | 258 */ |
| 261 PP_DecryptTrackingInfo tracking_info; | 259 PP_DecryptTrackingInfo tracking_info; |
| 262 }; | 260 }; |
| OLD | NEW |