diff --git a/amendments.json b/amendments.json index 7391ca640..bf58ebca3 100644 --- a/amendments.json +++ b/amendments.json @@ -310,6 +310,13 @@ "type": "correction", "status": "candidate", "id": 24 + }, + { + "description": "Redefine SendCodecs and ReceiveCodecs", + "pr": 2935, + "type": "addition", + "status": "candidate", + "id": 41 } ], "webidl-rtcrtpencodingparameters": [ @@ -563,5 +570,14 @@ ], "id": 40 } + ], + "create-receiver-algo": [ + { + "description": "Redefine SendCodecs and ReceiveCodecs", + "pr": 2935, + "type": "addition", + "status": "candidate", + "id": 41 + } ] } diff --git a/base-rec.html b/base-rec.html index 4800fb3ed..99d8426da 100644 --- a/base-rec.html +++ b/base-rec.html @@ -10116,7 +10116,7 @@

5.3 To create an RTCRtpReceiver with a string, kind, run the following steps:

-
    +
    1. Let receiver be a new RTCRtpReceiver object. diff --git a/webrtc.html b/webrtc.html index ce09e1689..947c6b27e 100644 --- a/webrtc.html +++ b/webrtc.html @@ -2246,11 +2246,13 @@

    2. - Set - transceiver.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}} - to the codecs that description - negotiates for receiving and which the user - agent is currently prepared to receive. + For each of the codecs that description negotiates for receiving, execute the following steps: +

        +
      1. Locate the matching codec description in transceiver.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}.
      2. +
      3. If the matching codec description is not found, abort these steps.
      4. +
      5. Set the "enabled" flag in the matching codec description to "true".
      6. +
      +

      If the direction is @@ -2299,13 +2301,15 @@

    3. - Set - transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}} - to the codecs that description - negotiates for sending and which the user - agent is currently capable of sending, - and set - transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastReturnedParameters]]}} + For each of the codecs that description negotiates for sending, execute the following steps: +

        +
      1. Locate the matching codec description in transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}}.
      2. +
      3. If the matching codec description is not found, abort these steps.
      4. +
      5. Set the "enabled" flag in the matching codec description to "true".
      6. +
      +
    4. +
    5. + Set transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastReturnedParameters]]}} to null.

    6. @@ -2573,11 +2577,12 @@

    7. - Set - transceiver.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}} - to the codecs that description - negotiates for receiving and which the user - agent is currently prepared to receive. + For each of the codecs that description negotiates for receiving, execute the following steps: +

        +
      1. Locate the matching codec description in transceiver.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}.
      2. +
      3. If the matching codec description is not found, abort these steps.
      4. +
      5. Set the "enabled" flag in the matching codec description to "true".
      6. +

    8. @@ -2590,11 +2595,12 @@

      1. - Set - transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}} - to the codecs that description - negotiates for sending and which the user - agent is currently capable of sending. + For each of the codecs that description negotiates for sending, execute the following steps: +

          +
        1. Locate the matching codec description in transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendCodecs]]}}.
        2. +
        3. If the matching codec description is not found, abort these steps.
        4. +
        5. Set the "enabled" flag in the matching codec description to "true".
        6. +

      2. @@ -3787,8 +3793,7 @@

        transceiver.{{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 transceiver's {{RTCRtpTransceiver/[[Sender]]}}'s {{RTCRtpSender/[[SendCodecs]]}} for which the "enabled" flag is "true". kind.

      3. @@ -3798,9 +3803,7 @@

        transceiver.{{RTCRtpTransceiver/direction}} is {{RTCRtpTransceiverDirection/"recvonly"}} or {{RTCRtpTransceiverDirection/"sendrecv"}}, - exclude any codecs not included in the - [=list of implemented receive codecs=] for - kind. + include all codecs in the transceiver's {{RTCRtpTransceiver/[[Receiver]]}}'s {{RTCRtpReceiver/[[ReceiveCodecs]]}} for which the "enabled" flag is "true".

      @@ -8851,8 +8854,10 @@

    9. Let sender have a [[\SendCodecs]] 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.

    10. @@ -8968,6 +8973,15 @@

      dictionaries representing the most optimistic view of the codecs the user agent supports for sending media of the given kind (video or audio).

      +

      + 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. +

      +

      The list of implemented header extensions for sending, given kind, is an [=implementation-defined=] list of @@ -9232,8 +9246,9 @@

    11. - {{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.
    12. {{RTCRtpParameters/rtcp}}.{{RTCRtcpParameters/cname}} is @@ -10182,7 +10197,7 @@

      To create an RTCRtpReceiver with a string, kind, run the following steps:

      -
        +
        1. Let receiver be a new {{RTCRtpReceiver}} object. @@ -10264,8 +10279,10 @@

        2. Let receiver have a [[\ReceiveCodecs]] - 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 + list of implemented receive codecs for kind, and with the "enabled" flag + set in an implementation defined manner.

        3. @@ -10379,6 +10396,14 @@

          the codecs the user agent supports for receiving media of the given kind (video or audio).

          +

          + 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. +

          The list of implemented header extensions for receiving, given kind, is an [=implementation-defined=] list of @@ -10427,6 +10452,7 @@

        4. {{RTCRtpParameters/codecs}} is set to the value of the + "enabled" codecs from the {{RTCRtpReceiver/[[ReceiveCodecs]]}} internal slot.