Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Issue 2099123002: [Chromoting] Improve DirectX capturer to support multiple outputs (Closed)

Created:
4 years, 5 months ago by Hzj_jie
Modified:
4 years, 4 months ago
Reviewers:
Sergey Ulanov, Jamie
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

[Chromoting] Improve DirectX capturer to support multiple outputs Current DirectX capturer cannot capture multiple video cards or monitors. But according to DXGI desktop duplication sample (https://goo.gl/An0L9l), we can capture multiple video cards and monitors by duplicating them one by one. So instead of one IDXGIOutputDuplication instance, this change creates an IDXGIOutputDuplication instance for each monitor, and merge the output into one DesktopFrame. Several other changes are also included, 1. Add supports to DXGI_OUTDUPL_DESC.DesktopImageInSystemMemory. When this flag is true, we won't copy its content to staging buffer. 2. Capture one monitor instead of entire screen. Above changes make the logic complex. But with some refactor work, the logic is not disordered. Please refer to the doc @ https://goo.gl/hU1ifG. BUG=314516 Committed: https://crrev.com/2d618de25a1bc40fbc3726fefdd842761fab61cc Cr-Commit-Position: refs/heads/master@{#13684}

Patch Set 1 #

Total comments: 84

Patch Set 2 : Resolve review comments #

Total comments: 9

Patch Set 3 : Resolve review comments #

Patch Set 4 : Sync latest changes #

Patch Set 5 : Resolve review comments #

Total comments: 27

Patch Set 6 : Resolve review comments #

Patch Set 7 : Resolve the issue with multiple ScreenCapturerWinDirectx instances. #

Patch Set 8 : Use a self-incremented integer to identify a DxgiDuplicatorContaienr::Initialize #

Total comments: 32

Patch Set 9 : Resolve review comments #

Total comments: 4

Patch Set 10 : Resolve review comments #

Total comments: 54

Patch Set 11 : Resolve review comments #

Patch Set 12 : Fetch latest changes #

Patch Set 13 : Fix several lint errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1813 lines, -703 lines) Patch
M webrtc/modules/desktop_capture/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +18 lines, -1 line 0 comments Download
M webrtc/modules/desktop_capture/desktop_capture.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_capturer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +37 lines, -2 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_capturer_win.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
A webrtc/modules/desktop_capture/win/d3d_device.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +57 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/d3d_device.cc View 1 2 3 4 5 1 chunk +93 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +88 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +145 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +172 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +240 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +128 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +304 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_texture.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +69 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_texture.cc View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +48 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +57 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_texture_staging.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +68 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/dxgi_texture_staging.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +149 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -51 lines 0 comments Download
M webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +68 lines, -648 lines 0 comments Download

Messages

