custom-signaller: add missing manual-sdp-munging property

All signallers must now implement this property

Fixes #611

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1854>
This commit is contained in:
Chris Bainbridge 2024-10-16 15:42:39 +02:00 committed by Mathieu Duponchelle
parent 5f0ca7acde
commit 785209cc7f

View file

@ -1,9 +1,12 @@
use gst::glib; use gst::glib;
use gst::prelude::*;
use gst::subclass::prelude::*; use gst::subclass::prelude::*;
use gst_webrtc::WebRTCSessionDescription; use gst_webrtc::WebRTCSessionDescription;
use gstrswebrtc::signaller::{Signallable, SignallableImpl}; use gstrswebrtc::signaller::{Signallable, SignallableImpl};
use once_cell::sync::Lazy;
#[derive(Default)] #[derive(Default)]
pub struct Signaller {} pub struct Signaller {}
@ -45,4 +48,23 @@ impl ObjectSubclass for Signaller {
type Interfaces = (Signallable,); type Interfaces = (Signallable,);
} }
impl ObjectImpl for Signaller {} impl ObjectImpl for Signaller {
fn properties() -> &'static [glib::ParamSpec] {
static PROPS: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecBoolean::builder("manual-sdp-munging")
.nick("Manual SDP munging")
.blurb("Whether the signaller manages SDP munging itself")
.default_value(false)
.read_only()
.build()]
});
PROPS.as_ref()
}
fn property(&self, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
match pspec.name() {
"manual-sdp-munging" => false.to_value(),
_ => unimplemented!(),
}
}
}