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

Side by Side Diff: content/renderer/media/media_stream_video_track.h

Issue 2817673004: Make MediaStreamVideoTrack::GetSettings return the track's frame rate. (Closed)
Patch Set: Remove unnecessary comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK(!IsOldVideoConstraints()); 106 DCHECK(!IsOldVideoConstraints());
107 return min_frame_rate_; 107 return min_frame_rate_;
108 } 108 }
109 const VideoTrackAdapterSettings& adapter_settings() const { 109 const VideoTrackAdapterSettings& adapter_settings() const {
110 DCHECK(!IsOldVideoConstraints()); 110 DCHECK(!IsOldVideoConstraints());
111 return *adapter_settings_; 111 return *adapter_settings_;
112 } 112 }
113 113
114 // Setting information about the track size. 114 // Setting information about the track size.
115 // Called from MediaStreamVideoSource at track initialization. 115 // Called from MediaStreamVideoSource at track initialization.
116 void SetTargetSize(int width, int height) { 116 void SetTargetSizeAndFrameRate(int width, int height, double frame_rate) {
117 width_ = width; 117 width_ = width;
118 height_ = height; 118 height_ = height;
119 frame_rate_ = frame_rate;
119 } 120 }
120 121
121 private: 122 private:
122 // MediaStreamVideoSink is a friend to allow it to call AddSink() and 123 // MediaStreamVideoSink is a friend to allow it to call AddSink() and
123 // RemoveSink(). 124 // RemoveSink().
124 friend class MediaStreamVideoSink; 125 friend class MediaStreamVideoSink;
125 FRIEND_TEST_ALL_PREFIXES(MediaStreamRemoteVideoSourceTest, StartTrack); 126 FRIEND_TEST_ALL_PREFIXES(MediaStreamRemoteVideoSourceTest, StartTrack);
126 FRIEND_TEST_ALL_PREFIXES(MediaStreamRemoteVideoSourceTest, RemoteTrackStop); 127 FRIEND_TEST_ALL_PREFIXES(MediaStreamRemoteVideoSourceTest, RemoteTrackStop);
127 FRIEND_TEST_ALL_PREFIXES(PepperToVideoTrackAdapterTest, PutFrame); 128 FRIEND_TEST_ALL_PREFIXES(PepperToVideoTrackAdapterTest, PutFrame);
128 129
(...skipping 23 matching lines...) Expand all
152 base::Optional<bool> noise_reduction_; 153 base::Optional<bool> noise_reduction_;
153 bool is_screencast_; 154 bool is_screencast_;
154 double min_frame_rate_; 155 double min_frame_rate_;
155 156
156 // Weak ref to the source this tracks is connected to. 157 // Weak ref to the source this tracks is connected to.
157 base::WeakPtr<MediaStreamVideoSource> source_; 158 base::WeakPtr<MediaStreamVideoSource> source_;
158 159
159 // This is used for tracking if all connected video sinks are secure. 160 // This is used for tracking if all connected video sinks are secure.
160 SecureDisplayLinkTracker<MediaStreamVideoSink> secure_tracker_; 161 SecureDisplayLinkTracker<MediaStreamVideoSink> secure_tracker_;
161 162
162 // Remembering our desired video size. 163 // Remembering our desired video size and frame rate.
163 int width_ = 0; 164 int width_ = 0;
164 int height_ = 0; 165 int height_ = 0;
166 double frame_rate_ = 0.0;
165 167
166 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); 168 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack);
167 }; 169 };
168 170
169 } // namespace content 171 } // namespace content
170 172
171 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 173 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
OLDNEW
« 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