Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / webkit / media / crypto / key_systems_info.h
blobf02abafd6a549ed4178cf33420faf8fbb68a0d11
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.
5 #ifndef WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_INFO_H_
6 #define WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_INFO_H_
8 #include <string>
10 namespace webkit_media {
12 struct MediaFormatAndKeySystem {
13 const char* mime_type;
14 const char* codecs_list;
15 const char* key_system;
18 struct KeySystemPluginTypePair {
19 const char* key_system;
20 const char* plugin_type;
23 // Specifies the container and codec combinations supported by individual
24 // key systems. Each line is a container-codecs combination and the key system
25 // that supports it. Multiple codecs can be listed. In all cases, the container
26 // without a codec is also supported.
27 // This list is converted at runtime into individual container-codec-key system
28 // entries in KeySystems::key_system_map_.
29 extern const MediaFormatAndKeySystem kSupportedFormatKeySystemCombinations[];
30 extern const int kNumSupportedFormatKeySystemCombinations;
32 // There should be one entry for each key system.
33 extern const KeySystemPluginTypePair kKeySystemToPluginTypeMapping[];
34 extern const int kNumKeySystemToPluginTypeMapping;
36 // Returns whether |key_system| is compatible with the user's system.
37 bool IsSystemCompatible(const std::string& key_system);
39 // Returns the name that UMA will use for the given |key_system|.
40 // This function can be called frequently. Hence this function should be
41 // implemented not to impact performance.
42 std::string KeySystemNameForUMAGeneric(const std::string& key_system);
44 // Returns whether built-in AesDecryptor can be used for the given |key_system|.
45 bool CanUseBuiltInAesDecryptor(const std::string& key_system);
47 } // namespace webkit_media
49 #endif // WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_INFO_H_