Skip to content

Add remote track channelCount #3025

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion amendments.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ function removeComments(el) {

function markInsertion(el, controller) {
const wrapper = document.createElement("ins");
if (el.tagName === "DIV" || el.tagName === "SECTION" || el.tagName === "DT" || el.tagName === "DD" || el.tagName === "LI") {
if (el.tagName === "DIV" || el.tagName === "SECTION" || el.tagName === "DT" || el.tagName === "DD" || el.tagName === "LI" || el.tagName === "TR") {
// special casing the case where <div> is used to group <dt>/<dd>
if (el.tagName === "DIV" && el.parentNode.tagName === "DL") {
for (let child of el.children) {
wrapChildNodes(child, document.createElement("ins"));
}
el.children[0].prepend(controller);
} else if (el.tagName === "TR") {
for (let child of el.children) {
wrapChildNodes(child, document.createElement("ins"));
}
el.children[0].prepend(controller);

} else {
wrapChildNodes(el, wrapper);
el.prepend(controller);
Expand Down
17 changes: 17 additions & 0 deletions amendments.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,23 @@
]
}
],
"def-constraint-channelCount": [
{
"description": "Add channelCount to remote track settings",
"type": "addition",
"status": "candidate",
"difftype": "append",
"id": 53,
"pr": 3025,
"tests": [
"webrtc/RTCRtpEncodingParameters-codec-opus-stereo.https.html"
],
"testUpdates": [
"web-platform-tests/wpt#48599",
"web-platform-tests/wpt#49392"
]
}
],
"codec-match-without-level-id": [
{
"description": "Two codecs are considered the same even if level-id is not",
Expand Down
23 changes: 23 additions & 0 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -16732,6 +16732,29 @@ <h4>
double rounded to the tenth decimal place.
</td>
</tr>
<tr id="def-constraint-channelCount">
<th data-tests="RTCRtpEncodingParameters-codec-opus-stereo.https.html">
channelCount
</th>
<td>
{{ConstrainULong}}
</td>
<td>
As a setting, this is the number of {{RTCRtpCodec/channels}}
that the decoder produced when the last audio frame was
decoded. The number of channels that the decoder produces MUST
reflect the number of channels configured when the local SDP
was set. Before any frames have been decoded, this setting
MUST NOT [=map/exist=].
Comment on lines +16747 to +16748
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe the constrainable pattern allows absence. Is there a precedent in the spec for a setting to not exist and come into being later? I don't think we should allow that. I've filed #3045

Suggested change
was set. Before any frames have been decoded, this setting
MUST NOT [=map/exist=].
was set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a precedent in the spec for a setting to not exist and come into being later?

Yes this is how remote track settings already work in the video frames (width, height and frameRate) so I thought we should be consistent with audio frames.

<p class="note">
For example, the opus audio codec has a "stereo" flag. If
"stereo=0" was negotiated, the decoder produces one channel
regardless if the bitstream is mono or stereo, and if
"stereo=1" was negotiated, the decoder produces two channels
regardless if the bitstream is mono or stereo.
</p>
</td>
</tr>
</tbody>
</table>
<p class="no-test-needed">
Expand Down