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

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

Issue 1090273006: Revert of 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 757db4a6d38437b36d65fb26b71073a95b2b6945..3c507c6f46b6fcbe5811067de64ac6bd0fb641fb 100644
--- a/content/browser/media/capture/content_video_capture_device_core.cc
+++ b/content/browser/media/capture/content_video_capture_device_core.cc
@@ -75,9 +75,9 @@
const gfx::Size coded_size((visible_size.width() + 15) & ~15,
(visible_size.height() + 15) & ~15);
- scoped_ptr<media::VideoCaptureDevice::Client::Buffer> output_buffer(
+ scoped_refptr<media::VideoCaptureDevice::Client::Buffer> output_buffer =
client_->ReserveOutputBuffer(params_.requested_format.pixel_format,
- coded_size));
+ coded_size);
const bool should_capture =
oracle_.ObserveEventAndDecideCapture(event, damage_rect, event_time);
const char* event_name =
@@ -134,7 +134,7 @@
*callback = base::Bind(&ThreadSafeCaptureOracle::DidCaptureFrame,
this,
frame_number,
- base::Passed(&output_buffer),
+ output_buffer,
capture_begin_time);
return true;
}
@@ -180,7 +180,7 @@
void ThreadSafeCaptureOracle::DidCaptureFrame(
int frame_number,
- scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
+ const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer,
base::TimeTicks capture_begin_time,
const scoped_refptr<media::VideoFrame>& frame,
base::TimeTicks timestamp,
@@ -202,7 +202,7 @@
media::VideoFrameMetadata::CAPTURE_BEGIN_TIME, capture_begin_time);
frame->metadata()->SetTimeTicks(
media::VideoFrameMetadata::CAPTURE_END_TIME, base::TimeTicks::Now());
- client_->OnIncomingCapturedVideoFrame(buffer.Pass(), frame, timestamp);
+ client_->OnIncomingCapturedVideoFrame(buffer, frame, timestamp);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698