Commit 6f457768 authored by Christian Larson's avatar Christian Larson Committed by Commit Bot

Fix CaptureEngine initialize to use video only.

CaptureEngine is used for VideoOnly so no need to
initialize both audio and video.  This can cause
permissions issues or extra delay during initialize.
Note this will fix GUM behavior for video only but
not change the GUM with audio behavior.

Bug: 1120716
Change-Id: Iaa9147f3e18804d663bf0a4c1163aa9327ea4f71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376366
Commit-Queue: Christian Larson <chrila@microsoft.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801813}
parent 3c41aee0
...@@ -777,8 +777,17 @@ bool VideoCaptureDeviceMFWin::Init() { ...@@ -777,8 +777,17 @@ bool VideoCaptureDeviceMFWin::Init() {
} }
ComPtr<IMFAttributes> attributes; ComPtr<IMFAttributes> attributes;
MFCreateAttributes(&attributes, 1); hr = MFCreateAttributes(&attributes, 1);
DCHECK(attributes); if (FAILED(hr)) {
LogError(FROM_HERE, hr);
return false;
}
hr = attributes->SetUINT32(MF_CAPTURE_ENGINE_USE_VIDEO_DEVICE_ONLY, TRUE);
if (FAILED(hr)) {
LogError(FROM_HERE, hr);
return false;
}
video_callback_ = new MFVideoCallback(this); video_callback_ = new MFVideoCallback(this);
hr = engine_->Initialize(video_callback_.get(), attributes.Get(), nullptr, hr = engine_->Initialize(video_callback_.get(), attributes.Get(), nullptr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment