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

Issue 2709523003: BlankDetectorDesktopCapturerWrapper to detect a blank DesktopFrame (Closed)

Created:
3 years, 10 months ago by Hzj_jie
Modified:
3 years, 9 months ago
Reviewers:
Sergey Ulanov
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, Jamie
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

BlankDetectorDesktopCapturerWrapper to detect a blank DesktopFrame DXGI capturer highly depends on video adapter and its driver, as well as Windows itself. I recently found it cannot work on my virtualbox instance any more, which indicates it may not work well on some specific systems. What worse is, the APIs do not return a failure in such case. So this change adds a BlankDetectorDesktopCapturerWrapper, which samples several pixels in the frame returned by a DesktopCapturer implementation. If all the pixels selected are blank, this wrapper returns a failure. A typical usage is to combine BlankDetectorDesktopCapturerWrapper with FallbackDesktopCapturerWrapper, and use GDI capturer in case of failure. Usually less than 10000 pixels are checked, so the BlankDetectorDesktopCapturerWrapper should not significant impact the capturer performance. This change is expected to resolve bug 682112 in another dimension. BUG=682112 Review-Url: https://codereview.webrtc.org/2709523003 Cr-Original-Commit-Position: refs/heads/master@{#16984} Committed: https://chromium.googlesource.com/external/webrtc/+/c4e9d210b3516c7b2faa32f24409a2e626599255 Review-Url: https://codereview.webrtc.org/2709523003 Cr-Commit-Position: refs/heads/master@{#17024} Committed: https://chromium.googlesource.com/external/webrtc/+/ccf57a71eb2a550744367a4cbec285d85494c3c2

Patch Set 1 #

Patch Set 2 : Check more pixels and add test cases #

Total comments: 2

Patch Set 3 : Resolve review comments #

Total comments: 12

Patch Set 4 : Resolve review comments #

Patch Set 5 : Resolve review comments #

Total comments: 14

Patch Set 6 : Resolve review comments #

Total comments: 6

Patch Set 7 : Resolve review comments #

Patch Set 8 : Remove HISTOGRAM #

Unified diffs Side-by-side diffs Delta from patch set Stats (+378 lines, -30 lines) Patch
M webrtc/modules/desktop_capture/BUILD.gn View 1 2 3 4 5 6 7 7 chunks +8 lines, -23 lines 0 comments Download
A webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.h View 1 2 3 4 5 6 1 chunk +74 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc View 1 2 3 4 5 6 7 1 chunk +115 lines, -0 lines 0 comments Download
A webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper_unittest.cc View 1 2 3 4 5 6 1 chunk +163 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/rgba_color.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_capturer_win.cc View 1 2 3 4 5 6 1 chunk +18 lines, -4 lines 0 comments Download

Messages

