Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: media/base/encryption_scheme.h

Issue 2423703002: media: Use native CipherMode enum type in media mojo interfaces (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/base/ipc/media_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | media/base/ipc/media_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698