Change network_priority from a double to an enum.
It can only be one of four possible values, so it never made sense
for it to be a double. Other than the fact that its neighbor
bitrate_priority is a double, and they're both defined as the same enum
in the web spec. However, while bitrate_priority being a double
offers more flexibility than the web spec, network_priority being a
double is only confusing.
Bug: webrtc:5658
Change-Id: I0784c116f3260c4b3a8b99a3cd85c8d66017e46f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168840
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30685}
diff --git a/api/rtp_parameters.h b/api/rtp_parameters.h
index d9d4d5a..358a582 100644
--- a/api/rtp_parameters.h
+++ b/api/rtp_parameters.h
@@ -91,12 +91,11 @@
RTC_EXPORT extern const double kDefaultBitratePriority;
-// TODO(deadbeef): Switch to an enum class.
-struct RTC_EXPORT Priority {
- static const double kVeryLow;
- static const double kLow;
- static const double kMedium;
- static const double kHigh;
+enum class Priority {
+ kVeryLow,
+ kLow,
+ kMedium,
+ kHigh,
};
struct RTC_EXPORT RtcpFeedback {
@@ -401,7 +400,9 @@
// 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 = Priority::kLow;
+ // TODO(http://crbug.com/webrtc/11379): TCP connections should use a single
+ // DSCP value even if shared by multiple senders; this is not implemented.
+ Priority network_priority = Priority::kLow;
// If set, this represents the Transport Independent Application Specific
// maximum bandwidth defined in RFC3890. If unset, there is no maximum