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

Issue 2867213004: [Mojo Video Capture] Hook up video capture service behind a feature flag (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 week, 5 days ago by chfremer
Modified:
2 days, 17 hours ago
CC:
Aaron Boodman, abarth-chromium, chfremer+watch_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mfoltz+watch_chromium.org, miu+watch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, xjz+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Hook up video capture service behind a feature flag This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL25. After this CL, the video capture service can be enabled by starting Chrome with command-line flag --enable-features=MojoVideoCapture. Changes in this CL: * Add a base::Feature kMojoVideoCapture to allow switching the service on and off. * Add a class VideoCaptureProviderSwitcher that can route device capture requests to the service's VideoCaptureProvider while routing screen capture requests to the InProcessVideoCaptureProvider. * Hook up the VideoCaptureProviderSwitcher in the factory code in MediaStreamManager. * Register video capture service in the service manager context for the Browser process. * Remove build flag "enable_mojo_video_capture", since we want the service to be testable in all builds. * Forward switches for using fake video capture devices to utility processes. * Add test cases for exercising the service to VideoCaptureBrowserTest. BUG=584797 TEST= content_browsertests --gtest_filter="VideoCaptureBrowserTest.*" [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing Review-Url: https://codereview.chromium.org/2867213004 Cr-Commit-Position: refs/heads/master@{#473358} Committed: https://chromium.googlesource.com/chromium/src/+/d99842d2bfbffba9b80aaa81aced1f1e7ebb39c8

Patch Set 1 #

Patch Set 2 : Rebase to May 9th #

Patch Set 3 : Fix mojo::MakeRequest(&device) happening after base::Passed(&device). #

Total comments: 24

Patch Set 4 : Incorporate suggestions from Patch Set 3 #

Patch Set 5 : Incorporate more suggestions from Patch Set 3 #

Total comments: 19

Patch Set 6 : Incorporate suggestions from PatchSet 5 #

Total comments: 4

Patch Set 7 : Incorporate suggestions from PatchSet#6 #

Patch Set 8 : Fix for compile on Windows #

Patch Set 9 : Rebase to May 19th #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -76 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -22 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/service_video_capture_device_launcher.cc View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_browsertest.cc View 1 2 3 4 5 12 chunks +92 lines, -36 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_provider.h View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
A content/browser/renderer_host/media/video_capture_provider_switcher.h View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/video_capture_provider_switcher.cc View 1 2 3 4 5 6 7 1 chunk +88 lines, -0 lines 0 comments Download
M content/browser/service_manager/service_manager_context.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -0 lines 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M content/public/app/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/public/app/mojo/content_browser_manifest.json View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/utility/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M content/utility/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/utility/utility_service_factory.cc View 2 chunks +15 lines, -0 lines 0 comments Download
M media/capture/video/video_capture_system.h View 1 chunk +2 lines, -1 line 0 comments Download
M services/video_capture/device_factory_media_to_mojo_adapter.cc View 1 2 3 1 chunk +4 lines, -11 lines 0 comments Download
M services/video_capture/public/cpp/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A services/video_capture/public/cpp/constants.h View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A services/video_capture/public/cpp/constants.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M services/video_capture/service_manifest.json View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
Commit queue not available (can’t edit this change).

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 54 (37 generated)
chfremer
mcasas@, rockot@: PTAL miu@, emircan@: FYI
1 week, 5 days ago (2017-05-09 19:26:05 UTC) #3
mcasas
https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode189 content/browser/renderer_host/media/video_capture_browsertest.cc:189: // Mojo video capture is currently not supported on ...
1 week, 5 days ago (2017-05-10 02:33:33 UTC) #16
chfremer
PTAL https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode189 content/browser/renderer_host/media/video_capture_browsertest.cc:189: // Mojo video capture is currently not supported ...
1 week, 4 days ago (2017-05-10 17:59:40 UTC) #19
mcasas
https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode317 content/browser/renderer_host/media/video_capture_browsertest.cc:317: gfx::Size(640, 480), 6.0f, true, false})); On 2017/05/10 17:59:39, chfremer ...
1 week, 4 days ago (2017-05-10 18:15:44 UTC) #20
chfremer
PTAL https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2867213004/diff/60001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode317 content/browser/renderer_host/media/video_capture_browsertest.cc:317: gfx::Size(640, 480), 6.0f, true, false})); On 2017/05/10 18:15:43, ...
1 week, 4 days ago (2017-05-10 21:08:06 UTC) #21
chfremer
ping, rockot@: Could you please take a quick look at the service hookup parts?
1 week, 2 days ago (2017-05-12 17:16:20 UTC) #22
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/2867213004/diff/100001/services/video_capture/service_manifest.json File services/video_capture/service_manifest.json (right): https://codereview.chromium.org/2867213004/diff/100001/services/video_capture/service_manifest.json#newcode7 services/video_capture/service_manifest.json:7: "capture": [ "*" ], I guess this is ...
1 week, 2 days ago (2017-05-12 19:29:22 UTC) #23
mcasas
Almost there https://codereview.chromium.org/2867213004/diff/100001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/2867213004/diff/100001/content/browser/renderer_host/media/media_stream_manager.cc#newcode428 content/browser/renderer_host/media/media_stream_manager.cc:428: std::move(device_task_runner)); |device_task_runner| is unused if base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture), and ...
1 week, 2 days ago (2017-05-12 22:07:03 UTC) #24
chfremer
mcasas@: PTAL https://codereview.chromium.org/2867213004/diff/100001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/2867213004/diff/100001/content/browser/renderer_host/media/media_stream_manager.cc#newcode428 content/browser/renderer_host/media/media_stream_manager.cc:428: std::move(device_task_runner)); On 2017/05/12 22:07:02, mcasas wrote: > ...
1 week, 2 days ago (2017-05-12 23:30:21 UTC) #25
mcasas
lgtm https://codereview.chromium.org/2867213004/diff/100001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/2867213004/diff/100001/content/browser/renderer_host/media/media_stream_manager.cc#newcode428 content/browser/renderer_host/media/media_stream_manager.cc:428: std::move(device_task_runner)); On 2017/05/12 23:30:21, chfremer wrote: > On ...
1 week, 2 days ago (2017-05-12 23:33:01 UTC) #26
chfremer
piman@: PTAL tsepez@: Please RS content_browser_manifest.json
6 days, 21 hours ago (2017-05-15 18:31:46 UTC) #30
Tom Sepez
lgtm RS
6 days, 20 hours ago (2017-05-15 18:41:21 UTC) #31
piman
LGTM + nits https://codereview.chromium.org/2867213004/diff/120001/content/browser/renderer_host/media/video_capture_provider_switcher.cc File content/browser/renderer_host/media/video_capture_provider_switcher.cc (right): https://codereview.chromium.org/2867213004/diff/120001/content/browser/renderer_host/media/video_capture_provider_switcher.cc#newcode33 content/browser/renderer_host/media/video_capture_provider_switcher.cc:33: base::Unretained(media_device_launcher_.get())); nit: keeping around a callback ...
6 days, 20 hours ago (2017-05-15 19:34:32 UTC) #32
chfremer
Thanks for the review! https://codereview.chromium.org/2867213004/diff/120001/content/browser/renderer_host/media/video_capture_provider_switcher.cc File content/browser/renderer_host/media/video_capture_provider_switcher.cc (right): https://codereview.chromium.org/2867213004/diff/120001/content/browser/renderer_host/media/video_capture_provider_switcher.cc#newcode33 content/browser/renderer_host/media/video_capture_provider_switcher.cc:33: base::Unretained(media_device_launcher_.get())); On 2017/05/15 19:34:32, piman ...
6 days, 17 hours ago (2017-05-15 22:08:13 UTC) #36
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/2867213004/180001
2 days, 17 hours ago (2017-05-19 22:12:47 UTC) #50
commit-bot: I haz the power
Committed patchset #9 (id:180001) as https://chromium.googlesource.com/chromium/src/+/d99842d2bfbffba9b80aaa81aced1f1e7ebb39c8
2 days, 17 hours ago (2017-05-19 22:18:40 UTC) #53
tsergeant
15 hours, 28 minutes ago (2017-05-22 00:08:13 UTC) #54
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:180001) has been created in
https://codereview.chromium.org/2900583002/ by tsergeant@chromium.org.

The reason for reverting is: This CL appears to cause test failures on the
Webkit Android bots for blink_heap_unittests and webkit_unit_tests.

Example failing build:
https://luci-milo.appspot.com/buildbot/chromium.webkit/WebKit%20Android%20%28...

OSError: [Errno 2] No such file or directory:
'/b/c/b/WebKit_Android__Nexus4_/src/out/Release/gen/services/video_capture/manifest.json'.
Sign in to reply to this message.

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