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

Issue 1090273006: Revert of VideoCapture: add support for GpuMemoryBuffer allocation and lifetime mgmt in VideoCaptureBufferPool (Closed)

Created:
5 years, 8 months ago by magjed_chromium
Modified:
5 years, 8 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of VideoCapture: add support for GpuMemoryBuffer allocation and lifetime mgmt in VideoCaptureBufferPool (patchset #7 id:480001 of https://codereview.chromium.org/1064963002/) Reason for revert: The reason for reverting is: Speculatively revert to address Android Tests (dbg) content_unittests failure: http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/27395 content_unittests content_unittests failures: VideoCaptureBufferPoolTest.BufferPool/2 GpuMemoryBufferFactoryTests/GpuMemoryBufferFactoryTest.CreateAndDestroy/1 VideoCaptureBufferPoolTest.BufferPool/0 VideoCaptureBufferPoolTest.BufferPool/1 [ RUN ] VideoCaptureBufferPoolTest.BufferPool/0 [FATAL:browser_gpu_memory_buffer_manager.cc(56)] Check failed: !g_gpu_memory_buffer_manager. #00 0x764081d3 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00fdf1d3 #01 0x75cf95c3 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x008d05c3 #02 0x75a3c697 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00613697 #03 0x75f8d1fb /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b641fb #04 0x75f8d35b /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b6435b #05 0x75f8d3e3 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b643e3 #06 0x75f8d5e3 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b645e3 #07 0x75f8c3c7 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b633c7 #08 0x75f49bb7 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b20bb7 #09 0x75f41c8b /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00b18c8b #10 0x75736087 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x0030d087 #11 0x763de291 /data/app-lib/org.chromium.native_test-1/libcontent_unittests.so+0x00fb5291 #12 0x41503bcf /system/lib/libdvm.so+0x0001dbcf #13 0x41534125 /system/lib/libdvm.so+0x0004e125 #14 0x4150cfe3 /system/lib/libdvm.so+0x00026fe3 #15 0x41513fa3 /system/lib/libdvm.so+0x0002dfa3 #16 0x4151163b /system/lib/libdvm.so+0x0002b63b #17 0x41546863 /system/lib/libdvm.so+0x00060863 #18 0x4154e7c5 /system/lib/libdvm.so+0x000687c5 #19 0x4150cfe3 /system/lib/libdvm.so+0x00026fe3 #20 0x41513fa3 /system/lib/libdvm.so+0x0002dfa3 #21 0x4151163b /system/lib/libdvm.so+0x0002b63b #22 0x4154657f /system/lib/libdvm.so+0x0006057f #23 0x4152fd0d /system/lib/libdvm.so+0x00049d0d #24 0x401a82b3 /system/lib/libandroid_runtime.so+0x0004d2b3 #25 0x401a8fd9 /system/lib/libandroid_runtime.so+0x0004dfd9 #26 0x4006b05d /system/bin/app_process+0x0000105d #27 0x400a234b /system/lib/libc.so+0x0000e34b This CL is the most suspect in the blame-list because it touches the VideoCaptureBufferPool. Original issue's description: > VideoCapture: add support for GpuMemoryBuffer allocation and lifetime mgmt in VideoCaptureBufferPool & relatives > > - This CL adds support for GpuMemoryBufferTracker in > addition to the existing SharedMemTracker. > > - A GpuMemoryBufferTracker owns a GpuMemoryBuffer, > which can only be accessed byte-wise between Map() and > Unmap(). > > - For that reason, instead of making a VCBP::Tracker > directly accessible via |void* data| and |size|, a > BufferHandle abstraction is introduced. > > - VideoCaptureDeviceClient then defines its own > AutoReleaseBuffer in terms of this new BufferHandle. > This BufferHandle is supposed to stay Map()ed and > ready to use for the duration of its lifetime. > > Summing up: > * VideoCaptureBufferPool has a pool of Trackers, > * from the VCBP we can get a BufferHandle per |buffer_id|, > * from a BufferHandle we can obtain data(), valid > and Map()ed as long as the BufferHandle itself exists. > > - VideoCaptureDevice::ReserveOutputBuffer() changes to > return a scoped_ptr<Buffer> ISO a scoped_refptr. > > - Added VideoCaptureDevice::OnIncomingCapturedBuffer() > to pass directly a Buffer with the capture contents. > > - video_capture_texture_wrapper.{cc,h} is removed and > its contents are merged into VideoCaptureDeviceClient. > > - FakeVideoCaptureDevice learns how to produce > GpuMemoryBuffers. Also, PIXEL_FORMAT_GPUMEMORYBUFFER > is added. > > Summing up, VCDClient accepts: > * memory backed buffers (the usual) > * texture-backed buffers > * GMB-backed buffers (these are wrapped into a Texture > VideoFrame indistinguishable from the previous case) > > - VideoCaptureTextureWrapper files are gone and > its contents folded into VideoCaptureDeviceClient. > > - Unittests are updated, and so is FakeVideoCaptureDevice. > > BUG=440843 > > Committed: https://crrev.com/abeb15fa955c570cd481accb04c2a677eb2865a9 > Cr-Commit-Position: refs/heads/master@{#326171} TBR=miu@chromium.org,emircan@chromium.org,avi@chromium.org,dalecurtis@chromium.org,mcasas@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=440843 Committed: https://crrev.com/df9c7fd3c4ba0f43fa27df0bbca0089e8cb94b01 Cr-Commit-Position: refs/heads/master@{#326250}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1065 lines, -1105 lines) Patch
M content/browser/BUILD.gn View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/media/capture/content_video_capture_device_core.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/media/capture/content_video_capture_device_core.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 chunk +7 lines, -21 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 chunk +7 lines, -21 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 4 chunks +40 lines, -44 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.h View 5 chunks +14 lines, -25 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.cc View 7 chunks +37 lines, -146 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc View 3 chunks +78 lines, -186 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 6 chunks +29 lines, -15 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 11 chunks +75 lines, -71 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.h View 3 chunks +5 lines, -20 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.cc View 8 chunks +78 lines, -380 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
A content/browser/renderer_host/media/video_capture_texture_wrapper.h View 1 chunk +62 lines, -0 lines 0 comments Download
A content/browser/renderer_host/media/video_capture_texture_wrapper.cc View 1 chunk +463 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M media/base/video_capture_types.h View 1 chunk +0 lines, -1 line 0 comments Download
M media/base/video_capture_types.cc View 2 chunks +0 lines, -5 lines 0 comments Download
M media/video/capture/fake_video_capture_device.h View 2 chunks +4 lines, -4 lines 0 comments Download
M media/video/capture/fake_video_capture_device.cc View 3 chunks +70 lines, -66 lines 0 comments Download
M media/video/capture/fake_video_capture_device_factory.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M media/video/capture/fake_video_capture_device_unittest.cc View 4 chunks +30 lines, -35 lines 0 comments Download
M media/video/capture/video_capture_device.h View 3 chunks +13 lines, -17 lines 0 comments Download
M media/video/capture/video_capture_device.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 3 chunks +17 lines, -31 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
magjed_chromium
5 years, 8 months ago (2015-04-22 09:03:12 UTC) #1
Created Revert of VideoCapture: add support for GpuMemoryBuffer allocation and
lifetime mgmt in VideoCaptureBufferPool

Powered by Google App Engine
This is Rietveld 408576698