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

Unified Diff: chromecast/common/media/cast_media_client.cc

Issue 2466463005: Support (E)AC3 passthrough
Patch Set: Improve CastMediaClient::IsSupportedPassthroughAudio() Created 4 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: chromecast/common/media/cast_media_client.cc
diff --git a/chromecast/common/media/cast_media_client.cc b/chromecast/common/media/cast_media_client.cc
index 38ba0f14bc7f8dc1017c511294033950c6283ceb..ae57816b99efb8f6aea994e8d52d017f466a0b99 100644
--- a/chromecast/common/media/cast_media_client.cc
+++ b/chromecast/common/media/cast_media_client.cc
@@ -5,6 +5,7 @@
#include "chromecast/common/media/cast_media_client.h"
#include "base/lazy_instance.h"
+#include "chromecast/media/base/media_caps.h"
#include "chromecast/media/base/media_codec_support.h"
#include "chromecast/public/media/media_capabilities_shlib.h"
@@ -55,7 +56,6 @@ void CastMediaClient::RecordRapporURL(const std::string& metric,
content_media_client_->RecordRapporURL(metric, url);
}
-// static
bool CastMediaClient::IsSupportedVideoConfig(::media::VideoCodec codec,
::media::VideoCodecProfile profile,
int level) {
@@ -75,5 +75,12 @@ bool CastMediaClient::IsSupportedVideoConfig(::media::VideoCodec codec,
return true;
}
+bool CastMediaClient::IsSupportedPassthroughAudio(::media::AudioCodec codec) {
+ return (codec == ::media::kCodecAC3 &&
+ MediaCapabilities::HdmiSinkSupportsAC3()) ||
+ (codec == ::media::kCodecEAC3 &&
+ MediaCapabilities::HdmiSinkSupportsEAC3());
+}
+
} // namespace media
} // namespace chromecast

Powered by Google App Engine
This is Rietveld 408576698