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

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

Issue 2742893003: Let getSettings() return the constrained track resolution, not source. (Closed)
Patch Set: Added bug # for non-working test Created 3 years, 9 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/media_stream_video_track.h ('k') | content/renderer/media/video_track_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_video_track.cc
diff --git a/content/renderer/media/media_stream_video_track.cc b/content/renderer/media/media_stream_video_track.cc
index 599018f61e8dfd86409a9eb3807ab884c6ccd47c..0f366f5a77148c6e7c022386f72503cfae3a7800 100644
--- a/content/renderer/media/media_stream_video_track.cc
+++ b/content/renderer/media/media_stream_video_track.cc
@@ -302,18 +302,15 @@ void MediaStreamVideoTrack::Stop() {
void MediaStreamVideoTrack::getSettings(
blink::WebMediaStreamTrack::Settings& settings) {
- // TODO(hta): Extract the real value.
- settings.deviceId = blink::WebString("video device ID");
- if (!source_)
- return;
-
const media::VideoCaptureFormat* format = source_->GetCurrentFormat();
if (format) {
settings.frameRate = format->frame_rate;
- settings.width = format->frame_size.width();
- settings.height = format->frame_size.height();
settings.videoKind = GetVideoKindForFormat(*format);
}
+ if (width_ && height_) {
+ settings.width = width_;
+ settings.height = height_;
+ }
switch (source_->device_info().device.video_facing) {
case media::MEDIA_VIDEO_FACING_NONE:
settings.facingMode = blink::WebMediaStreamTrack::FacingMode::None;
« no previous file with comments | « content/renderer/media/media_stream_video_track.h ('k') | content/renderer/media/video_track_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698