Re: [webrtc-pc] setCodecPreferences, sendonly codecs and dummy codecs (#2937)

I am on Windows so the send codecs are as follows (14), with clockRate removed for brevity:
```
{mimeType: 'video/VP8'}
{mimeType: 'video/rtx'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f'}
{mimeType: 'video/AV1'}
{mimeType: 'video/VP9', sdpFmtpLine: 'profile-id=0'}
{mimeType: 'video/VP9', sdpFmtpLine: 'profile-id=2'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f'}
{mimeType: 'video/red'}
{mimeType: 'video/ulpfec'}
```
while receive codecs are as follows (21):
```
{mimeType: 'video/VP8'}
{mimeType: 'video/rtx'}
{mimeType: 'video/VP9', sdpFmtpLine: 'profile-id=0'}
{mimeType: 'video/VP9', sdpFmtpLine: 'profile-id=2'}
{mimeType: 'video/VP9', sdpFmtpLine: 'profile-id=1'}
{mimeType: 'video/VP9', sdpFmtpLine: 'profile-id=3'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=f4001f'}
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=f4001f'}
{mimeType: 'video/AV1'}
{mimeType: 'video/AV1', sdpFmtpLine: 'profile=1'} 
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f'} 
{mimeType: 'video/H264', sdpFmtpLine: 'level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=64001f'}
{mimeType: 'video/red'}
{mimeType: 'video/ulpfec'}
{mimeType: 'video/flexfec-03', sdpFmtpLine: 'repair-window=10000000'}
```

Prior to making sCP only look at recv codecs we would not have been able to set a few of those codecs (e.g. VP9 profile 1) using sCP. Nobody tried either ;-)
Note that we use an *exact* match in sCP (i.e. sdpFmtpLine *must* be the same) while SDP O/A is more codec-specific in the comparison, e.g. level-asymmetry-allowed from https://www.rfc-editor.org/rfc/rfc6184#section-8.1. This is ok since we *want* folks to use the input from getCapabilities and do not want them to hardcode.

I am still looking for a sendonly codec (and thought I had one but ... nope). But if you look at the differences you'll notice that so far we are just extending profiles (in their different spellings) of already supported codec families, some of which define rules for dealing with this kind of stuff.

-- 
GitHub Notification of comment by fippo
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2937#issuecomment-1941301767 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 13 February 2024 11:40:31 UTC