Total messages: 81 (44 generated)
Hzj_jie
4 years, 5 months ago (2016-07-06 22:13:57 UTC) #15
Sergey Ulanov
I'm not sure if multiple capturers trying to capture from the same device concurrently will ...
4 years, 5 months ago (2016-07-08 22:36:55 UTC) #16
Hzj_jie
https://codereview.chromium.org/2099123002/diff/240001/webrtc/modules/desktop_capture/desktop_capturer.h File webrtc/modules/desktop_capture/desktop_capturer.h (right): https://codereview.chromium.org/2099123002/diff/240001/webrtc/modules/desktop_capture/desktop_capturer.h#newcode54 webrtc/modules/desktop_capture/desktop_capturer.h:54: void OnTemporaryError() { On 2016/07/08 22:36:53, Sergey Ulanov wrote: ...
4 years, 5 months ago (2016-07-11 00:55:01 UTC) #19
Hzj_jie
Kindly ping.
4 years, 5 months ago (2016-07-17 20:11:26 UTC) #21
Sergey Ulanov
https://codereview.chromium.org/2099123002/diff/240001/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc File webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc (right): https://codereview.chromium.org/2099123002/diff/240001/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc#newcode81 webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc:81: for (size_t i = 0; i < duplicators_.size(); i++) ...
4 years, 5 months ago (2016-07-20 19:05:18 UTC) #22
Hzj_jie
https://codereview.chromium.org/2099123002/diff/240001/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc File webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc (right): https://codereview.chromium.org/2099123002/diff/240001/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc#newcode81 webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc:81: for (size_t i = 0; i < duplicators_.size(); i++) ...
4 years, 5 months ago (2016-07-22 18:43:44 UTC) #24
Sergey Ulanov
https://codereview.chromium.org/2099123002/diff/320001/webrtc/modules/desktop_capture/win/dxgi_texture.h File webrtc/modules/desktop_capture/win/dxgi_texture.h (right): https://codereview.chromium.org/2099123002/diff/320001/webrtc/modules/desktop_capture/win/dxgi_texture.h#newcode66 webrtc/modules/desktop_capture/win/dxgi_texture.h:66: class DxgiDesktopFrame : public DesktopFrame { On 2016/07/22 18:43:43, ...
4 years, 5 months ago (2016-07-22 19:23:25 UTC) #25
Hzj_jie
Ah, got you, updated.
4 years, 5 months ago (2016-07-22 21:04:03 UTC) #26
Sergey Ulanov
On 2016/07/22 21:04:03, Hzj_jie wrote: > Ah, got you, updated. Is this CL ready for ...
4 years, 5 months ago (2016-07-22 21:17:37 UTC) #27
Hzj_jie
On 2016/07/22 21:17:37, Sergey Ulanov wrote: > On 2016/07/22 21:04:03, Hzj_jie wrote: > > Ah, ...
4 years, 5 months ago (2016-07-22 21:19:01 UTC) #28
Sergey Ulanov
https://codereview.chromium.org/2099123002/diff/400001/webrtc/modules/desktop_capture/win/dxgi_context.h File webrtc/modules/desktop_capture/win/dxgi_context.h (right): https://codereview.chromium.org/2099123002/diff/400001/webrtc/modules/desktop_capture/win/dxgi_context.h#newcode20 webrtc/modules/desktop_capture/win/dxgi_context.h:20: struct DxgiContext { Add comment to explain how this ...
4 years, 4 months ago (2016-07-26 00:48:52 UTC) #29
Hzj_jie
https://codereview.chromium.org/2099123002/diff/400001/webrtc/modules/desktop_capture/win/dxgi_context.h File webrtc/modules/desktop_capture/win/dxgi_context.h (right): https://codereview.chromium.org/2099123002/diff/400001/webrtc/modules/desktop_capture/win/dxgi_context.h#newcode20 webrtc/modules/desktop_capture/win/dxgi_context.h:20: struct DxgiContext { On 2016/07/26 00:48:51, Sergey Ulanov wrote: ...
4 years, 4 months ago (2016-07-26 02:13:02 UTC) #30
Hzj_jie
https://codereview.chromium.org/2099123002/diff/400001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc File webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc (right): https://codereview.chromium.org/2099123002/diff/400001/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc#newcode144 webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc:144: DetectUpdatedRegion(frame_info, offset, &context->updated_region_); On 2016/07/26 02:13:02, Hzj_jie wrote: > ...
4 years, 4 months ago (2016-07-26 03:45:35 UTC) #31
Hzj_jie
4 years, 4 months ago (2016-07-27 00:50:18 UTC) #33
Hzj_jie
On 2016/07/27 00:50:18, Hzj_jie wrote: Design doc has also been updated to include the mechanism ...
4 years, 4 months ago (2016-07-27 00:53:07 UTC) #34
Hzj_jie
4 years, 4 months ago (2016-07-28 19:58:03 UTC) #35
Sergey Ulanov
https://codereview.chromium.org/2099123002/diff/480001/webrtc/modules/desktop_capture/win/dxgi_context.h File webrtc/modules/desktop_capture/win/dxgi_context.h (right): https://codereview.chromium.org/2099123002/diff/480001/webrtc/modules/desktop_capture/win/dxgi_context.h#newcode34 webrtc/modules/desktop_capture/win/dxgi_context.h:34: friend class DxgiDuplicatorContainer; I still don't think think hiding ...
4 years, 4 months ago (2016-07-28 22:15:33 UTC) #36
Hzj_jie
https://codereview.chromium.org/2099123002/diff/480001/webrtc/modules/desktop_capture/win/dxgi_context.h File webrtc/modules/desktop_capture/win/dxgi_context.h (right): https://codereview.chromium.org/2099123002/diff/480001/webrtc/modules/desktop_capture/win/dxgi_context.h#newcode34 webrtc/modules/desktop_capture/win/dxgi_context.h:34: friend class DxgiDuplicatorContainer; On 2016/07/28 22:15:32, Sergey Ulanov wrote: ...
4 years, 4 months ago (2016-07-29 02:12:24 UTC) #37
Sergey Ulanov
Almost there :-) See my suggestions about Context classes. Also can you please add some ...
4 years, 4 months ago (2016-07-30 00:49:22 UTC) #38
Hzj_jie
I will definitely add unittests, since DxgiContext logic are not covered by current scenario. But ...
4 years, 4 months ago (2016-07-31 22:04:42 UTC) #40
Sergey Ulanov
More style nits. Also please see my comment about return type in Duplicate(). LGTM when ...
4 years, 4 months ago (2016-08-06 01:27:58 UTC) #41
Hzj_jie
All the comments are addressed. But DirectX capturer won't be able to output smallest dirty ...
4 years, 4 months ago (2016-08-08 00:16:10 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/580001
4 years, 4 months ago (2016-08-08 00:16:46 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/7224)
4 years, 4 months ago (2016-08-08 00:19:37 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/600001
4 years, 4 months ago (2016-08-08 20:57:08 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/7255)
4 years, 4 months ago (2016-08-08 21:06:29 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/600001
4 years, 4 months ago (2016-08-08 21:50:22 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/7257)
4 years, 4 months ago (2016-08-08 21:53:09 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/600001
4 years, 4 months ago (2016-08-08 21:56:59 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/7259)
4 years, 4 months ago (2016-08-08 22:03:13 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/620001
4 years, 4 months ago (2016-08-08 22:21:23 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/7261)
4 years, 4 months ago (2016-08-08 22:27:13 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/620001
4 years, 4 months ago (2016-08-09 00:01:05 UTC) #71
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/7269)
4 years, 4 months ago (2016-08-09 00:04:28 UTC) #73
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099123002/660001
4 years, 4 months ago (2016-08-09 00:23:16 UTC) #77
commit-bot: I haz the power
Committed patchset #13 (id:660001)
4 years, 4 months ago (2016-08-09 00:50:27 UTC) #79
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 00:50:36 UTC) #81
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/2d618de25a1bc40fbc3726fefdd842761fab61cc
Cr-Commit-Position: refs/heads/master@{#13684}

Powered by Google App Engine
This is Rietveld 408576698