Skip to content

Commit

Permalink
Merge branch 'main' into amendments-test-annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dontcallmedom committed Feb 26, 2024
2 parents 2993069 + dc1fc15 commit 146350d
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 48 deletions.
31 changes: 31 additions & 0 deletions amendments.json
Expand Up @@ -463,6 +463,13 @@
"type": "correction",
"status": "candidate",
"id": 24
},
{
"description": "Redefine SendCodecs and ReceiveCodecs",
"pr": 2935,
"type": "addition",
"status": "candidate",
"id": 41
}
],
"webidl-rtcrtpencodingparameters": [
Expand Down Expand Up @@ -784,5 +791,29 @@
],
"id": 40
}
],
"setcodecpreferences-receive": [
{
"description": "setCodecPreferences only takes into account receive codecs",
"pr": 2926,
"type": "correction",
"status": "candidate",
"tests": [
"webrtc/RTCRtpTransceiver-setCodecPreferences.html"
],
"testUpdates": [
"web-platform-tests/wpt#44318"
],
"id": 40
}
],
"create-receiver-algo": [
{
"description": "Redefine SendCodecs and ReceiveCodecs",
"pr": 2935,
"type": "addition",
"status": "candidate",
"id": 41
}
]
}
2 changes: 1 addition & 1 deletion base-rec.html
Expand Up @@ -10116,7 +10116,7 @@ <h3 id="x5-3-rtcrtpreceiver-interface"><bdi class="secno">5.3 </bdi>
To <dfn id="dfn-create-an-rtcrtpreceiver">create an RTCRtpReceiver</dfn> with a string,
<var>kind</var>, run the following steps:
</p>
<ol>
<ol id="create-receiver-algo">
<li class="no-test-needed">
<p>
Let <var>receiver</var> be a new <a data-link-type="idl" href="#dom-rtcrtpreceiver" class="internalDFN" id="ref-for-dom-rtcrtpreceiver-24"><code><code>RTCRtpReceiver</code></code></a> object.
Expand Down
109 changes: 62 additions & 47 deletions webrtc.html
Expand Up @@ -2246,11 +2246,13 @@ <h4>
</li>
<li>
<p>
Set
<var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}
to the codecs that <var>description</var>
negotiates for receiving and which the user
agent is currently prepared to receive.
For each of the codecs that <var>description</var> negotiates for receiving, execute the following steps:
<ol>
<li>Locate the matching codec description in <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}.</li>
<li>If the matching codec description is not found, abort these steps.</li>
<li>Set the "enabled" flag in the matching codec description to "true".</li>
</ol>

</p>
<p class='note'>
If the <var>direction</var> is
Expand Down Expand Up @@ -2299,13 +2301,15 @@ <h4>
</li>
<li>
<p>
Set
<var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}}
to the codecs that <var>description</var>
negotiates for sending and which the user
agent is currently capable of sending,
and set
<var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastReturnedParameters]]}}
For each of the codecs that <var>description</var> negotiates for sending, execute the following steps:
<ol>
<li>Locate the matching codec description in <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}}.</li>
<li>If the matching codec description is not found, abort these steps.</li>
<li>Set the "enabled" flag in the matching codec description to "true".</li>
</ol>
</li>
<li>
Set <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastReturnedParameters]]}}
to <code>null</code>.
</p>
</li>
Expand Down Expand Up @@ -2573,11 +2577,12 @@ <h4>
</li>
<li>
<p>
Set
<var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}
to the codecs that <var>description</var>
negotiates for receiving and which the user
agent is currently prepared to receive.
For each of the codecs that <var>description</var> negotiates for receiving, execute the following steps:
<ol>
<li>Locate the matching codec description in <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}.</li>
<li>If the matching codec description is not found, abort these steps.</li>
<li>Set the "enabled" flag in the matching codec description to "true".</li>
</ol>
</p>
</li>
<li>
Expand All @@ -2590,11 +2595,12 @@ <h4>
<ol>
<li>
<p>
Set
<var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}}
to the codecs that <var>description</var>
negotiates for sending and which the user
agent is currently capable of sending.
For each of the codecs that <var>description</var> negotiates for sending, execute the following steps:
<ol>
<li>Locate the matching codec description in <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}}.</li>
<li>If the matching codec description is not found, abort these steps.</li>
<li>Set the "enabled" flag in the matching codec description to "true".</li>
</ol>
</p>
</li>
<li>
Expand Down Expand Up @@ -3787,8 +3793,7 @@ <h2>
<var>transceiver</var>.{{RTCRtpTransceiver/direction}}
is {{RTCRtpTransceiverDirection/"sendonly"}}
or {{RTCRtpTransceiverDirection/"sendrecv"}},
exclude any codecs not included in the
[=RTCRtpSender/list of implemented send codecs=] for
include all codecs in the <var>transceiver</var>'s {{RTCRtpTransceiver/[[Sender]]}}'s {{RTCRtpSender/[[SendCodecs]]}} for which the "enabled" flag is "true".
<var>kind</var>.
</p>
</li>
Expand All @@ -3798,9 +3803,7 @@ <h2>
<var>transceiver</var>.{{RTCRtpTransceiver/direction}}
is {{RTCRtpTransceiverDirection/"recvonly"}}
or {{RTCRtpTransceiverDirection/"sendrecv"}},
exclude any codecs not included in the
[=list of implemented receive codecs=] for
<var>kind</var>.
include all codecs in the <var>transceiver</var>'s {{RTCRtpTransceiver/[[Receiver]]}}'s {{RTCRtpReceiver/[[ReceiveCodecs]]}} for which the "enabled" flag is "true".
</p>
</li>
</ol>
Expand Down Expand Up @@ -4241,7 +4244,7 @@ <h2>
</p>
</li>
<li data-tests=
"RTCPeerConnection-setLocalDescription-offer.html">
"RTCPeerConnection-setLocalDescription-offer.html,legacy/munge-dont.html">
<p>
If <var>type</var> is {{RTCSdpType/"offer"}}, and
<var>sdp</var> is not the empty string and not
Expand All @@ -4253,7 +4256,7 @@ <h2>
</p>
</li>
<li data-tests=
"RTCPeerConnection-setLocalDescription-answer.html">
"RTCPeerConnection-setLocalDescription-answer.html,legacy/munge-dont.html">
<p>
If <var>type</var> is {{RTCSdpType/"answer"}} or
{{RTCSdpType/"pranswer"}}, and <var>sdp</var> is
Expand Down Expand Up @@ -8851,8 +8854,10 @@ <h3>
<li>
<p>
Let <var>sender</var> have a <dfn class="export" data-dfn-for="RTCRtpSender">[[\SendCodecs]]</dfn> internal
slot, representing a list of {{RTCRtpCodecParameters}}
dictionaries, and initialized to an empty list.
slot, representing a list of [=tuple=]s, each containing an {{RTCRtpCodecParameters}}
dictionary and an "enabled" boolean, and initialized to the
[=RTCRtpSender/list of implemented send codecs=], with the "enabled" flag
set in an implementation defined manner.
</p>
</li>
<li class="no-test-needed">
Expand Down Expand Up @@ -8968,6 +8973,15 @@ <h2>
dictionaries representing the most optimistic view of the codecs the user
agent supports for sending media of the given <var>kind</var> (video or audio).
</p>
<p class="note">
This conceptual list contains every combination of parameters that
the user agent is capable of processing. In practice, this would
be implemented as a piece of code that parses the parameters and
determines whether they are acceptable or not, but this is highly
codec dependent, so for the purpose of specification, we work with
a conceptual list containing all acceptable parameter combinations.
</p>

