Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_PUBLIC_COMMON_KEY_SYSTEM_INFO_H_ | |
|
xhwang
2013/09/04 21:48:40
s/COMMON/RENDERER ?
ddorwin
2013/09/06 18:30:00
Done.
| |
| 6 #define CONTENT_PUBLIC_COMMON_KEY_SYSTEM_INFO_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <utility> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/basictypes.h" | |
| 13 #include "content/common/content_export.h" | |
| 14 | |
| 15 // Definitions: | |
| 16 // * Key system | |
| 17 // https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypt ed-media.html#key-system | |
| 18 // * Concrete key system | |
| 19 // A key system string that can be instantiated, such as | |
| 20 // via the MediaKeys constructor. Examples include "org.w3.clearkey" and | |
| 21 // "com.widevine.alpha". | |
| 22 // * Abstract key system | |
| 23 // A key system string that cannot be instantiated like a concrete key system | |
| 24 // but is otherwise useful, such as in discovery using isTypeSupported(). | |
| 25 // * Parent key system | |
| 26 // A key system string that is one level up from the child key system. It may | |
| 27 // be an abstract key system. | |
| 28 // As an example, "com.example" is the parent of "com.example.foo". | |
| 29 | |
| 30 namespace content { | |
| 31 | |
| 32 // Contains information about an EME key system as well as how to instantiate | |
| 33 // the corresponding CDM. | |
| 34 struct CONTENT_EXPORT KeySystemInfo { | |
| 35 typedef std::pair<std::string, std::string> ContainerCodecsPair; | |
|
xhwang
2013/09/04 21:48:40
Add a comment that the second param can contain mu
ddorwin
2013/09/06 18:30:00
Done.
| |
| 36 | |
| 37 explicit KeySystemInfo(const std::string& key_system); | |
| 38 ~KeySystemInfo(); | |
| 39 | |
| 40 std::string key_system; | |
| 41 | |
| 42 // Specifies container and codec combinations supported by |key_system|. | |
| 43 // Multiple codecs may be listed for each container. | |
| 44 // In all cases, the container without a codec is also always supported. | |
| 45 std::vector<ContainerCodecsPair> supported_types; | |
| 46 | |
| 47 // A hierarchical parent for |key_system|. This value can be used to check | |
| 48 // supported types but cannot be used to instantiate a MediaKeys object. | |
| 49 // Only one parent key system is currently supported per concrete key system. | |
| 50 std::string parent_key_system; | |
| 51 | |
| 52 // The following indicate how the corresponding CDM should be instantiated. | |
| 53 bool use_aes_decryptor; | |
| 54 #if defined(ENABLE_PEPPER_CDMS) | |
| 55 std::string pepper_type; | |
| 56 #elif defined(OS_ANDROID) | |
| 57 std::vector<uint8> uuid; | |
| 58 #endif | |
| 59 }; | |
| 60 | |
| 61 } // namespace content | |
| 62 | |
| 63 #endif // CONTENT_PUBLIC_COMMON_KEY_SYSTEM_INFO_H_ | |
| OLD | NEW |