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

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: switched to using double instead of string for file size 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
« no previous file with comments | « media/base/sample_format.h ('k') | media/base/video_frame.h » ('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 3fdcf1018e03475a20ad0e38e2ecc6a041d8ad49..a4791cd6861ef5dbb86f0edfe0fa7ce2f0459383 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";
+ 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
« no previous file with comments | « media/base/sample_format.h ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698