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

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

Issue 665343002: Move KeySystemInfo to media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 6 years, 1 month 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') | content/content_common.gypi » ('j') | 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "content/public/common/eme_constants.h" 11 #include "media/base/eme_constants.h"
12 12
13 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 13 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
14 14
15 #if defined(WIDEVINE_CDM_AVAILABLE) 15 #if defined(WIDEVINE_CDM_AVAILABLE)
16 16
17 using content::KeySystemInfo; 17 using media::KeySystemInfo;
18 using content::SupportedCodecs; 18 using media::SupportedCodecs;
19 19
20 namespace cdm { 20 namespace cdm {
21 21
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
(...skipping 17 matching lines...) Expand all
46 } 46 }
47 47
48 // TODO(xhwang): A container or an initDataType may be supported even though 48 // TODO(xhwang): A container or an initDataType may be supported even though
49 // there are no codecs supported in that container. Fix this when we support 49 // there are no codecs supported in that container. Fix this when we support
50 // initDataType. 50 // initDataType.
51 info.supported_codecs = supported_codecs; 51 info.supported_codecs = supported_codecs;
52 52
53 // Here we assume that support for a container imples support for the 53 // Here we assume that support for a container imples support for the
54 // associated initialization data type. KeySystems handles validating 54 // associated initialization data type. KeySystems handles validating
55 // |init_data_type| x |container| pairings. 55 // |init_data_type| x |container| pairings.
56 if (supported_codecs & content::EME_CODEC_WEBM_ALL) 56 if (supported_codecs & media::EME_CODEC_WEBM_ALL)
57 info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_WEBM; 57 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_WEBM;
58 #if defined(USE_PROPRIETARY_CODECS) 58 #if defined(USE_PROPRIETARY_CODECS)
59 if (supported_codecs & content::EME_CODEC_MP4_ALL) 59 if (supported_codecs & media::EME_CODEC_MP4_ALL)
60 info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_CENC; 60 info.supported_init_data_types |= media::EME_INIT_DATA_TYPE_CENC;
61 #endif // defined(USE_PROPRIETARY_CODECS) 61 #endif // defined(USE_PROPRIETARY_CODECS)
62 62
63 #if defined(ENABLE_PEPPER_CDMS) 63 #if defined(ENABLE_PEPPER_CDMS)
64 info.pepper_type = kWidevineCdmPluginMimeType; 64 info.pepper_type = kWidevineCdmPluginMimeType;
65 #endif // defined(ENABLE_PEPPER_CDMS) 65 #endif // defined(ENABLE_PEPPER_CDMS)
66 66
67 concrete_key_systems->push_back(info); 67 concrete_key_systems->push_back(info);
68 } 68 }
69 69
70 } // namespace cdm 70 } // namespace cdm
71 71
72 #endif // defined(WIDEVINE_CDM_AVAILABLE) 72 #endif // defined(WIDEVINE_CDM_AVAILABLE)
OLDNEW
« no previous file with comments | « components/cdm/renderer/widevine_key_systems.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698