Chromium Code Reviews
Help | Chromium Project | Sign in
(3)

Issue 2753073006: [Mojo Video Capture] Add support to BuildableVideoCaptureDevice for aborting the device start.

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 week, 5 days ago by chfremer
Modified:
5 days, 4 hours ago
Reviewers:
emircan, mcasas, miu
CC:
chromium-reviews, posciak+watch_chromium.org, chfremer+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Add support to BuildableVideoCaptureDevice for aborting the device start. This CL is supposed to be a pure refactoring. There should be no changes to existing behavior. This is part of a series of CLs with the goal of separating the class VideoCaptureManager from knowledge of things that are going to be private implementation details of the video capture service. The end goal is to have VideoCaptureManager talk to an abstraction that can be implemented by either the video capture Mojo service or the existing (legacy) in-process implementation. Changes in this CL: * When a request to stop a device comes in while the device is still starting up asynchronously, the device needs to be stopped as soon as it has finished starting up. This CL moves the logic for this from VideoCaptureManager to implementations of BuildableVideoCaptureDevice. * Some naming improvements This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL17. BUG=584797 TEST= content_browsertests --gtest_filter="VideoCaptureBrowserTest.*" content_unittests --gtest_filter="*Video*" [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing

Patch Set 1 #

Total comments: 7

Patch Set 2 : Incorporate suggestions from Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -183 lines) Patch
M content/browser/renderer_host/media/buildable_video_capture_device.h View 1 2 chunks +9 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/in_process_buildable_video_capture_device.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc View 1 5 chunks +65 lines, -31 lines 3 comments Download
M content/browser/renderer_host/media/video_capture_browsertest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 7 chunks +20 lines, -19 lines 2 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 17 chunks +79 lines, -109 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 3 chunks +8 lines, -13 lines 0 comments Download
Trybot results: Sign in to try more bots
Commit queue not available (can’t edit this change).

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 13 (6 generated)
chfremer
miu@: PTAL emircan@: PTAL mcasas@: FYI
1 week, 5 days ago (2017-03-17 20:31:46 UTC) #5
miu
lgtm % a few things to consider to simplify things: https://codereview.chromium.org/2753073006/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc File content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc (right): https://codereview.chromium.org/2753073006/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc#newcode302 ...
1 week, 5 days ago (2017-03-17 21:48:02 UTC) #6
chfremer
PTAL https://codereview.chromium.org/2753073006/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc File content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc (right): https://codereview.chromium.org/2753073006/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc#newcode302 content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc:302: std::move(buffer_pool), On 2017/03/17 21:48:02, miu wrote: > Note: ...
1 week, 1 day ago (2017-03-21 22:37:23 UTC) #9
chfremer
mcasas@: PTAL
1 week, 1 day ago (2017-03-21 23:05:28 UTC) #10
miu
still lgtm https://codereview.chromium.org/2753073006/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2753073006/diff/20001/content/browser/renderer_host/media/video_capture_manager.cc#newcode329 content/browser/renderer_host/media/video_capture_manager.cc:329: device_start_request_queue_.begin(), device_start_request_queue_.end(), On 2017/03/21 22:37:23, chfremer wrote: ...
1 week ago (2017-03-22 21:33:28 UTC) #11
chfremer
https://codereview.chromium.org/2753073006/diff/40001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc File content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc (right): https://codereview.chromium.org/2753073006/diff/40001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc#newcode68 content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc:68: std::move(done_cb).Run(); On 2017/03/22 21:33:28, miu wrote: > nit: Is ...
1 week ago (2017-03-22 22:37:52 UTC) #12
mcasas
5 days, 4 hours ago (2017-03-24 21:54:36 UTC) #13
lgtm

https://codereview.chromium.org/2753073006/diff/40001/content/browser/rendere...
File
content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc
(right):

https://codereview.chromium.org/2753073006/diff/40001/content/browser/rendere...
content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc:102:
DCHECK(state_ == State::NO_DEVICE);
DCHECK_EQ(State::NO_DEVICE, state_) ?
Not sure if enum classes have operator<<,
if not, then this construction won't work and
you should disregard this comment :-)

https://codereview.chromium.org/2753073006/diff/40001/content/browser/rendere...
File content/browser/renderer_host/media/video_capture_manager.h (right):

https://codereview.chromium.org/2753073006/diff/40001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:120: void
ResumeCaptureForClient(
nit: Should we rename also {Pause,Resume}CaptureForClient
to {Pause,Resume}Client (resp.) ?

https://codereview.chromium.org/2753073006/diff/40001/content/browser/rendere...
content/browser/renderer_host/media/video_capture_manager.h:312:
DeviceStartQueue device_start_request_queue_;
DeviceStartQueue is just a list of CaptureDeviceStartRequest,
which is a way of reinventing the wheel, in this case a 
CancellableTaskTracker [1].  I filed a bug a while ago and
it's still there : https://crbug.com/598465.  Would you mind
adding a TODO() here...? Thanks!


[1]
https://cs.chromium.org/chromium/src/base/task/cancelable_task_tracker.h?sq=p...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld cc6ac46