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

Side by Side Diff: components/cdm/renderer/widevine_key_systems.cc

Issue 1737213002: EME: Remove WidevineCdmType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parent
Patch Set: Fix Cast build. Created 4 years, 9 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 | « components/cdm/renderer/widevine_key_systems.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "components/cdm/renderer/widevine_key_systems.h" 5 #include "components/cdm/renderer/widevine_key_systems.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "media/base/eme_constants.h" 14 #include "media/base/eme_constants.h"
15 15
16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
17 17
18 #if defined(WIDEVINE_CDM_AVAILABLE) 18 #if defined(WIDEVINE_CDM_AVAILABLE)
19 19
20 using media::KeySystemInfo; 20 using media::KeySystemInfo;
21 using media::SupportedCodecs; 21 using media::SupportedCodecs;
22 22
23 namespace cdm { 23 namespace cdm {
24 24
25 void AddWidevineWithCodecs( 25 void AddWidevineWithCodecs(
26 WidevineCdmType widevine_cdm_type,
27 SupportedCodecs supported_codecs, 26 SupportedCodecs supported_codecs,
28 #if defined(OS_ANDROID) 27 #if defined(OS_ANDROID)
29 SupportedCodecs supported_secure_codecs, 28 SupportedCodecs supported_secure_codecs,
30 #endif // defined(OS_ANDROID) 29 #endif // defined(OS_ANDROID)
31 media::EmeRobustness max_audio_robustness, 30 media::EmeRobustness max_audio_robustness,
32 media::EmeRobustness max_video_robustness, 31 media::EmeRobustness max_video_robustness,
33 media::EmeSessionTypeSupport persistent_license_support, 32 media::EmeSessionTypeSupport persistent_license_support,
34 media::EmeSessionTypeSupport persistent_release_message_support, 33 media::EmeSessionTypeSupport persistent_release_message_support,
35 media::EmeFeatureSupport persistent_state_support, 34 media::EmeFeatureSupport persistent_state_support,
36 media::EmeFeatureSupport distinctive_identifier_support, 35 media::EmeFeatureSupport distinctive_identifier_support,
37 std::vector<KeySystemInfo>* concrete_key_systems) { 36 std::vector<KeySystemInfo>* concrete_key_systems) {
38 KeySystemInfo info; 37 KeySystemInfo info;
39 info.key_system = kWidevineKeySystem; 38 info.key_system = kWidevineKeySystem;
40 39
41 switch (widevine_cdm_type) {
42 case WIDEVINE:
43 break;
44 #if defined(OS_ANDROID)
45 case WIDEVINE_HR_NON_COMPOSITING:
46 info.key_system.append(".hrnoncompositing");
47 break;
48 #endif // defined(OS_ANDROID)
49 default:
50 NOTREACHED();
51 }
52
53 // TODO(xhwang): A container or an initDataType may be supported even though 40 // TODO(xhwang): A container or an initDataType may be supported even though
54 // there are no codecs supported in that container. Fix this when we support 41 // there are no codecs supported in that container. Fix this when we support
55 // initDataType. 42 // initDataType.
56 info.supported_codecs = supported_codecs; 43 info.supported_codecs = supported_codecs;
57 #if defined(OS_ANDROID) 44 #if defined(OS_ANDROID)
58 info.supported_secure_codecs = supported_secure_codecs; 45 info.supported_secure_codecs = supported_secure_codecs;
59 #endif // defined(OS_ANDROID) 46 #endif // defined(OS_ANDROID)
60 47
61 // Here we assume that support for a container imples support for the 48 // Here we assume that support for a container imples support for the
62 // associated initialization data type. KeySystems handles validating 49 // associated initialization data type. KeySystems handles validating
(...skipping 15 matching lines...) Expand all
78 #if defined(ENABLE_PEPPER_CDMS) 65 #if defined(ENABLE_PEPPER_CDMS)
79 info.pepper_type = kWidevineCdmPluginMimeType; 66 info.pepper_type = kWidevineCdmPluginMimeType;
80 #endif // defined(ENABLE_PEPPER_CDMS) 67 #endif // defined(ENABLE_PEPPER_CDMS)
81 68
82 concrete_key_systems->push_back(info); 69 concrete_key_systems->push_back(info);
83 } 70 }
84 71
85 } // namespace cdm 72 } // namespace cdm
86 73
87 #endif // defined(WIDEVINE_CDM_AVAILABLE) 74 #endif // defined(WIDEVINE_CDM_AVAILABLE)
OLDNEW
« no previous file with comments | « components/cdm/renderer/widevine_key_systems.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698