diff --git a/amendments.json b/amendments.json index 72b6fb300..20eb82f26 100644 --- a/amendments.json +++ b/amendments.json @@ -1242,5 +1242,16 @@ "web-platform-tests/wpt#48361" ] } + ], + "codec-match-without-level-id": [ + { + "description": "Two codecs are considered the same even if level-id is not", + "type": "correction", + "status": "candidate", + "difftype": "modify", + "id": 52, + "pr": 3023, + "testUpdates": "not-testable" + } ] } diff --git a/base-rec.html b/base-rec.html index 39ff43116..813c12a68 100644 --- a/base-rec.html +++ b/base-rec.html @@ -11174,6 +11174,7 @@

+
Note

If set, the offerer's codec preferences will decide the order of the codecs in the offer. If the answerer does not have any diff --git a/webrtc.html b/webrtc.html index afe7c7ea6..454459378 100644 --- a/webrtc.html +++ b/webrtc.html @@ -2818,9 +2818,9 @@

  • For each encoding in transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}}, - if encoding.{{RTCRtpEncodingParameters/codec}} does not - [= codec dictionary match | match =] any entry in codecs, - [=map/remove=] encoding[{{RTCRtpEncodingParameters/codec}}].

    + if encoding.{{RTCRtpEncodingParameters/codec}} does not match any entry in + codecs, using the [= codec dictionary match =] algorithm with ignoreLevels + set to true, [=map/remove=] encoding.{{RTCRtpEncodingParameters/codec}}.

  • @@ -3748,7 +3748,9 @@

    or {{RTCRtpTransceiverDirection/"sendrecv"}}, exclude any codecs not included in the [=RTCRtpSender/list of implemented send codecs=] for - kind. + kind, using the [= codec dictionary match =] + algorithm with ignoreLevels set to + true.

  • @@ -3759,7 +3761,9 @@

    or {{RTCRtpTransceiverDirection/"sendrecv"}}, exclude any codecs not included in the [=list of implemented receive codecs=] for - kind. + kind, using the [= codec dictionary match =] + algorithm with ignoreLevels set to + true.

  • @@ -4031,7 +4035,9 @@

    or {{RTCRtpTransceiverDirection/"sendrecv"}}, exclude any codecs not included in the [=RTCRtpSender/list of implemented send codecs=] for - kind. + kind, using the [= codec dictionary match =] + algorithm with ignoreLevels set to + true.

  • @@ -4042,7 +4048,9 @@

    or {{RTCRtpTransceiverDirection/"sendrecv"}}, exclude any codecs not included in the [=list of implemented receive codecs=] for - kind. + kind, using the [= codec dictionary match =] + algorithm with ignoreLevels set to + true.

  • @@ -9086,7 +9094,8 @@

  • Any encoding in encodings [=map/exists|contains=] a codec - [= codec dictionary match | not found =] in choosableCodecs. + not found in choosableCodecs, using the [= codec dictionary match =] + algorithm with ignoreLevels set to true.
  • @@ -9791,8 +9800,16 @@

    codec of type RTCRtpCodec
    -

    Optional value selecting which codec is used for this encoding's - RTP stream. If absent, the user agent can chose to use any negotiated codec.

    +

    + Optional value selecting which codec is used for this encoding's + RTP stream. If absent, the user agent can chose to use any negotiated codec. +

    +

    + When {{codec}} is set and {{RTCRtpSender/[[SendCodecs]]}} have been negotiated, + the user agent SHOULD use the first {{RTCRtpSender/[[SendCodecs]]}} matching + {{codec}} for sending, according to the [= codec dictionary match =] algorithm + with ignoreLevels set to true. +

    @@ -11466,10 +11483,13 @@

    -

    The codec dictionary match algorithm - given two {{RTCRtpCodec}} dictionaries - first and second is as follows: +

    + The codec dictionary match algorithm given two + {{RTCRtpCodec}} dictionaries first and second, and + an ignoreLevels boolean defaulting to false if not + specified, is as follows:

    +
    1. @@ -11497,18 +11517,56 @@

      If either (but not both) of first.{{RTCRtpCodec/sdpFmtpLine}} and second.{{RTCRtpCodec/sdpFmtpLine}} are [= map/exist | missing =], - or if they both [=map/exist=] and first.{{RTCRtpCodec/sdpFmtpLine}} - is different from second.{{RTCRtpCodec/sdpFmtpLine}}, return - false. + return false.

    2. +
    3. +

      + If both first.{{RTCRtpCodec/sdpFmtpLine}} and + second.{{RTCRtpCodec/sdpFmtpLine}} [=map/exist=], and are in key/value format, run the following + steps: +

      +
        +
      1. +

        + Let firstMediaFormat be a key-value map of the media formats constructed + from first.{{RTCRtpCodec/sdpFmtpLine}} and secondMediaFormat + be a key-value map of the media formats constructed from + second.{{RTCRtpCodec/sdpFmtpLine}}. +

        +

        + Which FMTP parameters make up the media format is codec specific. In some cases + a parameter can be omitted and still be inferred, in which case it is also a part + of the media format of that codec. +

        +
      2. +
      3. +

        + If firstMediaFormat is not equal to secondMediaFormat, return + false. +

        +
      4. +
      5. +
        +

        + If ignoreLevels is false and the highest complying bitstream + levels inferred from first.{{RTCRtpCodec/sdpFmtpLine}} and + second.{{RTCRtpCodec/sdpFmtpLine}} are different, return false. +

        +

        + Even if ignoreLevels is true, some codecs (such as H.264) include + levels in the media format, so that the level cannot be ignored in this algorithm. +

        +
        +
      6. +
      +
    4. Return true.

    -

    If set, the offerer's receive codec preferences will decide the order of the codecs in the offer. If the answerer does not have any