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

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

Issue 2037573004: Add video width and height to getSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html » ('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 59d9cdd83cce164fbf2c61d3f73c768f9fb92a0e..e23b290328ddc6aafdea984452fa1336165dd720 100644
--- a/content/renderer/media/media_stream_video_track.cc
+++ b/content/renderer/media/media_stream_video_track.cc
@@ -292,8 +292,11 @@ void MediaStreamVideoTrack::getSettings(
blink::WebMediaStreamTrack::Settings& settings) {
if (source_) {
const media::VideoCaptureFormat* format = source_->GetCurrentFormat();
- if (format)
+ if (format) {
settings.frameRate = format->frame_rate;
+ settings.width = format->frame_size.width();
+ settings.height = format->frame_size.height();
+ }
}
// TODO(hta): Extract the real value.
settings.deviceId = blink::WebString("video device ID");
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-getSettings.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698