Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 128143c4dfeb88f9c499b5c1b94af8264aea9a85..b54154c706301679a1c0a9a8c51c2069714b513b 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -53,6 +53,27 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
YV12A = 14, // 20bpp YUVA planar 1x1 Y, 2x2 VU, 1x1 A samples. |
}; |
+ static std::string FormatToString(Format format) { |
scherkus (not reviewing)
2013/08/02 23:18:19
don't inline this function declaration inside the
Ty Overby
2013/08/03 00:02:23
Done.
|
+ switch(format){ |
+ case VideoFrame::Format::INVALID: |
+ return "INVALID"; |
+ case VideoFrame::Format::RGB32: |
+ return "RGB32"; |
+ case VideoFrame::Format::YV12: |
+ return "YV12"; |
+ case VideoFrame::Format::YV16: |
+ return "YV16"; |
+ case VideoFrame::Format::EMPTY: |
+ return "EMPTY"; |
+ case VideoFrame::Format::I420: |
+ return "I420"; |
+ case VideoFrame::Format::YV12A: |
+ return "YV12A"; |
+ case VideoFrame::Format::NATIVE_TEXTURE: |
+ return "NATIVE_TEXTURE"; |
+ } |
+ } |
+ |
// This class calls the TextureNoLongerNeededCallback when the last reference |
// on the class is destroyed. The VideoFrame holds a reference to the mailbox |
// but anyone else who queries the mailbox should also hold a reference while |