diff --git a/api/rtp_parameters.cc b/api/rtp_parameters.cc index 2b580b1084..3ca9cd38f1 100644 --- a/api/rtp_parameters.cc +++ b/api/rtp_parameters.cc @@ -19,6 +19,11 @@ namespace webrtc { const double kDefaultBitratePriority = 1.0; +const double NetworkPriority::kVeryLow = 0.5; +const double NetworkPriority::kLow = 1.0; +const double NetworkPriority::kMedium = 2.0; +const double NetworkPriority::kHigh = 4.0; + RtcpFeedback::RtcpFeedback() = default; RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {} RtcpFeedback::RtcpFeedback(RtcpFeedbackType type, diff --git a/api/rtp_parameters.h b/api/rtp_parameters.h index 4f45d65a3d..94ce00d916 100644 --- a/api/rtp_parameters.h +++ b/api/rtp_parameters.h @@ -91,6 +91,14 @@ enum class DegradationPreference { RTC_EXPORT extern const double kDefaultBitratePriority; +// TODO(deadbeef): Switch to an enum class. +struct RTC_EXPORT NetworkPriority { + static const double kVeryLow; + static const double kLow; + static const double kMedium; + static const double kHigh; +}; + struct RTC_EXPORT RtcpFeedback { RtcpFeedbackType type = RtcpFeedbackType::CCM; @@ -393,7 +401,7 @@ struct RTC_EXPORT RtpEncodingParameters { // we follow chromium's translation of the allowed string enum values for // this field to 1.0, 0.5, et cetera, similar to bitrate_priority above. // TODO(http://crbug.com/webrtc/8630): Implement this per encoding parameter. - double network_priority = kDefaultBitratePriority; + double network_priority = NetworkPriority::kLow; // If set, this represents the Transport Independent Application Specific // maximum bandwidth defined in RFC3890. If unset, there is no maximum