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 @@
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 totrue
, [=map/remove=] encoding.{{RTCRtpEncodingParameters/codec}}.
true
.
true
.
true
.
true
.
true
.
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
.
+
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:
@@ -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
.
+ If both first.{{RTCRtpCodec/sdpFmtpLine}} and + second.{{RTCRtpCodec/sdpFmtpLine}} [=map/exist=], and are in key/value format, run the following + steps: +
++ 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. +
+
+ If firstMediaFormat is not equal to secondMediaFormat, return
+ false
.
+
+ 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.
+
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