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

Side by Side Diff: content/renderer/media/video_capture_impl.cc

Issue 48113011: Remove media::VideoFrame from media::VideoCaptureDevice::Client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: ffdbaeb83 Trybot failures. Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/rtc_video_encoder.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/video_capture_impl.h" 5 #include "content/renderer/media/video_capture_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "content/child/child_process.h" 9 #include "content/child/child_process.h"
10 #include "content/common/media/video_capture_messages.h" 10 #include "content/common/media/video_capture_messages.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 return; 251 return;
252 } 252 }
253 253
254 last_frame_format_ = format; 254 last_frame_format_ = format;
255 gfx::Size size(format.width, format.height); 255 gfx::Size size(format.width, format.height);
256 256
257 ClientBufferMap::iterator iter = client_buffers_.find(buffer_id); 257 ClientBufferMap::iterator iter = client_buffers_.find(buffer_id);
258 DCHECK(iter != client_buffers_.end()); 258 DCHECK(iter != client_buffers_.end());
259 scoped_refptr<ClientBuffer> buffer = iter->second; 259 scoped_refptr<ClientBuffer> buffer = iter->second;
260 scoped_refptr<media::VideoFrame> frame = 260 scoped_refptr<media::VideoFrame> frame =
261 media::VideoFrame::WrapExternalSharedMemory( 261 media::VideoFrame::WrapExternalPackedMemory(
262 media::VideoFrame::I420, 262 media::VideoFrame::I420,
263 size, gfx::Rect(size), size, 263 size,
264 gfx::Rect(size),
265 size,
264 reinterpret_cast<uint8*>(buffer->buffer->memory()), 266 reinterpret_cast<uint8*>(buffer->buffer->memory()),
265 buffer->buffer_size, 267 buffer->buffer_size,
266 buffer->buffer->handle(), 268 buffer->buffer->handle(),
267 // TODO(sheu): convert VideoCaptureMessageFilter::Delegate to use 269 // TODO(sheu): convert VideoCaptureMessageFilter::Delegate to use
268 // base::TimeTicks instead of base::Time. http://crbug.com/249215 270 // base::TimeTicks instead of base::Time. http://crbug.com/249215
269 timestamp - base::Time::UnixEpoch(), 271 timestamp - base::Time::UnixEpoch(),
270 media::BindToLoop( 272 media::BindToLoop(
271 capture_message_loop_proxy_, 273 capture_message_loop_proxy_,
272 base::Bind( 274 base::Bind(
273 &VideoCaptureImpl::DoClientBufferFinishedOnCaptureThread, 275 &VideoCaptureImpl::DoClientBufferFinishedOnCaptureThread,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if (it != clients->end()) { 424 if (it != clients->end()) {
423 handler->OnStopped(this); 425 handler->OnStopped(this);
424 handler->OnRemoved(this); 426 handler->OnRemoved(this);
425 clients->erase(it); 427 clients->erase(it);
426 found = true; 428 found = true;
427 } 429 }
428 return found; 430 return found;
429 } 431 }
430 432
431 } // namespace content 433 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_encoder.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698