| 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(240)] | 84 [assert_size(368)] |
| 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 * Key ID of the block to be decrypted. | 97 * Key ID of the block to be decrypted. |
| 98 * | 98 * |
| 99 * TODO(xhwang): For WebM the key ID can be as large as 2048 bytes in theory. | 99 * For WebM the key ID can be as large as 2048 bytes in theory. But it's not |
| 100 * But it's not used in current implementations. If we really need to support | 100 * used in current implementations. If we really need to support it, we should |
| 101 * it, we should move key ID out as a separate parameter, e.g. | 101 * move key ID out as a separate parameter, e.g. as a <code>PP_Var</code>, or |
| 102 * as a <code>PP_Var</code>, or make the whole | 102 * make the whole <code>PP_EncryptedBlockInfo</code> as a |
| 103 * <code>PP_EncryptedBlockInfo</code> as a <code>PP_Resource</code>. | 103 * <code>PP_Resource</code>. |
| 104 */ | 104 */ |
| 105 uint8_t[64] key_id; | 105 uint8_t[64] key_id; |
| 106 uint32_t key_id_size; | 106 uint32_t key_id_size; |
| 107 | 107 |
| 108 /** | 108 /** |
| 109 * Initialization vector of the block to be decrypted. | 109 * Initialization vector of the block to be decrypted. |
| 110 */ | 110 */ |
| 111 uint8_t[16] iv; | 111 uint8_t[16] iv; |
| 112 uint32_t iv_size; | 112 uint32_t iv_size; |
| 113 | 113 |
| 114 /** | 114 /** |
| 115 * Subsample information of the block to be decrypted. | 115 * Subsample information of the block to be decrypted. |
| 116 * |
| 117 * We need to have a fixed size of |subsamples| here. Choose 32 because it is |
| 118 * sufficient for almost all real life scenarios. Note that in theory the |
| 119 * number of subsamples could be larger than 32. If that happens, playback |
| 120 * will fail. |
| 116 */ | 121 */ |
| 117 PP_DecryptSubsampleDescription[16] subsamples; | 122 PP_DecryptSubsampleDescription[32] subsamples; |
| 118 uint32_t num_subsamples; | 123 uint32_t num_subsamples; |
| 119 }; | 124 }; |
| 120 | 125 |
| 121 /** | 126 /** |
| 122 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 127 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
| 123 */ | 128 */ |
| 124 [assert_size(4)] | 129 [assert_size(4)] |
| 125 enum PP_DecryptedFrameFormat { | 130 enum PP_DecryptedFrameFormat { |
| 126 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, | 131 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, |
| 127 PP_DECRYPTEDFRAMEFORMAT_YV12 = 1, | 132 PP_DECRYPTEDFRAMEFORMAT_YV12 = 1, |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 /** | 478 /** |
| 474 * Status of this key. | 479 * Status of this key. |
| 475 */ | 480 */ |
| 476 PP_CdmKeyStatus key_status; | 481 PP_CdmKeyStatus key_status; |
| 477 | 482 |
| 478 /** | 483 /** |
| 479 * Optional error code for keys that are not usable. | 484 * Optional error code for keys that are not usable. |
| 480 */ | 485 */ |
| 481 uint32_t system_code; | 486 uint32_t system_code; |
| 482 }; | 487 }; |
| OLD | NEW |