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

Unified Diff: media/base/sample_format.cc

Issue 21953003: Added logging calls to FFmpegDemuxer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
Index: media/base/sample_format.cc
diff --git a/media/base/sample_format.cc b/media/base/sample_format.cc
index 3fdcf1018e03475a20ad0e38e2ecc6a041d8ad49..23ad14c4dae89ca0340b135f1fc1146a9d30d028 100644
--- a/media/base/sample_format.cc
+++ b/media/base/sample_format.cc
@@ -29,4 +29,27 @@ int SampleFormatToBytesPerChannel(SampleFormat sample_format) {
return 0;
}
+const char* SampleFormatToString(SampleFormat sample_format) {
+ switch(sample_format) {
+ case kUnknownSampleFormat:
+ return "Unknown Sample Format";
DaleCurtis 2013/08/05 22:33:35 Lower case second word+
Ty Overby 2013/08/05 22:37:45 Done.
+ case kSampleFormatU8:
+ return "Unsigned 8-bit with bias of 128";
+ case kSampleFormatS16:
+ return "Signed 16-bit";
+ case kSampleFormatS32:
+ return "Signed 32-bit";
+ case kSampleFormatF32:
+ return "Float 32-bit";
+ case kSampleFormatPlanarS16:
+ return "Signed 16-bit planar";
+ case kSampleFormatPlanarF32:
+ return "Float 32-bit planar";
+ case kSampleFormatMax:
+ break;
+ }
+ NOTREACHED() << "Invalid sample format provided: " << sample_format;
+ return "";
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698