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

Issue 1845113002: DirectX based screen capturer logic (Closed)

Created:
4 years, 8 months ago by Hzj_jie
Modified:
4 years, 7 months ago
Reviewers:
Sergey Ulanov, joedow
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

DirectX based screen capturer logic BUG=595530, 314516 Committed: https://crrev.com/2970c2a237564b11d632afe5b628178cee9a716e Cr-Commit-Position: refs/heads/master@{#12835}

Patch Set 1 #

Total comments: 56

Patch Set 2 : Support shared memory (for me2me scenario) #

Patch Set 3 : Resolve review feedbacks #

Patch Set 4 : virtual non-empty functions are not allowed in head files #

Patch Set 5 : UINT to size_t conversion warnings #

Patch Set 6 : d3d11.lib is missing in the link options #

Patch Set 7 : Two VC specific warnings #

Patch Set 8 : clang specific warnings #

Patch Set 9 : clang specific warnings #

Patch Set 10 : Add d3d11.lib to desktop_capture #

Patch Set 11 : Do not clear updated region to avoid race condition #

Patch Set 12 : Lint errors #

Total comments: 21

Patch Set 13 : resolve review comments #

Patch Set 14 : A wrong assertion #

Patch Set 15 : Resolve review comments #

Patch Set 16 : clang initializing order warning. #

Patch Set 17 : clang missing braces error #

Patch Set 18 : clang compiling error #

Patch Set 19 : Pitch is not consistent with IDXGIResource.GetDesc.Width #

Patch Set 20 : Windows does not guarantee pitch equals to width * 4 #

Patch Set 21 : Remove width change in Texture::Capture #

Total comments: 74

Patch Set 22 : Several lint formatting #

Total comments: 43

Patch Set 23 : Resolve review comments #

Patch Set 24 : A crash bug in dummy desktop frame #

Patch Set 25 : Retry upload, patch error? #

Patch Set 26 : Resolve conflicts #

Patch Set 27 : Remove unrelated changes #

Total comments: 32

Patch Set 28 : REsolve review comments #

Total comments: 2

Patch Set 29 : Resolve review feedback #

Patch Set 30 : Build break in ScreenCapturerWinDirectx (rtc::scoped_ptr has been removed) #

Total comments: 40

Patch Set 31 : Resolve review comments #

Patch Set 32 : Resolve a lint error #

Total comments: 11

Patch Set 33 : Resolve review comments #

Total comments: 4

Patch Set 34 : Resolve review comments #

Patch Set 35 : Remove unchanged files #

Total comments: 10

Patch Set 36 : Resolve review comments #

Total comments: 2

Patch Set 37 : Add a ForceDuplicateOutput to avoid DuplicateOutput to be executed repeatly when Capture function i… #

