From eae574df25977b8478c48152fb6d75241b283562 Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Mon, 9 Dec 2019 12:45:10 -0600 Subject: [PATCH] Rename the ServoSrc type to ServoGstSrc to avoid a name clash --- ports/gstplugin/lib.rs | 4 ++-- ports/gstplugin/servosrc.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/gstplugin/lib.rs b/ports/gstplugin/lib.rs index af8e384cd1c6..93cc0be3402f 100644 --- a/ports/gstplugin/lib.rs +++ b/ports/gstplugin/lib.rs @@ -4,7 +4,7 @@ use glib::subclass::types::ObjectSubclass; use gstreamer::gst_plugin_define; -use servosrc::ServoSrc; +use servosrc::ServoGstSrc; mod logging; mod resources; @@ -35,6 +35,6 @@ fn plugin_init(plugin: &gstreamer::Plugin) -> Result<(), glib::BoolError> { Some(plugin), "servosrc", gstreamer::Rank::None, - ServoSrc::get_type(), + ServoGstSrc::get_type(), ) } diff --git a/ports/gstplugin/servosrc.rs b/ports/gstplugin/servosrc.rs index 22aa907447f8..0e164928f45a 100644 --- a/ports/gstplugin/servosrc.rs +++ b/ports/gstplugin/servosrc.rs @@ -92,7 +92,7 @@ use std::rc::Rc; use std::sync::Mutex; use std::thread; -pub struct ServoSrc { +pub struct ServoGstSrc { sender: Sender, swap_chain: SwapChain, url: Mutex>, @@ -420,8 +420,8 @@ const CAPS: &str = "video/x-raw(memory:GLMemory), height=[1,2147483647], framerate=[0/1,2147483647/1]"; -impl ObjectSubclass for ServoSrc { - const NAME: &'static str = "ServoSrc"; +impl ObjectSubclass for ServoGstSrc { + const NAME: &'static str = "ServoGstSrc"; // gstreamer-gl doesn't have support for GLBaseSrc yet // https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/219 type ParentType = BaseSrc; @@ -464,7 +464,7 @@ impl ObjectSubclass for ServoSrc { glib_object_subclass!(); } -impl ObjectImpl for ServoSrc { +impl ObjectImpl for ServoGstSrc { glib_object_impl!(); fn constructed(&self, obj: &glib::Object) { @@ -499,12 +499,12 @@ impl ObjectImpl for ServoSrc { } } -impl ElementImpl for ServoSrc {} +impl ElementImpl for ServoGstSrc {} thread_local! { static GL: RefCell>> = RefCell::new(None); } -impl BaseSrcImpl for ServoSrc { +impl BaseSrcImpl for ServoGstSrc { fn set_caps(&self, src: &BaseSrc, outcaps: &Caps) -> Result<(), LoggableError> { // Save the video info for later use let info = VideoInfo::from_caps(outcaps)