| Index: media/capture/video/win/video_capture_device_win.cc
|
| diff --git a/media/capture/video/win/video_capture_device_win.cc b/media/capture/video/win/video_capture_device_win.cc
|
| index d3c5d539c2b6c5926da1e34f40de0079c77e8da0..e9667055186f39855347886f3b1c818c7bf12c68 100644
|
| --- a/media/capture/video/win/video_capture_device_win.cc
|
| +++ b/media/capture/video/win/video_capture_device_win.cc
|
| @@ -11,6 +11,7 @@
|
| #include <list>
|
| #include <utility>
|
|
|
| +#include "base/big_endian.h"
|
| #include "base/macros.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| #include "base/win/scoped_co_mem.h"
|
| @@ -163,6 +164,15 @@ VideoCaptureDeviceWin::TranslateMediaSubtypeToPixelFormat(
|
| if (sub_type == pixel_format.sub_type)
|
| return pixel_format.format;
|
| }
|
| + // TODO(astojilj) Define GUIDs and move this to common place as the code is
|
| + // replicated around.
|
| + uint32_t fourcc;
|
| + base::ReadBigEndian(reinterpret_cast<const char*>(&sub_type.Data1), &fourcc);
|
| + if (fourcc == 'Z16 ' || fourcc == 'INVZ') {
|
| + return PIXEL_FORMAT_Y16;
|
| + } else if (fourcc == 'Y8 ') {
|
| + return PIXEL_FORMAT_Y8;
|
| + }
|
| #ifndef NDEBUG
|
| WCHAR guid_str[128];
|
| StringFromGUID2(sub_type, guid_str, arraysize(guid_str));
|
|
|