Split out mojo_converters into its own target.
[chromium-blink-merge.git] / media / base / key_system_info.h
blobe259c00d855c755b397784e6662e8e88800dc7e6
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_KEY_SYSTEM_INFO_H_
6 #define MEDIA_BASE_KEY_SYSTEM_INFO_H_
8 #include <string>
10 #include "media/base/eme_constants.h"
11 #include "media/base/media_export.h"
13 // Definitions:
14 // * Key system
15 // https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#key-system
16 // * Concrete key system
17 // A key system string that can be instantiated, such as
18 // via the MediaKeys constructor. Examples include "org.w3.clearkey" and
19 // "com.widevine.alpha".
20 // * Abstract key system
21 // A key system string that cannot be instantiated like a concrete key system
22 // but is otherwise useful, such as in discovery using isTypeSupported().
23 // * Parent key system
24 // A key system string that is one level up from the child key system. It may
25 // be an abstract key system.
26 // As an example, "com.example" is the parent of "com.example.foo".
28 namespace media {
30 // Contains information about an EME key system as well as how to instantiate
31 // the corresponding CDM.
32 struct MEDIA_EXPORT KeySystemInfo {
33 explicit KeySystemInfo(const std::string& key_system);
34 ~KeySystemInfo();
36 std::string key_system;
38 // Specifies registered initialization data types supported by |key_system|.
39 SupportedInitDataTypes supported_init_data_types;
41 // Specifies codecs supported by |key_system|.
42 SupportedCodecs supported_codecs;
44 // A hierarchical parent for |key_system|. This value can be used to check
45 // supported types but cannot be used to instantiate a MediaKeys object.
46 // Only one parent key system is currently supported per concrete key system.
47 std::string parent_key_system;
49 // The following indicate how the corresponding CDM should be instantiated.
50 bool use_aes_decryptor;
51 #if defined(ENABLE_PEPPER_CDMS)
52 std::string pepper_type;
53 #endif
56 } // namespace media
58 #endif // MEDIA_BASE_KEY_SYSTEM_INFO_H_