| Index: media/capture/video/win/sink_input_pin_win.cc
|
| diff --git a/media/capture/video/win/sink_input_pin_win.cc b/media/capture/video/win/sink_input_pin_win.cc
|
| index b29215829de817b3ecdd036c6e8faa072e7ff054..1b2120bd4328122530ec318d6bf50155e2902a89 100644
|
| --- a/media/capture/video/win/sink_input_pin_win.cc
|
| +++ b/media/capture/video/win/sink_input_pin_win.cc
|
| @@ -95,6 +95,14 @@ bool SinkInputPin::IsMediaTypeValid(const AM_MEDIA_TYPE* media_type) {
|
| resulting_format_.pixel_format = PIXEL_FORMAT_RGB32;
|
| return true;
|
| }
|
| + // TODO(astojilj) Define GUIDs and move this to common place as the code is
|
| + // replicated around.
|
| + if ((sub_type.Data1 == MAKEFOURCC('Z', '1', '6', ' ') ||
|
| + sub_type.Data1 == MAKEFOURCC('I', 'N', 'V', 'Z')) &&
|
| + sub_type.Data1 == pvi->bmiHeader.biCompression) {
|
| + resulting_format_.pixel_format = PIXEL_FORMAT_Y16;
|
| + return true;
|
| + }
|
|
|
| #ifndef NDEBUG
|
| WCHAR guid_str[128];
|
| @@ -123,8 +131,10 @@ bool SinkInputPin::GetValidMediaType(int index, AM_MEDIA_TYPE* media_type) {
|
| media_type->formattype = FORMAT_VideoInfo;
|
| media_type->bTemporalCompression = FALSE;
|
|
|
| - if (requested_pixel_format_ == PIXEL_FORMAT_MJPEG) {
|
| + if (requested_pixel_format_ == PIXEL_FORMAT_MJPEG ||
|
| + requested_pixel_format_ == PIXEL_FORMAT_Y16) {
|
| // If the requested pixel format is MJPEG, accept only MJPEG.
|
| + // If the requested pixel format is Y16, accept only Y16.
|
| // This is ok since the capabilities of the capturer have been
|
| // enumerated and we know that it is supported.
|
| if (index != 0)
|
|
|