Chromium Code Reviews| Index: media/video/capture/video_capture_types.cc |
| diff --git a/media/video/capture/video_capture_types.cc b/media/video/capture/video_capture_types.cc |
| index 17f2d654c6193e697b8dbc9a188bcaa099d4e74d..066794f61bfe975455ed14099b786ebbe39d4b02 100644 |
| --- a/media/video/capture/video_capture_types.cc |
| +++ b/media/video/capture/video_capture_types.cc |
| @@ -5,6 +5,7 @@ |
| #include "media/video/capture/video_capture_types.h" |
| #include "base/logging.h" |
| +#include "base/strings/stringprintf.h" |
| #include "media/base/limits.h" |
| namespace media { |
| @@ -30,6 +31,15 @@ bool VideoCaptureFormat::IsValid() const { |
| (pixel_format < PIXEL_FORMAT_MAX); |
| } |
| +#if !defined(NDEBUG) |
|
Sébastien Marchand
2014/09/05 19:23:10
I don't think that this prepocessor check is neces
|
| +std::string VideoCaptureFormat::ToString() const { |
| + return base::StringPrintf("resolution: %s, fps: %f, pixel format: %s", |
| + frame_size.ToString().c_str(), |
| + frame_rate, |
| + PixelFormatToString(pixel_format).c_str()); |
| +} |
| +#endif |
| + |
| std::string VideoCaptureFormat::PixelFormatToString(VideoPixelFormat format) { |
| switch (format) { |
| case PIXEL_FORMAT_UNKNOWN: |