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

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

Issue 1005903003: Implement robustness strings in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout tests. Created 5 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
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 11 matching lines...) Expand all
22 // Return |name|'s parent key system. 22 // Return |name|'s parent key system.
23 static std::string GetDirectParentName(std::string name) { 23 static std::string GetDirectParentName(std::string name) {
24 size_t last_period = name.find_last_of('.'); 24 size_t last_period = name.find_last_of('.');
25 DCHECK_GT(last_period, 0u); 25 DCHECK_GT(last_period, 0u);
26 return name.substr(0u, last_period); 26 return name.substr(0u, last_period);
27 } 27 }
28 28
29 void AddWidevineWithCodecs( 29 void AddWidevineWithCodecs(
30 WidevineCdmType widevine_cdm_type, 30 WidevineCdmType widevine_cdm_type,
31 SupportedCodecs supported_codecs, 31 SupportedCodecs supported_codecs,
32 media::EmeRobustness max_audio_robustness,
33 media::EmeRobustness max_video_robustness,
32 media::EmeSessionTypeSupport persistent_license_support, 34 media::EmeSessionTypeSupport persistent_license_support,
33 media::EmeSessionTypeSupport persistent_release_message_support, 35 media::EmeSessionTypeSupport persistent_release_message_support,
34 media::EmeFeatureSupport persistent_state_support, 36 media::EmeFeatureSupport persistent_state_support,
35 media::EmeFeatureSupport distinctive_identifier_support, 37 media::EmeFeatureSupport distinctive_identifier_support,
36 std::vector<KeySystemInfo>* concrete_key_systems) { 38 std::vector<KeySystemInfo>* concrete_key_systems) {
37 KeySystemInfo info; 39 KeySystemInfo info;
38 info.key_system = kWidevineKeySystem; 40 info.key_system = kWidevineKeySystem;
39 41
40 switch (widevine_cdm_type) { 42 switch (widevine_cdm_type) {
41 case WIDEVINE: 43 case WIDEVINE:
(...skipping 17 matching lines...) Expand all
59 // Here we assume that support for a container imples support for the 61 // Here we assume that support for a container imples support for the
60 // associated initialization data type. KeySystems handles validating 62 // associated initialization data type. KeySystems handles validating
61 // |init_data_type| x |container| pairings. 63 // |init_data_type| x |container| pairings.
62 if (supported_codecs & media::EME_CODEC_WEBM_ALL) 64 if (supported_codecs & media::EME_CODEC_WEBM_ALL)
63 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM; 65 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM;
64 #if defined(USE_PROPRIETARY_CODECS) 66 #if defined(USE_PROPRIETARY_CODECS)
65 if (supported_codecs & media::EME_CODEC_MP4_ALL) 67 if (supported_codecs & media::EME_CODEC_MP4_ALL)
66 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC; 68 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC;
67 #endif // defined(USE_PROPRIETARY_CODECS) 69 #endif // defined(USE_PROPRIETARY_CODECS)
68 70
71 info.max_audio_robustness = max_audio_robustness;
72 info.max_video_robustness = max_video_robustness;
69 info.persistent_license_support = persistent_license_support; 73 info.persistent_license_support = persistent_license_support;
70 info.persistent_release_message_support = persistent_release_message_support; 74 info.persistent_release_message_support = persistent_release_message_support;
71 info.persistent_state_support = persistent_state_support; 75 info.persistent_state_support = persistent_state_support;
72 info.distinctive_identifier_support = distinctive_identifier_support; 76 info.distinctive_identifier_support = distinctive_identifier_support;
73 77
74 #if defined(ENABLE_PEPPER_CDMS) 78 #if defined(ENABLE_PEPPER_CDMS)
75 info.pepper_type = kWidevineCdmPluginMimeType; 79 info.pepper_type = kWidevineCdmPluginMimeType;
76 #endif // defined(ENABLE_PEPPER_CDMS) 80 #endif // defined(ENABLE_PEPPER_CDMS)
77 81
78 concrete_key_systems->push_back(info); 82 concrete_key_systems->push_back(info);
79 } 83 }
80 84
81 } // namespace cdm 85 } // namespace cdm
82 86
83 #endif // defined(WIDEVINE_CDM_AVAILABLE) 87 #endif // defined(WIDEVINE_CDM_AVAILABLE)
OLDNEW
« no previous file with comments | « components/cdm/renderer/widevine_key_systems.h ('k') | content/renderer/media/render_media_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698