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

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

Issue 1052273004: Extract requestMediaKeySystemAccess() algorithm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Class vs struct forward declarations. Created 5 years, 8 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/key_systems.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_KEY_SYSTEMS_H_ 5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_
6 #define MEDIA_BASE_KEY_SYSTEMS_H_ 6 #define MEDIA_BASE_KEY_SYSTEMS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/eme_constants.h" 12 #include "media/base/eme_constants.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 14
15 namespace media { 15 namespace media {
16 16
17 // Provides an interface for querying registered key systems. The exposed API is 17 // Provides an interface for querying registered key systems. The exposed API is
18 // only intended to support unprefixed EME. 18 // only intended to support unprefixed EME.
19 // 19 //
20 // Many of the original static methods are still available, they should be 20 // Many of the original static methods are still available, they should be
21 // migrated into this interface over time (or removed). 21 // migrated into this interface over time (or removed).
22 // 22 //
23 // TODO(sandersd): Provide GetKeySystem() so that it is not necessary to pass 23 // TODO(sandersd): Provide GetKeySystem() so that it is not necessary to pass
24 // |key_system| to every method. http://crbug.com/457438 24 // |key_system| to every method. http://crbug.com/457438
25 class MEDIA_EXPORT KeySystems { 25 class MEDIA_EXPORT KeySystems {
26 public: 26 public:
27 static KeySystems& GetInstance(); 27 static KeySystems* GetInstance();
28 28
29 // Returns whether |key_system| is a supported key system. 29 // Returns whether |key_system| is a supported key system.
30 virtual bool IsSupportedKeySystem(const std::string& key_system) const = 0; 30 virtual bool IsSupportedKeySystem(const std::string& key_system) const = 0;
31 31
32 // Returns whether |init_data_type| is supported by |key_system|. 32 // Returns whether |init_data_type| is supported by |key_system|.
33 virtual bool IsSupportedInitDataType( 33 virtual bool IsSupportedInitDataType(
34 const std::string& key_system, 34 const std::string& key_system,
35 EmeInitDataType init_data_type) const = 0; 35 EmeInitDataType init_data_type) const = 0;
36 36
37 // Returns whether the list of codecs are supported together by |key_system|. 37 // Returns whether the list of codecs are supported together by |key_system|.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask); 127 MEDIA_EXPORT void AddContainerMask(const std::string& container, uint32 mask);
128 MEDIA_EXPORT void AddCodecMask( 128 MEDIA_EXPORT void AddCodecMask(
129 EmeMediaType media_type, 129 EmeMediaType media_type,
130 const std::string& codec, 130 const std::string& codec,
131 uint32 mask); 131 uint32 mask);
132 #endif // defined(UNIT_TEST) 132 #endif // defined(UNIT_TEST)
133 133
134 } // namespace media 134 } // namespace media
135 135
136 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ 136 #endif // MEDIA_BASE_KEY_SYSTEMS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698