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

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

Issue 557723003: Implement Chromium side of MediaKeys.isTypeSupported(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work around performance warning. Created 6 years, 2 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/android_key_systems.cc ('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 12
12 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 13 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
13 14
14 #if defined(WIDEVINE_CDM_AVAILABLE) 15 #if defined(WIDEVINE_CDM_AVAILABLE)
15 16
16 using content::KeySystemInfo; 17 using content::KeySystemInfo;
17 using content::SupportedCodecs; 18 using content::SupportedCodecs;
18 19
19 namespace cdm { 20 namespace cdm {
20 21
(...skipping 21 matching lines...) Expand all
42 #endif // defined(OS_ANDROID) 43 #endif // defined(OS_ANDROID)
43 default: 44 default:
44 NOTREACHED(); 45 NOTREACHED();
45 } 46 }
46 47
47 // 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
48 // 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
49 // initDataType. 50 // initDataType.
50 info.supported_codecs = supported_codecs; 51 info.supported_codecs = supported_codecs;
51 52
53 // Here we assume that support for a container imples support for the
54 // associated initialization data type. KeySystems handles validating
55 // |init_data_type| x |container| pairings.
56 if (supported_codecs & content::EME_CODEC_WEBM_ALL)
57 info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_WEBM;
58 #if defined(USE_PROPRIETARY_CODECS)
59 if (supported_codecs & content::EME_CODEC_MP4_ALL)
60 info.supported_init_data_types |= content::EME_INIT_DATA_TYPE_CENC;
61 #endif // defined(USE_PROPRIETARY_CODECS)
62
52 #if defined(ENABLE_PEPPER_CDMS) 63 #if defined(ENABLE_PEPPER_CDMS)
53 info.pepper_type = kWidevineCdmPluginMimeType; 64 info.pepper_type = kWidevineCdmPluginMimeType;
54 #endif // defined(ENABLE_PEPPER_CDMS) 65 #endif // defined(ENABLE_PEPPER_CDMS)
55 66
56 concrete_key_systems->push_back(info); 67 concrete_key_systems->push_back(info);
57 } 68 }
58 69
59 } // namespace cdm 70 } // namespace cdm
60 71
61 #endif // defined(WIDEVINE_CDM_AVAILABLE) 72 #endif // defined(WIDEVINE_CDM_AVAILABLE)
OLDNEW
« no previous file with comments | « components/cdm/renderer/android_key_systems.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698