net/ndi: fix build with --no-default-features
doc_show_default() is only available with gst/v1_18
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
@@ -109,6 +109,12 @@ impl ObjectSubclass for NdiSrc {
impl ObjectImpl for NdiSrc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
+ let receiver = glib::ParamSpecString::builder("receiver-ndi-name")
+ .nick("Receiver NDI Name")
+ .blurb("NDI stream name of this receiver");
+ #[cfg(feature = "doc")]
+ let receiver = receiver.doc_show_default();
+
vec![
glib::ParamSpecString::builder("ndi-name")
.nick("NDI Name")
@@ -118,11 +124,7 @@ impl ObjectImpl for NdiSrc {
.nick("URL/Address")
.blurb("URL/address and port of the sender, e.g. 127.0.0.1:5961")
.build(),
- glib::ParamSpecString::builder("receiver-ndi-name")
- .nick("Receiver NDI Name")
- .blurb("NDI stream name of this receiver")
- .doc_show_default()
- .build(),
+ receiver.build(),
glib::ParamSpecUInt::builder("connect-timeout")
.nick("Connect Timeout")
.blurb("Connection timeout in ms")
