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

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

Issue 1154153003: Relanding 1143663007: VideoFrame: Separate Pixel Format from Storage Type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NV12 support in CrOS Created 5 years, 7 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_device_client.cc
diff --git a/content/browser/renderer_host/media/video_capture_device_client.cc b/content/browser/renderer_host/media/video_capture_device_client.cc
index b9885c3e0cc8c1fc49fd24978541a33f5c01c1a9..b739aca1967fb8176190fb2f9b0c7272d542623d 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -247,6 +247,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData(
const gfx::Size dimensions(destination_width, destination_height);
if (!VideoFrame::IsValidConfig(VideoFrame::I420,
+ VideoFrame::STORAGE_UNKNOWN,
dimensions,
gfx::Rect(dimensions),
dimensions)) {
@@ -460,7 +461,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedBuffer(
} else {
DCHECK_EQ(frame_format.pixel_format, media::PIXEL_FORMAT_I420);
scoped_refptr<VideoFrame> video_frame =
- VideoFrame::WrapExternalPackedMemory(
+ VideoFrame::WrapExternalData(
VideoFrame::I420,
frame_format.frame_size,
gfx::Rect(frame_format.frame_size),
@@ -468,8 +469,6 @@ void VideoCaptureDeviceClient::OnIncomingCapturedBuffer(
reinterpret_cast<uint8*>(buffer->data()),
VideoFrame::AllocationSize(VideoFrame::I420,
frame_format.frame_size),
- base::SharedMemory::NULLHandle(),
- 0 /* shared_memory_offset */,
base::TimeDelta());
DCHECK(video_frame.get());
video_frame->metadata()->SetDouble(media::VideoFrameMetadata::FRAME_RATE,

Powered by Google App Engine
This is Rietveld 408576698