Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BASE_ENCRYPTION_SCHEME_H_ | 5 #ifndef MEDIA_BASE_ENCRYPTION_SCHEME_H_ |
| 6 #define MEDIA_BASE_ENCRYPTION_SCHEME_H_ | 6 #define MEDIA_BASE_ENCRYPTION_SCHEME_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <functional> | |
| 9 | 10 |
| 10 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 11 | 12 |
| 12 namespace media { | 13 namespace media { |
| 13 | 14 |
| 14 // Specification of whether and how the stream is encrypted (in whole or part). | 15 // Specification of whether and how the stream is encrypted (in whole or part). |
| 15 class MEDIA_EXPORT EncryptionScheme { | 16 class MEDIA_EXPORT EncryptionScheme { |
| 16 public: | 17 public: |
| 17 // Algorithm and mode used for encryption. CIPHER_MODE_UNENCRYPTED indicates | 18 // Algorithm and mode used for encryption. CIPHER_MODE_UNENCRYPTED indicates |
| 18 // no encryption. | 19 // no encryption. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 | 70 |
| 70 private: | 71 private: |
| 71 CipherMode mode_ = CIPHER_MODE_UNENCRYPTED; | 72 CipherMode mode_ = CIPHER_MODE_UNENCRYPTED; |
| 72 Pattern pattern_; | 73 Pattern pattern_; |
| 73 | 74 |
| 74 // Allow copy and assignment. | 75 // Allow copy and assignment. |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace media | 78 } // namespace media |
| 78 | 79 |
| 80 namespace std { | |
| 81 | |
| 82 template <> | |
| 83 struct hash<media::EncryptionScheme::CipherMode> { | |
| 84 std::size_t operator()( | |
| 85 const media::EncryptionScheme::CipherMode& mode) const { | |
| 86 return static_cast<std::size_t>(mode); | |
| 87 } | |
| 88 }; | |
| 89 } // namespace std | |
|
xhwang
2016/10/15 09:13:59
+rockot
I have to add this, otherwise, the linker
Ken Rockot(use gerrit already)
2016/10/15 15:35:29
I think this will do it: https://codereview.chromi
| |
| 90 | |
| 79 #endif // MEDIA_BASE_ENCRYPTION_SCHEME_H_ | 91 #endif // MEDIA_BASE_ENCRYPTION_SCHEME_H_ |
| OLD | NEW |