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

Unified Diff: media/base/sample_format.cc

Issue 1468153003: Define AudioBuffer and VideoFrame for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsInterleaved Created 5 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
« no previous file with comments | « media/base/sample_format.h ('k') | media/mojo/interfaces/decryptor.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/sample_format.cc
diff --git a/media/base/sample_format.cc b/media/base/sample_format.cc
index 464fc1b6f578e0f4187f40365d18f4ef8922a20b..c4bd19545cdd79d92a39fa05554b128f877678af 100644
--- a/media/base/sample_format.cc
+++ b/media/base/sample_format.cc
@@ -51,4 +51,16 @@ const char* SampleFormatToString(SampleFormat sample_format) {
return "";
}
+bool IsPlanar(SampleFormat sample_format) {
DaleCurtis 2015/11/24 21:40:08 Might be worth making these both fully-qualified s
jrummell 2015/11/24 22:34:41 Done.
+ return sample_format == kSampleFormatPlanarF32 ||
+ sample_format == kSampleFormatPlanarS16 ||
+ sample_format == kSampleFormatPlanarS32;
+}
+
+bool IsInterleaved(SampleFormat sample_format) {
+ return sample_format == kSampleFormatU8 ||
+ sample_format == kSampleFormatS16 ||
+ sample_format == kSampleFormatS32 || sample_format == kSampleFormatF32;
+}
+
} // namespace media
« no previous file with comments | « media/base/sample_format.h ('k') | media/mojo/interfaces/decryptor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698