|
[Mojo Video Capture] Split OnIncomingCapturedVideoFrame() to OnNewBuffer() and OnFrameReadyInBuffer()
In interface media::VideoFrameReceiver, instead of method
OnIncomingCapturedVideoFrame() use two methods OnNewBufferHandle() and
OnFrameReadyInBuffer(). This matches the Mojo interface exposed to the Renderers
by VideoCaptureHost.
Instead of requiring the VideoFrameReceiver implementation
(VideoCaptureController) to set and release a consumer hold, we pass in a
|buffer_read_permission| that encapsulates the hold using the RAII pattern.
This allows us to remove the |frame_buffer_pool_| member from
VideoCaptureController.
Use struct mojom::VideoFrameInfo when receiving frames as
media::VideoFrameReceiver (e.g. VideoCaptureController). This will allow us to
have it receive frames from the Mojo service in a later step. This required some
changes in media/capture/BUILD.gn, because the component formerly named
"capture" (now renamed to "capture_lib") now depends on
media/capture/mojo:capture_types, which in turn depends on classes formerly part
of "capture". I moved these classes to a new component "capture_base".
Since it had to be updated, freed video_capture_device_client_unittest.cc from
unnecessary context, which allowed moving it from content/ to
media/capture/video, which is where the class under test lives.
This CL is part of the Mojo Video Capture work. For the bigger picture,
see [1] CL11b
BUG= 584797
TEST=
content_unittests --gtest_filter="*Video*",
capture_unittests --gtest_filter="VideoCaptureDeviceClientTest*"
Apprtc loopback on Debug,
Desktop Capture Example extension on Release
On Android content_shell, run video capture sample from [2], put to
background, then restore from background.
[1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing
[2] https://webrtc.github.io/samples/src/content/getusermedia/gum/
Review-Url: https://codereview.chromium.org/2686763002
Cr-Commit-Position: refs/heads/master@{#452548}
Committed: https://chromium.googlesource.com/chromium/src/+/e09db164377ade3a5559dd9b1fae1f47756894b0
Total comments: 26
Total comments: 4
Total comments: 2
Total comments: 14
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+516 lines, -1088 lines) |
Patch |
|
M |
content/browser/media/capture/web_contents_video_capture_device_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller.h
|
View
|
1
2
3
4
5
6
7
8
|
8 chunks |
+28 lines, -57 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller.cc
|
View
|
1
2
3
4
5
6
7
8
|
10 chunks |
+78 lines, -103 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller_event_handler.h
|
View
|
1
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
View
|
1
|
12 chunks |
+36 lines, -74 lines |
0 comments
|
Download
|
|
D |
content/browser/renderer_host/media/video_capture_device_client_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -258 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
View
|
1
|
2 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_host.h
|
View
|
1
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_host.cc
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -13 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_manager.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_manager.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
8 chunks |
+13 lines, -49 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_manager_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_frame_receiver_on_io_thread.h
|
View
|
|
1 chunk |
+12 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_frame_receiver_on_io_thread.cc
|
View
|
|
1 chunk |
+27 lines, -11 lines |
0 comments
|
Download
|
|
M |
content/test/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
media/base/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
media/capture/BUILD.gn
|
View
|
|
5 chunks |
+34 lines, -17 lines |
0 comments
|
Download
|
|
M |
media/capture/content/thread_safe_capture_oracle.cc
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
media/capture/mojo/OWNERS
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
media/capture/mojo/video_capture_types.typemap
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
media/capture/video/fake_video_capture_device.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
media/capture/video/video_capture_device.h
|
View
|
1
|
3 chunks |
+8 lines, -22 lines |
0 comments
|
Download
|
|
M |
media/capture/video/video_capture_device.cc
|
View
|
1
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
media/capture/video/video_capture_device_client.cc
|
View
|
1
2
3
4
5
6
7
8
|
7 chunks |
+51 lines, -33 lines |
0 comments
|
Download
|
|
A + |
media/capture/video/video_capture_device_client_unittest.cc
|
View
|
|
9 chunks |
+78 lines, -69 lines |
0 comments
|
Download
|
|
M |
media/capture/video/video_capture_jpeg_decoder.h
|
View
|
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
media/capture/video/video_frame_receiver.h
|
View
|
1
|
2 chunks |
+32 lines, -10 lines |
0 comments
|
Download
|
|
M |
media/capture/video_capture_types.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
mojo/common/values_struct_traits.h
|
View
|
1
2
3
4
5
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
mojo/common/values_struct_traits.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
mojo/public/cpp/bindings/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
A + |
mojo/public/cpp/bindings/clone_traits.h
|
View
|
1
2
3
4
5
|
7 chunks |
+9 lines, -84 lines |
0 comments
|
Download
|
|
M |
mojo/public/cpp/bindings/lib/clone_equals_util.h
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -161 lines |
0 comments
|
Download
|
|
A + |
mojo/public/cpp/bindings/lib/equals_traits.h
|
View
|
1
2
3
4
5
|
3 chunks |
+3 lines, -70 lines |
0 comments
|
Download
|
|
M |
mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h
|
View
|
1
2
3
4
5
|
3 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_template_definition.tmpl
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_template_definition.tmpl
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
services/video_capture/receiver_mojo_to_media_adapter.h
|
View
|
|
1 chunk |
+12 lines, -4 lines |
0 comments
|
Download
|
|
M |
services/video_capture/receiver_mojo_to_media_adapter.cc
|
View
|
|
2 chunks |
+14 lines, -6 lines |
0 comments
|
Download
|
Dependent Patchsets:
Total messages: 82 (55 generated)
|