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

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

Issue 23551011: From Video Capture, abolish OnFrameInfo and enable resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes from bbudge Created 7 years, 2 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/rtc_video_capture_delegate.cc ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_capturer.cc
diff --git a/content/renderer/media/rtc_video_capturer.cc b/content/renderer/media/rtc_video_capturer.cc
index fec4d091e8769438a47bc9840aa8c38ab141a140..2cf0d917b4fd742d8d07bfdb259b1a374dc852e9 100644
--- a/content/renderer/media/rtc_video_capturer.cc
+++ b/content/renderer/media/rtc_video_capturer.cc
@@ -29,24 +29,25 @@ cricket::CaptureState RtcVideoCapturer::Start(
return cricket::CS_FAILED;
}
- media::VideoCaptureCapability cap;
- cap.width = capture_format.width;
- cap.height = capture_format.height;
- cap.frame_rate = capture_format.framerate();
- cap.color = media::PIXEL_FORMAT_I420;
+ media::VideoCaptureParams request;
+ request.requested_format =
+ media::VideoCaptureFormat(capture_format.width,
+ capture_format.height,
+ capture_format.framerate(),
+ media::ConstantResolutionVideoCaptureDevice);
SetCaptureFormat(&capture_format);
state_ = VIDEO_CAPTURE_STATE_STARTED;
first_frame_timestamp_ = media::kNoTimestamp();
delegate_->StartCapture(
- cap,
+ request,
base::Bind(&RtcVideoCapturer::OnFrameCaptured, base::Unretained(this)),
base::Bind(&RtcVideoCapturer::OnStateChange, base::Unretained(this)));
// Update the desired aspect ratio so that later the video frame can be
// cropped to meet the requirement if the camera returns a different
- // resolution than the |cap|.
- UpdateAspectRatio(cap.width, cap.height);
+ // resolution than the |request|.
+ UpdateAspectRatio(capture_format.width, capture_format.height);
return cricket::CS_STARTING;
}
« no previous file with comments | « content/renderer/media/rtc_video_capture_delegate.cc ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698