diff options
Diffstat (limited to 'third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc')
-rw-r--r-- | third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc b/third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc index 9c64125b4e..ac028ce38b 100644 --- a/third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc +++ b/third_party/libwebrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc @@ -112,9 +112,13 @@ bool DxgiOutputDuplicator::DuplicateOutput() { memset(&desc_, 0, sizeof(desc_)); duplication_->GetDesc(&desc_); - if (desc_.ModeDesc.Format != DXGI_FORMAT_B8G8R8A8_UNORM) { - RTC_LOG(LS_ERROR) << "IDXGIDuplicateOutput does not use RGBA (8 bit) " - << "format, which is required by downstream components, " + + // DXGI_FORMAT_R16G16B16A16_FLOAT is returned for HDR monitor, + // DXGI_FORMAT_B8G8R8A8_UNORM for others. + if ((desc_.ModeDesc.Format != DXGI_FORMAT_B8G8R8A8_UNORM) && + (desc_.ModeDesc.Format != DXGI_FORMAT_R16G16B16A16_FLOAT)) { + RTC_LOG(LS_ERROR) << "IDXGIDuplicateOutput does not use RGBA (8, 16 bit)" + << "which is required by downstream components" << "format is " << desc_.ModeDesc.Format; return false; } |