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

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

Issue 2922013002: Update constraints processing for video content capture. (Closed)
Patch Set: Rebase Created 3 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 | content/renderer/media/media_stream_constraints_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_constraints_util.h
diff --git a/content/renderer/media/media_stream_constraints_util.h b/content/renderer/media/media_stream_constraints_util.h
index 92c372407ec8362b626e244919aa925bec50a6c6..1c666a34f6cbfc0c7dac5a16bfd536efe4327ae2 100644
--- a/content/renderer/media/media_stream_constraints_util.h
+++ b/content/renderer/media/media_stream_constraints_util.h
@@ -47,8 +47,9 @@ class NumericRangeSet;
// * noise_reduction: used to control noise reduction for a screen-capture
// track sent to a peer connection. Derive from the googNoiseReduction
// constraint.
-// * min_frame_rate: used to control frame refreshes in screen-capture tracks
-// sent to a peer connection. Derived from the frameRate constraint.
+// * min_frame_rate and max_frame_rate: used to control frame refreshes in
+// screen-capture tracks sent to a peer connection. Derived from the
+// frameRate constraint.
class CONTENT_EXPORT VideoCaptureSettings {
public:
// Creates an object without value and with an empty failed constraint name.
@@ -65,7 +66,8 @@ class CONTENT_EXPORT VideoCaptureSettings {
media::VideoCaptureParams capture_params_,
base::Optional<bool> noise_reduction_,
const VideoTrackAdapterSettings& track_adapter_settings,
- double min_frame_rate);
+ base::Optional<double> min_frame_rate,
+ base::Optional<double> max_frame_rate);
VideoCaptureSettings(const VideoCaptureSettings& other);
VideoCaptureSettings& operator=(const VideoCaptureSettings& other);
@@ -119,10 +121,14 @@ class CONTENT_EXPORT VideoCaptureSettings {
DCHECK(HasValue());
return track_adapter_settings_;
}
- double min_frame_rate() const {
+ const base::Optional<double>& min_frame_rate() const {
DCHECK(HasValue());
return min_frame_rate_;
}
+ const base::Optional<double>& max_frame_rate() const {
+ DCHECK(HasValue());
+ return max_frame_rate_;
+ }
private:
const char* failed_constraint_name_;
@@ -130,7 +136,8 @@ class CONTENT_EXPORT VideoCaptureSettings {
media::VideoCaptureParams capture_params_;
base::Optional<bool> noise_reduction_;
VideoTrackAdapterSettings track_adapter_settings_;
- double min_frame_rate_;
+ base::Optional<double> min_frame_rate_;
+ base::Optional<double> max_frame_rate_;
};
// Method to get boolean value of constraint with |name| from constraints.
« no previous file with comments | « no previous file | content/renderer/media/media_stream_constraints_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698