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

Issue 2365223002: Video Capture: Allow suspension of individual devices. (Closed)

Created:
4 years, 2 months ago by miu
Modified:
4 years, 2 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org, chfremer, braveyao
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Video Capture: Allow suspension of individual devices. Adds infrastructure to notify started video capture devices when there are no consumers present, so that they may turn down to an "idle," low resource utilization state. There are legitimate use cases where MediaStream sessions are purposely left open without any sinks attached for significant periods of time, and then attached when the application is ready to consume the video. This is a prerequisite to a soon-upcoming change that will allow screen capture devices, which are very resource intensive, to suspend. BUG=650113 Committed: https://crrev.com/1c98a2e10b2505761d1f88880e3c8267951d30e2 Cr-Commit-Position: refs/heads/master@{#421705}

Patch Set 1 #

Total comments: 13

Patch Set 2 : REBASE, and clean-ups+tests suggested by chfremer@. #

Total comments: 32

Patch Set 3 : Augmented interface comments, per xhwang's concerns. #

Patch Set 4 : Style tweaks, per mcasas's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+639 lines, -161 lines) Patch
M content/browser/renderer_host/media/video_capture_host.cc View 1 2 3 2 chunks +9 lines, -10 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 2 chunks +26 lines, -8 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 1 11 chunks +123 lines, -18 lines 0 comments Download
M content/common/media/video_capture.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/media_stream_video_capturer_source.h View 1 1 chunk +4 lines, -6 lines 0 comments Download
M content/renderer/media/media_stream_video_capturer_source.cc View 1 6 chunks +46 lines, -7 lines 0 comments Download
M content/renderer/media/media_stream_video_source.h View 1 2 3 3 chunks +18 lines, -3 lines 0 comments Download
M content/renderer/media/media_stream_video_source.cc View 1 1 chunk +18 lines, -3 lines 0 comments Download
M content/renderer/media/media_stream_video_track.cc View 1 2 3 2 chunks +12 lines, -8 lines 0 comments Download
M content/renderer/media/video_capture_impl.h View 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/media/video_capture_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/video_capture_impl_manager.h View 1 2 3 5 chunks +19 lines, -10 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager.cc View 1 2 3 6 chunks +129 lines, -48 lines 0 comments Download
M content/renderer/media/video_capture_impl_manager_unittest.cc View 5 chunks +182 lines, -37 lines 0 comments Download
M media/base/video_capturer_source.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (15 generated)
miu
emircan: PTAL at content/renderer/media/media_stream* mcasas: PTAL at the rest (i.e., the video capture stack; all ...
4 years, 2 months ago (2016-09-25 23:16:14 UTC) #4
miu
+cc chfremer and braveyao (FYI)
4 years, 2 months ago (2016-09-25 23:27:16 UTC) #5
miu
...and the follow-up change that implements suspension for the screen capture devices: https://codereview.chromium.org/2364413002/
4 years, 2 months ago (2016-09-25 23:43:01 UTC) #6
chfremer
Some drive-by comments and questions. https://codereview.chromium.org/2365223002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2365223002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc#newcode750 content/browser/renderer_host/media/video_capture_manager.cc:750: } We are changing ...
4 years, 2 months ago (2016-09-27 00:54:59 UTC) #10
miu
chfremer: Addressed your comments for patch set 2: https://codereview.chromium.org/2365223002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2365223002/diff/1/content/browser/renderer_host/media/video_capture_manager.cc#newcode750 content/browser/renderer_host/media/video_capture_manager.cc:750: } ...
4 years, 2 months ago (2016-09-27 23:42:23 UTC) #11
miu
braveyao: PTAL at changes to content/browser/renderer_host/media/video_capture_manager.cc I've removed the overrides treating screen capture devices specially. ...
4 years, 2 months ago (2016-09-28 00:12:55 UTC) #13
chfremer
lgtm Thanks for adding the extra verifications to the test case. https://codereview.chromium.org/2365223002/diff/1/content/renderer/media/video_capture_impl_manager.h File content/renderer/media/video_capture_impl_manager.h (right): ...
4 years, 2 months ago (2016-09-28 00:27:37 UTC) #14
braveyao
lgtm to content/browser/renderer_host/media/video_capture_manager.cc. Scree capture on Android is not managed by controller. So the modification ...
4 years, 2 months ago (2016-09-28 00:42:16 UTC) #15
emircan
content/renderer/media/media_stream* lgtm % nit. https://codereview.chromium.org/2365223002/diff/20001/content/renderer/media/media_stream_video_source.cc File content/renderer/media/media_stream_video_source.cc (right): https://codereview.chromium.org/2365223002/diff/20001/content/renderer/media/media_stream_video_source.cc#newcode405 content/renderer/media/media_stream_video_source.cc:405: if (it == suspended_tracks_.end()) std::set ...
4 years, 2 months ago (2016-09-28 17:16:24 UTC) #16
miu
https://codereview.chromium.org/2365223002/diff/20001/content/renderer/media/media_stream_video_source.cc File content/renderer/media/media_stream_video_source.cc (right): https://codereview.chromium.org/2365223002/diff/20001/content/renderer/media/media_stream_video_source.cc#newcode405 content/renderer/media/media_stream_video_source.cc:405: if (it == suspended_tracks_.end()) On 2016/09/28 17:16:24, emircan wrote: ...
4 years, 2 months ago (2016-09-28 20:57:50 UTC) #17
miu
mcasas: Need OWNERS approval for content/browser/renderer_host/media/* and media/capture/video/video_capture_device.h. xhwang: Need OWNERS approval for media/base/video_capturer_source.h.
4 years, 2 months ago (2016-09-28 20:59:46 UTC) #19
xhwang
I am not familiar with this class. Just some comments from API's perspective. https://codereview.chromium.org/2365223002/diff/20001/media/base/video_capturer_source.h File ...
4 years, 2 months ago (2016-09-28 21:09:56 UTC) #20
mcasas
lgtm % a few comments/ suggestions below https://codereview.chromium.org/2365223002/diff/20001/content/browser/renderer_host/media/video_capture_host.cc File content/browser/renderer_host/media/video_capture_host.cc (right): https://codereview.chromium.org/2365223002/diff/20001/content/browser/renderer_host/media/video_capture_host.cc#newcode243 content/browser/renderer_host/media/video_capture_host.cc:243: if (it->second) ...
4 years, 2 months ago (2016-09-28 21:34:45 UTC) #21
miu
xhwang: PTAL (augmented comments per your suggestions in PS3). https://codereview.chromium.org/2365223002/diff/20001/media/base/video_capturer_source.h File media/base/video_capturer_source.h (right): https://codereview.chromium.org/2365223002/diff/20001/media/base/video_capturer_source.h#newcode92 media/base/video_capturer_source.h:92: ...
4 years, 2 months ago (2016-09-28 21:52:14 UTC) #22
miu
https://codereview.chromium.org/2365223002/diff/20001/content/browser/renderer_host/media/video_capture_host.cc File content/browser/renderer_host/media/video_capture_host.cc (right): https://codereview.chromium.org/2365223002/diff/20001/content/browser/renderer_host/media/video_capture_host.cc#newcode243 content/browser/renderer_host/media/video_capture_host.cc:243: if (it->second) { On 2016/09/28 21:34:43, mcasas wrote: > ...
4 years, 2 months ago (2016-09-28 22:35:16 UTC) #24
xhwang
thanks! media/base/video_capturer_source.h lgtm
4 years, 2 months ago (2016-09-28 22:44:57 UTC) #26
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/2365223002/60001
4 years, 2 months ago (2016-09-29 01:08:52 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-09-29 01:18:54 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-09-29 01:20:48 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1c98a2e10b2505761d1f88880e3c8267951d30e2
Cr-Commit-Position: refs/heads/master@{#421705}

Powered by Google App Engine
This is Rietveld 408576698