| Index: media/capture/video/win/video_capture_device_mf_win.cc
|
| diff --git a/media/capture/video/win/video_capture_device_mf_win.cc b/media/capture/video/win/video_capture_device_mf_win.cc
|
| index 9965e7c76a3fbd083c5661478d1015034b8a5cd9..920f67eae46e57e7e00915b8c8333e6ddb27c751 100644
|
| --- a/media/capture/video/win/video_capture_device_mf_win.cc
|
| +++ b/media/capture/video/win/video_capture_device_mf_win.cc
|
| @@ -10,6 +10,7 @@
|
|
|
| #include <utility>
|
|
|
| +#include "base/big_endian.h"
|
| #include "base/location.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/strings/stringprintf.h"
|
| @@ -178,6 +179,17 @@ bool VideoCaptureDeviceMFWin::FormatFromGuid(const GUID& guid,
|
| return true;
|
| }
|
| }
|
| + // 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*>(&guid.Data1), &fourcc);
|
| + if (fourcc == 'Z16 ' || fourcc == 'INVZ') {
|
| + *format = PIXEL_FORMAT_Y16;
|
| + return true;
|
| + } else if (fourcc == 'Y8 ') {
|
| + *format = PIXEL_FORMAT_Y8;
|
| + return true;
|
| + }
|
|
|
| return false;
|
| }
|
|
|