Skip to content

Commit

Permalink
Redefine SendCodecs and ReceiveCodecs
Browse files Browse the repository at this point in the history
to contain all supported codecs, revealing only those that are
"enabled" at any given time.

Fixes: #2925
  • Loading branch information
alvestrand committed Feb 6, 2024
1 parent d3a5c60 commit 9499ffa
Showing 1 changed file with 41 additions and 32 deletions.
73 changes: 41 additions & 32 deletions webrtc.html
Original file line number Diff line number Diff line change
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:
<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:
<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:
<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 @@ -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 where each element contains 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 @@ -9232,8 +9237,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 @@ -10265,7 +10271,9 @@ <h3>
<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.
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 @@ -10427,6 +10435,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

0 comments on commit 9499ffa

Please sign in to comment.