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 MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 5 #ifndef MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
6 #define MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 6 #define MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 enum EncryptionAlgo { | 35 enum EncryptionAlgo { |
36 kEncAlgoInvalid = -1, | 36 kEncAlgoInvalid = -1, |
37 kEncAlgoNotEncrypted = 0, | 37 kEncAlgoNotEncrypted = 0, |
38 kEncAlgoDes = 1, | 38 kEncAlgoDes = 1, |
39 kEncAlgo3des = 2, | 39 kEncAlgo3des = 2, |
40 kEncAlgoTwofish = 3, | 40 kEncAlgoTwofish = 3, |
41 kEncAlgoBlowfish = 4, | 41 kEncAlgoBlowfish = 4, |
42 kEncAlgoAes = 5, | 42 kEncAlgoAes = 5, |
43 }; | 43 }; |
44 | 44 |
| 45 enum CipherMode { |
| 46 kCipherModeInvalid = 0, |
| 47 kCipherModeCtr = 1, |
| 48 }; |
| 49 |
45 ContentEncoding(); | 50 ContentEncoding(); |
46 ~ContentEncoding(); | 51 ~ContentEncoding(); |
47 | 52 |
48 int64 order() const { return order_; } | 53 int64 order() const { return order_; } |
49 void set_order(int64 order) { order_ = order; } | 54 void set_order(int64 order) { order_ = order; } |
50 | 55 |
51 Scope scope() const { return scope_; } | 56 Scope scope() const { return scope_; } |
52 void set_scope(Scope scope) { scope_ = scope; } | 57 void set_scope(Scope scope) { scope_ = scope; } |
53 | 58 |
54 Type type() const { return type_; } | 59 Type type() const { return type_; } |
55 void set_type(Type type) { type_ = type; } | 60 void set_type(Type type) { type_ = type; } |
56 | 61 |
57 EncryptionAlgo encryption_algo() const { return encryption_algo_; } | 62 EncryptionAlgo encryption_algo() const { return encryption_algo_; } |
58 void set_encryption_algo(EncryptionAlgo encryption_algo) { | 63 void set_encryption_algo(EncryptionAlgo encryption_algo) { |
59 encryption_algo_ = encryption_algo; | 64 encryption_algo_ = encryption_algo; |
60 } | 65 } |
61 | 66 |
62 const uint8* encryption_key_id() const { return encryption_key_id_.get(); } | 67 const uint8* encryption_key_id() const { return encryption_key_id_.get(); } |
63 int encryption_key_id_size() const { return encryption_key_id_size_; } | 68 int encryption_key_id_size() const { return encryption_key_id_size_; } |
64 | 69 |
65 void SetEncryptionKeyId(const uint8* encryption_key_id, int size); | 70 void SetEncryptionKeyId(const uint8* encryption_key_id, int size); |
66 | 71 |
| 72 CipherMode cipher_mode() const { return cipher_mode_; } |
| 73 void set_cipher_mode(CipherMode mode) { cipher_mode_ = mode; } |
| 74 |
67 private: | 75 private: |
68 int64 order_; | 76 int64 order_; |
69 Scope scope_; | 77 Scope scope_; |
70 Type type_; | 78 Type type_; |
71 EncryptionAlgo encryption_algo_; | 79 EncryptionAlgo encryption_algo_; |
72 scoped_array<uint8> encryption_key_id_; | 80 scoped_array<uint8> encryption_key_id_; |
73 int encryption_key_id_size_; | 81 int encryption_key_id_size_; |
| 82 CipherMode cipher_mode_; |
74 | 83 |
75 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); | 84 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); |
76 }; | 85 }; |
77 | 86 |
78 } // namespace media | 87 } // namespace media |
79 | 88 |
80 #endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 89 #endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
OLD | NEW |