DescriptionReland2 [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBufferExt()
PatchSet#1 is the state as previously reviewed, landed, and reverted.
PatchSet#2 is the fix for the caused issue.
Description of issue and fix:
The original CL caused crbug.com/678766.
Method OnIncomingCapturedBufferExt() unwrapped |memory_handle| and passed it
to |frame|. However, |frame| did not take ownership, resulting in
|memory_handle| never getting closed.
Since the memory handle inside |frame| is not being used downstream anyway,
the fix is to use a NULLHandle() instead of unwrapping and attaching ownership.
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-Original-Commit-Position: refs/heads/master@{#441391}
Review-Url: https://codereview.chromium.org/2621743002
Cr-Commit-Position: refs/heads/master@{#442796}
Committed: https://chromium.googlesource.com/chromium/src/+/690089d348c70b998fa589cd8ac74a5b274ee2a7
Patch Set 1 : As previously reviewed and reverted #Patch Set 2 : Fix for shared memory handle not closed. #
Total comments: 2
Dependent Patchsets: Messages
Total messages: 17 (11 generated)
|