From f32795e33e66c0bfe3248498232a48a527b4acb0 Mon Sep 17 00:00:00 2001 From: Seth Hampson Date: Tue, 19 Dec 2017 11:37:41 -0800 Subject: [PATCH] Updates to video config to allow changes in google3 tests, in order to not break anything. Bug: webrtc:8630 Change-Id: I71bfd3f01344c80a83b728385b9231b47ee1fd5d Reviewed-on: https://webrtc-review.googlesource.com/32460 Commit-Queue: Seth Hampson Reviewed-by: Elad Alon Reviewed-by: Stefan Holmer Reviewed-by: Peter Thatcher Cr-Commit-Position: refs/heads/master@{#21373} --- api/rtpparameters.cc | 2 ++ api/rtpparameters.h | 1 + call/video_config.cc | 1 + call/video_config.h | 3 +++ 4 files changed, 7 insertions(+) diff --git a/api/rtpparameters.cc b/api/rtpparameters.cc index 160a0690e0..79fd3a93f9 100644 --- a/api/rtpparameters.cc +++ b/api/rtpparameters.cc @@ -17,6 +17,8 @@ namespace webrtc { +const double kDefaultBitratePriority = 1.0; + RtcpFeedback::RtcpFeedback() {} RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {} RtcpFeedback::RtcpFeedback(RtcpFeedbackType type, diff --git a/api/rtpparameters.h b/api/rtpparameters.h index e6bd25e3ae..221f5b6da1 100644 --- a/api/rtpparameters.h +++ b/api/rtpparameters.h @@ -72,6 +72,7 @@ enum class DegradationPreference { BALANCED, }; +extern const double kDefaultBitratePriority; enum class PriorityType { VERY_LOW, LOW, MEDIUM, HIGH }; struct RtcpFeedback { diff --git a/call/video_config.cc b/call/video_config.cc index 7cf26406a1..982c013e46 100644 --- a/call/video_config.cc +++ b/call/video_config.cc @@ -54,6 +54,7 @@ VideoEncoderConfig::VideoEncoderConfig() encoder_specific_settings(nullptr), min_transmit_bitrate_bps(0), max_bitrate_bps(0), + bitrate_priority(1.0), number_of_streams(0) {} VideoEncoderConfig::VideoEncoderConfig(VideoEncoderConfig&&) = default; diff --git a/call/video_config.h b/call/video_config.h index 52a3e9ad05..2276e785dd 100644 --- a/call/video_config.h +++ b/call/video_config.h @@ -35,6 +35,7 @@ struct VideoStream { int min_bitrate_bps; int target_bitrate_bps; int max_bitrate_bps; + rtc::Optional bitrate_priority; int max_qp; @@ -142,6 +143,8 @@ class VideoEncoderConfig { // unless the estimated bandwidth indicates that the link can handle it. int min_transmit_bitrate_bps; int max_bitrate_bps; + // The bitrate priority used for all VideoStreams. + double bitrate_priority; // Max number of encoded VideoStreams to produce. size_t number_of_streams;