Skip to content

Commit

Permalink
[M110] Fix virtual camera not working on Windows
Browse files Browse the repository at this point in the history
This fixes a regression that virtual camera (ManyCam, SplitCam) no
longer works on Windows, introduced by:
https://chromium-review.googlesource.com/c/chromium/src/+/3999744

Tested on:
https://storage.googleapis.com/dalecurtis/canvas-camera.html
https://webcamtests.com/

// The win-rel trybot is broken on branch 5481: crbug.com/1406862
// All other bots pass. The change is landed and tested in canary
// Hence, forcing no-try for timely merge
NOTRY=True


(cherry picked from commit 8955f1f)

Fixed: 1403408
Change-Id: I0d0cc9b5b6b58900bc3332a3ea43c135cd4d50a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4123530
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1086712}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4154750
Commit-Queue: Ilya Nikolaevskiy <ilnik@chromium.org>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/branch-heads/5481@{#233}
Cr-Branched-From: 130f3e4-refs/heads/main@{#1084008}
  • Loading branch information
tmoniuszko-opera authored and Chromium LUCI CQ committed Jan 12, 2023
1 parent 5559f14 commit c4de30c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions media/capture/video/win/video_capture_device_mf_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,9 @@ HRESULT ConvertToVideoSinkMediaType(IMFMediaType* source_media_type,
if (FAILED(hr))
return hr;

hr = CopyAttribute(source_media_type, sink_media_type, MF_MT_VIDEO_PRIMARIES);
if (FAILED(hr))
return hr;

// Next two attributes may be missing, unless a HDR video is captured so
// Next three attributes may be missing, unless a HDR video is captured so
// ignore errors.
CopyAttribute(source_media_type, sink_media_type, MF_MT_VIDEO_PRIMARIES);
CopyAttribute(source_media_type, sink_media_type, MF_MT_TRANSFER_FUNCTION);
CopyAttribute(source_media_type, sink_media_type, MF_MT_YUV_MATRIX);

Expand Down

0 comments on commit c4de30c

Please sign in to comment.