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

Side by Side Diff: chrome/renderer/media/chrome_key_systems.cc

Issue 2793163003: Add EME support for new VP9 codec string in WebM. (Closed)
Patch Set: Add another debug log Created 3 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/renderer/media/chrome_key_systems.h" 5 #include "chrome/renderer/media/chrome_key_systems.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // as those may offer a higher level of protection. 189 // as those may offer a higher level of protection.
190 supported_codecs |= media::EME_CODEC_WEBM_OPUS; 190 supported_codecs |= media::EME_CODEC_WEBM_OPUS;
191 supported_codecs |= media::EME_CODEC_WEBM_VORBIS; 191 supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
192 #if BUILDFLAG(USE_PROPRIETARY_CODECS) 192 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
193 supported_codecs |= media::EME_CODEC_MP4_AAC; 193 supported_codecs |= media::EME_CODEC_MP4_AAC;
194 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) 194 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
195 195
196 for (size_t i = 0; i < codecs.size(); ++i) { 196 for (size_t i = 0; i < codecs.size(); ++i) {
197 if (codecs[i] == kCdmSupportedCodecVp8) 197 if (codecs[i] == kCdmSupportedCodecVp8)
198 supported_codecs |= media::EME_CODEC_WEBM_VP8; 198 supported_codecs |= media::EME_CODEC_WEBM_VP8;
199 if (codecs[i] == kCdmSupportedCodecVp9) 199 if (codecs[i] == kCdmSupportedCodecVp9) {
200 supported_codecs |= media::EME_CODEC_WEBM_VP9; 200 supported_codecs |= media::EME_CODEC_WEBM_VP9;
201 supported_codecs |= media::EME_CODEC_COMMON_VP9;
202 }
201 #if BUILDFLAG(USE_PROPRIETARY_CODECS) 203 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
202 if (codecs[i] == kCdmSupportedCodecAvc1) 204 if (codecs[i] == kCdmSupportedCodecAvc1)
203 supported_codecs |= media::EME_CODEC_MP4_AVC1; 205 supported_codecs |= media::EME_CODEC_MP4_AVC1;
204 if (codecs[i] == kCdmSupportedCodecVp9)
205 supported_codecs |= media::EME_CODEC_MP4_VP9;
206 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) 206 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
207 } 207 }
208 208
209 using Robustness = cdm::WidevineKeySystemProperties::Robustness; 209 using Robustness = cdm::WidevineKeySystemProperties::Robustness;
210 concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties( 210 concrete_key_systems->emplace_back(new cdm::WidevineKeySystemProperties(
211 supported_codecs, 211 supported_codecs,
212 #if defined(OS_CHROMEOS) 212 #if defined(OS_CHROMEOS)
213 Robustness::HW_SECURE_ALL, // Maximum audio robustness. 213 Robustness::HW_SECURE_ALL, // Maximum audio robustness.
214 Robustness::HW_SECURE_ALL, // Maximim video robustness. 214 Robustness::HW_SECURE_ALL, // Maximim video robustness.
215 media::EmeSessionTypeSupport:: 215 media::EmeSessionTypeSupport::
(...skipping 24 matching lines...) Expand all
240 #if defined(WIDEVINE_CDM_AVAILABLE) 240 #if defined(WIDEVINE_CDM_AVAILABLE)
241 AddPepperBasedWidevine(key_systems_properties); 241 AddPepperBasedWidevine(key_systems_properties);
242 #endif // defined(WIDEVINE_CDM_AVAILABLE) 242 #endif // defined(WIDEVINE_CDM_AVAILABLE)
243 243
244 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) 244 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
245 245
246 #if defined(OS_ANDROID) 246 #if defined(OS_ANDROID)
247 cdm::AddAndroidWidevine(key_systems_properties); 247 cdm::AddAndroidWidevine(key_systems_properties);
248 #endif // defined(OS_ANDROID) 248 #endif // defined(OS_ANDROID)
249 } 249 }
OLDNEW
« no previous file with comments | « chrome/browser/media/encrypted_media_supported_types_browsertest.cc ('k') | media/base/eme_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698