Add constants for allowed network_priority values

After chromium switches to using these, they'll be changed to an enum.

Bug: webrtc:5658
Change-Id: Ic5d7d4651d204c31822194bd02c587e5b887ee17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168562
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30551}
This commit is contained in:
Taylor Brandstetter 2020-02-18 13:41:54 -08:00 committed by Commit Bot
parent e6ca3b8c38
commit 567f03f7a0
2 changed files with 14 additions and 1 deletions

View File

@ -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,

View File

@ -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