Chromium Code Reviews| Index: media/video/capture/win/sink_input_pin_win.cc |
| diff --git a/media/video/capture/win/sink_input_pin_win.cc b/media/video/capture/win/sink_input_pin_win.cc |
| index 08e76a72792d0f488cf970373c18f4b22114e3f5..c61064579a37a9b35d97998f8fe3edf7da68a4ba 100644 |
| --- a/media/video/capture/win/sink_input_pin_win.cc |
| +++ b/media/video/capture/win/sink_input_pin_win.cc |
| @@ -90,6 +90,15 @@ bool SinkInputPin::GetValidMediaType(int index, AM_MEDIA_TYPE* media_type) { |
| media_type->subtype = MEDIASUBTYPE_RGB24; |
| break; |
| } |
| + case 3: { |
| + pvi->bmiHeader.biCompression = BI_RGB; |
| + pvi->bmiHeader.biBitCount = 32; |
| + pvi->bmiHeader.biWidth = requested_info_header_.biWidth; |
| + pvi->bmiHeader.biHeight = requested_info_header_.biHeight; |
| + pvi->bmiHeader.biSizeImage = GetArea(requested_info_header_) * 4; |
| + media_type->subtype = MEDIASUBTYPE_RGB32; |
| + break; |
| + } |
| default: |
| return false; |
| } |
| @@ -144,6 +153,11 @@ bool SinkInputPin::IsMediaTypeValid(const AM_MEDIA_TYPE* media_type) { |
| resulting_format_.pixel_format = PIXEL_FORMAT_RGB24; |
| return true; // This format is acceptable. |
| } |
| + if (sub_type == MEDIASUBTYPE_RGB32 && |
| + pvi->bmiHeader.biCompression == BI_RGB) { |
|
mcasas
2015/03/27 01:02:11
Indent two extra right
emircan
2015/03/27 17:50:39
Done.
|
| + resulting_format_.pixel_format = PIXEL_FORMAT_ARGB; |
| + return true; // This format is acceptable. |
|
mcasas
2015/03/27 01:02:11
Comment is irrelevant (similar ones too).
emircan
2015/03/27 17:50:39
Done.
|
| + } |
| return false; |
| } |