-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow level-id to be different in codec match #3023
Open
henbos
wants to merge
16
commits into
w3c:main
Choose a base branch
from
henbos:241121_LevelId
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c757b5f
Allow level-id to be different in codec match
henbos 2473be4
grammar
henbos 68f15e1
Update amendments
henbos d137450
Not testable?
henbos 0aea1b3
Trial and error
henbos 7197ba0
..
henbos 5fb5525
Order and default
henbos a81bd7e
Rewording and grammar fix
henbos 46142bd
nit
henbos 3636bc6
Significant rework of PR
henbos adc8a46
...
henbos 38b106c
Merge branch 'main' into 241121_LevelId
henbos 0cc5068
Update wording
henbos d0e97ad
Update webrtc.html
henbos 6e82ed5
Merge branch 'main' into 241121_LevelId
henbos dc885bc
Update filter steps
henbos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
henbos marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2818,9 +2818,9 @@ <h4> | |
<li> | ||
<p>For each <var>encoding</var> in | ||
<var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}}, | ||
if <var>encoding</var>.{{RTCRtpEncodingParameters/codec}} does not | ||
[= codec dictionary match | match =] any entry in <var>codecs</var>, | ||
[=map/remove=] <var>encoding</var>[{{RTCRtpEncodingParameters/codec}}].</p> | ||
if <var>encoding</var>.{{RTCRtpEncodingParameters/codec}} does not match any entry in | ||
<var>codecs</var>, using the [= codec dictionary match =] algorithm with <var>ignoreLevels</var> | ||
set to <code>true</code>, [=map/remove=] <var>encoding</var>.{{RTCRtpEncodingParameters/codec}}.</p> | ||
</li> | ||
</ol> | ||
</li> | ||
|
@@ -9084,7 +9084,8 @@ <h2> | |
</li> | ||
<li id="setparameters-codec-validation-4"> | ||
Any <var>encoding</var> in encodings [=map/exists|contains=] a codec | ||
[= codec dictionary match | not found =] in <var>choosableCodecs</var>. | ||
not found in <var>choosableCodecs</var>, using the [= codec dictionary match =] | ||
algorithm with <var>ignoreLevels</var> set to <code>true</code>. | ||
</li> | ||
</ul> | ||
</li> | ||
|
@@ -9789,8 +9790,16 @@ <h2> | |
<dfn data-idl>codec</dfn> of type <span class="idlMemberType">RTCRtpCodec</span> | ||
</dt> | ||
<dd> | ||
<p>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.</p> | ||
<p> | ||
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. | ||
</p> | ||
<p> | ||
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 <var>ignoreLevels</var> set to <code>true</code>. | ||
</p> | ||
</dd> | ||
</div> | ||
<div> | ||
|
@@ -11439,10 +11448,13 @@ <h2> | |
</ol> | ||
</div> | ||
<div id="codecmatch-algorithm"> | ||
<p> The <dfn class="export">codec dictionary match</dfn> algorithm | ||
given two {{RTCRtpCodec}} dictionaries | ||
<var>first</var> and <var>second</var> is as follows: | ||
<p> | ||
The <dfn class="export">codec dictionary match</dfn> algorithm given two | ||
{{RTCRtpCodec}} dictionaries <var>first</var> and <var>second</var>, and | ||
an <var>ignoreLevels</var> boolean defaulting to <code>false</code> if not | ||
henbos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
specified, is as follows: | ||
</p> | ||
</div> | ||
<ol class=algorithm> | ||
<li> | ||
<p> | ||
|
@@ -11470,18 +11482,57 @@ <h2> | |
<p> | ||
If either (but not both) of <var>first</var>.{{RTCRtpCodec/sdpFmtpLine}} | ||
and <var>second</var>.{{RTCRtpCodec/sdpFmtpLine}} are [= map/exist | missing =], | ||
or if they both [=map/exist=] and <var>first</var>.{{RTCRtpCodec/sdpFmtpLine}} | ||
is different from <var>second</var>.{{RTCRtpCodec/sdpFmtpLine}}, return | ||
<code>false</code>. | ||
return <code>false</code>. | ||
aboba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
If both <var>first</var>.{{RTCRtpCodec/sdpFmtpLine}} and | ||
<var>second</var>.{{RTCRtpCodec/sdpFmtpLine}} [=map/exist=], run the following | ||
henbos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
</p> | ||
<ol> | ||
<li> | ||
<p> | ||
Let <var>firstMediaFormat</var> be a key-value map of the media formats constructed | ||
from <var>first</var>.{{RTCRtpCodec/sdpFmtpLine}} and <var>secondMediaFormat</var> | ||
be a key-value map of the media formats constructed from | ||
<var>second</var>.{{RTCRtpCodec/sdpFmtpLine}}. | ||
</p> | ||
<p class="note"> | ||
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. | ||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
If <var>firstMediaFormat</var> is not equal to <var>secondMediaFormat</var>, return | ||
<code>false</code>. | ||
</p> | ||
</li> | ||
<li> | ||
<div id="codec-match-without-level-id"> | ||
<p> | ||
If <var>ignoreLevels</var> is <code>false</code> and the highest complying bitstream | ||
levels inferred from <var>first</var>.{{RTCRtpCodec/sdpFmtpLine}} and | ||
<var>second</var>.{{RTCRtpCodec/sdpFmtpLine}} are different, return <code>false</code>. | ||
</p> | ||
<p class="note"> | ||
Even if <var>ignoreLevels</var> is <code>true</code>, some codecs (such as H.264) have | ||
bistream levels that are not distinct from their media formats and as such cannot be | ||
henbos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ignored in this algorithm. | ||
</p> | ||
</div> | ||
</li> | ||
</ol> | ||
</li> | ||
<li> | ||
<p> | ||
Return <code>true</code>. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If one of the inputs is garbage the old algorithm returned false. Doesn't this risk returning true if the line is not parseable? |
||
</p> | ||
</li> | ||
</ol> | ||
</div> | ||
<p class="note"> | ||
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 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remote SDP is testable.