OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
6 #define MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 6 #define MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
12 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
13 | 12 |
14 namespace media { | 13 namespace media { |
15 | 14 |
16 class MEDIA_EXPORT ContentEncoding { | 15 class MEDIA_EXPORT ContentEncoding { |
17 public: | 16 public: |
18 // The following enum definitions are based on the ContentEncoding element | 17 // The following enum definitions are based on the ContentEncoding element |
19 // specified in the Matroska spec. | 18 // specified in the Matroska spec. |
20 | 19 |
(...skipping 24 matching lines...) Expand all Loading... |
45 }; | 44 }; |
46 | 45 |
47 enum CipherMode { | 46 enum CipherMode { |
48 kCipherModeInvalid = 0, | 47 kCipherModeInvalid = 0, |
49 kCipherModeCtr = 1, | 48 kCipherModeCtr = 1, |
50 }; | 49 }; |
51 | 50 |
52 ContentEncoding(); | 51 ContentEncoding(); |
53 ~ContentEncoding(); | 52 ~ContentEncoding(); |
54 | 53 |
55 int64 order() const { return order_; } | 54 int64_t order() const { return order_; } |
56 void set_order(int64 order) { order_ = order; } | 55 void set_order(int64_t order) { order_ = order; } |
57 | 56 |
58 Scope scope() const { return scope_; } | 57 Scope scope() const { return scope_; } |
59 void set_scope(Scope scope) { scope_ = scope; } | 58 void set_scope(Scope scope) { scope_ = scope; } |
60 | 59 |
61 Type type() const { return type_; } | 60 Type type() const { return type_; } |
62 void set_type(Type type) { type_ = type; } | 61 void set_type(Type type) { type_ = type; } |
63 | 62 |
64 EncryptionAlgo encryption_algo() const { return encryption_algo_; } | 63 EncryptionAlgo encryption_algo() const { return encryption_algo_; } |
65 void set_encryption_algo(EncryptionAlgo encryption_algo) { | 64 void set_encryption_algo(EncryptionAlgo encryption_algo) { |
66 encryption_algo_ = encryption_algo; | 65 encryption_algo_ = encryption_algo; |
67 } | 66 } |
68 | 67 |
69 const std::string& encryption_key_id() const { return encryption_key_id_; } | 68 const std::string& encryption_key_id() const { return encryption_key_id_; } |
70 void SetEncryptionKeyId(const uint8* encryption_key_id, int size); | 69 void SetEncryptionKeyId(const uint8_t* encryption_key_id, int size); |
71 | 70 |
72 CipherMode cipher_mode() const { return cipher_mode_; } | 71 CipherMode cipher_mode() const { return cipher_mode_; } |
73 void set_cipher_mode(CipherMode mode) { cipher_mode_ = mode; } | 72 void set_cipher_mode(CipherMode mode) { cipher_mode_ = mode; } |
74 | 73 |
75 private: | 74 private: |
76 int64 order_; | 75 int64_t order_; |
77 Scope scope_; | 76 Scope scope_; |
78 Type type_; | 77 Type type_; |
79 EncryptionAlgo encryption_algo_; | 78 EncryptionAlgo encryption_algo_; |
80 std::string encryption_key_id_; | 79 std::string encryption_key_id_; |
81 CipherMode cipher_mode_; | 80 CipherMode cipher_mode_; |
82 | 81 |
83 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); | 82 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); |
84 }; | 83 }; |
85 | 84 |
86 } // namespace media | 85 } // namespace media |
87 | 86 |
88 #endif // MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 87 #endif // MEDIA_FORMATS_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
OLD | NEW |