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, | |
|
Ami GONE FROM CHROMIUM
2012/10/10 07:30:26
why does it make sense to have UNKNOWN?
Tom Finegan
2012/10/10 08:26:06
I was thinking of metadata and text streams, and t
Ami GONE FROM CHROMIUM
2012/10/10 18:06:45
yes, remove until needed.
Tom Finegan
2012/10/10 20:02:51
Done.
| |
| 122 PP_STREAMTYPE_AUDIO = 1, | |
| 123 PP_STREAMTYPE_VIDEO = 2 | |
| 124 }; | |
| 125 | |
| 126 /** | |
| 127 * <code>PP_EncryptedMediaInfo</code> contains the information required to | |
|
Ami GONE FROM CHROMIUM
2012/10/10 07:30:26
Does this type justify its existence, as opposed t
Tom Finegan
2012/10/10 08:26:06
We have to pass a resource around with the info, a
Ami GONE FROM CHROMIUM
2012/10/10 18:06:45
I don't understand; my proposal is that APIs that
Tom Finegan
2012/10/10 20:02:51
I just thought it was nicer to keep the PP_StreamT
| |
| 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 make sure |encryption_info| starts on an 8-byte | |
| 140 * boundary. The value of this field should not be used. | |
|
Ami GONE FROM CHROMIUM
2012/10/10 07:30:26
Why does alignment matter?
(also, what makes you t
Tom Finegan
2012/10/10 08:26:06
Fair point on alignment. I copied the comment from
| |
| 141 */ | |
| 142 uint32_t padding; | |
| 143 | |
| 144 /** | |
| 145 * Information required to decrypt the media. | |
| 146 */ | |
| 147 PP_EncryptedBlockInfo encryption_info; | |
| 148 }; | |
| 149 | |
| 150 /** | |
| 117 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. | 151 * <code>PP_DecryptedFrameFormat</code> contains video frame formats. |
| 118 */ | 152 */ |
| 119 [assert_size(4)] | 153 [assert_size(4)] |
| 120 enum PP_DecryptedFrameFormat { | 154 enum PP_DecryptedFrameFormat { |
| 121 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, | 155 PP_DECRYPTEDFRAMEFORMAT_UNKNOWN = 0, |
| 122 PP_DECRYPTEDFRAMEFORMAT_EMPTY = 1, | 156 PP_DECRYPTEDFRAMEFORMAT_EMPTY = 1, |
| 123 PP_DECRYPTEDFRAMEFORMAT_YV12 = 2, | 157 PP_DECRYPTEDFRAMEFORMAT_YV12 = 2, |
| 124 PP_DECRYPTEDFRAMEFORMAT_I420 = 3 | 158 PP_DECRYPTEDFRAMEFORMAT_I420 = 3 |
| 125 }; | 159 }; |
| 126 | 160 |
| 127 /** | 161 /** |
| 128 * <code>PP_VideoCodec</code> contains video codec type constants. | 162 * <code>PP_VideoCodec</code> contains video codec type constants. |
| 129 */ | 163 */ |
| 130 [assert_size(4)] | 164 [assert_size(4)] |
| 131 enum PP_VideoCodec { | 165 enum PP_VideoCodec { |
| 132 PP_VIDEOCODEC_UNKNOWN = 0, | 166 PP_VIDEOCODEC_UNKNOWN = 0, |
| 133 PP_VIDEOCODEC_VP8 = 1 | 167 PP_VIDEOCODEC_VP8 = 1 |
| 134 }; | 168 }; |
| 135 | 169 |
| 136 /** | 170 /** |
| 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 | 171 * The <code>PP_DecryptResult</code> enum contains decryption and decoding |
| 172 * result constants. | 172 * result constants. |
| 173 */ | 173 */ |
| 174 [assert_size(4)] | 174 [assert_size(4)] |
| 175 enum PP_DecryptResult { | 175 enum PP_DecryptResult { |
| 176 /** The decryption (and/or decoding) operation finished successfully. */ | 176 /** The decryption (and/or decoding) operation finished successfully. */ |
| 177 PP_DECRYPTRESULT_SUCCESS = 0, | 177 PP_DECRYPTRESULT_SUCCESS = 0, |
| 178 /** The decryptor did not have the necessary decryption key. */ | 178 /** The decryptor did not have the necessary decryption key. */ |
| 179 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, | 179 PP_DECRYPTRESULT_DECRYPT_NOKEY = 1, |
| 180 /** An unexpected error happened during decryption. */ | 180 /** An unexpected error happened during decryption. */ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 /** | 253 /** |
| 254 * Height of the video frame, in pixels. | 254 * Height of the video frame, in pixels. |
| 255 */ | 255 */ |
| 256 int32_t height; | 256 int32_t height; |
| 257 | 257 |
| 258 /** | 258 /** |
| 259 * Information needed by the client to track the decrypted frame. | 259 * Information needed by the client to track the decrypted frame. |
| 260 */ | 260 */ |
| 261 PP_DecryptTrackingInfo tracking_info; | 261 PP_DecryptTrackingInfo tracking_info; |
| 262 }; | 262 }; |
| OLD | NEW |