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

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

Issue 755143004: Advertise Opus support in EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable tests on Android. Created 6 years 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 DVLOG(1) << "Widevine CDM is not currently available."; 150 DVLOG(1) << "Widevine CDM is not currently available.";
151 return; 151 return;
152 } 152 }
153 153
154 std::vector<std::string> codecs; 154 std::vector<std::string> codecs;
155 GetSupportedCodecsForPepperCdm(additional_param_names, 155 GetSupportedCodecsForPepperCdm(additional_param_names,
156 additional_param_values, 156 additional_param_values,
157 &codecs); 157 &codecs);
158 158
159 SupportedCodecs supported_codecs = media::EME_CODEC_NONE; 159 SupportedCodecs supported_codecs = media::EME_CODEC_NONE;
160
161 // Audio codecs are always supported.
162 // TODO(sandersd): Include AAC here once the tests are updated.
163 // TODO(sandersd): Distinguish these from those that are directly supported,
164 // as those may offer a higher level of protection.
165 supported_codecs |= media::EME_CODEC_WEBM_OPUS;
166 supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
167
160 for (size_t i = 0; i < codecs.size(); ++i) { 168 for (size_t i = 0; i < codecs.size(); ++i) {
161 if (codecs[i] == kCdmSupportedCodecVorbis)
162 supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
163 if (codecs[i] == kCdmSupportedCodecVp8) 169 if (codecs[i] == kCdmSupportedCodecVp8)
164 supported_codecs |= media::EME_CODEC_WEBM_VP8; 170 supported_codecs |= media::EME_CODEC_WEBM_VP8;
165 if (codecs[i] == kCdmSupportedCodecVp9) 171 if (codecs[i] == kCdmSupportedCodecVp9)
166 supported_codecs |= media::EME_CODEC_WEBM_VP9; 172 supported_codecs |= media::EME_CODEC_WEBM_VP9;
167 #if defined(USE_PROPRIETARY_CODECS) 173 #if defined(USE_PROPRIETARY_CODECS)
168 if (codecs[i] == kCdmSupportedCodecAac) 174 if (codecs[i] == kCdmSupportedCodecAac)
169 supported_codecs |= media::EME_CODEC_MP4_AAC; 175 supported_codecs |= media::EME_CODEC_MP4_AAC;
170 if (codecs[i] == kCdmSupportedCodecAvc1) 176 if (codecs[i] == kCdmSupportedCodecAvc1)
171 supported_codecs |= media::EME_CODEC_MP4_AVC1; 177 supported_codecs |= media::EME_CODEC_MP4_AVC1;
172 #endif // defined(USE_PROPRIETARY_CODECS) 178 #endif // defined(USE_PROPRIETARY_CODECS)
(...skipping 12 matching lines...) Expand all
185 191
186 #if defined(WIDEVINE_CDM_AVAILABLE) 192 #if defined(WIDEVINE_CDM_AVAILABLE)
187 AddPepperBasedWidevine(key_systems_info); 193 AddPepperBasedWidevine(key_systems_info);
188 #endif // defined(WIDEVINE_CDM_AVAILABLE) 194 #endif // defined(WIDEVINE_CDM_AVAILABLE)
189 #endif // defined(ENABLE_PEPPER_CDMS) 195 #endif // defined(ENABLE_PEPPER_CDMS)
190 196
191 #if defined(OS_ANDROID) 197 #if defined(OS_ANDROID)
192 cdm::AddAndroidWidevine(key_systems_info); 198 cdm::AddAndroidWidevine(key_systems_info);
193 #endif // defined(OS_ANDROID) 199 #endif // defined(OS_ANDROID)
194 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698