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

Unified Diff: content/browser/renderer_host/media/video_capture_texture_wrapper.cc

Issue 1064703002: VideoCaptureBufferPool: Refactor to allow support of non-ShMem backed buffers (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/renderer_host/media/video_capture_texture_wrapper.cc
diff --git a/content/browser/renderer_host/media/video_capture_texture_wrapper.cc b/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
index 773de53f4b83132f03c9eb8a8b2b84948dfdcd31..14f70c8e136df47ec38a37719278b216128b9e0c 100644
--- a/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
+++ b/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
@@ -208,8 +208,11 @@ void VideoCaptureTextureWrapper::OnIncomingCapturedData(
const base::TimeTicks& timestamp) {
// Reserve a temporary Buffer for conversion to ARGB.
+ const media::VideoCaptureFormat format(frame_format.frame_size,
+ frame_format.frame_rate,
+ media::PIXEL_FORMAT_ARGB);
scoped_refptr<media::VideoCaptureDevice::Client::Buffer> argb_buffer =
- ReserveOutputBuffer(media::VideoFrame::ARGB, frame_format.frame_size);
+ ReserveOutputBuffer(format);
DVLOG_IF(1, !argb_buffer) << "Couldn't allocate ARGB Buffer";
if (!argb_buffer)
return;
@@ -234,8 +237,11 @@ void VideoCaptureTextureWrapper::OnIncomingCapturedData(
return;
// Reserve output buffer for the texture on the IPC borderlands.
+ const media::VideoCaptureFormat format2(gfx::Size(),
miu 2015/04/08 01:20:00 Here, an empty size is being passed. If the textu
mcasas 2015/04/08 22:07:06 Yes, down the line it will. Changed this line to
+ frame_format.frame_rate,
+ media::PIXEL_FORMAT_TEXTURE);
scoped_refptr<media::VideoCaptureDevice::Client::Buffer> texture_buffer =
- ReserveOutputBuffer(media::VideoFrame::NATIVE_TEXTURE, gfx::Size());
+ ReserveOutputBuffer(format2);
DVLOG_IF(1, !texture_buffer) << "Couldn't allocate Texture Buffer";
if (!texture_buffer)
return;

Powered by Google App Engine
This is Rietveld 408576698