Patch Set 38 : Recreate DXGIDuplicateOutput if AcquireNextFrame does not return a known error code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+916 lines, -56 lines) Patch
M webrtc/modules/desktop_capture/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 31 32 2 chunks +6 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/desktop_capture.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 31 32 2 chunks +15 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/desktop_capture_options.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 3 chunks +16 lines, -7 lines 0 comments Download
M webrtc/modules/desktop_capture/desktop_capture_options.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +0 lines, -15 lines 0 comments Download
M webrtc/modules/desktop_capture/desktop_frame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 3 chunks +12 lines, -9 lines 0 comments Download
M webrtc/modules/desktop_capture/desktop_frame.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 5 chunks +22 lines, -21 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_capturer_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 2 chunks +10 lines, -4 lines 0 comments Download
A webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +107 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +728 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (14 generated)
Hzj_jie
Hi, Sergey, please have a look at this change. I may still need to fix ...
4 years, 8 months ago (2016-03-31 01:13:39 UTC) #3
Sergey Ulanov
https://codereview.chromium.org/1845113002/diff/1/webrtc/base/scoped_ptr.h File webrtc/base/scoped_ptr.h (right): https://codereview.chromium.org/1845113002/diff/1/webrtc/base/scoped_ptr.h#newcode598 webrtc/base/scoped_ptr.h:598: std::unique_ptr<T> ScopedToUnique(scoped_ptr<T>&& sp) { Is this change related to ...
4 years, 8 months ago (2016-03-31 18:41:17 UTC) #4
Hzj_jie
Now it supports Me2Me scenario with shared memory. https://codereview.chromium.org/1845113002/diff/1/webrtc/base/scoped_ptr.h File webrtc/base/scoped_ptr.h (right): https://codereview.chromium.org/1845113002/diff/1/webrtc/base/scoped_ptr.h#newcode598 webrtc/base/scoped_ptr.h:598: std::unique_ptr<T> ...
4 years, 8 months ago (2016-04-05 23:15:18 UTC) #5
Hzj_jie
Fix several lint errors in last iteration.
4 years, 8 months ago (2016-04-08 17:39:39 UTC) #6
Sergey Ulanov
https://codereview.chromium.org/1845113002/diff/1/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/1/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode36 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:36: ComPtr<IDXGIOutputDuplication> On 2016/04/05 23:15:18, Hzj_jie wrote: > On 2016/03/31 ...
4 years, 8 months ago (2016-04-08 21:22:26 UTC) #8
Hzj_jie
Thank you Sergey for the review. The reason I have separated the logic into DesktopFrameWinDxgi ...
4 years, 8 months ago (2016-04-11 22:19:16 UTC) #9
Sergey Ulanov
Lets talk about this change offline to make sure we are on the same page. ...
4 years, 8 months ago (2016-04-12 03:00:47 UTC) #10
Sergey Ulanov
Lets talk about this change offline to make sure we are on the same page.
4 years, 8 months ago (2016-04-12 03:00:59 UTC) #11
Hzj_jie
https://codereview.chromium.org/1845113002/diff/220001/webrtc/modules/desktop_capture/win/desktop_frame_win_dxgi.cc File webrtc/modules/desktop_capture/win/desktop_frame_win_dxgi.cc (right): https://codereview.chromium.org/1845113002/diff/220001/webrtc/modules/desktop_capture/win/desktop_frame_win_dxgi.cc#newcode121 webrtc/modules/desktop_capture/win/desktop_frame_win_dxgi.cc:121: if (shared_memory() != nullptr) { On 2016/04/12 03:00:46, Sergey ...
4 years, 8 months ago (2016-04-12 17:40:40 UTC) #12
Hzj_jie
Thank you Sergey for the reviewing. The comments are all resolved.
4 years, 8 months ago (2016-04-14 02:15:47 UTC) #13
Sergey Ulanov
https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_capture_options.h File webrtc/modules/desktop_capture/desktop_capture_options.h (right): https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_capture_options.h#newcode86 webrtc/modules/desktop_capture/desktop_capture_options.h:86: bool use_directx_capturer() const { return use_directx_capturer_; } Maybe call ...
4 years, 8 months ago (2016-04-14 23:10:43 UTC) #14
Hzj_jie
https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_capture_options.h File webrtc/modules/desktop_capture/desktop_capture_options.h (right): https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_capture_options.h#newcode86 webrtc/modules/desktop_capture/desktop_capture_options.h:86: bool use_directx_capturer() const { return use_directx_capturer_; } On 2016/04/14 ...
4 years, 8 months ago (2016-04-15 19:42:18 UTC) #15
Sergey Ulanov
Please split ScreenCaptureFrameQueue refactoring into a separate CL. https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_frame.h File webrtc/modules/desktop_capture/desktop_frame.h (right): https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_frame.h#newcode121 webrtc/modules/desktop_capture/desktop_frame.h:121: int ...
4 years, 8 months ago (2016-04-19 23:51:09 UTC) #16
Hzj_jie
https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_frame.h File webrtc/modules/desktop_capture/desktop_frame.h (right): https://codereview.chromium.org/1845113002/diff/400001/webrtc/modules/desktop_capture/desktop_frame.h#newcode121 webrtc/modules/desktop_capture/desktop_frame.h:121: int stride, On 2016/04/19 23:51:07, Sergey Ulanov wrote: > ...
4 years, 7 months ago (2016-04-26 23:00:08 UTC) #17
Sergey Ulanov
https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/desktop_capture_options.h File webrtc/modules/desktop_capture/desktop_capture_options.h (right): https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/desktop_capture_options.h#newcode109 webrtc/modules/desktop_capture/desktop_capture_options.h:109: bool allow_directx_capturer_; = false; so the new capturer is ...
4 years, 7 months ago (2016-05-13 19:38:11 UTC) #18
Hzj_jie
https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/desktop_capture_options.h File webrtc/modules/desktop_capture/desktop_capture_options.h (right): https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/desktop_capture_options.h#newcode109 webrtc/modules/desktop_capture/desktop_capture_options.h:109: bool allow_directx_capturer_; On 2016/05/13 19:38:10, Sergey Ulanov wrote: > ...
4 years, 7 months ago (2016-05-16 18:17:29 UTC) #19
Sergey Ulanov
Lets talk offline about updated_region handling https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode123 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:123: DesktopRect rect = ...
4 years, 7 months ago (2016-05-16 19:18:53 UTC) #20
Hzj_jie
https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode123 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:123: DesktopRect rect = ExpandAndIntersect(it.rect(), size()); On 2016/05/16 19:18:52, Sergey ...
4 years, 7 months ago (2016-05-17 03:11:46 UTC) #21
Sergey Ulanov
update_region handling looks good now, but I have a few more comments, mostly style-related. https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc ...
4 years, 7 months ago (2016-05-18 00:50:32 UTC) #22
Hzj_jie
https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/520001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode559 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:559: shared_memory_frame = static_cast<SharedMemoryDesktopFrame*>( On 2016/05/18 00:50:31, Sergey Ulanov wrote: ...
4 years, 7 months ago (2016-05-18 22:37:34 UTC) #23
Sergey Ulanov
https://codereview.chromium.org/1845113002/diff/580001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/580001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode675 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:675: if (frames_.current_frame()) { On 2016/05/18 22:37:34, Hzj_jie wrote: > ...
4 years, 7 months ago (2016-05-19 18:12:10 UTC) #24
Hzj_jie
Change to fix DesktopSessionAgent crash issue has been issued @ https://codereview.chromium.org/1996753002 https://codereview.chromium.org/1845113002/diff/580001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): ...
4 years, 7 months ago (2016-05-19 21:20:28 UTC) #25
Sergey Ulanov
https://codereview.chromium.org/1845113002/diff/640001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/640001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode62 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:62: DesktopVector dpi; Do we need to store DPI here? ...
4 years, 7 months ago (2016-05-19 22:19:13 UTC) #26
Hzj_jie
https://codereview.chromium.org/1845113002/diff/640001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/640001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode62 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:62: DesktopVector dpi; On 2016/05/19 22:19:13, Sergey Ulanov wrote: > ...
4 years, 7 months ago (2016-05-20 00:09:28 UTC) #27
Sergey Ulanov
Looking at this again I think there is one more issue with DPI handling. https://codereview.chromium.org/1845113002/diff/680001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc ...
4 years, 7 months ago (2016-05-20 00:34:14 UTC) #28
Sergey Ulanov
Looking at this again I think there is one more issue with DPI handling.
4 years, 7 months ago (2016-05-20 00:34:31 UTC) #29
Hzj_jie
https://codereview.chromium.org/1845113002/diff/680001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/680001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode674 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:674: void ScreenCapturerWinDirectx::EmitCurrentFrame() { On 2016/05/20 00:34:14, Sergey Ulanov wrote: ...
4 years, 7 months ago (2016-05-20 01:12:23 UTC) #30
Sergey Ulanov
lgtm https://codereview.chromium.org/1845113002/diff/700001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/700001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode691 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:691: if (frames_.current_frame()) { I don't think you need ...
4 years, 7 months ago (2016-05-20 19:21:59 UTC) #31
Hzj_jie
https://codereview.chromium.org/1845113002/diff/700001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc File webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc (right): https://codereview.chromium.org/1845113002/diff/700001/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc#newcode691 webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc:691: if (frames_.current_frame()) { On 2016/05/20 19:21:58, Sergey Ulanov wrote: ...
4 years, 7 months ago (2016-05-20 19:44:05 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845113002/740001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845113002/740001
4 years, 7 months ago (2016-05-20 21:11:29 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 7 months ago (2016-05-20 22:32:30 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845113002/740001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845113002/740001
4 years, 7 months ago (2016-05-20 22:33:18 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 7 months ago (2016-05-21 00:33:53 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845113002/740001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845113002/740001
4 years, 7 months ago (2016-05-21 00:34:39 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 7 months ago (2016-05-21 02:35:06 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845113002/740001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845113002/740001
4 years, 7 months ago (2016-05-21 04:13:34 UTC) #48
commit-bot: I haz the power
Committed patchset #38 (id:740001)
4 years, 7 months ago (2016-05-21 05:08:06 UTC) #50
commit-bot: I haz the power
4 years, 7 months ago (2016-05-21 05:08:17 UTC) #52
Message was sent while issue was closed.
Patchset 38 (id:??) landed as
https://crrev.com/2970c2a237564b11d632afe5b628178cee9a716e
Cr-Commit-Position: refs/heads/master@{#12835}

Powered by Google App Engine
This is Rietveld 408576698