From 6e9855c36b30059b19a69c348e2fe9e7208b7a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Fri, 12 Jul 2024 18:36:30 +0200 Subject: [PATCH] webrtcsink: fix property types for rav1enc Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/572 Part-of: --- net/webrtc/src/webrtcsink/imp.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index 8bccc454..3dd0d5cc 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -788,10 +788,10 @@ fn configure_encoder(enc: &gst::Element, start_bitrate: u32) { enc.set_property_from_str("usage-profile", "realtime"); } "rav1enc" => { - enc.set_property("bitrate", start_bitrate); + enc.set_property("bitrate", start_bitrate as i32); enc.set_property("low-latency", true); - enc.set_property("max-key-frame-interval", 715827882); - enc.set_property("speed-preset", 10); + enc.set_property("max-key-frame-interval", 715827882u64); + enc.set_property("speed-preset", 10u32); } "vpuenc_h264" => { enc.set_property("bitrate", start_bitrate / 1000); @@ -1048,9 +1048,10 @@ impl VideoEncoder { self.element .set_property("bitrate", (bitrate / 1000) as u32); } - "nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" | "rav1enc" => { + "nvv4l2h264enc" | "nvv4l2vp8enc" | "nvv4l2vp9enc" => { self.element.set_property("bitrate", bitrate as u32) } + "rav1enc" => self.element.set_property("bitrate", bitrate), _ => return Err(WebRTCSinkError::BitrateNotSupported), }