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

Issue 2777703002: Introduce SelectSettings algorithm for MediaStream video tracks. (Closed)

Created:
3 years, 9 months ago by Guido Urdaneta
Modified:
3 years, 8 months ago
Reviewers:
hbos_chromium
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, imcheng+watch_chromium.org, feature-media-reviews_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, jam, avayvod+watch_chromium.org, darin-cc_chromium.org, jasonroberts+watch_google.com, xjz+watch_chromium.org, isheriff+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce SelectSettings algorithm for MediaStream video tracks. This CL also: * Renames functions and types related to selecting settings, dropping "Source" from the name, since now they also deal with track settings. * Introduces a VideoTrackAdapterSettings struct to pass arguments to VideoTrackAdapter and to return track settings in a more convenient manner. * Use a single class VideoCaptureSettings for the results of both content and device capture. They differed only in the facing_mode field. * The default width and height in ResolutionSet::SelectClosestPointToIdeal are passed as parameters instead of using MediaStreamVideoSource constants. This gives more flexibility, such as allowing the use of source settings as defaults. * Makes default width and height constants for content capture public. This is a first step towards better defaults for screen capture. See http://crbug.com/257097. * Reimplements the internal ConstrainedFormat class in media_stream_constraints_util_video_device.cc so in terms of ResolutionSet and NumericRangeSet. This removes code that is largely duplicated and facilitates integration with the code that computes track settings. * Replaces rtc::Optional with base::Optional. * Makes minor changes to be more consistent with other parts of the codebase (e.g., some constexpr changed to const), or to better express intent. * Fixes minor lint issues in existing source files. BUG=657733 Review-Url: https://codereview.chromium.org/2777703002 Cr-Commit-Position: refs/heads/master@{#460403} Committed: https://chromium.googlesource.com/chromium/src/+/eff69cf4c3028e0bb4e15c78b137c6bb26966974

Patch Set 1 #

Patch Set 2 : merge Content and Device result classes #

Total comments: 25

Patch Set 3 : address hbos' comments #

Patch Set 4 : static asserts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1981 lines, -748 lines) Patch
M content/renderer/media/media_stream_constraints_util.h View 1 2 2 chunks +148 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util.cc View 1 2 3 chunks +74 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_sets.h View 4 chunks +14 lines, -8 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_sets.cc View 9 chunks +28 lines, -21 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_sets_unittest.cc View 21 chunks +43 lines, -63 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_unittest.cc View 1 2 3 3 chunks +454 lines, -2 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_video_content.h View 1 2 chunks +9 lines, -62 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_video_content.cc View 1 2 5 chunks +48 lines, -89 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_video_content_unittest.cc View 1 99 chunks +505 lines, -152 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_video_device.h View 1 3 chunks +21 lines, -101 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_video_device.cc View 1 2 20 chunks +98 lines, -129 lines 0 comments Download
M content/renderer/media/media_stream_constraints_util_video_device_unittest.cc View 1 2 87 chunks +441 lines, -22 lines 0 comments Download
M content/renderer/media/media_stream_video_source.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/renderer/media/user_media_client_impl.h View 1 2 chunks +6 lines, -7 lines 0 comments Download
M content/renderer/media/user_media_client_impl.cc View 1 4 chunks +20 lines, -22 lines 0 comments Download
M content/renderer/media/video_track_adapter.h View 3 chunks +18 lines, -11 lines 0 comments Download
M content/renderer/media/video_track_adapter.cc View 9 chunks +50 lines, -56 lines 0 comments Download

Messages

Total messages: 45 (37 generated)
Guido Urdaneta
Hi, PTAL
3 years, 9 months ago (2017-03-27 11:56:26 UTC) #27
Guido Urdaneta
Please wait until the next patchset for the review.
3 years, 8 months ago (2017-03-28 08:48:26 UTC) #30
Guido Urdaneta
Ready for review now. Please ignore the older patchset.
3 years, 8 months ago (2017-03-28 09:51:39 UTC) #33
hbos_chromium
https://codereview.chromium.org/2777703002/diff/140001/content/renderer/media/media_stream_constraints_util.cc File content/renderer/media/media_stream_constraints_util.cc (right): https://codereview.chromium.org/2777703002/diff/140001/content/renderer/media/media_stream_constraints_util.cc#newcode116 content/renderer/media/media_stream_constraints_util.cc:116: min_frame_rate_(min_frame_rate) {} Should we DCHECK that the video capture ...
3 years, 8 months ago (2017-03-28 12:52:53 UTC) #38
Guido Urdaneta
https://codereview.chromium.org/2777703002/diff/140001/content/renderer/media/media_stream_constraints_util.cc File content/renderer/media/media_stream_constraints_util.cc (right): https://codereview.chromium.org/2777703002/diff/140001/content/renderer/media/media_stream_constraints_util.cc#newcode116 content/renderer/media/media_stream_constraints_util.cc:116: min_frame_rate_(min_frame_rate) {} On 2017/03/28 12:52:53, hbos_chromium wrote: > Should ...
3 years, 8 months ago (2017-03-28 18:35:43 UTC) #39
hbos_chromium
lgtm https://codereview.chromium.org/2777703002/diff/140001/content/renderer/media/media_stream_constraints_util.h File content/renderer/media/media_stream_constraints_util.h (right): https://codereview.chromium.org/2777703002/diff/140001/content/renderer/media/media_stream_constraints_util.h#newcode109 content/renderer/media/media_stream_constraints_util.h:109: VideoTrackAdapterSettings track_adapter_settings_; On 2017/03/28 18:35:43, Guido Urdaneta wrote: ...
3 years, 8 months ago (2017-03-29 14:54:53 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2777703002/180001
3 years, 8 months ago (2017-03-29 15:00:31 UTC) #42
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 16:01:29 UTC) #45
Message was sent while issue was closed.
Committed patchset #4 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/eff69cf4c3028e0bb4e15c78b137...

Powered by Google App Engine
This is Rietveld 408576698