|
|
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}
Total comments: 14
Total comments: 22
Total comments: 22
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1085 lines, -1045 lines) |
Patch |
 |
M |
content/browser/BUILD.gn
|
View
|
1
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/content_video_capture_device_core.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/content_video_capture_device_core.cc
|
View
|
1
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/desktop_capture_device_aura_unittest.cc
|
View
|
1
2
|
1 chunk |
+21 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/desktop_capture_device_unittest.cc
|
View
|
1
2
|
1 chunk |
+21 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/web_contents_video_capture_device_unittest.cc
|
View
|
1
|
4 chunks |
+44 lines, -40 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_buffer_pool.h
|
View
|
1
2
|
5 chunks |
+25 lines, -14 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_buffer_pool.cc
|
View
|
1
2
|
7 chunks |
+140 lines, -31 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
|
View
|
1
2
|
3 chunks |
+184 lines, -76 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller.h
|
View
|
1
2
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller.cc
|
View
|
1
2
|
6 chunks |
+14 lines, -28 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
View
|
1
2
3
4
5
6
|
11 chunks |
+71 lines, -75 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_device_client.h
|
View
|
1
2
3
4
|
3 chunks |
+20 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_device_client.cc
|
View
|
1
2
3
4
|
9 chunks |
+376 lines, -74 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_manager.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
D |
content/browser/renderer_host/media/video_capture_texture_wrapper.h
|
View
|
|
1 chunk |
+0 lines, -62 lines |
0 comments
|
Download
|
 |
D |
content/browser/renderer_host/media/video_capture_texture_wrapper.cc
|
View
|
1
|
1 chunk |
+0 lines, -463 lines |
0 comments
|
Download
|
 |
M |
content/content_browser.gypi
|
View
|
1
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/public/common/content_switches.h
|
View
|
1
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/public/common/content_switches.cc
|
View
|
1
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
media/base/video_capture_types.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
media/base/video_capture_types.cc
|
View
|
1
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/fake_video_capture_device.h
|
View
|
1
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/fake_video_capture_device.cc
|
View
|
1
|
3 chunks |
+62 lines, -66 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/fake_video_capture_device_factory.cc
|
View
|
1
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/fake_video_capture_device_unittest.cc
|
View
|
1
|
4 chunks |
+32 lines, -27 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/video_capture_device.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+17 lines, -13 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/video_capture_device.cc
|
View
|
1
3
4
6
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
media/video/capture/video_capture_device_unittest.cc
|
View
|
1
|
3 chunks |
+31 lines, -17 lines |
0 comments
|
Download
|
Total messages: 51 (29 generated)
|