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

Issue 1064703002: VideoCaptureBufferPool: Refactor to allow support of non-ShMem backed buffers (Closed)

Created:
5 years, 8 months ago by mcasas
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

VideoCaptureBufferPool: Refactor to allow support of non-ShMem backed buffers This CL refactors VideoCaptureBufferPool, and in particular its inner class Buffer, to allow pooling GpuMemoryBuffers. For that, Buffer is renamed to Tracker, and turned into a base class, where SharedMemory specifics are implemented in SharedMemoryTracker. In ToT, VideoCaptureDeviceClient calculates the linear size in bytes needed for holding the captured VideoFrame. This responsability is shifted into the VCBPool, so in the inmediate future, GpuMemoryBuffers can be allocated. To support this, VCBP::ReserveForProducer() gets the pixel format and dimensions. VideoCaptureDevice::Client::ReserveOutputBuffer() goes through the same parameter upgrade. (In the next CL, a GpuMemoryBufferTracker class is introduced, allowing VCBP::ReserveForProducer() will allocate GMBs if so instructed via the pixel format.) BUG=440843 Committed: https://crrev.com/0549561d5a5331a44a7db5fd4a441a9d6b6c92ad Cr-Commit-Position: refs/heads/master@{#324380}

Patch Set 1 : #

Total comments: 12

Patch Set 2 : miu@s comments #

Total comments: 8

Patch Set 3 : miu@s nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -171 lines) Patch
M content/browser/media/capture/content_video_capture_device_core.cc View 1 3 chunks +4 lines, -7 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 1 chunk +4 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.h View 1 2 5 chunks +56 lines, -38 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.cc View 1 2 3 chunks +139 lines, -72 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 11 chunks +19 lines, -18 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.cc View 1 3 chunks +11 lines, -13 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_texture_wrapper.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M media/video/capture/fake_video_capture_device.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M media/video/capture/fake_video_capture_device_unittest.cc View 1 1 chunk +3 lines, -4 lines 0 comments Download
M media/video/capture/video_capture_device.h View 1 1 chunk +1 line, -1 line 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (8 generated)
mcasas
miu@ PTAL. First CL in the series.
5 years, 8 months ago (2015-04-06 21:58:13 UTC) #4
mcasas
miu@ PING -- or perkj@/magjed@ PTAL
5 years, 8 months ago (2015-04-07 19:00:21 UTC) #7
mcasas
emircan@ PTAL/FYI
5 years, 8 months ago (2015-04-07 19:00:42 UTC) #9
miu
https://codereview.chromium.org/1064703002/diff/60001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/1064703002/diff/60001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode162 content/browser/renderer_host/media/video_capture_buffer_pool.cc:162: VideoFrame::AllocationSize(VideoFrame::I420, format.frame_size); The call to AllocationSize() should use the ...
5 years, 8 months ago (2015-04-08 01:20:03 UTC) #10
mcasas
miu@ PTAL https://codereview.chromium.org/1064703002/diff/60001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/1064703002/diff/60001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode162 content/browser/renderer_host/media/video_capture_buffer_pool.cc:162: VideoFrame::AllocationSize(VideoFrame::I420, format.frame_size); On 2015/04/08 01:20:00, miu wrote: ...
5 years, 8 months ago (2015-04-08 22:07:06 UTC) #12
miu
lgtm % some tweaks to consider: https://codereview.chromium.org/1064703002/diff/100001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/1064703002/diff/100001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode17 content/browser/renderer_host/media/video_capture_buffer_pool.cc:17: VideoFrame::Format VideoPixelFormatToVideoFrameFormat( I ...
5 years, 8 months ago (2015-04-08 22:26:14 UTC) #13
mcasas
https://codereview.chromium.org/1064703002/diff/100001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/1064703002/diff/100001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode17 content/browser/renderer_host/media/video_capture_buffer_pool.cc:17: VideoFrame::Format VideoPixelFormatToVideoFrameFormat( On 2015/04/08 22:26:14, miu wrote: > I ...
5 years, 8 months ago (2015-04-09 02:03:23 UTC) #14
miu
Responses sgtm, and this change still lgtm.
5 years, 8 months ago (2015-04-09 02:17:56 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1064703002/120001
5 years, 8 months ago (2015-04-09 02:26:25 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:120001)
5 years, 8 months ago (2015-04-09 05:01:11 UTC) #18
commit-bot: I haz the power
5 years, 8 months ago (2015-04-09 05:01:58 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0549561d5a5331a44a7db5fd4a441a9d6b6c92ad
Cr-Commit-Position: refs/heads/master@{#324380}

Powered by Google App Engine
This is Rietveld 408576698