Re: [webrtc-pc] Confusion over duplicates in setCodecPreferences? Why allow them? (#2955)

In my mind, the following needs to hold regardless of domain details:
1. the match algorithm needs to distinguish all entries returned from `RTCRtpReceiver.getCapabilities()`
2. IOW it by definition contains no "duplicates"
3. The following must be valid/succeed
  ```js
  videoTransceiver.setCodecPreferences(RTCRtpReceiver.getCapabilities("video"));
  audioTransceiver.setCodecPreferences(RTCRtpReceiver.getCapabilities("audio"));
  ```

Those seem to be the APIs the match algorithm are in service of.

A quick [dump](https://jsfiddle.net/jib1/5v9zb03t/9/) of getCapabilities() reveal:
```js
  {
    "clockRate": 90000,
    "mimeType": "video/H264",
    "sdpFmtpLine": "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f"
  },
  {
    "clockRate": 90000,
    "mimeType": "video/H264",
    "sdpFmtpLine": "level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f"
  },
```
This suggests they are distinct codecs to me. Does that match your understanding?

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


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

Received on Wednesday, 17 April 2024 00:22:06 UTC