OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_MEDIA_BASE_KEY_SYSTEMS_COMMON_H_ | 5 #ifndef CHROMECAST_MEDIA_BASE_KEY_SYSTEMS_COMMON_H_ |
6 #define CHROMECAST_MEDIA_BASE_KEY_SYSTEMS_COMMON_H_ | 6 #define CHROMECAST_MEDIA_BASE_KEY_SYSTEMS_COMMON_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chromecast/public/media/cast_key_system.h" |
13 #include "media/base/android/media_client_android.h" | 14 #include "media/base/android/media_client_android.h" |
14 | 15 |
15 namespace chromecast { | 16 namespace chromecast { |
16 namespace media { | 17 namespace media { |
17 | 18 |
18 #if defined(PLAYREADY_CDM_AVAILABLE) | 19 #if defined(PLAYREADY_CDM_AVAILABLE) |
19 extern const char kChromecastPlayreadyKeySystem[]; | 20 extern const char kChromecastPlayreadyKeySystem[]; |
20 #endif // defined(PLAYREADY_CDM_AVAILABLE) | 21 #endif // defined(PLAYREADY_CDM_AVAILABLE) |
21 | 22 |
22 enum CastKeySystem { | |
23 KEY_SYSTEM_NONE = 0, | |
24 KEY_SYSTEM_CLEAR_KEY, | |
25 KEY_SYSTEM_PLAYREADY, | |
26 KEY_SYSTEM_WIDEVINE | |
27 }; | |
28 | |
29 // Translates a key system string into a CastKeySystem, calling into the | 23 // Translates a key system string into a CastKeySystem, calling into the |
30 // platform for known key systems if needed. | 24 // platform for known key systems if needed. |
31 CastKeySystem GetKeySystemByName(const std::string& key_system_name); | 25 CastKeySystem GetKeySystemByName(const std::string& key_system_name); |
32 | 26 |
33 // Translates a platform-specific key system string into a CastKeySystem. | 27 // Translates a platform-specific key system string into a CastKeySystem. |
34 // TODO(gunsch): Remove when prefixed EME is removed. | 28 // TODO(gunsch): Remove when prefixed EME is removed. |
35 CastKeySystem GetPlatformKeySystemByName(const std::string& key_system_name); | 29 CastKeySystem GetPlatformKeySystemByName(const std::string& key_system_name); |
36 | 30 |
37 // Translates a platform-specific key system string into a CastKeySystem. | 31 // Translates a platform-specific key system string into a CastKeySystem. |
38 // TODO(gunsch): Remove when prefixed EME is removed. | 32 // TODO(gunsch): Remove when prefixed EME is removed. |
39 #if defined(OS_ANDROID) | 33 #if defined(OS_ANDROID) |
40 std::vector<::media::MediaClientAndroid::KeySystemUuidMap::value_type> | 34 std::vector<::media::MediaClientAndroid::KeySystemUuidMap::value_type> |
41 GetPlatformKeySystemUUIDMappings(); | 35 GetPlatformKeySystemUUIDMappings(); |
42 #endif | 36 #endif |
43 | 37 |
44 } // namespace media | 38 } // namespace media |
45 } // namespace chromecast | 39 } // namespace chromecast |
46 | 40 |
47 #endif // CHROMECAST_MEDIA_BASE_KEY_SYSTEMS_COMMON_H_ | 41 #endif // CHROMECAST_MEDIA_BASE_KEY_SYSTEMS_COMMON_H_ |
OLD | NEW |