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

Issue 2410383002: VideoCapture: more migration IPC-->mojo, part 6 (Closed)

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

Description

VideoCapture: more migration IPC-->mojo, part 6 This CL does the migration of the last Vid Capture IPC message to mojo, namely OnBufferCreated(). This message shared a SharedMemoryHandle, which is now send using mojo::{Wrap,Unwrap}SharedMemoryHandle(). This needs a few small changes elsewhere in the code, in particular there is no need to ShareToProcess() a given ShMem (and this in turn makes us think that the whole data-sending can be simplified in later CLs). Following suggestion in PS1, VideoCaptureBufferTracker() is changed to mojo::ScopedSharedBufferHandle GetHandleForTransit();, which causes changes in a few other classes; - SharedMemoryBufferTracker, MojoSharedMemoryBufferTracker - VideoCaptureBufferPool & Impl, - VideoCaptureController (no need for render process id). (all these changes are in services/video_capture/ and content/browser/renderer_host/media/) VideoCaptureHost is still a BrowserMessageFilter, and VideoCaptureMessageFilter is not completely gone yet, but will disappear soon -- I didn't want to mix the changes in the ShMem management with other changes just in case. BUG=651897 TEST=local capture, {content,capture,video_capture}_unittests Committed: https://crrev.com/0abf0b0b42e9e974d78b6f13a2ed81afdd668287 Cr-Commit-Position: refs/heads/master@{#426500}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Changed ShareToProcess() to GetHandleForTransit() in VideoCaptureBufferTracker and associates #

Total comments: 6

Patch Set 3 : First part of nick@s comments #

Total comments: 2

Patch Set 4 : Comment correction #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -424 lines) Patch
M content/browser/renderer_host/media/shared_memory_buffer_tracker.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/shared_memory_buffer_tracker.cc View 1 3 chunks +7 lines, -5 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 5 chunks +7 lines, -13 lines 2 comments Download
M content/browser/renderer_host/media/video_capture_controller_event_handler.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 11 chunks +5 lines, -17 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.h View 1 2 3 6 chunks +23 lines, -60 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.cc View 1 5 chunks +34 lines, -31 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host_unittest.cc View 10 chunks +28 lines, -60 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 1 2 chunks +1 line, -2 lines 0 comments Download
M content/common/media/video_capture_messages.h View 1 2 1 chunk +3 lines, -11 lines 0 comments Download
M content/common/video_capture.mojom View 1 2 3 2 chunks +44 lines, -2 lines 0 comments Download
M content/renderer/media/video_capture_impl.h View 3 chunks +6 lines, -15 lines 0 comments Download
M content/renderer/media/video_capture_impl.cc View 4 chunks +33 lines, -32 lines 0 comments Download
M content/renderer/media/video_capture_impl_unittest.cc View 6 chunks +14 lines, -12 lines 0 comments Download
M content/renderer/media/video_capture_message_filter.h View 4 chunks +8 lines, -33 lines 0 comments Download
M content/renderer/media/video_capture_message_filter.cc View 4 chunks +9 lines, -43 lines 0 comments Download
M content/renderer/media/video_capture_message_filter_unittest.cc View 3 chunks +18 lines, -52 lines 0 comments Download
M media/capture/video/DEPS View 1 1 chunk +1 line, -1 line 0 comments Download
M media/capture/video/video_capture_buffer_pool.h View 1 2 chunks +3 lines, -5 lines 0 comments Download
M media/capture/video/video_capture_buffer_pool_impl.h View 1 1 chunk +2 lines, -4 lines 0 comments Download
M media/capture/video/video_capture_buffer_pool_impl.cc View 1 1 chunk +4 lines, -9 lines 0 comments Download
M media/capture/video/video_capture_buffer_tracker.h View 1 2 chunks +3 lines, -4 lines 0 comments Download
M mojo/public/cpp/system/platform_handle.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/video_capture/mojo_shared_memory_buffer_tracker.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M services/video_capture/mojo_shared_memory_buffer_tracker.cc View 1 1 chunk +3 lines, -4 lines 2 comments Download

Messages

