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

Issue 2818513003: [Mojo Video Capture] Adapt video_capture service to refactored video capture stack (Closed)

Created:
3 years, 8 months ago by chfremer
Modified:
3 years, 8 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, Aaron Boodman, posciak+watch_chromium.org, chfremer+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, feature-media-reviews_chromium.org, xjz+watch_chromium.org, darin (slow to review), miu+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Adapt video_capture service to refactored video capture stack This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL22b. Note: The video capture service implementation is currently in an incomplete and outdated state and its tests are disabled. With the refactoring of the legacy video capture stack now being complete, the next goal is to update the service implementation and fit it into the refactored stack. Changes in this CL: * Update Mojo interfaces to more closely resemble their native counterparts. - video_capture.mojom.Device offers functionality similar to VideoCaptureDeviceLauncher + LaunchedVideoCaptureDevice. - video_capture.mojom.DeviceFactory offers functionality similar to media::VideoCaptureProvider. - video_capture.mojom.Receiver offers functionality similar to media::VideoFrameReceiver. * In the service implementation, use a VideoCaptureSystem instead of a VideoCaptureDeviceFactory directly. * Add new adapter classes for plumbing between Mojo service and its usage in the native code. * Re-enable existing video_capture_unittests and add a few more. BUG=584797 TEST= service_unittests --gtest_filter="*Video*" 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/2818513003 Cr-Commit-Position: refs/heads/master@{#467398} Committed: https://chromium.googlesource.com/chromium/src/+/308b44e5bfb17c42ca3ea5b4fa5ed66c2698107b

Patch Set 1 #

Total comments: 16

Patch Set 2 : Incorporated suggestions from Patch Set 1 #

Patch Set 3 : Fix compile errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+627 lines, -168 lines) Patch
M media/capture/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A media/capture/video/shared_memory_buffer_handle.h View 1 1 chunk +37 lines, -0 lines 0 comments Download
A media/capture/video/shared_memory_buffer_handle.cc View 1 1 chunk +31 lines, -0 lines 0 comments Download
M media/capture/video/shared_memory_buffer_tracker.h View 2 chunks +1 line, -20 lines 0 comments Download
M media/capture/video/shared_memory_buffer_tracker.cc View 3 chunks +3 lines, -19 lines 0 comments Download
M media/capture/video/video_capture_buffer_handle.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M services/video_capture/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M services/video_capture/device_factory_media_to_mojo_adapter.h View 3 chunks +7 lines, -12 lines 0 comments Download
M services/video_capture/device_factory_media_to_mojo_adapter.cc View 4 chunks +53 lines, -26 lines 0 comments Download
M services/video_capture/device_media_to_mojo_adapter.h View 1 chunk +6 lines, -0 lines 0 comments Download
M services/video_capture/device_media_to_mojo_adapter.cc View 1 4 chunks +23 lines, -4 lines 0 comments Download
A services/video_capture/public/cpp/device_to_feedback_observer_adapter.h View 1 chunk +30 lines, -0 lines 0 comments Download
A services/video_capture/public/cpp/device_to_feedback_observer_adapter.cc View 1 chunk +20 lines, -0 lines 0 comments Download
A services/video_capture/public/cpp/receiver_media_to_mojo_adapter.h View 1 chunk +39 lines, -0 lines 0 comments Download
A services/video_capture/public/cpp/receiver_media_to_mojo_adapter.cc View 1 1 chunk +112 lines, -0 lines 0 comments Download
M services/video_capture/public/interfaces/device.mojom View 1 chunk +2 lines, -0 lines 0 comments Download
M services/video_capture/public/interfaces/receiver.mojom View 1 chunk +10 lines, -2 lines 0 comments Download
M services/video_capture/receiver_mojo_to_media_adapter.h View 1 chunk +1 line, -1 line 0 comments Download
M services/video_capture/receiver_mojo_to_media_adapter.cc View 4 chunks +37 lines, -8 lines 0 comments Download
M services/video_capture/service_impl.cc View 2 chunks +9 lines, -3 lines 0 comments Download
M services/video_capture/test/fake_device_descriptor_unittest.cc View 3 chunks +4 lines, -5 lines 0 comments Download
M services/video_capture/test/fake_device_unittest.cc View 1 6 chunks +62 lines, -27 lines 0 comments Download
M services/video_capture/test/mock_device_factory.cc View 2 chunks +6 lines, -1 line 0 comments Download
M services/video_capture/test/mock_device_test.h View 2 chunks +12 lines, -1 line 0 comments Download
M services/video_capture/test/mock_device_test.cc View 4 chunks +35 lines, -1 line 0 comments Download
M services/video_capture/test/mock_device_unittest.cc View 3 chunks +43 lines, -22 lines 0 comments Download
M services/video_capture/test/mock_receiver.h View 1 chunk +17 lines, -5 lines 0 comments Download
M services/video_capture/test/mock_receiver.cc View 1 chunk +13 lines, -3 lines 0 comments Download
M services/video_capture/test/service_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 38 (29 generated)
chfremer
mcasas@: PTAL emircan@: optional review miu@: FYI
3 years, 8 months ago (2017-04-17 22:01:50 UTC) #17
emircan
https://codereview.chromium.org/2818513003/diff/60001/media/capture/video/shared_memory_buffer_handle.cc File media/capture/video/shared_memory_buffer_handle.cc (right): https://codereview.chromium.org/2818513003/diff/60001/media/capture/video/shared_memory_buffer_handle.cc#newcode24 media/capture/video/shared_memory_buffer_handle.cc:24: return static_cast<uint8_t*>(shared_memory_->memory()); We should add checks to make sure ...
3 years, 8 months ago (2017-04-19 18:16:48 UTC) #18
chfremer
emircan@: PTAL ochang@: Please RS *.mojom https://codereview.chromium.org/2818513003/diff/60001/media/capture/video/shared_memory_buffer_handle.cc File media/capture/video/shared_memory_buffer_handle.cc (right): https://codereview.chromium.org/2818513003/diff/60001/media/capture/video/shared_memory_buffer_handle.cc#newcode24 media/capture/video/shared_memory_buffer_handle.cc:24: return static_cast<uint8_t*>(shared_memory_->memory()); On ...
3 years, 8 months ago (2017-04-19 23:03:38 UTC) #22
emircan
lgtm
3 years, 8 months ago (2017-04-19 23:11:29 UTC) #25
Oliver Chang
RS LGTM
3 years, 8 months ago (2017-04-25 20:51:46 UTC) #30
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/2818513003/100001
3 years, 8 months ago (2017-04-26 16:49:13 UTC) #33
commit-bot: I haz the power
Committed patchset #3 (id:100001) as https://chromium.googlesource.com/chromium/src/+/308b44e5bfb17c42ca3ea5b4fa5ed66c2698107b
3 years, 8 months ago (2017-04-26 18:52:54 UTC) #36
alph
A revert of this CL (patchset #3 id:100001) has been created in https://codereview.chromium.org/2844813002/ by alph@chromium.org. ...
3 years, 8 months ago (2017-04-26 20:47:09 UTC) #37
zmin
3 years, 8 months ago (2017-04-26 20:50:48 UTC) #38
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:100001) has been created in
https://codereview.chromium.org/2844833002/ by zmin@chromium.org.

The reason for reverting is: service_unittests service_unittests
Run on OS: 'Ubuntu-14.04'
failures:
FakeVideoCaptureDeviceDescriptorTest.AccessIsRevokedOnSecondAccess

https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/Linux%20C....

Powered by Google App Engine
This is Rietveld 408576698