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

Issue 2573223002: [Mojo Video Capture] Simplify media::VideoCaptureDevice::Client:Buffer to a struct (Closed)

Created:
4 years ago by chfremer
Modified:
3 years, 11 months ago
Reviewers:
mcasas, miu
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, xjz+watch_chromium.org, darin (slow to review), miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Simplify media::VideoCaptureDevice::Client:Buffer to a struct In interface media::VideoCaptureDevice::Client, change interface Buffer to a move-only struct. The new struct separates the concerns of providing access handles (for in-process as well as for inter-process transit) from access permissions. This allows clients to explicitly obtain in-process memory-mapped handles when they need it. Clients who only want to pass along the buffer or move it across process boundaries do not need memory-mapped handles. In interface media::VideoCaptureBufferPool, renamed GetBufferHandle() -> GetHandleForInProcessAccess() GetHandleForTransit() -> GetHandleForInterProcessTransit(). Removed outdated implementation in video_capture Mojo service. We leave the implementation empty, until refactoring the interfaces has been completed. This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL1.9.10 For a peek at the follow-up CLs, please see https://codereview.chromium.org/2607203002/ https://codereview.chromium.org/2602983002/ BUG=584797 TEST= content_unittests --gtest_filter="*Video*", video_capture_unittests, Apprtc loopback on Debug, Desktop Capture Example extension on Release [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing Review-Url: https://codereview.chromium.org/2573223002 Cr-Commit-Position: refs/heads/master@{#442066} Committed: https://chromium.googlesource.com/chromium/src/+/e1aac992b0399db7776661f4ac2c43094c265de7

Patch Set 1 : Merge Ownership into BufferAccessProvider. #

Total comments: 21

Patch Set 2 : Rebase #

Patch Set 3 : miu's comments #

Total comments: 4

Patch Set 4 : miu's comments #

Patch Set 5 : Backport naming improvements and Ownership interface from future CLs #

Total comments: 2

Patch Set 6 : Rebase #

Patch Set 7 : miu's comments #

Total comments: 14

