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

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

Issue 1160983002: Allows support for persistent session types in BrowserCdm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase conflicts with https://codereview.chromium.org/1166453002 Created 5 years, 6 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 "build/build_config.h"
11 #include "chromecast/media/base/key_systems_common.h" 12 #include "chromecast/media/base/key_systems_common.h"
12 #include "components/cdm/renderer/widevine_key_systems.h" 13 #include "components/cdm/renderer/widevine_key_systems.h"
13 #include "media/base/eme_constants.h" 14 #include "media/base/eme_constants.h"
14 15
15 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
16 17
17 using ::media::EmeFeatureSupport; 18 using ::media::EmeFeatureSupport;
18 using ::media::EmeRobustness; 19 using ::media::EmeRobustness;
19 using ::media::EmeSessionTypeSupport; 20 using ::media::EmeSessionTypeSupport;
20 21
21 namespace chromecast { 22 namespace chromecast {
22 namespace shell { 23 namespace shell {
23 24
24 void AddKeySystemWithCodecs( 25 void AddKeySystemWithCodecs(
25 const std::string& key_system_name, 26 const std::string& key_system_name,
26 std::vector<::media::KeySystemInfo>* key_systems_info) { 27 std::vector<::media::KeySystemInfo>* key_systems_info) {
27 ::media::KeySystemInfo info; 28 ::media::KeySystemInfo info;
28 info.key_system = key_system_name; 29 info.key_system = key_system_name;
29 info.supported_init_data_types = ::media::kInitDataTypeMaskCenc; 30 info.supported_init_data_types = ::media::kInitDataTypeMaskCenc;
30 info.supported_codecs = 31 info.supported_codecs =
31 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1; 32 ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1;
32 info.max_audio_robustness = ::media::EmeRobustness::EMPTY; 33 info.max_audio_robustness = ::media::EmeRobustness::EMPTY;
33 info.max_video_robustness = ::media::EmeRobustness::EMPTY; 34 info.max_video_robustness = ::media::EmeRobustness::EMPTY;
35 #if defined(OS_ANDROID)
34 info.persistent_license_support = 36 info.persistent_license_support =
35 ::media::EmeSessionTypeSupport::NOT_SUPPORTED; 37 ::media::EmeSessionTypeSupport::NOT_SUPPORTED;
38 #else
39 info.persistent_license_support =
40 ::media::EmeSessionTypeSupport::SUPPORTED;
41 #endif
36 info.persistent_release_message_support = 42 info.persistent_release_message_support =
37 ::media::EmeSessionTypeSupport::NOT_SUPPORTED; 43 ::media::EmeSessionTypeSupport::NOT_SUPPORTED;
38 info.persistent_state_support = ::media::EmeFeatureSupport::ALWAYS_ENABLED; 44 info.persistent_state_support = ::media::EmeFeatureSupport::ALWAYS_ENABLED;
39 info.distinctive_identifier_support = 45 info.distinctive_identifier_support =
40 ::media::EmeFeatureSupport::ALWAYS_ENABLED; 46 ::media::EmeFeatureSupport::ALWAYS_ENABLED;
41 key_systems_info->push_back(info); 47 key_systems_info->push_back(info);
42 } 48 }
43 49
44 void AddChromecastKeySystems( 50 void AddChromecastKeySystems(
45 std::vector<::media::KeySystemInfo>* key_systems_info) { 51 std::vector<::media::KeySystemInfo>* key_systems_info) {
(...skipping 17 matching lines...) Expand all
63 #endif // defined(WIDEVINE_CDM_AVAILABLE) 69 #endif // defined(WIDEVINE_CDM_AVAILABLE)
64 70
65 #if defined(PLAYREADY_CDM_AVAILABLE) 71 #if defined(PLAYREADY_CDM_AVAILABLE)
66 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem, 72 AddKeySystemWithCodecs(media::kChromecastPlayreadyKeySystem,
67 key_systems_info); 73 key_systems_info);
68 #endif // defined(PLAYREADY_CDM_AVAILABLE) 74 #endif // defined(PLAYREADY_CDM_AVAILABLE)
69 } 75 }
70 76
71 } // namespace shell 77 } // namespace shell
72 } // namespace chromecast 78 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cdm/browser_cdm_cast.cc ('k') | content/browser/media/cdm/browser_cdm_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698