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/1286>
This commit is contained in:
Sebastian Dröge 2023-07-10 19:54:30 +03:00
parent 83a2c52f32
commit adb113a591

View file

@ -567,8 +567,8 @@ fn setup_encoding(
gst::Caps::builder("audio/x-raw").build()
};
match codec.encoder.name().as_str() {
"vp8enc" | "vp9enc" => {
match codec.payloader.name().as_str() {
"rtpvp8pay" | "rtpvp9pay" => {
pay.set_property_from_str("picture-id-mode", "15-bit");
}
_ => (),