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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/media/chrome_key_systems.cc
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 7ebb4fe31f1204e58e7e03b5a5eec66c00a91753..db388eacf9e9486919a00ec3dba99be53e3cd5ac 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -157,16 +157,22 @@ static void AddPepperBasedWidevine(
&codecs);
SupportedCodecs supported_codecs = media::EME_CODEC_NONE;
jrummell 2014/11/25 21:37:12 nit: Should this be = EME_CODEC_WEBM_AUDIO_ALL, an
sandersd (OOO until July 31) 2014/11/25 21:46:40 No, a specific goal is to remove _ALL from use eve
+
+ // Audio codecs are always supported.
+ // TODO(sandersd): Distinguish these from those that are directly supported,
+ // as those may offer a higher level of protection.
+ supported_codecs |= media::EME_CODEC_WEBM_OPUS;
+ supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
+#if defined(USE_PROPRIETARY_CODECS)
+ supported_codecs |= media::EME_CODEC_MP4_AAC;
+#endif // defined(USE_PROPRIETARY_CODECS)
+
for (size_t i = 0; i < codecs.size(); ++i) {
- if (codecs[i] == kCdmSupportedCodecVorbis)
- supported_codecs |= media::EME_CODEC_WEBM_VORBIS;
if (codecs[i] == kCdmSupportedCodecVp8)
supported_codecs |= media::EME_CODEC_WEBM_VP8;
if (codecs[i] == kCdmSupportedCodecVp9)
supported_codecs |= media::EME_CODEC_WEBM_VP9;
#if defined(USE_PROPRIETARY_CODECS)
- if (codecs[i] == kCdmSupportedCodecAac)
- supported_codecs |= media::EME_CODEC_MP4_AAC;
if (codecs[i] == kCdmSupportedCodecAvc1)
supported_codecs |= media::EME_CODEC_MP4_AVC1;
#endif // defined(USE_PROPRIETARY_CODECS)

Powered by Google App Engine
This is Rietveld 408576698