| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 /** | 74 /** |
| 75 * Size in bytes of encrypted data in a subsample entry. | 75 * Size in bytes of encrypted data in a subsample entry. |
| 76 */ | 76 */ |
| 77 uint32_t cipher_bytes; | 77 uint32_t cipher_bytes; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * The <code>PP_EncryptedBlockInfo</code> struct contains all the information | 81 * The <code>PP_EncryptedBlockInfo</code> struct contains all the information |
| 82 * needed to decrypt an encrypted block. | 82 * needed to decrypt an encrypted block. |
| 83 */ | 83 */ |
| 84 [assert_size(248)] | 84 [assert_size(240)] |
| 85 struct PP_EncryptedBlockInfo { | 85 struct PP_EncryptedBlockInfo { |
| 86 /** | 86 /** |
| 87 * Information needed by the client to track the block to be decrypted. | 87 * Information needed by the client to track the block to be decrypted. |
| 88 */ | 88 */ |
| 89 PP_DecryptTrackingInfo tracking_info; | 89 PP_DecryptTrackingInfo tracking_info; |
| 90 | 90 |
| 91 /** | 91 /** |
| 92 * Size in bytes of data to be decrypted (data_offset included). | 92 * Size in bytes of data to be decrypted (data_offset included). |
| 93 */ | 93 */ |
| 94 uint32_t data_size; | 94 uint32_t data_size; |
| 95 | 95 |
| 96 /** | 96 /** |
| 97 * Size in bytes of data to be discarded before applying the decryption. | |
| 98 */ | |
| 99 uint32_t data_offset; | |
| 100 | |
| 101 /** | |
| 102 * Key ID of the block to be decrypted. | 97 * Key ID of the block to be decrypted. |
| 103 * | 98 * |
| 104 * TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory. | 99 * TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory. |
| 105 * But it's not used in current implementations. If we really need to support | 100 * But it's not used in current implementations. If we really need to support |
| 106 * it, we should move key ID out as a separate parameter, e.g. | 101 * it, we should move key ID out as a separate parameter, e.g. |
| 107 * as a <code>PP_Var</code>, or make the whole | 102 * as a <code>PP_Var</code>, or make the whole |
| 108 * <code>PP_EncryptedBlockInfo</code> as a <code>PP_Resource</code>. | 103 * <code>PP_EncryptedBlockInfo</code> as a <code>PP_Resource</code>. |
| 109 */ | 104 */ |
| 110 uint8_t[64] key_id; | 105 uint8_t[64] key_id; |
| 111 uint32_t key_id_size; | 106 uint32_t key_id_size; |
| 112 | 107 |
| 113 /** | 108 /** |
| 114 * Initialization vector of the block to be decrypted. | 109 * Initialization vector of the block to be decrypted. |
| 115 */ | 110 */ |
| 116 uint8_t[16] iv; | 111 uint8_t[16] iv; |
| 117 uint32_t iv_size; | 112 uint32_t iv_size; |
| 118 | 113 |
| 119 /** | 114 /** |
| 120 * Subsample information of the block to be decrypted. | 115 * Subsample information of the block to be decrypted. |
| 121 */ | 116 */ |
| 122 PP_DecryptSubsampleDescription[16] subsamples; | 117 PP_DecryptSubsampleDescription[16] subsamples; |
| 123 uint32_t num_subsamples; | 118 uint32_t num_subsamples; |
| 124 | |
| 125 /** | |
| 126 * 4-byte padding to make the size of <code>PP_EncryptedBlockInfo</code> | |
| 127 * a multiple of 8 bytes. The value of this field should not be used. | |
| 128 */ | |
| 129 uint32_t padding; | |
| 130 }; | 119 }; |
| 131 | 120 |
| 132 /** | 121 /** |
| 133 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 122 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
| 134 */ | 123 */ |
| 135 [assert_size(4)] | 124 [assert_size(4)] |
| 136 enum PP_DecryptedFrameFormat { | 125 enum PP_DecryptedFrameFormat { |
| 137 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, | 126 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, |
| 138 PP_DECRYPTEDFRAMEFORMAT_YV12 = 1, | 127 PP_DECRYPTEDFRAMEFORMAT_YV12 = 1, |
| 139 PP_DECRYPTEDFRAMEFORMAT_I420 = 2 | 128 PP_DECRYPTEDFRAMEFORMAT_I420 = 2 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 }; | 391 }; |
| 403 | 392 |
| 404 /** | 393 /** |
| 405 * <code>PP_DecryptorStreamType</code> contains stream type constants. | 394 * <code>PP_DecryptorStreamType</code> contains stream type constants. |
| 406 */ | 395 */ |
| 407 [assert_size(4)] | 396 [assert_size(4)] |
| 408 enum PP_DecryptorStreamType { | 397 enum PP_DecryptorStreamType { |
| 409 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, | 398 PP_DECRYPTORSTREAMTYPE_AUDIO = 0, |
| 410 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 | 399 PP_DECRYPTORSTREAMTYPE_VIDEO = 1 |
| 411 }; | 400 }; |
| OLD | NEW |