Commit 08365860 authored by tsunghung's avatar tsunghung Committed by Commit bot

[Chromecast] Fix CastMediaClient::IsSupportedAudioConfig() for (E)AC3 on Android

Before we have the chance to fully implement the function, we need
a quick fix for (E)AC3.

No ATV we know of that supports (E)AC3 decoder, so it relies on the
audio sink device.

BUG=Internal b/36896359

Review-Url: https://codereview.chromium.org/2798263006
Cr-Commit-Position: refs/heads/master@{#463010}
parent b3770571
...@@ -75,6 +75,15 @@ bool CastMediaClient::IsSupportedVideoConfig( ...@@ -75,6 +75,15 @@ bool CastMediaClient::IsSupportedVideoConfig(
bool CastMediaClient::IsSupportedAudioConfig( bool CastMediaClient::IsSupportedAudioConfig(
const ::media::AudioConfig& config) { const ::media::AudioConfig& config) {
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
AudioCodec codec = ToCastAudioCodec(config.codec);
// No ATV device we know of has (E)AC3 decoder, so it relies on the audio sink
// device.
if (codec == kCodecEAC3)
return MediaCapabilities::HdmiSinkSupportsEAC3();
if (codec == kCodecAC3)
return MediaCapabilities::HdmiSinkSupportsAC3();
// TODO(sanfin): Implement this for Android. // TODO(sanfin): Implement this for Android.
return true; return true;
#else #else
......
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