<p>
The <dfn>list of implemented header extensions for sending</dfn>, given
<var>kind</var>, is an [=implementation-defined=] list of
Expand Down Expand Up @@ -9232,8 +9246,9 @@ <h2>
</li>
<li data-tests=
"RTCRtpParameters-codecs.html,protocol/video-codecs.https.html">
{{RTCRtpParameters/codecs}} is set to the value of the
{{RTCRtpSender/[[SendCodecs]]}} internal slot.
{{RTCRtpParameters/codecs}} is set to the codecs from the
{{RTCRtpSender/[[SendCodecs]]}} internal slot where the
"enabled" flag is true.
</li>
<li data-tests="RTCRtpParameters-encodings.html">
{{RTCRtpParameters/rtcp}}.{{RTCRtcpParameters/cname}} is
Expand Down Expand Up @@ -10182,7 +10197,7 @@ <h3>
To <dfn class="abstract-op">create an RTCRtpReceiver</dfn> with a string,
<var>kind</var>, run the following steps:
</p>
<ol class=algorithm>
<ol class=algorithm id="create-receiver-algo">
<li class="no-test-needed">
<p>
Let <var>receiver</var> be a new {{RTCRtpReceiver}} object.
Expand Down Expand Up @@ -10264,8 +10279,10 @@ <h3>
<li>
<p>
Let <var>receiver</var> have a <dfn data-dfn-for="RTCRtpReceiver">[[\ReceiveCodecs]]</dfn>
internal slot, representing a list of {{RTCRtpCodecParameters}}
dictionaries, and initialized to an empty list.
internal slot, representing a list of [=tuple=]s, each containing a {{RTCRtpCodecParameters}}
dictionaries, and initialized to an list containing all the codecs in the
<a>list of implemented receive codecs</a> for <var>kind</var>, and with the "enabled" flag
set in an implementation defined manner.
</p>
</li>
<li>
Expand Down Expand Up @@ -10379,6 +10396,14 @@ <h2>
the codecs the user agent supports for receiving media of the given
<var>kind</var> (video or audio).
</p>
<p class="note">
This conceptual list contains every combination of parameters that
the user agent is capable of processing. In practice, this would
be implemented as a piece of code that parses the parameters and
determines whether they are acceptable or not, but this is highly
codec dependent, so for the purpose of specification, we work with
a conceptual list containing all acceptable parameter combinations.
</p>
<p>
The <dfn>list of implemented header extensions for receiving</dfn>, given
<var>kind</var>, is an [=implementation-defined=] list of
Expand Down Expand Up @@ -10427,6 +10452,7 @@ <h2>
<li data-tests="RTCRtpReceiver-getParameters.html">
<p>
{{RTCRtpParameters/codecs}} is set to the value of the
"enabled" codecs from the
{{RTCRtpReceiver/[[ReceiveCodecs]]}} internal slot.
</p>
<div class="note">
Expand Down Expand Up @@ -11224,17 +11250,6 @@ <h2>
where <var>kind</var> is the kind of the
{{RTCRtpTransceiver}} on which the method is called.
</p>
<p class="note">
Due to a recommendation in [[!SDP]], calls to
{{RTCPeerConnection/createAnswer}} SHOULD use only the common
subset of the codec preferences and the codecs that appear in
the offer. For example, if codec preferences are "C, B, A",
but only codecs "A, B" were offered, the answer should only
contain codecs "B, A". However, <span data-jsep=
"initial-answers">[[!RFC8829]]</span> allows adding codecs that
were not in the offer, so implementations can behave
differently.
</p>
<p>
When {{setCodecPreferences()}} is invoked, the <a>user
agent</a> MUST run the following steps:
Expand Down

0 comments on commit 146350d

Please sign in to comment.