Total messages: 86 (63 generated)
Hzj_jie
3 years, 10 months ago (2017-02-21 02:06:02 UTC) #6
Hzj_jie
I am working on an optimization of this class, and adding test cases.
3 years, 10 months ago (2017-02-21 18:32:59 UTC) #9
Sergey Ulanov
Do I understand it correctly that the problem is that the capturer doesn't work correctly ...
3 years, 10 months ago (2017-02-21 21:58:48 UTC) #17
Hzj_jie
On 2017/02/21 21:58:48, Sergey Ulanov wrote: > Do I understand it correctly that the problem ...
3 years, 10 months ago (2017-02-21 22:08:05 UTC) #18
Hzj_jie
https://codereview.webrtc.org/2709523003/diff/40001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/40001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode79 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:79: if (!IsBlankFrame(*frame)) { On 2017/02/21 21:58:48, Sergey Ulanov wrote: ...
3 years, 10 months ago (2017-02-21 22:59:40 UTC) #21
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/2709523003/60001
3 years, 10 months ago (2017-02-22 18:36:08 UTC) #25
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
3 years, 10 months ago (2017-02-22 18:36:10 UTC) #27
Sergey Ulanov
I'm not sure we actually need BlankDetectorDesktopCapturerWrapper. Let's try enabling fallback capturer for DX and ...
3 years, 10 months ago (2017-02-23 23:02:02 UTC) #29
Hzj_jie
On 2017/02/23 23:02:02, Sergey Ulanov wrote: > I'm not sure we actually need BlankDetectorDesktopCapturerWrapper. Let's ...
3 years, 10 months ago (2017-02-24 01:03:09 UTC) #30
Hzj_jie
On 2017/02/24 01:03:09, Hzj_jie wrote: > On 2017/02/23 23:02:02, Sergey Ulanov wrote: > > I'm ...
3 years, 10 months ago (2017-02-24 19:10:12 UTC) #31
Sergey Ulanov
I think it would be useful to collect some stats to analyze how often we ...
3 years, 10 months ago (2017-02-25 00:05:29 UTC) #32
Hzj_jie
https://codereview.webrtc.org/2709523003/diff/60001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/60001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode14 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:14: #include "webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.h" On 2017/02/25 00:05:28, Sergey Ulanov wrote: > ...
3 years, 10 months ago (2017-02-25 02:06:38 UTC) #35
Sergey Ulanov
https://codereview.webrtc.org/2709523003/diff/60001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/60001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode83 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:83: if (!IsBlankFrame(*frame)) { On 2017/02/25 02:06:38, Hzj_jie wrote: > ...
3 years, 9 months ago (2017-02-27 23:26:25 UTC) #38
Hzj_jie
https://codereview.webrtc.org/2709523003/diff/60001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/60001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode83 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:83: if (!IsBlankFrame(*frame)) { On 2017/02/27 23:26:25, Sergey Ulanov wrote: ...
3 years, 9 months ago (2017-02-28 00:13:18 UTC) #43
Sergey Ulanov
https://codereview.webrtc.org/2709523003/diff/100001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/100001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode48 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:48: capturer_->CaptureFrame(); Maybe check permanent_failure_reached() here instead of in OnCaptureResult()? ...
3 years, 9 months ago (2017-03-01 22:18:32 UTC) #46
Hzj_jie
https://codereview.webrtc.org/2709523003/diff/100001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/100001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode48 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:48: capturer_->CaptureFrame(); On 2017/03/01 22:18:32, Sergey Ulanov wrote: > Maybe ...
3 years, 9 months ago (2017-03-01 23:31:38 UTC) #54
Sergey Ulanov
lgtm, but please see my comments https://codereview.webrtc.org/2709523003/diff/160001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/160001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode111 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:111: // We will ...
3 years, 9 months ago (2017-03-02 23:45:51 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/2709523003/180001
3 years, 9 months ago (2017-03-03 01:36:19 UTC) #69
commit-bot: I haz the power
Committed patchset #7 (id:180001) as https://chromium.googlesource.com/external/webrtc/+/c4e9d210b3516c7b2faa32f24409a2e626599255
3 years, 9 months ago (2017-03-03 01:38:41 UTC) #72
Hzj_jie
https://codereview.webrtc.org/2709523003/diff/160001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc File webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc (right): https://codereview.webrtc.org/2709523003/diff/160001/webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc#newcode111 webrtc/modules/desktop_capture/blank_detector_desktop_capturer_wrapper.cc:111: // We will check 768 pixels for a frame ...
3 years, 9 months ago (2017-03-03 02:29:41 UTC) #73
perkj_webrtc
A revert of this CL (patchset #7 id:180001) has been created in https://codereview.webrtc.org/2726983005/ by perkj@webrtc.org. ...
3 years, 9 months ago (2017-03-03 08:01:40 UTC) #74
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/2709523003/200001
3 years, 9 months ago (2017-03-03 22:36:53 UTC) #83
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 22:40:24 UTC) #86
Message was sent while issue was closed.
Committed patchset #8 (id:200001) as
https://chromium.googlesource.com/external/webrtc/+/ccf57a71eb2a550744367a4cb...

Powered by Google App Engine
This is Rietveld 408576698