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

Issue 2378943002: Let clients interact with VideoCaptureDeviceClient instead of VideoCaptureDevice (Closed)

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

Description

Modify the Mojo interfaces so that clients interact with the VideoCaptureDeviceClient interface instead of VideoCaptureDevice. This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL1.7.1. * Instead of exposing the interface mojom::VideoCaptureDeviceClient (which is the mojo equivalent of media::VideoCaptureDevice::Client) to clients of the Mojo service, use the implementation media::VideoCaptureDeviceClient inside the service and expose its client interface (media::VideoFrameReceiver) as mojom::VideoFrameReceiver to clients of the service. * Add class video_capture::BufferTrackerFactory, and use it as the Mojo service's implementation of media::VideoCaptureBufferTrackerFactory required to operate the media::VideoCaptureDeviceClient. The buffers it creates are backed by MojoSharedBufferVideoFrames. * Add support to VideoCaptureDeviceClient for buffers that are backed by video frames in order to avoid wrapping the MojoSharedBufferVideoFrame-backed buffers in another VideoFrame. BUG=584797 TEST=content_unittest, capture_unittest, video_capture_unittest [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing Committed: https://crrev.com/a15bab53286e1800eed33dbc3619ccd957e9bf0d Cr-Commit-Position: refs/heads/master@{#424550}

Patch Set 1 #

Patch Set 2 : * Rename a class * formatting #

Total comments: 4

Patch Set 3 : mcasas comments #

Total comments: 6

Patch Set 4 : rebase #

