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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 500653003: Video capture frame size: separate coded size and visible size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix content_unittests build. Created 6 years, 4 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
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | content/renderer/media/video_capture_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index bae0813bbae742623348f9b36aa056b730fbd334..9a6ec78360c3ec53e7d37b69f389d9bdb20c02e7 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -206,6 +206,7 @@ void VideoCaptureImpl::OnBufferDestroyed(int buffer_id) {
void VideoCaptureImpl::OnBufferReceived(int buffer_id,
const media::VideoCaptureFormat& format,
+ const gfx::Rect& visible_rect,
base::TimeTicks timestamp) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -235,8 +236,8 @@ void VideoCaptureImpl::OnBufferReceived(int buffer_id,
media::VideoFrame::WrapExternalPackedMemory(
media::VideoFrame::I420,
last_frame_format_.frame_size,
- gfx::Rect(last_frame_format_.frame_size),
- last_frame_format_.frame_size,
+ visible_rect,
+ gfx::Size(visible_rect.width(), visible_rect.height()),
reinterpret_cast<uint8*>(buffer->buffer->memory()),
buffer->buffer_size,
buffer->buffer->handle(),
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | content/renderer/media/video_capture_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698