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

Unified Diff: chromecast/renderer/cast_content_renderer_client.cc

Issue 2798263006: [Chromecast] Fix CastMediaClient::IsSupportedAudioConfig() for (E)AC3 on Android (Closed)
Patch Set: [Chromecast] Fix CastMediaClient::IsSupportedAudioConfig() for (E)AC3 on Android 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/cast_content_renderer_client.cc
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc
index f1e905ed17cd17fafbed673f39e669981efbb5ac..7af90145fc55c523d860c68d08f03b0d48e4e9e5 100644
--- a/chromecast/renderer/cast_content_renderer_client.cc
+++ b/chromecast/renderer/cast_content_renderer_client.cc
@@ -118,6 +118,15 @@ void CastContentRendererClient::AddSupportedKeySystems(
bool CastContentRendererClient::IsSupportedAudioConfig(
const ::media::AudioConfig& config) {
#if defined(OS_ANDROID)
+ media::AudioCodec codec = media::ToCastAudioCodec(config.codec);
+
+ // No ATV device we know of has (E)AC3 decoder, so it relies on the audio sink
+ // device.
+ if (codec == media::kCodecEAC3)
+ return media::MediaCapabilities::HdmiSinkSupportsEAC3();
+ if (codec == media::kCodecAC3)
+ return media::MediaCapabilities::HdmiSinkSupportsAC3();
+
// TODO(sanfin): Implement this for Android.
return true;
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698