Total messages: 40 (22 generated)
mcasas
rockot@ PTAL at the mojo parts, and RS the mojo/ added export. ncarter@ RS mojo/messages ...
4 years, 2 months ago (2016-10-18 18:45:13 UTC) #6
Ken Rockot(use gerrit already)
Looks great, just one gripe about shared memory handle usage https://codereview.chromium.org/2410383002/diff/60001/content/browser/renderer_host/media/shared_memory_buffer_tracker.cc File content/browser/renderer_host/media/shared_memory_buffer_tracker.cc (right): https://codereview.chromium.org/2410383002/diff/60001/content/browser/renderer_host/media/shared_memory_buffer_tracker.cc#newcode41 ...
4 years, 2 months ago (2016-10-19 05:24:18 UTC) #11
mcasas
guys PTAL (description updated as well) https://codereview.chromium.org/2410383002/diff/60001/content/browser/renderer_host/media/shared_memory_buffer_tracker.cc File content/browser/renderer_host/media/shared_memory_buffer_tracker.cc (right): https://codereview.chromium.org/2410383002/diff/60001/content/browser/renderer_host/media/shared_memory_buffer_tracker.cc#newcode41 content/browser/renderer_host/media/shared_memory_buffer_tracker.cc:41: *new_handle = base::SharedMemory::DuplicateHandle(shared_memory_.handle()); ...
4 years, 2 months ago (2016-10-19 17:53:30 UTC) #16
Ken Rockot(use gerrit already)
lgtm
4 years, 2 months ago (2016-10-19 17:55:48 UTC) #17
ncarter (slow)
https://codereview.chromium.org/2410383002/diff/80001/content/browser/renderer_host/media/video_capture_host.h File content/browser/renderer_host/media/video_capture_host.h (right): https://codereview.chromium.org/2410383002/diff/80001/content/browser/renderer_host/media/video_capture_host.h#newcode25 content/browser/renderer_host/media/video_capture_host.h:25: // This class is essentially a super adapter between ...
4 years, 2 months ago (2016-10-19 18:58:21 UTC) #18
mcasas
nick@ PTAL https://codereview.chromium.org/2410383002/diff/80001/content/browser/renderer_host/media/video_capture_host.h File content/browser/renderer_host/media/video_capture_host.h (right): https://codereview.chromium.org/2410383002/diff/80001/content/browser/renderer_host/media/video_capture_host.h#newcode25 content/browser/renderer_host/media/video_capture_host.h:25: // This class is essentially a super ...
4 years, 2 months ago (2016-10-19 19:29:52 UTC) #19
ncarter (slow)
lgtm https://codereview.chromium.org/2410383002/diff/100001/content/common/video_capture.mojom File content/common/video_capture.mojom (right): https://codereview.chromium.org/2410383002/diff/100001/content/common/video_capture.mojom#newcode45 content/common/video_capture.mojom:45: // | ---> ReleaseBuffer(1) | should be ReleaseBuffer(2)
4 years, 2 months ago (2016-10-19 20:36:54 UTC) #20
mcasas
https://codereview.chromium.org/2410383002/diff/100001/content/common/video_capture.mojom File content/common/video_capture.mojom (right): https://codereview.chromium.org/2410383002/diff/100001/content/common/video_capture.mojom#newcode45 content/common/video_capture.mojom:45: // | ---> ReleaseBuffer(1) | On 2016/10/19 20:36:54, ncarter ...
4 years, 2 months ago (2016-10-19 21:30:59 UTC) #21
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/2410383002/120001
4 years, 2 months ago (2016-10-19 21:32:07 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/285485)
4 years, 2 months ago (2016-10-19 22:19:11 UTC) #26
mcasas
dcheng@ plz RS mojom/messages.h and/or PTAL
4 years, 2 months ago (2016-10-19 23:27:49 UTC) #28
dcheng
mojo lgtm i wonder if we can get rid of buffer ID altogether in the ...
4 years, 2 months ago (2016-10-20 08:37:56 UTC) #29
mcasas
Re. "i wonder if we can get rid of buffer ID altogether in the future? ...
4 years, 2 months ago (2016-10-20 15:09:51 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/2410383002/120001
4 years, 2 months ago (2016-10-20 15:10:31 UTC) #32
Ken Rockot(use gerrit already)
On Oct 20, 2016 8:09 AM, <mcasas@chromium.org> wrote: > > Re. > "i wonder if ...
4 years, 2 months ago (2016-10-20 15:23:15 UTC) #33
Tom Sepez
Deferring to dcheng, removing myself as reviewer.
4 years, 2 months ago (2016-10-20 16:44:36 UTC) #36
commit-bot: I haz the power
Committed patchset #4 (id:120001)
4 years, 2 months ago (2016-10-20 16:46:56 UTC) #38
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:19:03 UTC) #40
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/0abf0b0b42e9e974d78b6f13a2ed81afdd668287
Cr-Commit-Position: refs/heads/master@{#426500}

Powered by Google App Engine
This is Rietveld 408576698