|
Reland [Mojo Video Capture] Simplify media::VideoCaptureDevice::Client:Buffer to a struct
PatchSet#1 is the state as previously reviewed, landed, reverted, and merged
with the fix from https://codereview.chromium.org/2621743002/.
PatchSet#2: Because the original CL introduced another new
SharedMemoryHandle-not-getting-closed issue, this PatchSet has the fix for this.
Instead of fixing this by attaching ownership of the handle to a VideoFrame, I
decided to instead add a method
GetNonOwnedSharedMemoryHandleForLegacyIPC() to interface
VideoCaptureDevice::Client::Buffer::HandleProvider. This allows us to avoid the
otherwise introduced extra step of wrapping/unwrapping a new file handle copy.
Description of original CL:
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-Original-Commit-Position: refs/heads/master@{#442066}
Committed: https://chromium.googlesource.com/chromium/src/+/e1aac992b0399db7776661f4ac2c43094c265de7
Review-Url: https://codereview.chromium.org/2620763003
Cr-Commit-Position: refs/heads/master@{#444191}
Committed: https://chromium.googlesource.com/chromium/src/+/03c86be79f1ccae3c1923d1cff9106d15abdbf21
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+562 lines, -821 lines) |
Patch |
 |
M |
content/browser/media/capture/desktop_capture_device_aura_unittest.cc
|
View
|
|
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 chunk |
+17 lines, -18 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/web_contents_video_capture_device_unittest.cc
|
View
|
|
6 chunks |
+23 lines, -68 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller.h
|
View
|
1
2
|
4 chunks |
+4 lines, -13 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller.cc
|
View
|
1
2
|
6 chunks |
+17 lines, -31 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
View
|
|
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
|
4 chunks |
+17 lines, -15 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_manager.cc
|
View
|
1
2
|
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
|
|
5 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/fake_video_capture_device.cc
|
View
|
|
1 chunk |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/fake_video_capture_device_unittest.cc
|
View
|
1
|
3 chunks |
+66 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 chunks |
+4 lines, -8 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/shared_memory_buffer_tracker.cc
|
View
|
1
|
2 chunks |
+10 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
|
1 chunk |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_buffer_pool_impl.h
|
View
|
1
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_buffer_pool_impl.cc
|
View
|
1
|
2 chunks |
+18 lines, -6 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_buffer_tracker.h
|
View
|
1
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_device.h
|
View
|
1
2
|
6 chunks |
+54 lines, -28 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_device.cc
|
View
|
|
1 chunk |
+20 lines, -4 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_device_client.h
|
View
|
|
2 chunks |
+20 lines, -28 lines |
0 comments
|
Download
|
 |
M |
media/capture/video/video_capture_device_client.cc
|
View
|
1
|
11 chunks |
+83 lines, -73 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
|
|
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:
Dependent Patchsets:
Total messages: 26 (17 generated)
|