From 0d4a28ba2fbc565ae3c002aa34463b783137ea91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?=
additional members to control audio packetization.
partial dictionary RTCRtpEncodingParameters { - unsigned long ptime; - boolean adaptivePtime = false; + RTCResolutionRestriction restrictedResolution; + unsigned long ptime; + boolean adaptivePtime = false; };
The resolution at which to restrict this encoding.
+The default "scale resolution down by" factors (e.g. 4:2:1) are not + applied when this parameter is used. Instead, frames are either sent + as-is or they are downscaled by the encoder to uphold the + restrictions. The encoder will never upscale a frame. In simulcast, + this can result in dropping top layer(s) if the input frame is too + small as to avoid sending the same resolution on multiple layers.
+When setting parameters, if {{restrictedResolution}} is specified + on any encoding, check that the following is true or else throw an + {{InvalidModificationError}}:
+{{restrictedResolution}} is specified on all encodings and has + values in both dimensions that are greater than 0.
+{{RTCRtpEncodingParameters/scaleResolutionDownBy}} is not + specified on any encoding.
+dictionary RTCResolutionRestriction { + unsigned long maxWidth; + unsigned long maxHeight; +};+
The maximum width that frames will be encoded with without getting + downscaled. The size comparison is orientation agnostic. When scaling + is applied, both dimensions of the frame are downscaled using the same + factor.
+The maximum height that frames will be encoded with without getting + downscaled. The size comparison is orientation agnostic. When scaling + is applied, both dimensions of the frame are downscaled using the same + factor.
++ Orientation agnostic means that if resolution restrictions are specified + in landscape mode but the frame is in portrait mode or vice versa, the + encoder will internally swap the restricted width and height prior to + each size comparison. This does not modify the value of + {{RTCRtpEncodingParameters/restrictedResolution}}. +
+partial dictionary RTCRtpEncodingParameters { - RTCResolutionRestriction restrictedResolution; + RTCResolutionRestriction resolutionRestriction; unsigned long ptime; boolean adaptivePtime = false; };@@ -367,7 +367,7 @@
The resolution at which to restrict this encoding.
@@ -377,12 +377,12 @@When setting parameters, if {{restrictedResolution}} is specified +
When setting parameters, if {{resolutionRestriction}} is specified on any encoding, check that the following is true or else throw an {{InvalidModificationError}}:
{{restrictedResolution}} is specified on all encodings and has +
{{resolutionRestriction}} is specified on all encodings and has values in both dimensions that are greater than 0.
When setting parameters, if {{resolutionRestriction}} is specified on any encoding, check that the following is true or else throw an {{InvalidModificationError}}:
From 046e1ea90a6d75afeabdd5f6d4c4273ac9000a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?=partial dictionary RTCRtpEncodingParameters { - RTCResolutionRestriction resolutionRestriction; + RTCResolutionRestriction scaleResolutionDownTo; unsigned long ptime; boolean adaptivePtime = false; };@@ -367,22 +367,26 @@
The resolution at which to restrict this encoding.
+The maximum dimensions at which to restrict this encoding.
The default "scale resolution down by" factors (e.g. 4:2:1) are not applied when this parameter is used. Instead, frames are either sent as-is or they are downscaled by the encoder to uphold the restrictions. The encoder will never upscale a frame. In simulcast, - encodings are sent up to and including the layer that results in a - downscale, ignoring any layers further up.
-When setting parameters, if {{resolutionRestriction}} is specified + not upscaling can result in multiple same-sized encodings if the size + of the frame is smaller than {{scaleResolutionDownTo}}; an encoding is + not sent if {{scaleResolutionDownTo}} is larger than the frame and + there exists another {{RTCRtpEncodingParameters/active}} encoding with + a smaller {{scaleResolutionDownTo}} density resulting in the same + size.
+When setting parameters, if {{scaleResolutionDownTo}} is specified on any encoding, check that the following is true or else throw an {{InvalidModificationError}}:
{{resolutionRestriction}} is specified on all encodings and has +
{{scaleResolutionDownTo}} is specified on all encodings and has values in both dimensions that are greater than 0.
The maximum width that frames will be encoded with without getting - downscaled. The size comparison is orientation agnostic. When scaling - is applied, both dimensions of the frame are downscaled using the same - factor.
+ downscaled. When scaling is applied, both dimensions of the frame are + downscaled using the same factor.The maximum height that frames will be encoded with without getting - downscaled. The size comparison is orientation agnostic. When scaling - is applied, both dimensions of the frame are downscaled using the same - factor.
+ downscaled. When scaling is applied, both dimensions of the frame are + downscaled using the same factor.- Orientation agnostic means that if resolution restrictions are specified - in landscape mode but the frame is in portrait mode or vice versa, the - encoder will internally swap the restricted width and height prior to - each size comparison. This does not modify the value of - {{RTCRtpEncodingParameters/resolutionRestriction}}. -
The maximum width that frames will be encoded with without getting - downscaled. When scaling is applied, both dimensions of the frame are - downscaled using the same factor.
+ downscaled. The restrictions are orientation agnostic, see note below. + When scaling is applied, both dimensions of the frame are downscaled + using the same factor.The maximum height that frames will be encoded with without getting - downscaled. When scaling is applied, both dimensions of the frame are - downscaled using the same factor.
+ downscaled. The restrictions are orientation agnostic, see note below. + When scaling is applied, both dimensions of the frame are downscaled + using the same factor.+ The restrictions being orientation agnostic means that they will + automatically be adjusted to portrait mode or landscape mode depending + on the orientation of the frame being restricted. This means that it + does not matter if 1280x720 or 720x1280 is specified, both always + result in the exact same scaling factor. +
The restrictions being orientation agnostic means that they will - automatically be adjusted to portrait mode or landscape mode depending - on the orientation of the frame being restricted. This means that it - does not matter if 1280x720 or 720x1280 is specified, both always - result in the exact same scaling factor regardless of the orientation - of the frame. + automatically be adjusted to the orientation of the frame being + restricted (portrait mode or landscape mode) by swapping width and + height if necessary. This means that it does not matter if 1280x720 or + 720x1280 is specified, both always result in the exact same scaling + factor regardless of the orientation of the frame.
From 2685fad03e15291e013ea924c18910875174a417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?=When setting parameters, if {{scaleResolutionDownTo}} is specified - on any encoding, check that the following is true or else throw an + on any encoding, check that the following is true or else return a + promise [= rejected =] with a newly [= exception/created =] {{InvalidModificationError}}:
The maximum dimensions at which to restrict this encoding.
-The default "scale resolution down by" factors (e.g. 4:2:1) are not - applied when this parameter is used. Instead, frames are either sent - as-is or they are downscaled by the encoder to uphold the - restrictions. The encoder will never upscale a frame. In simulcast, - not upscaling can result in multiple same-sized encodings if the size - of the frame is smaller than {{scaleResolutionDownTo}}; an encoding is - not sent if {{scaleResolutionDownTo}} is larger than the frame and +
When {{scaleResolutionDownTo}} is specified, the + {{RTCRtpEncodingParameters/scaleResolutionDownBy}} scaling factor MUST + be ignored by the encoder. Instead, frames are sent according to the + specified resolution restrictions: frames MUST either be downscaled or + sent as-is. The encoder MUST NOT upscale a frame. In simulcast, not + upscaling can result in multiple same-sized encodings if the size of + the frame is smaller than {{scaleResolutionDownTo}}; an encoding MUST + NOT be sent if {{scaleResolutionDownTo}} is larger than the frame and there exists another {{RTCRtpEncodingParameters/active}} encoding with a smaller {{scaleResolutionDownTo}} density resulting in the same size.
-When setting parameters, if {{scaleResolutionDownTo}} is specified - on any encoding, check that the following is true or else return a - promise [= rejected =] with a newly [= exception/created =] - {{InvalidModificationError}}:
+When configuring parameters - either via + {{RTCPeerConnection/addTransceiver()}} or + {{RTCRtpSender/setParameters()}} - if {{scaleResolutionDownTo}} is + specified on any encoding, check that the following is true or else + [= exception/throw =] / [= reject =] with a newly + [= exception/created =] {{InvalidModificationError}}:
{{scaleResolutionDownTo}} is specified on all encodings and has - values in both dimensions that are greater than 0.
+{{scaleResolutionDownTo}} is specified on all encodings.
{{RTCRtpEncodingParameters/scaleResolutionDownBy}} is not - specified on any encoding.
+For each {{scaleResolutionDownTo}} value, both dimensions have + a value greater than 0.
When configuring parameters - either via - {{RTCPeerConnection/addTransceiver()}} or - {{RTCRtpSender/setParameters()}} - if {{scaleResolutionDownTo}} is - specified on any encoding, check that the following is true or else - [= exception/throw =] / [= reject =] with a newly +
When configuring parameters, the following validation MUST be + performed if {{scaleResolutionDownTo}} is specified on any encoding or + else {{RTCPeerConnection/addTransceiver()}} [= exception/throws =] a + newly [= exception/created =] {{OperationError}} and + {{RTCRtpSender/setParameters()}} [= reject|rejects =] with a newly [= exception/created =] {{InvalidModificationError}}:
The maximum dimensions at which to restrict this encoding.
When {{scaleResolutionDownTo}} is specified, the
- {{RTCRtpEncodingParameters/scaleResolutionDownBy}} scaling factor MUST
+ {{RTCRtpEncodingParameters/scaleResolutionDownBy}} value MUST
be ignored by the encoder. Instead, frames are sent according to the
specified resolution restrictions: frames MUST either be downscaled or
sent as-is. The encoder MUST NOT upscale a frame. In simulcast, not
From 02637b12afca8e21dd5d3f92bd950aaf0823ba66 Mon Sep 17 00:00:00 2001
From: henbos The maximum dimensions at which to restrict this encoding. When {{scaleResolutionDownTo}} is specified, the
{{RTCRtpEncodingParameters/scaleResolutionDownBy}} value MUST
- be ignored by the encoder. Instead, frames are sent according to the
+ be ignored. Instead, frames are sent according to the
specified resolution restrictions: frames MUST either be downscaled or
sent as-is. The encoder MUST NOT upscale a frame. In simulcast, not
upscaling can result in multiple same-sized encodings if the size of
From 555172fd10e923a6c7ef0afb8ec275e4b9b9c907 Mon Sep 17 00:00:00 2001
From: henbos When {{scaleResolutionDownTo}} is specified, the
{{RTCRtpEncodingParameters/scaleResolutionDownBy}} value MUST
be ignored. Instead, frames are sent according to the
- specified resolution restrictions: frames MUST either be downscaled or
- sent as-is. The encoder MUST NOT upscale a frame. In simulcast, not
+ specified resolution restrictions: frames MUST NOT be upscaled. In simulcast, not
upscaling can result in multiple same-sized encodings if the size of
the frame is smaller than {{scaleResolutionDownTo}}; an encoding MUST
NOT be sent if {{scaleResolutionDownTo}} is larger than the frame and
From 6f0ae22ca65a9c88422db5d60bb884bd7249c0f0 Mon Sep 17 00:00:00 2001
From: henbos The maximum width that frames will be encoded with without getting
- downscaled. The restrictions are orientation agnostic, see note below.
+ The maximum width that frames will be encoded with.
+ The restrictions are orientation agnostic, see note below.
When scaling is applied, both dimensions of the frame are downscaled
using the same factor. The maximum height that frames will be encoded with without getting
- downscaled. The restrictions are orientation agnostic, see note below.
+ The maximum height that frames will be encoded with.
+ The restrictions are orientation agnostic, see note below.
When scaling is applied, both dimensions of the frame are downscaled
using the same factor. The maximum height that frames will be encoded with.
The restrictions are orientation agnostic, see note below.
- When scaling is applied, both dimensions of the frame are downscaled
+ When scaling is applied, both dimensions of the frame MUST be downscaled
using the same factor.
From 0ec01b0249b99164350d14921dbc9f783dc8a3dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= The maximum dimensions at which to restrict this encoding. When {{scaleResolutionDownTo}} is specified, the
- {{RTCRtpEncodingParameters/scaleResolutionDownBy}} value MUST
- be ignored. Instead, frames are sent according to the
- specified resolution restrictions: frames MUST NOT be upscaled. In simulcast, not
- upscaling can result in multiple same-sized encodings if the size of
- the frame is smaller than {{scaleResolutionDownTo}}; an encoding MUST
- NOT be sent if {{scaleResolutionDownTo}} is larger than the frame and
- there exists another {{RTCRtpEncodingParameters/active}} encoding with
- a smaller {{scaleResolutionDownTo}} density resulting in the same
- size. When configuring parameters, the following validation MUST be
performed if {{scaleResolutionDownTo}} is specified on any encoding or
else {{RTCPeerConnection/addTransceiver()}} [= exception/throws =] a
@@ -450,19 +444,19 @@ The maximum width that frames will be encoded with.
- The restrictions are orientation agnostic, see note below.
- When scaling is applied, both dimensions of the frame are downscaled
- using the same factor. The maximum width that frames will be encoded with. The
+ restrictions are orientation agnostic, see note below. When scaling is
+ applied, both dimensions of the frame are downscaled using the same
+ factor. The maximum height that frames will be encoded with.
- The restrictions are orientation agnostic, see note below.
- When scaling is applied, both dimensions of the frame MUST be downscaled
- using the same factor. The maximum height that frames will be encoded with. The
+ restrictions are orientation agnostic, see note below. When scaling is
+ applied, both dimensions of the frame MUST be downscaled using the
+ same factor.
The restrictions being orientation agnostic means that they will
Dictionary {{RTCRtpEncodingParameters}} Members
Dictionary {{RTCRtpEncodingParameters}} Members
Dictionary {{RTCResolutionRestriction}} Members
maxWidth of type unsigned long
Dictionary {{RTCResolutionRestriction}} Members
maxHeight of type unsigned long
Dictionary {{RTCResolutionRestriction}} Members
Dictionary {{RTCRtpEncodingParameters}} Members
Dictionary {{RTCResolutionRestriction}} Members
maxWidth of type unsigned long