Patch Set 8 : mcasas comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+534 lines, -826 lines) Patch
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 2 chunks +12 lines, -13 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 chunk +17 lines, -18 lines 0 comments Download
M content/browser/media/capture/screen_capture_device_android_unittest.cc View 1 2 3 4 5 1 chunk +17 lines, -18 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 5 6 7 6 chunks +23 lines, -68 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 2 3 4 5 6 7 4 chunks +6 lines, -15 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 3 4 5 6 7 7 chunks +17 lines, -30 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 2 3 4 5 6 7 12 chunks +96 lines, -132 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc View 1 2 3 4 5 6 7 4 chunks +23 lines, -15 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 4 5 2 chunks +1 line, -5 lines 0 comments Download
M content/browser/renderer_host/media/video_frame_receiver_on_io_thread.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/video_frame_receiver_on_io_thread.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/capture/content/thread_safe_capture_oracle.h View 1 chunk +7 lines, -8 lines 0 comments Download
M media/capture/content/thread_safe_capture_oracle.cc View 1 2 3 4 5 6 7 5 chunks +10 lines, -9 lines 0 comments Download
M media/capture/video/fake_video_capture_device.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -6 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 2 3 4 5 6 3 chunks +59 lines, -35 lines 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate_unittest.cc View 3 chunks +9 lines, -11 lines 0 comments Download
M media/capture/video/shared_memory_buffer_tracker.h View 1 2 3 4 2 chunks +3 lines, -8 lines 0 comments Download
M media/capture/video/shared_memory_buffer_tracker.cc View 1 2 3 4 2 chunks +5 lines, -20 lines 0 comments Download
M media/capture/video/video_capture_buffer_handle.h View 1 chunk +2 lines, -7 lines 0 comments Download
M media/capture/video/video_capture_buffer_pool.h View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M media/capture/video/video_capture_buffer_pool_impl.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M media/capture/video/video_capture_buffer_pool_impl.cc View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M media/capture/video/video_capture_buffer_tracker.h View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 2 3 4 5 6 7 6 chunks +52 lines, -28 lines 0 comments Download
M media/capture/video/video_capture_device.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -4 lines 0 comments Download
M media/capture/video/video_capture_device_client.h View 1 2 3 4 5 6 7 2 chunks +20 lines, -28 lines 0 comments Download
M media/capture/video/video_capture_device_client.cc View 1 2 3 4 5 6 7 12 chunks +82 lines, -77 lines 0 comments Download
M media/capture/video/video_capture_device_unittest.cc View 2 chunks +12 lines, -13 lines 0 comments Download
M media/capture/video/video_capture_jpeg_decoder.h View 2 chunks +4 lines, -5 lines 0 comments Download
M media/capture/video/video_frame_receiver.h View 1 chunk +1 line, -1 line 0 comments Download
M services/video_capture/BUILD.gn View 1 chunk +0 lines, -6 lines 0 comments Download
D services/video_capture/buffer_tracker_factory_impl.h View 1 chunk +0 lines, -26 lines 0 comments Download
D services/video_capture/buffer_tracker_factory_impl.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M services/video_capture/device_media_to_mojo_adapter.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
D services/video_capture/mojo_shared_memory_buffer_handle.h View 1 chunk +0 lines, -35 lines 0 comments Download
D services/video_capture/mojo_shared_memory_buffer_handle.cc View 1 chunk +0 lines, -45 lines 0 comments Download
D services/video_capture/mojo_shared_memory_buffer_tracker.h View 1 chunk +0 lines, -37 lines 0 comments Download
D services/video_capture/mojo_shared_memory_buffer_tracker.cc View 1 chunk +0 lines, -50 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 1 chunk +2 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 71 (54 generated)
chfremer
miu@: PTAL mcasas@: PTAL
4 years ago (2016-12-14 22:26:27 UTC) #9
chfremer
I updated the CL description to contain a link to the follow-up CL, which may ...
4 years ago (2016-12-15 19:32:26 UTC) #21
chfremer
mcasas, emircan, and I had an offline discussion about the usage of an empty interface ...
4 years ago (2016-12-15 23:24:26 UTC) #26
miu
https://codereview.chromium.org/2573223002/diff/80001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/2573223002/diff/80001/content/browser/renderer_host/media/video_capture_controller.cc#newcode375 content/browser/renderer_host/media/video_capture_controller.cc:375: const int buffer_id = buffer.id; If |frame_buffer_pool_| is null, ...
4 years ago (2016-12-20 22:25:37 UTC) #31
chfremer
Addressed miu's comments. miu@: PTAL mcasas@: PTAL Also note the follow-up CL, in case you ...
4 years ago (2016-12-22 19:01:20 UTC) #38
miu
Comment threads from PS2 continued, and new PS3 comments: https://codereview.chromium.org/2573223002/diff/80001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/2573223002/diff/80001/content/browser/renderer_host/media/video_capture_controller.cc#newcode375 content/browser/renderer_host/media/video_capture_controller.cc:375: ...
3 years, 12 months ago (2016-12-27 23:38:49 UTC) #41
chfremer
miu@: PTAL https://codereview.chromium.org/2573223002/diff/80001/media/capture/video/video_capture_device.h File media/capture/video/video_capture_device.h (right): https://codereview.chromium.org/2573223002/diff/80001/media/capture/video/video_capture_device.h#newcode98 media/capture/video/video_capture_device.h:98: struct CAPTURE_EXPORT Buffer { On 2016/12/27 23:38:48, ...
3 years, 12 months ago (2016-12-28 01:06:45 UTC) #42
miu
PS5 lgtm % suggestion in comment below. I really like the new naming in PS5, ...
3 years, 11 months ago (2016-12-30 01:03:22 UTC) #50
chfremer
On 2016/12/30 01:03:22, miu wrote: > PS5 lgtm % suggestion in comment below. > > ...
3 years, 11 months ago (2016-12-30 04:04:56 UTC) #51
miu
On 2016/12/30 04:04:56, chfremer wrote: > That is why I would choose "Ownership" as the ...
3 years, 11 months ago (2016-12-30 04:55:17 UTC) #52
chfremer
Incorporated miu's suggestions. mcasas@: PTAL https://codereview.chromium.org/2573223002/diff/160001/media/capture/video/video_capture_device.h File media/capture/video/video_capture_device.h (right): https://codereview.chromium.org/2573223002/diff/160001/media/capture/video/video_capture_device.h#newcode89 media/capture/video/video_capture_device.h:89: class CAPTURE_EXPORT Ownership { ...
3 years, 11 months ago (2017-01-03 23:15:38 UTC) #53
mcasas
https://codereview.chromium.org/2573223002/diff/200001/content/browser/renderer_host/media/video_capture_controller.h File content/browser/renderer_host/media/video_capture_controller.h (right): https://codereview.chromium.org/2573223002/diff/200001/content/browser/renderer_host/media/video_capture_controller.h#newcode73 content/browser/renderer_host/media/video_capture_controller.h:73: // before they can provide the observer. (This is ...
3 years, 11 months ago (2017-01-05 20:37:02 UTC) #58
chfremer
mcasas@: PTAL https://codereview.chromium.org/2573223002/diff/200001/content/browser/renderer_host/media/video_capture_controller.h File content/browser/renderer_host/media/video_capture_controller.h (right): https://codereview.chromium.org/2573223002/diff/200001/content/browser/renderer_host/media/video_capture_controller.h#newcode73 content/browser/renderer_host/media/video_capture_controller.h:73: // before they can provide the observer. ...
3 years, 11 months ago (2017-01-05 22:44:48 UTC) #59
mcasas
On 2017/01/05 22:44:48, chfremer wrote: > mcasas@: PTAL > > https://codereview.chromium.org/2573223002/diff/200001/content/browser/renderer_host/media/video_capture_controller.h > File content/browser/renderer_host/media/video_capture_controller.h (right): ...
3 years, 11 months ago (2017-01-06 18:54:52 UTC) #60
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/2573223002/220001
3 years, 11 months ago (2017-01-06 21:45:54 UTC) #67
commit-bot: I haz the power
Committed patchset #8 (id:220001) as https://chromium.googlesource.com/chromium/src/+/e1aac992b0399db7776661f4ac2c43094c265de7
3 years, 11 months ago (2017-01-06 21:52:59 UTC) #70
chfremer
3 years, 11 months ago (2017-01-07 01:04:56 UTC) #71
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:220001) has been created in
https://codereview.chromium.org/2613793007/ by chfremer@chromium.org.

The reason for reverting is: In order to revert
https://codereview.chromium.org/2592303002/, need to revert this first, since it
depends on it..

Powered by Google App Engine
This is Rietveld 408576698