Re: [webrtc-pc] If a preferred codec is filtered out, does it still get assigned a PT? (#2938)

@alvestrand The right thing would be to get rid of SDP and offer/answer and replace them with an API service that specifies which codecs should be sent and received from each transceiver. This is, obviously, a breaking change.

The issue with the offer/answer is when the offer is generated before the answer is received, the offerer should expect to receive any of the codecs listed in the sendrecv m= line. Once the answer is received, the offerer can discard all the codecs that are not included in the answer for the sendrecv line, which means using codecs not included in the answer is not allowed in either direction. If the codec is present in the answer sendrecv m= line, the sender can send it. It does not matter that the codec is not the first in the sequence. The sequence of codecs in the m= line is just a preference but not a hard requirement. Also, the answerer can add codecs in the answer, which was not present in the offer. The offerer can send media using this codec as well. Finally, the answerer can send using any of the codecs that were present in both the offer and answer and switch between them as it seems appropriate. The only way for the offerer to force a smaller set from the original set was to initiate another offer/answer.

So, what this comes down to is that an offer/answer negotiation can set up a list of common codecs (with a small caveat that the answerer can add unidirectional codecs that it can receive). You can add an additional API surface to force sending using a specific codec from the selected list. That API is not a codec preference. It would be a straight codec selection.

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


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

Received on Monday, 19 February 2024 23:12:55 UTC