webrtcsink: Set VP8/VP9 payloader based on payloader element factory name

Instead of checking the encoder's name. There are more VP8/VP9 encoders
than the ones from the vpx plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1272>
This commit is contained in:
Sebastian Dröge 2023-07-10 19:45:17 +03:00
parent 1bb06d775c
commit 957a28f239

View file

@ -582,8 +582,11 @@ impl Codec {
.property("mtu", 1200_u32)
.property("pt", pt);
if ["vp8enc", "vp9enc"].contains(&self.encoder_name().unwrap().as_str()) {
res = res.property_from_str("picture-id-mode", "15-bit");
match info.payloader.name().as_str() {
"rtpvp8pay" | "rtpvp9pay" => {
res = res.property_from_str("picture-id-mode", "15-bit");
}
_ => (),
}
res.build().unwrap()