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

Unified Diff: media/base/sample_format.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: media/base/sample_format.cc
diff --git a/media/base/sample_format.cc b/media/base/sample_format.cc
index 0ee7f5e17b788c73ae6620321788047f1fd03387..5e5de6280c35d82cabfaf1e5f8b79a19701d5466 100644
--- a/media/base/sample_format.cc
+++ b/media/base/sample_format.cc
@@ -13,6 +13,7 @@ int SampleFormatToBytesPerChannel(SampleFormat sample_format) {
case kUnknownSampleFormat:
return 0;
case kSampleFormatU8:
+ case kSampleFormatRaw:
return 1;
case kSampleFormatS16:
case kSampleFormatPlanarS16:
@@ -49,6 +50,8 @@ const char* SampleFormatToString(SampleFormat sample_format) {
return "Float 32-bit planar";
case kSampleFormatPlanarS32:
return "Signed 32-bit planar";
+ case kSampleFormatRaw:
+ return "Raw compressed bitstream";
}
NOTREACHED() << "Invalid sample format provided: " << sample_format;
return "";
@@ -66,6 +69,7 @@ bool IsPlanar(SampleFormat sample_format) {
case kSampleFormatS24:
case kSampleFormatS32:
case kSampleFormatF32:
+ case kSampleFormatRaw:
return false;
}
@@ -80,6 +84,7 @@ bool IsInterleaved(SampleFormat sample_format) {
case kSampleFormatS24:
case kSampleFormatS32:
case kSampleFormatF32:
+ case kSampleFormatRaw:
return true;
case kUnknownSampleFormat:
case kSampleFormatPlanarS16:

Powered by Google App Engine
This is Rietveld 408576698