diff --git a/Cargo.toml b/Cargo.toml index 44b5b993..4da1e160 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ gobject-sys = "0.9" gstreamer = { version = "0.14.3", features = ["subclassing", "v1_12"] } gstreamer-base = { version = "0.14.0", features = ["subclassing"] } gstreamer-audio = "0.14.0" -gstreamer-video = "0.14.3" +gstreamer-video = { version = "0.14.3", features = ["v1_12"] } gstreamer-sys = "0.8" lazy_static = "1.1.0" byte-slice-cast = "0.2.0" diff --git a/src/lib.rs b/src/lib.rs index 596496eb..6c75e3bb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,18 +45,20 @@ fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { lazy_static! { static ref DEFAULT_RECEIVER_NDI_NAME: String = { - format!("GStreamer NDI Source {}-{}", env!("CARGO_PKG_VERSION"), env!("COMMIT_ID")) + format!( + "GStreamer NDI Source {}-{}", + env!("CARGO_PKG_VERSION"), + env!("COMMIT_ID") + ) }; +} - #[cfg(feature = "reference-timestamps")] - static ref TIMECODE_CAPS: gst::Caps = { - gst::Caps::new_simple("timestamp/x-ndi-timecode", &[]) - }; - - #[cfg(feature = "reference-timestamps")] - static ref TIMESTAMP_CAPS: gst::Caps = { - gst::Caps::new_simple("timestamp/x-ndi-timestamp", &[]) - }; +#[cfg(feature = "reference-timestamps")] +lazy_static! { + static ref TIMECODE_CAPS: gst::Caps = + { gst::Caps::new_simple("timestamp/x-ndi-timecode", &[]) }; + static ref TIMESTAMP_CAPS: gst::Caps = + { gst::Caps::new_simple("timestamp/x-ndi-timestamp", &[]) }; } impl glib::translate::ToGlib for TimestampMode { diff --git a/src/receiver.rs b/src/receiver.rs index 375c18d0..8f23f7fa 100644 --- a/src/receiver.rs +++ b/src/receiver.rs @@ -1316,7 +1316,7 @@ impl Receiver { return Err(gst::FlowError::NotNegotiated); } - let builder = gst_video::VideoInfo::new( + let mut builder = gst_video::VideoInfo::new( format, video_frame.xres() as u32, video_frame.yres() as u32,