Patch Set 5 : Remove method AsClientBuffer() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+478 lines, -300 lines) Patch
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/shared_memory_buffer_handle.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/shared_memory_buffer_handle.cc View 1 2 3 4 1 chunk +8 lines, -5 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M media/capture/video/video_capture_buffer_handle.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M media/capture/video/video_capture_device.h View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M media/capture/video/video_capture_device_client.cc View 1 2 3 4 2 chunks +19 lines, -10 lines 0 comments Download
M services/video_capture/BUILD.gn View 1 2 3 3 chunks +11 lines, -4 lines 0 comments Download
A services/video_capture/buffer_tracker_factory_impl.h View 1 1 chunk +26 lines, -0 lines 0 comments Download
A services/video_capture/buffer_tracker_factory_impl.cc View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
D services/video_capture/device_client_mojo_to_media_adapter.h View 1 chunk +0 lines, -65 lines 0 comments Download
D services/video_capture/device_client_mojo_to_media_adapter.cc View 1 chunk +0 lines, -84 lines 0 comments Download
M services/video_capture/fake_device_descriptor_unittest.cc View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M services/video_capture/fake_device_unittest.cc View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M services/video_capture/mock_device_video_capture_service_test.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M services/video_capture/mock_device_video_capture_service_test.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M services/video_capture/mock_device_video_capture_service_unittest.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
D services/video_capture/mock_video_capture_device_client.h View 1 chunk +0 lines, -31 lines 0 comments Download
D services/video_capture/mock_video_capture_device_client.cc View 1 chunk +0 lines, -20 lines 0 comments Download
A services/video_capture/mock_video_frame_receiver.h View 1 chunk +35 lines, -0 lines 0 comments Download
A services/video_capture/mock_video_frame_receiver.cc View 1 chunk +20 lines, -0 lines 0 comments Download
A services/video_capture/mojo_shared_memory_buffer_handle.h View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A services/video_capture/mojo_shared_memory_buffer_handle.cc View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A + services/video_capture/mojo_shared_memory_buffer_tracker.h View 1 2 3 1 chunk +13 lines, -12 lines 0 comments Download
A services/video_capture/mojo_shared_memory_buffer_tracker.cc View 1 2 3 1 chunk +51 lines, -0 lines 0 comments Download
M services/video_capture/public/interfaces/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
D services/video_capture/public/interfaces/video_capture_device_client.mojom View 1 chunk +0 lines, -14 lines 0 comments Download
M services/video_capture/public/interfaces/video_capture_device_proxy.mojom View 2 chunks +2 lines, -2 lines 0 comments Download
A + services/video_capture/public/interfaces/video_frame_receiver.mojom View 1 chunk +6 lines, -4 lines 0 comments Download
A services/video_capture/receiver_mojo_to_media_adapter.h View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A services/video_capture/receiver_mojo_to_media_adapter.cc View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
M services/video_capture/video_capture_device_factory_impl.h View 2 chunks +3 lines, -1 line 0 comments Download
M services/video_capture/video_capture_device_factory_impl.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M services/video_capture/video_capture_device_proxy_impl.h View 1 2 3 2 chunks +8 lines, -5 lines 0 comments Download
M services/video_capture/video_capture_device_proxy_impl.cc View 1 2 3 3 chunks +34 lines, -11 lines 0 comments Download
M services/video_capture/video_capture_service.cc View 1 5 chunks +15 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (11 generated)
chfremer
mcasas@: PTAL emircan@: FIY Note: Lots of files touched, but most of them with canonical ...
4 years, 2 months ago (2016-09-29 00:11:59 UTC) #3
mcasas
looking good, but it's so large that I can't seem to have a long enough ...
4 years, 2 months ago (2016-10-05 02:43:48 UTC) #4
mcasas
lgtm with comments, and I'd like emircan@ to take a look at it as well. ...
4 years, 2 months ago (2016-10-05 17:24:00 UTC) #5
chfremer
https://codereview.chromium.org/2378943002/diff/20001/services/video_capture/receiver_mojo_to_media_adapter.cc File services/video_capture/receiver_mojo_to_media_adapter.cc (right): https://codereview.chromium.org/2378943002/diff/20001/services/video_capture/receiver_mojo_to_media_adapter.cc#newcode16 services/video_capture/receiver_mojo_to_media_adapter.cc:16: // TODO: remove |params| if not needed On 2016/10/05 ...
4 years, 2 months ago (2016-10-05 23:30:28 UTC) #6
chfremer
On 2016/10/05 23:30:28, chfremer wrote: > https://codereview.chromium.org/2378943002/diff/20001/services/video_capture/receiver_mojo_to_media_adapter.cc > File services/video_capture/receiver_mojo_to_media_adapter.cc (right): > > https://codereview.chromium.org/2378943002/diff/20001/services/video_capture/receiver_mojo_to_media_adapter.cc#newcode16 > ...
4 years, 2 months ago (2016-10-10 16:40:50 UTC) #7
emircan
lgtm % nits. https://codereview.chromium.org/2378943002/diff/40001/media/capture/video/video_capture_buffer_handle.h File media/capture/video/video_capture_buffer_handle.h (right): https://codereview.chromium.org/2378943002/diff/40001/media/capture/video/video_capture_buffer_handle.h#newcode23 media/capture/video/video_capture_buffer_handle.h:23: virtual ClientBuffer AsClientBuffer(int plane) = 0; ...
4 years, 2 months ago (2016-10-10 18:46:13 UTC) #8
chfremer
tsepez@: PTAL *.mojom avi@: Please RS web_contents_video_capture_device_unittest.cc https://codereview.chromium.org/2378943002/diff/40001/media/capture/video/video_capture_buffer_handle.h File media/capture/video/video_capture_buffer_handle.h (right): https://codereview.chromium.org/2378943002/diff/40001/media/capture/video/video_capture_buffer_handle.h#newcode23 media/capture/video/video_capture_buffer_handle.h:23: virtual ClientBuffer ...
4 years, 2 months ago (2016-10-11 19:09:07 UTC) #10
Avi (use Gerrit)
lgtm content/browser/media/capture/web_contents_video_capture_device_unittest.cc stamp
4 years, 2 months ago (2016-10-11 19:37:54 UTC) #13
Tom Sepez
.mojom LGTM
4 years, 2 months ago (2016-10-11 20:32:25 UTC) #14
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/2378943002/80001
4 years, 2 months ago (2016-10-11 21:15:49 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-11 21:34:38 UTC) #21
commit-bot: I haz the power
4 years, 2 months ago (2016-10-11 21:39:34 UTC) #23
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a15bab53286e1800eed33dbc3619ccd957e9bf0d
Cr-Commit-Position: refs/heads/master@{#424550}

Powered by Google App Engine
This is Rietveld 408576698