From 61ea355dc617eef9c86470b19018e2979f9d1a65 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Wed, 17 Apr 2024 11:59:15 -0400 Subject: [PATCH 1/3] Rename to "codec dictionary match" algorithm and remove index consistency claim --- webrtc.html | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/webrtc.html b/webrtc.html index cc1ffeb64..a9ee1ad0c 100644 --- a/webrtc.html +++ b/webrtc.html @@ -11299,7 +11299,7 @@

{{setCodecPreferences}} will reject attempts to set codecs - [= codec match | not matching =] codecs found in + [= codec dictionary match | not matching =] codecs found in {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind), where kind is the kind of the {{RTCRtpTransceiver}} on which the method is called. @@ -11329,11 +11329,9 @@

  • - Remove any duplicate values in codecs. Start - at the back of the list such that the priority of the - codecs is maintained; the index of the first occurrence - of a codec within the list is the same before and after - this step. + Remove any [= codec dictionary match | duplicate =] values in + codecs. Start at the back of the list such + that the order of the codecs is maintained.

  • @@ -11341,16 +11339,6 @@

    Let kind be the transceiver's [=RTCRtpTransceiver/transceiver kind=].

  • -
  • -

    - If the intersection between codecs and - {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind).{{RTCRtpParameters/codecs}} - only contains RTX, RED, FEC codecs or Comfort Noise codecs or is an empty set, - throw {{InvalidModificationError}}. This ensures that we - always have something to offer, regardless of - transceiver.{{RTCRtpTransceiver/direction}}. -

    -
  • Let codecCapabilities be @@ -11363,12 +11351,21 @@

    1. -

      If codec does [= codec match | not match any codec =] +

      If codec does [= codec dictionary match | not match any codec =] in codecCapabilities, throw {{InvalidModificationError}}.

  • +
  • +

    + If codecs only contains RTX, RED, FEC codecs + or Comfort Noise codecs or is an empty set, + throw {{InvalidModificationError}}. This ensures that we + always have something to offer, regardless of + transceiver.{{RTCRtpTransceiver/direction}}. +

    +
  • Set transceiver.{{RTCRtpTransceiver/[[PreferredCodecs]]}} to @@ -11378,7 +11375,8 @@

    -

    The codec match algorithm given two {{RTCRtpCodec}} +

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

      From 116fe19670235f4905c96c4e3305ca6a92d4cb95 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Wed, 17 Apr 2024 16:02:23 -0400 Subject: [PATCH 2/3] exclude link argument from codec match link itself --- webrtc.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc.html b/webrtc.html index a9ee1ad0c..33dbf3468 100644 --- a/webrtc.html +++ b/webrtc.html @@ -11351,7 +11351,7 @@

      1. -

        If codec does [= codec dictionary match | not match any codec =] +

        If codec does [= codec dictionary match | not match =] any codec in codecCapabilities, throw {{InvalidModificationError}}.

      2. From 1fde195b23e6b4a63084c4072bd84316ac022fa4 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Wed, 17 Apr 2024 16:06:07 -0400 Subject: [PATCH 3/3] avoid calling RTX, RED, FEC and Comfort Noise codecs. --- webrtc.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc.html b/webrtc.html index 33dbf3468..03e1997b7 100644 --- a/webrtc.html +++ b/webrtc.html @@ -11359,8 +11359,8 @@

      3. - If codecs only contains RTX, RED, FEC codecs - or Comfort Noise codecs or is an empty set, + If codecs only contains entries for RTX, RED, FEC + or Comfort Noise or is an empty set, throw {{InvalidModificationError}}. This ensures that we always have something to offer, regardless of transceiver.{{RTCRtpTransceiver/direction}}.