Chromium Code Reviews| Index: media/base/decrypt_config.h |
| diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h |
| index 5fca7876d330c78c76ade6c624ba00b85b49c70c..ba6d7b3b27c8c4b5c0b530414bcc511ef522295e 100644 |
| --- a/media/base/decrypt_config.h |
| +++ b/media/base/decrypt_config.h |
| @@ -11,18 +11,47 @@ |
| namespace media { |
| +struct SubsampleEntry { |
| + int clear_bytes; |
| + int cypher_bytes; |
| +}; |
| + |
| // Contains all information that a decryptor needs to decrypt. |
| class MEDIA_EXPORT DecryptConfig { |
| public: |
| - explicit DecryptConfig(const uint8* key_id, int key_id_size); |
| + DecryptConfig(const uint8* key_id, int key_id_size, |
|
ddorwin
2012/06/26 06:09:19
Do we really need two constructors - there is a lo
fgalligan1
2012/06/27 00:28:36
For WebM we will also be adding the HMAC parameter
strobe_
2012/06/27 02:01:21
Done.
|
| + const uint8* iv, int iv_size); |
| + DecryptConfig(const uint8* key_id, int key_id_size, |
| + const uint8* iv, int iv_size, |
| + const SubsampleEntry* subsamples, int subsample_count); |
| + |
| + // TODO(strobe): This constructor implicitly sets CBC mode and uses a default |
| + // IV, to preserve compatibility with an early implementation. It should be |
| + // removed, along with CBC mode and the default IV, when |
| + // https://chromiumcodereview.appspot.com/10535029 lands. |
| + DecryptConfig(const uint8* key_id, int key_id_size); |
| + |
| ~DecryptConfig(); |
| const uint8* key_id() const { return key_id_.get(); } |
| int key_id_size() const { return key_id_size_; } |
| + const uint8* iv() const { return iv_.get(); } |
| + int iv_size() const { return iv_size_; } |
| + const SubsampleEntry* subsamples() const { return subsamples_.get(); } |
|
ddorwin
2012/06/26 06:09:19
Any reason not to return and store these as a vect
strobe_
2012/06/27 02:01:21
Done.
|
| + int subsample_count() const { return subsample_count_; } |
| + bool use_cbc() const { return use_cbc_; } |
| + |
| + SubsampleEntry* mutable_subsamples() { return subsamples_.get(); } |
|
ddorwin
2012/06/26 06:09:19
I'm wondering why this is necessary.
strobe_
2012/06/27 02:01:21
Addressed in later comments. Can either:
- Allow u
|
| private: |
| scoped_array<uint8> key_id_; |
| int key_id_size_; |
| + scoped_array<uint8> iv_; |
| + int iv_size_; |
| + scoped_array<SubsampleEntry> subsamples_; |
| + int subsample_count_; |
| + // TODO(strobe): Remove when CBC is no longer used. |
| + bool use_cbc_; |
| DISALLOW_COPY_AND_ASSIGN(DecryptConfig); |
| }; |