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

Side by Side Diff: chromecast/renderer/key_systems_cast.cc

Issue 1005903003: Implement robustness strings in requestMediaKeySystemAccess(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change parameter names. 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 "chromecast/renderer/key_systems_cast.h" 5 #include "chromecast/renderer/key_systems_cast.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "chromecast/media/base/key_systems_common.h" 11 #include "chromecast/media/base/key_systems_common.h"
12 #include "components/cdm/renderer/widevine_key_systems.h" 12 #include "components/cdm/renderer/widevine_key_systems.h"
13 #include "media/base/eme_constants.h" 13 #include "media/base/eme_constants.h"
14 14
15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
16 16
17 namespace chromecast { 17 namespace chromecast {
18 namespace shell { 18 namespace shell {
19 19
20 void AddKeySystemWithCodecs( 20 void AddKeySystemWithCodecs(
21 const std::string& key_system_name, 21 const std::string& key_system_name,
22 std::vector<::media::KeySystemInfo>* key_systems_info) { 22 std::vector<::media::KeySystemInfo>* key_systems_info) {
23 ::media::KeySystemInfo info; 23 ::media::KeySystemInfo info;
24 info.key_system = key_system_name; 24 info.key_system = key_system_name;
25 info.supported_init_data_types = ::media::EME_INIT_DATA_TYPE_CENC;
25 info.supported_codecs = 26 info.supported_codecs =
26 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1; 27 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1;
27 info.supported_init_data_types = ::media::EME_INIT_DATA_TYPE_CENC; 28 info.max_audio_robustness = ::media::EmeRobustness::EMPTY;
29 info.max_video_robustness = ::media::EmeRobustness::EMPTY;
lcwu1 2015/03/23 23:23:54 From the spec, it appears that the robustness leve
sandersd (OOO until July 31) 2015/03/23 23:42:51 I envision that other values would be added to the
28 info.persistent_license_support = ::media::EME_SESSION_TYPE_NOT_SUPPORTED; 30 info.persistent_license_support = ::media::EME_SESSION_TYPE_NOT_SUPPORTED;
29 info.persistent_release_message_support = 31 info.persistent_release_message_support =
30 ::media::EME_SESSION_TYPE_NOT_SUPPORTED; 32 ::media::EME_SESSION_TYPE_NOT_SUPPORTED;
31 info.persistent_state_support = ::media::EME_FEATURE_ALWAYS_ENABLED; 33 info.persistent_state_support = ::media::EME_FEATURE_ALWAYS_ENABLED;
32 info.distinctive_identifier_support = ::media::EME_FEATURE_ALWAYS_ENABLED; 34 info.distinctive_identifier_support = ::media::EME_FEATURE_ALWAYS_ENABLED;
33 key_systems_info->push_back(info); 35 key_systems_info->push_back(info);
34 } 36 }
35 37
36 void AddChromecastKeySystems( 38 void AddChromecastKeySystems(
37 std::vector<::media::KeySystemInfo>* key_systems_info) { 39 std::vector<::media::KeySystemInfo>* key_systems_info) {
38 #if defined(WIDEVINE_CDM_AVAILABLE) 40 #if defined(WIDEVINE_CDM_AVAILABLE)
39 AddWidevineWithCodecs( 41 AddWidevineWithCodecs(
40 cdm::WIDEVINE, 42 cdm::WIDEVINE,
41 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1, 43 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1,
42 ::media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent license. 44 ::media::EmeRobustness::HW_SECURE_CRYPTO, // Max audio robustness.
43 ::media::EME_SESSION_TYPE_NOT_SUPPORTED, // Persistent release message. 45 ::media::EmeRobustness::HW_SECURE_ALL, // Max video robustness.
44 ::media::EME_FEATURE_NOT_SUPPORTED, // Persistent state. 46 ::media::EME_SESSION_TYPE_NOT_SUPPORTED, // persistent-license.
45 ::media::EME_FEATURE_ALWAYS_ENABLED, // Distinctive identifier. 47 ::media::EME_SESSION_TYPE_NOT_SUPPORTED, // persistent-release-message.
48 ::media::EME_FEATURE_NOT_SUPPORTED, // Persistent state.
49 ::media::EME_FEATURE_ALWAYS_ENABLED, // Distinctive identifier.
46 key_systems_info); 50 key_systems_info);
47 #endif 51 #endif
48 52
49 #if defined(PLAYREADY_CDM_AVAILABLE) 53 #if defined(PLAYREADY_CDM_AVAILABLE)
50 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem, 54 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem,
51 key_systems_info); 55 key_systems_info);
52 #endif 56 #endif
53 } 57 }
54 58
55 } // namespace shell 59 } // namespace shell
56 } // namespace chromecast 60 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698