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

Issue 1135823004: Implement all resolution change policies for desktop and tab capture. (Closed)

Created:
5 years, 7 months ago by miu
Modified:
5 years, 7 months ago
Reviewers:
DaleCurtis, Wez
CC:
chromium-reviews, feature-media-reviews_chromium.org, darin-cc_chromium.org, jam, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@resolution_change_policy_constraints_ITEM1_CR1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement all resolution change policies for desktop and tab capture. Prior to this change, desktop/window capture would emit frames of any size, regardless of the resolution change policy; and tab capture would always emit frames of a fixed resolution. Both cause a problem where some receivers of the captured video need to do scaling/letterboxing themselves for proper UX, and other receivers require this be done on by the capture pipeline. This change builds upon https://codereview.chromium.org/1124263004, which allows the client to specify capture constraints that configure the capture pipeline to do (or not do) the scaling/letterboxing. All frame resolution calculation logic has been factored into one place in a new CaptureResolutionChooser class, which also depends on new utility functions added to media/base/video_util.*. BUG=473336 Committed: https://crrev.com/39254e67228717bbddf222614abd6cb9ba38608c Cr-Commit-Position: refs/heads/master@{#330232}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed Dale's comments. #

Total comments: 101

Patch Set 3 : Addressed Wez's first round comments. #

Patch Set 4 : REBASE #

Patch Set 5 : Addressed Wez's second round comments. #

Total comments: 8

Patch Set 6 : Addressed Wez's third round comments. #

Total comments: 2

Patch Set 7 : !!rwh to rwh != nullptr #

