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

Issue 2566983007: [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame with OnIncomingCapturedBufferExt (Closed)

Created:
4 years ago by chfremer
Modified:
4 years ago
Reviewers:
mcasas, miu
CC:
chromium-reviews, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBufferExt() In interface media:VideoCaptureDevice::Client, replaced the method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBufferExt(). Compared to method OnIncomingCaptureBuffer(), the VideoFrame parameter in OnIncomingCapturedVideoFrame() was only used for passing along a bit of extra information, namely a custom |visible_rect| as well as some |additional_metadata|. The new method makes the intent clear and eliminates the need for passing a media::VideoFrame that is partly redundant with the also passed media::VideoCaptureDevice::Client::Buffer. This CL breaks the video_capture_unittests, because current implementation of the video_capture service wants to use VideoCaptureDeviceClient with buffers that are backed by MojoSharedMemoryBufferTracker instances instead of the "regular" shared memory buffers. With this CL, VideoCaptureDeviceClient is dropping support for this. We are working towards making the video_capture service work with the regular buffers. To keep CLs small, we defer changes to the service to after refactorings of VideoCaptureController and VideoCaptureManager are complete and deactive the video_capture_unittests temporarily. This is acceptable for the time being, since they are not run on the bots yet. The CL that re-enables them is currently labeled CL1.9.22 in the design doc. This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL1.9.9 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

Patch Set 1 #

Total comments: 12

Patch Set 2 : miu's comments #

Patch Set 3 : mcasas comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -188 lines) Patch
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 1 chunk +7 lines, -3 lines 0 comments Download
M content/browser/media/capture/screen_capture_device_android_unittest.cc View 1 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 1 chunk +17 lines, -12 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 14 chunks +85 lines, -97 lines 0 comments Download
M media/capture/content/thread_safe_capture_oracle.cc View 1 2 1 chunk +27 lines, -20 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 1 chunk +6 lines, -4 lines 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate_unittest.cc View 1 1 chunk +6 lines, -2 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 1 chunk +15 lines, -13 lines 0 comments Download
M media/capture/video/video_capture_device_client.h View 1 1 chunk +6 lines, -2 lines 0 comments Download
M media/capture/video/video_capture_device_client.cc View 1 2 chunks +35 lines, -20 lines 0 comments Download
M media/capture/video/video_capture_device_unittest.cc View 1 1 chunk +7 lines, -2 lines 0 comments Download
M services/video_capture/test/fake_device_descriptor_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M services/video_capture/test/fake_device_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M services/video_capture/test/mock_device_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M services/video_capture/test/service_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 37 (28 generated)
chfremer
miu@: PTAL mcasas@: PTAL
4 years ago (2016-12-14 18:07:43 UTC) #15
miu
lgtm, but I'm curious why the tests fail? I assume you feel this doesn't break ...
4 years ago (2016-12-14 20:01:44 UTC) #16
chfremer
Addressed miu's comments. Note: See updated description for explanation about disabled tests. https://codereview.chromium.org/2566983007/diff/40001/media/capture/video/video_capture_device.h File media/capture/video/video_capture_device.h ...
4 years ago (2016-12-14 20:42:28 UTC) #19
mcasas
lgtm % comments https://codereview.chromium.org/2566983007/diff/40001/media/capture/content/thread_safe_capture_oracle.cc File media/capture/content/thread_safe_capture_oracle.cc (right): https://codereview.chromium.org/2566983007/diff/40001/media/capture/content/thread_safe_capture_oracle.cc#newcode214 media/capture/content/thread_safe_capture_oracle.cc:214: if (oracle_.CompleteCapture(frame_number, success, &reference_time)) { nit: ...
4 years ago (2016-12-14 21:04:27 UTC) #21
chfremer
Addressed mcasas@ comments. Thanks for the review! https://codereview.chromium.org/2566983007/diff/40001/media/capture/content/thread_safe_capture_oracle.cc File media/capture/content/thread_safe_capture_oracle.cc (right): https://codereview.chromium.org/2566983007/diff/40001/media/capture/content/thread_safe_capture_oracle.cc#newcode214 media/capture/content/thread_safe_capture_oracle.cc:214: if (oracle_.CompleteCapture(frame_number, ...
4 years ago (2016-12-14 21:42:29 UTC) #23
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/2566983007/80001
4 years ago (2016-12-14 23:16:10 UTC) #29
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years ago (2016-12-14 23:35:44 UTC) #32
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/ae6dc27e5d3233ceeb8397debaa745577b3312da Cr-Commit-Position: refs/heads/master@{#438673}
4 years ago (2016-12-14 23:39:28 UTC) #34
chfremer
4 years ago (2016-12-16 21:59:23 UTC) #35
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:80001) has been created in
https://codereview.chromium.org/2582883002/ by chfremer@chromium.org.

The reason for reverting is: Broke a test in webrtc.peerconnection, see
crbug.com/675020.

Powered by Google App Engine
This is Rietveld 408576698