| 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 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_ | 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_ |
| 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_ | 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_ |
| 7 | 7 |
| 8 #if defined(_MSC_VER) | 8 #if defined(_MSC_VER) |
| 9 typedef unsigned char uint8_t; | 9 typedef unsigned char uint8_t; |
| 10 typedef unsigned int uint32_t; | 10 typedef unsigned int uint32_t; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // own any pointers in this struct. | 90 // own any pointers in this struct. |
| 91 struct InputBuffer { | 91 struct InputBuffer { |
| 92 InputBuffer() | 92 InputBuffer() |
| 93 : data(NULL), | 93 : data(NULL), |
| 94 data_size(0), | 94 data_size(0), |
| 95 data_offset(0), | 95 data_offset(0), |
| 96 key_id(NULL), | 96 key_id(NULL), |
| 97 key_id_size(0), | 97 key_id_size(0), |
| 98 iv(NULL), | 98 iv(NULL), |
| 99 iv_size(0), | 99 iv_size(0), |
| 100 checksum(NULL), | |
| 101 checksum_size(0), | |
| 102 subsamples(NULL), | 100 subsamples(NULL), |
| 103 num_subsamples(0), | 101 num_subsamples(0), |
| 104 timestamp(0) {} | 102 timestamp(0) {} |
| 105 | 103 |
| 106 const uint8_t* data; // Pointer to the beginning of the input data. | 104 const uint8_t* data; // Pointer to the beginning of the input data. |
| 107 uint32_t data_size; // Size (in bytes) of |data|. | 105 uint32_t data_size; // Size (in bytes) of |data|. |
| 108 | 106 |
| 109 uint32_t data_offset; // Number of bytes to be discarded before decryption. | 107 uint32_t data_offset; // Number of bytes to be discarded before decryption. |
| 110 | 108 |
| 111 const uint8_t* key_id; // Key ID to identify the decryption key. | 109 const uint8_t* key_id; // Key ID to identify the decryption key. |
| 112 uint32_t key_id_size; // Size (in bytes) of |key_id|. | 110 uint32_t key_id_size; // Size (in bytes) of |key_id|. |
| 113 | 111 |
| 114 const uint8_t* iv; // Initialization vector. | 112 const uint8_t* iv; // Initialization vector. |
| 115 uint32_t iv_size; // Size (in bytes) of |iv|. | 113 uint32_t iv_size; // Size (in bytes) of |iv|. |
| 116 | 114 |
| 117 const uint8_t* checksum; | |
| 118 uint32_t checksum_size; // Size (in bytes) of the |checksum|. | |
| 119 | |
| 120 const struct SubsampleEntry* subsamples; | 115 const struct SubsampleEntry* subsamples; |
| 121 uint32_t num_subsamples; // Number of subsamples in |subsamples|. | 116 uint32_t num_subsamples; // Number of subsamples in |subsamples|. |
| 122 | 117 |
| 123 int64_t timestamp; // Presentation timestamp in microseconds. | 118 int64_t timestamp; // Presentation timestamp in microseconds. |
| 124 }; | 119 }; |
| 125 | 120 |
| 126 // Represents an output decrypted buffer. It does not own |data|. | 121 // Represents an output decrypted buffer. It does not own |data|. |
| 127 struct OutputBuffer { | 122 struct OutputBuffer { |
| 128 OutputBuffer() | 123 OutputBuffer() |
| 129 : data(NULL), | 124 : data(NULL), |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // re-initialize the video decoder. This can be used to reconfigure the | 299 // re-initialize the video decoder. This can be used to reconfigure the |
| 305 // video decoder if the config changes. | 300 // video decoder if the config changes. |
| 306 virtual void StopVideoDecoder() = 0; | 301 virtual void StopVideoDecoder() = 0; |
| 307 | 302 |
| 308 virtual ~ContentDecryptionModule() {} | 303 virtual ~ContentDecryptionModule() {} |
| 309 }; | 304 }; |
| 310 | 305 |
| 311 } // namespace cdm | 306 } // namespace cdm |
| 312 | 307 |
| 313 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_ | 308 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_ |
| OLD | NEW |