Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCPriorityType #249

Closed
aboba opened this issue Sep 30, 2015 · 2 comments
Closed

RTCPriorityType #249

aboba opened this issue Sep 30, 2015 · 2 comments

Comments

@aboba
Copy link
Contributor

aboba commented Sep 30, 2015

The latest WebRTC 1.0 draft (see: http://w3c.github.io/webrtc-pc/) defines RTCEncodingParameters thusly:

dictionary RTCRtpEncodingParameters {
boolean active;
RTCPriorityType priority;
unsigned long maxBitrate;
};

enum RTCPriorityType {
"very-low",
"low",
"medium",
"high"
};

In contrast, ORTC specifies the attributes like this:

partial dictionary RTCRtpEncodingParameters {
double priority = 1.0;
unsigned long long maxBitrate;
boolean active = true;
};

Proposed fix is to change priority from a double to RTCPriorityType. maxBitrate as an unsigned long long appears correct in ORTC (e.g. what happens if it is necessary specify gigabit rates??).

@aboba
Copy link
Contributor Author

aboba commented Sep 30, 2015

Sections of potential relevance in WebRTC 1.0:

4.10 Priority and QoS Model

Many applications have multiple media flows of the same data type and often some of the flows are more important than others. WebRTC uses the priority and Quality of Service (QoS) framework described in [RTCWEB-TRANSPORT] and [TSVWG-RTCWEB-QOS] to provide priority and DSCP marketing for packets that will help provide QoS in some networking environments. The priority setting can be used to indicate the relative priority of various flows. The priority API allows the JavaScript applications to tell the browser whether a particular media flow is high, medium, low or of very low importance to the application by setting the RTCRtpEncodingParamters.priority to the follwing values.

4.10.1 RTCPriorityType Enum

enum RTCPriorityType {
"very-low",
"low",
"medium",
"high"
};
Enumeration description
very-low See [RTCWEB-TRANSPORT], Section 4.
low See [RTCWEB-TRANSPORT], Section 4.
medium See [RTCWEB-TRANSPORT], Section 4.
high See [RTCWEB-TRANSPORT], Section 4.
Applications that use this API should be aware that often better overall user experience is obtained by lowering the priority of things that are not as important rather than raising the the priority of the things that are.

5.2.2 Dictionary RTCRtpEncodingParameters Members

active of type boolean,
Indicates that this encoding is actively being sent. Setting it to false causes this encoding to no longer be sent. Setting it to true causes this encoding to be sent.

maxBitrate of type unsigned long,
Indicates the maximum bitrate that can be used to send this encoding. The encoding may also be further constrained by other bandwidth limits (such as per-transport or per-session limits) below the maximum specified here.

TODO: Find or create a definition for bitrate (how much header overhead is included, for example). Should be aligned with RTCOutboundRTPStreamStats.targetBitrate in webrtc-stats.

priority of type RTCPriorityType,
Indicates the priority of this encoding. It is specified in [RTCWEB-TRANSPORT], Section 4.

@aboba aboba changed the title RTCEncodingParameters: Sync with WebRTC 1.0 RTCRtpEncodingParameters: Sync with WebRTC 1.0 Sep 30, 2015
@aboba
Copy link
Contributor Author

aboba commented Sep 30, 2015

Here is the proposed text:

partial dictionary RTCRtpEncodingParameters {
RTCPriorityType priority;
unsigned long maxBitrate;
boolean active = true;
};

priority of type RTCPriorityType,
Indicates the priority of this encoding. It is specified in [RTCWEB-TRANSPORT], Section 4. For scalable video coding, this parameter is only relevant for the base layer. This parameter is ignored in an RTCRtpReceiver object.

enum RTCPriorityType

RTCPriorityType can be used to indicate the relative priority of various flows. This allows applications to indicate to the browser whether a particular media flow is high, medium, low or of very low importance to the application. WebRTC uses the priority and Quality of Service (QoS) framework described in [RTCWEB-TRANSPORT] and [TSVWG-RTCWEB-QOS] to provide priority and DSCP marketing for packets that will help provide QoS in some networking environments. Applications that use this API should be aware that often better overall user experience is obtained by lowering the priority of things that are not as important rather than raising the the priority of the things that are.

enum RTCPriorityType {
"very-low",
"low",
"medium",
"high"
};
Enumeration description
very-low
See [RTCWEB-TRANSPORT], Section 4.

low
See [RTCWEB-TRANSPORT], Section 4.

medium
See [RTCWEB-TRANSPORT], Section 4.

high
See [RTCWEB-TRANSPORT], Section 4.

robin-raymond pushed a commit that referenced this issue Oct 6, 2015
#240

- Fixed typos in Example 11, as noted in:
#241
#248

- Added text relating to RTCDataChannel exceptions and errors, as noted in:
#242

- Reconciliation of RTCRtpEncodingParameters dictionary with WebRTC 1.0, as noted in:
#249
@aboba aboba closed this as completed Oct 6, 2015
Jxck pushed a commit to Jxck/ortc that referenced this issue Oct 15, 2015
w3c#240

- Fixed typos in Example 11, as noted in:
w3c#241
w3c#248

- Added text relating to RTCDataChannel exceptions and errors, as noted in:
w3c#242

- Reconciliation of RTCRtpEncodingParameters dictionary with WebRTC 1.0, as noted in:
w3c#249
@aboba aboba changed the title RTCRtpEncodingParameters: Sync with WebRTC 1.0 RTCPriorityType Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant