webrtcsink: fix RFC7273 attributes

RFC7273 related attributes are set in the SDP offer by passing them via the
transceiver `codec-preferences` signal. These attributes are intended to be set
at the media level so they must be prefixed by `a-` in the `Caps` argument to
the signal. Otherwise they end up under `a=fmtp`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1810>
This commit is contained in:
François Laignel 2024-09-24 23:36:22 +02:00 committed by GStreamer Marge Bot
parent b5586095bc
commit f532d523b2

View file

@ -2167,13 +2167,13 @@ impl BaseWebRTCSink {
}; };
if let Some(ts_refclk) = ts_refclk.as_deref() { if let Some(ts_refclk) = ts_refclk.as_deref() {
payloader_caps_mut.set("ts-refclk", Some(ts_refclk)); payloader_caps_mut.set("a-ts-refclk", Some(ts_refclk));
// Set the offset to 0, we will adjust the payloader offsets // Set the offset to 0, we will adjust the payloader offsets
// when the payloaders are available. // when the payloaders are available.
payloader_caps_mut.set("mediaclk", Some("direct=0")); payloader_caps_mut.set("a-mediaclk", Some("direct=0"));
} else { } else {
payloader_caps_mut.set("ts-refclk", Some("local")); payloader_caps_mut.set("a-ts-refclk", Some("local"));
payloader_caps_mut.set("mediaclk", Some("sender")); payloader_caps_mut.set("a-mediaclk", Some("sender"));
} }
} }