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

Unified Diff: content/browser/media/capture/content_video_capture_device_core.cc

Issue 1064963002: VideoCapture: add support for GpuMemoryBuffer allocation and lifetime mgmt in VideoCaptureBufferPool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/content_video_capture_device_core.cc
diff --git a/content/browser/media/capture/content_video_capture_device_core.cc b/content/browser/media/capture/content_video_capture_device_core.cc
index 3c507c6f46b6fcbe5811067de64ac6bd0fb641fb..b208ce82010e051969774d60a741e657a55eb3b0 100644
--- a/content/browser/media/capture/content_video_capture_device_core.cc
+++ b/content/browser/media/capture/content_video_capture_device_core.cc
@@ -118,12 +118,14 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
// NATIVE_TEXTURE frames wrap a texture mailbox, which we don't have at the
// moment. We do not construct those frames.
if (params_.requested_format.pixel_format != media::PIXEL_FORMAT_TEXTURE) {
+ const scoped_ptr<media::DataHandle> scoped_data_handle(
miu 2015/04/15 19:12:40 Why is the DataHandle allowed to be destroyed whil
mcasas 2015/04/16 03:11:21 Since I'm taking in your suggestion below, this co
+ output_buffer->GetDataHandle());
*storage = media::VideoFrame::WrapExternalPackedMemory(
media::VideoFrame::I420,
coded_size,
gfx::Rect(visible_size),
visible_size,
- static_cast<uint8*>(output_buffer->data()),
+ static_cast<uint8*>(scoped_data_handle->data()),
output_buffer->size(),
base::SharedMemory::NULLHandle(),
0,

Powered by Google App Engine
This is Rietveld 408576698