Commit 42ac1dfe authored by ziyangch's avatar ziyangch Committed by Commit Bot

[Chromecast] Disable secure FLAC and OPUS codec in EME on Chromecast V1.

BUG=internal b/115688282

Test=cast to Chromecast V1 from Google Play Movie.

Change-Id: Ic57c4861016066457d850ace0f9da8e3cd905959
Reviewed-on: https://chromium-review.googlesource.com/1237613
Commit-Queue: Ziyang Cheng <ziyangch@chromium.org>
Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593748}
parent 76346c9b
......@@ -592,6 +592,7 @@ buildflag_header("chromecast_buildflags") {
"USE_ANDROID_USER_AGENT=$use_android_user_agent",
"USE_CHROMECAST_CDMS=$use_chromecast_cdms",
"DEFAULT_COMMAND_LINE_FLAGS=\"$default_command_line_flags\"",
"DISABLE_SECURE_FLAC_OPUS_DECODING=$disable_secure_flac_and_opus_decoding",
]
}
......
......@@ -94,6 +94,10 @@ declare_args() {
# This arg can be overridden but not supports += operator.
# TODO(ziyangch): make the parsing logic have ability to quote/escape characters.
default_command_line_flags = ""
# Set to true to disable secure flac/opus support in EME, when using
# cast CMA media backend and supporting Widevine or Playready.
disable_secure_flac_and_opus_decoding = false
}
declare_args() {
......
......@@ -112,10 +112,13 @@ class PlayReadyKeySystemProperties : public ::media::KeySystemProperties {
SupportedCodecs GetCastEmeSupportedCodecs() {
SupportedCodecs codecs =
::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1 |
::media::EME_CODEC_MP4_FLAC | ::media::EME_CODEC_COMMON_VP9 |
::media::EME_CODEC_WEBM_OPUS | ::media::EME_CODEC_WEBM_VP8 |
::media::EME_CODEC_COMMON_VP9 | ::media::EME_CODEC_WEBM_VP8 |
::media::EME_CODEC_WEBM_VP9;
#if !BUILDFLAG(DISABLE_SECURE_FLAC_OPUS_DECODING)
codecs |= ::media::EME_CODEC_MP4_FLAC | ::media::EME_CODEC_WEBM_OPUS;
#endif // BUILDFLAG(DISABLE_SECURE_FLAC_OPUS_DECODING)
#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
codecs |= ::media::EME_CODEC_MP4_HEVC;
#endif // BUILDFLAG(ENABLE_HEVC_DEMUXING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment