| 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 <string> |
| 9 |
| 8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
| 11 | 13 |
| 12 namespace media { | 14 namespace media { |
| 13 | 15 |
| 14 class MEDIA_EXPORT ContentEncoding { | 16 class MEDIA_EXPORT ContentEncoding { |
| 15 public: | 17 public: |
| 16 // The following enum definitions are based on the ContentEncoding element | 18 // The following enum definitions are based on the ContentEncoding element |
| 17 // specified in the Matroska spec. | 19 // specified in the Matroska spec. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void set_scope(Scope scope) { scope_ = scope; } | 59 void set_scope(Scope scope) { scope_ = scope; } |
| 58 | 60 |
| 59 Type type() const { return type_; } | 61 Type type() const { return type_; } |
| 60 void set_type(Type type) { type_ = type; } | 62 void set_type(Type type) { type_ = type; } |
| 61 | 63 |
| 62 EncryptionAlgo encryption_algo() const { return encryption_algo_; } | 64 EncryptionAlgo encryption_algo() const { return encryption_algo_; } |
| 63 void set_encryption_algo(EncryptionAlgo encryption_algo) { | 65 void set_encryption_algo(EncryptionAlgo encryption_algo) { |
| 64 encryption_algo_ = encryption_algo; | 66 encryption_algo_ = encryption_algo; |
| 65 } | 67 } |
| 66 | 68 |
| 67 const uint8* encryption_key_id() const { return encryption_key_id_.get(); } | 69 const std::string& encryption_key_id() const { return encryption_key_id_; } |
| 68 int encryption_key_id_size() const { return encryption_key_id_size_; } | |
| 69 | |
| 70 void SetEncryptionKeyId(const uint8* encryption_key_id, int size); | 70 void SetEncryptionKeyId(const uint8* encryption_key_id, int size); |
| 71 | 71 |
| 72 CipherMode cipher_mode() const { return cipher_mode_; } | 72 CipherMode cipher_mode() const { return cipher_mode_; } |
| 73 void set_cipher_mode(CipherMode mode) { cipher_mode_ = mode; } | 73 void set_cipher_mode(CipherMode mode) { cipher_mode_ = mode; } |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 int64 order_; | 76 int64 order_; |
| 77 Scope scope_; | 77 Scope scope_; |
| 78 Type type_; | 78 Type type_; |
| 79 EncryptionAlgo encryption_algo_; | 79 EncryptionAlgo encryption_algo_; |
| 80 scoped_array<uint8> encryption_key_id_; | 80 std::string encryption_key_id_; |
| 81 int encryption_key_id_size_; | |
| 82 CipherMode cipher_mode_; | 81 CipherMode cipher_mode_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); | 83 DISALLOW_COPY_AND_ASSIGN(ContentEncoding); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace media | 86 } // namespace media |
| 88 | 87 |
| 89 #endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ | 88 #endif // MEDIA_WEBM_WEBM_CONTENT_ENCODINGS_H_ |
| OLD | NEW |