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

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

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
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) {
+ 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);
};
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | content/renderer/media/media_stream_video_track.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698