Patch Set 8 : REBASE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+972 lines, -246 lines) Patch
A content/browser/media/capture/capture_resolution_chooser.h View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download
A content/browser/media/capture/capture_resolution_chooser.cc View 1 2 3 4 5 1 chunk +120 lines, -0 lines 0 comments Download
A content/browser/media/capture/capture_resolution_chooser_unittest.cc View 1 2 1 chunk +169 lines, -0 lines 0 comments Download
M content/browser/media/capture/content_video_capture_device_core.h View 1 2 3 chunks +3 lines, -11 lines 0 comments Download
M content/browser/media/capture/content_video_capture_device_core.cc View 1 2 5 chunks +18 lines, -41 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device.cc View 1 2 10 chunks +43 lines, -77 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 2 3 4 5 7 chunks +108 lines, -32 lines 0 comments Download
M content/browser/media/capture/web_contents_audio_input_stream.cc View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/media/capture/web_contents_audio_input_stream_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -7 lines 0 comments Download
M content/browser/media/capture/web_contents_tracker.h View 1 2 3 4 5 5 chunks +24 lines, -6 lines 0 comments Download
M content/browser/media/capture/web_contents_tracker.cc View 1 2 3 4 5 6 4 chunks +37 lines, -7 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 1 2 3 4 5 12 chunks +43 lines, -28 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 13 chunks +234 lines, -24 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/base/video_util.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M media/base/video_util.cc View 1 2 2 chunks +40 lines, -9 lines 0 comments Download
M media/base/video_util_unittest.cc View 2 chunks +44 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
miu
dalecurtis: PTAL at media/base/video_util* wez: PTAL at content/browser/media/capture/*
5 years, 7 months ago (2015-05-09 00:54:28 UTC) #2
DaleCurtis
media/base/video_util lgtm % static func instead of templating. https://codereview.chromium.org/1135823004/diff/1/media/base/video_util.cc File media/base/video_util.cc (right): https://codereview.chromium.org/1135823004/diff/1/media/base/video_util.cc#newcode276 media/base/video_util.cc:276: template<bool ...
5 years, 7 months ago (2015-05-09 01:50:22 UTC) #3
miu
https://codereview.chromium.org/1135823004/diff/1/media/base/video_util.cc File media/base/video_util.cc (right): https://codereview.chromium.org/1135823004/diff/1/media/base/video_util.cc#newcode276 media/base/video_util.cc:276: template<bool fit_within_target> On 2015/05/09 01:50:21, DaleCurtis wrote: > Seems ...
5 years, 7 months ago (2015-05-09 03:52:57 UTC) #4
Wez
Haven't quite finished reviewing video capture device changes, but here's initial comments. https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc File content/browser/media/capture/capture_resolution_evaluator.cc ...
5 years, 7 months ago (2015-05-13 19:05:10 UTC) #5
miu
Thanks for the initial comments. Addressed all of them. PTAL. https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc File content/browser/media/capture/capture_resolution_evaluator.cc (right): https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc#newcode36 ...
5 years, 7 months ago (2015-05-14 01:21:33 UTC) #6
Wez
Moar comments! https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/content_video_capture_device_core.cc File content/browser/media/capture/content_video_capture_device_core.cc (left): https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/content_video_capture_device_core.cc#oldcode248 content/browser/media/capture/content_video_capture_device_core.cc:248: // will convert to) YUV420. Do we ...
5 years, 7 months ago (2015-05-14 01:44:56 UTC) #7
miu
Addressed round 2 comments. PTAL. https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/content_video_capture_device_core.cc File content/browser/media/capture/content_video_capture_device_core.cc (left): https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/content_video_capture_device_core.cc#oldcode248 content/browser/media/capture/content_video_capture_device_core.cc:248: // will convert to) ...
5 years, 7 months ago (2015-05-14 21:12:27 UTC) #8
Wez
https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc File content/browser/media/capture/capture_resolution_evaluator.cc (right): https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc#newcode37 content/browser/media/capture/capture_resolution_evaluator.cc:37: case media::RESOLUTION_POLICY_LAST: On 2015/05/14 01:21:32, miu wrote: > On ...
5 years, 7 months ago (2015-05-15 00:55:42 UTC) #9
miu
https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc File content/browser/media/capture/capture_resolution_evaluator.cc (right): https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator.cc#newcode40 content/browser/media/capture/capture_resolution_evaluator.cc:40: return gfx::Size(1, 1); On 2015/05/15 00:55:42, Wez wrote: > ...
5 years, 7 months ago (2015-05-15 21:14:01 UTC) #10
Wez
lgtm https://codereview.chromium.org/1135823004/diff/100001/content/browser/media/capture/web_contents_tracker.cc File content/browser/media/capture/web_contents_tracker.cc (right): https://codereview.chromium.org/1135823004/diff/100001/content/browser/media/capture/web_contents_tracker.cc#newcode99 content/browser/media/capture/web_contents_tracker.cc:99: MaybeDoCallback(!!rwh); rwh != nullptr here and below; !!rwh ...
5 years, 7 months ago (2015-05-15 21:36:07 UTC) #11
miu
https://codereview.chromium.org/1135823004/diff/100001/content/browser/media/capture/web_contents_tracker.cc File content/browser/media/capture/web_contents_tracker.cc (right): https://codereview.chromium.org/1135823004/diff/100001/content/browser/media/capture/web_contents_tracker.cc#newcode99 content/browser/media/capture/web_contents_tracker.cc:99: MaybeDoCallback(!!rwh); On 2015/05/15 21:36:06, Wez wrote: > rwh != ...
5 years, 7 months ago (2015-05-15 21:41:03 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1135823004/140001
5 years, 7 months ago (2015-05-15 21:42:07 UTC) #15
Wez
https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator_unittest.cc File content/browser/media/capture/capture_resolution_evaluator_unittest.cc (right): https://codereview.chromium.org/1135823004/diff/20001/content/browser/media/capture/capture_resolution_evaluator_unittest.cc#newcode12 content/browser/media/capture/capture_resolution_evaluator_unittest.cc:12: On 2015/05/15 21:14:00, miu wrote: > On 2015/05/15 00:55:42, ...
5 years, 7 months ago (2015-05-15 23:31:31 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 7 months ago (2015-05-15 23:40:16 UTC) #17
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:29:09 UTC) #18
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/39254e67228717bbddf222614abd6cb9ba38608c
Cr-Commit-Position: refs/heads/master@{#330232}

Powered by Google App Engine
This is Rietveld 408576698