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

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

Issue 2742893003: Let getSettings() return the constrained track resolution, not source. (Closed)
Patch Set: Use common target size calculation 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
Index: content/renderer/media/media_stream_video_track.h
diff --git a/content/renderer/media/media_stream_video_track.h b/content/renderer/media/media_stream_video_track.h
index 364a64e73525ae6006a88c478576982ed0a153c5..72ead10c4432aff5810f0db957e27d65d73cc425 100644
--- a/content/renderer/media/media_stream_video_track.h
+++ b/content/renderer/media/media_stream_video_track.h
@@ -61,6 +61,13 @@ class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrack {
const blink::WebMediaConstraints& constraints() const { return constraints_; }
+ // Setting information about the track size.
+ // Called from MediaStreamVideoSource at track initialization.
+ void SetTargetSize(int width, int height) {
Guido Urdaneta 2017/03/13 14:12:37 Is there a reason why the track cannot set these v
hta - Chromium 2017/03/13 15:04:35 Yes - when it is created, I don't think the resolu
+ width_ = width;
+ height_ = height;
+ }
+
private:
// MediaStreamVideoSink is a friend to allow it to call AddSink() and
// RemoveSink().
@@ -95,6 +102,10 @@ class CONTENT_EXPORT MediaStreamVideoTrack : public MediaStreamTrack {
// This is used for tracking if all connected video sinks are secure.
SecureDisplayLinkTracker<MediaStreamVideoSink> secure_tracker_;
+ // Remembering our desired video size.
+ int width_ = 0;
+ int height_ = 0;
+
DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack);
};

Powered by Google App Engine
This is Rietveld 408576698