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

Issue 2592303002: Reland [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBuf (Closed)

Created:
4 years ago by chfremer
Modified:
3 years, 11 months ago
Reviewers:
mcasas, miu, chfremer1
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

Reland [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBufferExt() This is exactly the same as reviewed previously https://codereview.chromium.org/2592303002/ The reason for the revert was a crash in a performance test on Android, which pointed to a bad file handle while Mojo-unwrapping a shared buffer. This was most likely caused by the same bug 675528 that was just fixed for the previous CL1.9.8. I ran the test on a local Android device an confirmed that it is no longer crashing. Description of original CL: 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 Committed: https://crrev.com/fc2e2a6f6597cf6582673572bbf22268e445dac0 Cr-Commit-Position: refs/heads/master@{#441391}

Patch Set 1 : Same changes as reviewed previously #

Patch Set 2 : Rebase #

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 chunk +6 lines, -2 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 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 chunk +17 lines, -12 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 14 chunks +85 lines, -97 lines 0 comments Download
M media/capture/content/thread_safe_capture_oracle.cc View 1 chunk +27 lines, -20 lines 0 comments Download
M media/capture/video/fake_video_capture_device_unittest.cc View 1 chunk +6 lines, -4 lines 0 comments Download
M media/capture/video/linux/v4l2_capture_delegate_unittest.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M media/capture/video/video_capture_device.h View 1 chunk +15 lines, -13 lines 0 comments Download
M media/capture/video/video_capture_device_client.h View 1 chunk +6 lines, -2 lines 0 comments Download
M media/capture/video/video_capture_device_client.cc View 2 chunks +35 lines, -20 lines 0 comments Download
M media/capture/video/video_capture_device_unittest.cc View 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: 25 (16 generated)
chfremer
mcasas@: Please RS miu@: Please RS
4 years ago (2016-12-22 01:09:13 UTC) #4
miu
lgtm RS lgtm
4 years ago (2016-12-22 01:30:31 UTC) #7
miu
lgtm lgtm RS lgtm
4 years ago (2016-12-22 01:30:31 UTC) #8
miu
On 2016/12/22 01:30:31, miu wrote: > lgtm > > lgtm > > RS lgtm Woah! ...
4 years ago (2016-12-22 01:30:58 UTC) #9
mcasas
On 2016/12/22 01:09:13, chfremer wrote: > mcasas@: Please RS > miu@: Please RS still lgtm ...
4 years ago (2016-12-22 01:31:49 UTC) #10
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/2592303002/20001
3 years, 11 months ago (2017-01-04 16:33:57 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 11 months ago (2017-01-04 16:38:55 UTC) #22
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/fc2e2a6f6597cf6582673572bbf22268e445dac0 Cr-Commit-Position: refs/heads/master@{#441391}
3 years, 11 months ago (2017-01-04 16:42:22 UTC) #24
chfremer
3 years, 11 months ago (2017-01-07 01:24:22 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/2618173002/ by chfremer@chromium.org.

The reason for reverting is: This caused a crash during video capture, see 
https://bugs.chromium.org/p/chromium/issues/detail?id=678766.

Powered by Google App Engine
This is Rietveld 408576698