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

Issue 2769543002: [Mojo Video Capture] Introduce abstraction VideoCaptureSystem (Closed)

Created:
3 years, 9 months ago by chfremer
Modified:
3 years, 8 months 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] Introduce abstraction VideoCaptureSystem 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: * Move nested struct VideoCaptureManager::DeviceInfo to struct media::VideoCaptureDeviceInfo. * Create abstraction VideoCaptureSystem and move caching of VideoCaptureDeviceInfo to there. This allows us to use this functionality in both InProcess and MojoService code paths. * Simplify BuildableDeviceCallbacks interface. With the mapping from device_id to descriptor being moved into VideoCaptureSystem, BuildableDeviceCallbacks no longer needs to offer a LookupDeviceDescriptor() method. This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL18. BUG=584797 TEST= content_unittests --gtest_filter="*Video*" 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/2769543002 Cr-Commit-Position: refs/heads/master@{#461845} Committed: https://chromium.googlesource.com/chromium/src/+/8d8a5d278461d098d3481acf52275bb931f834f3

Patch Set 1 #

Total comments: 26

Patch Set 2 : Incorporated suggestions from PatchSet 1 #

Patch Set 3 : Rebase to March 30 #

Patch Set 4 : Add missing ampersand to pass string by reference + Similarity 50 #

Patch Set 5 : Fix for code that should only be run for MEDIA_DEVICE_VIDEO_CAPTURE #

Total comments: 12

Patch Set 6 : Incorporated suggestions from PatchSet 5 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -241 lines) Patch
M content/browser/renderer_host/media/buildable_video_capture_device.h View 1 2 1 chunk +1 line, -5 lines 0 comments Download
M content/browser/renderer_host/media/in_process_buildable_video_capture_device.h View 1 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/in_process_buildable_video_capture_device.cc View 1 7 chunks +17 lines, -45 lines 0 comments Download
M content/browser/renderer_host/media/media_devices_manager_unittest.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 chunks +6 lines, -7 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 3 4 5 7 chunks +16 lines, -28 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 4 5 13 chunks +42 lines, -144 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 2 chunks +8 lines, -6 lines 0 comments Download
M media/capture/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M media/capture/video/video_capture_device_factory.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A media/capture/video/video_capture_device_info.h View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
A media/capture/video/video_capture_device_info.cc View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A media/capture/video/video_capture_system.h View 1 2 3 4 5 1 chunk +56 lines, -0 lines 0 comments Download
A media/capture/video/video_capture_system.cc View 1 2 3 4 5 1 chunk +126 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 38 (27 generated)
chfremer
miu@: PTAL
3 years, 9 months ago (2017-03-21 23:48:33 UTC) #7
miu
Comments on PS1: https://codereview.chromium.org/2769543002/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h File content/browser/renderer_host/media/in_process_buildable_video_capture_device.h (right): https://codereview.chromium.org/2769543002/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h#newcode26 content/browser/renderer_host/media/in_process_buildable_video_capture_device.h:26: media::VideoCaptureSystem* device_factory); arg rename too? https://codereview.chromium.org/2769543002/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h#newcode96 ...
3 years, 9 months ago (2017-03-22 22:51:24 UTC) #10
chfremer
miu@: PTAL https://codereview.chromium.org/2769543002/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h File content/browser/renderer_host/media/in_process_buildable_video_capture_device.h (right): https://codereview.chromium.org/2769543002/diff/20001/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h#newcode26 content/browser/renderer_host/media/in_process_buildable_video_capture_device.h:26: media::VideoCaptureSystem* device_factory); On 2017/03/22 22:51:23, miu wrote: ...
3 years, 9 months ago (2017-03-23 00:34:14 UTC) #11
miu
PS2 lgtm
3 years, 9 months ago (2017-03-24 21:24:14 UTC) #12
chfremer
emircan@: PTAL mcasas@: optional review
3 years, 8 months ago (2017-03-31 17:28:40 UTC) #16
emircan
lgtm % nits. https://codereview.chromium.org/2769543002/diff/140001/media/capture/video/video_capture_system.cc File media/capture/video/video_capture_system.cc (right): https://codereview.chromium.org/2769543002/diff/140001/media/capture/video/video_capture_system.cc#newcode68 media/capture/video/video_capture_system.cc:68: factory_->EnumerateDeviceDescriptors(media::BindToCurrentLoop( It seems like VideoCaptureDeviceFactory::EnumerateDeviceDescriptors() runs ...
3 years, 8 months ago (2017-04-03 19:04:28 UTC) #25
mcasas
https://codereview.chromium.org/2769543002/diff/140001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2769543002/diff/140001/content/browser/renderer_host/media/video_capture_manager.cc#newcode294 content/browser/renderer_host/media/video_capture_manager.cc:294: // TODO(chfremer): Check if any production code actually depends ...
3 years, 8 months ago (2017-04-04 18:38:42 UTC) #26
chfremer
Incorporated suggestions from PatchSet 5. Thanks for the review! https://codereview.chromium.org/2769543002/diff/140001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2769543002/diff/140001/content/browser/renderer_host/media/video_capture_manager.cc#newcode294 content/browser/renderer_host/media/video_capture_manager.cc:294: ...
3 years, 8 months ago (2017-04-04 19:05:33 UTC) #27
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/2769543002/160001
3 years, 8 months ago (2017-04-04 21:18:04 UTC) #34
commit-bot: I haz the power
Committed patchset #6 (id:160001) as https://chromium.googlesource.com/chromium/src/+/8d8a5d278461d098d3481acf52275bb931f834f3
3 years, 8 months ago (2017-04-04 21:49:41 UTC) #37
tasak
3 years, 8 months ago (2017-04-05 02:44:41 UTC) #38
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:160001) has been created in
https://codereview.chromium.org/2802553002/ by tasak@google.com.

The reason for reverting is: I think, this patch makes
MediaDevicesDispatcherHostTest.GetVideoInputCapabilities (Win7 Tests) flaky.

e.g.
https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%...

MediaDevicesDispatcherHostTest.GetVideoInputCapabilities (run #1):
[ RUN      ] MediaDevicesDispatcherHostTest.GetVideoInputCapabilities
c:\b\c\b\win\src\content\browser\renderer_host\media\media_devices_dispatcher_host_unittest.cc(373):
error: Actual function call count doesn't match EXPECT_CALL(*this,
MockVideoInputCapabilitiesCallback())...
         Expected: to be called once
           Actual: never called - unsatisfied and active
[  FAILED  ] MediaDevicesDispatcherHostTest.GetVideoInputCapabilities (48 ms)
.

Powered by Google App Engine
This is Rietveld 408576698