Re: [webrtc-encoded-transform] Add description of an API for controlling SDP codec negotiation (#186)

> Codec preferences are decided separately for sender and receiver. The botched `setCodecPreferences` obfuscates that.

The fact that you may have misunderstood setCodecPreferences() is no excuse for calling it "botched".
setCodecPreferences controls ONLY the receiver's stated preferences, controlling ONLY the list of codecs in the m= line of the media section. Placing it on the transceiver is consistent with having functionality that only controls the SDP negotiation on the transceiver, not the sender or receiver.

> 
> > 2. Putting it on the `sender` and `receiver`.
> 
> Con: invites people to set codec and transform separately, which has no use case and invites complexity for no gain.
> 
> > 3. Adding a `direction` argument for the `transceiver` method.
> 
> Con: bad for the same reason we don't put it on pc and pass in transceiver and direction.

This is about SDP control, not sender or receiver control. See bullet 3 in "final steps to create an answer" for language where we already confront the same issue. https://w3c.github.io/webrtc-pc/#dfn-final-steps-to-create-an-answer

I have some sympathy for adding a "direction" argument to the PC-level helper, so that the codecs can be suitably handled in the "sendonly/sendrecv" filtering in "final steps to create an answer", but the transceiver-level functionality doesn't need it.

> 
> > The transceiver needs to know because of `setCodecPreferences` and the sender needs to know because of `setParameters`.
> 
> A transceiver can see properties on its sender and receiver, so I see no technical _"need"_ here.

Separation of concerns dictates that we keep parameters that are chiefly concerned with the SDP on the transceiver level. That's why "setCodecPreferences" is on transceiver level.



-- 
GitHub Notification of comment by alvestrand
Please view or discuss this issue at https://github.com/w3c/webrtc-encoded-transform/pull/186#issuecomment-1818658226 using your GitHub account


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

Received on Monday, 20 November 2023 09:41:32 UTC