From 4616f0a4a46abbe88a9d827f084c419dbb12bfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Tue, 11 Oct 2022 22:39:37 +0200 Subject: [PATCH] ts/standalone: move current sink under task_sink --- .../threadshare/examples/standalone/main.rs | 2 +- .../examples/standalone/sink/mod.rs | 18 +----------------- .../examples/standalone/sink/{ => task}/imp.rs | 0 .../examples/standalone/sink/task/mod.rs | 17 +++++++++++++++++ 4 files changed, 19 insertions(+), 18 deletions(-) rename generic/threadshare/examples/standalone/sink/{ => task}/imp.rs (100%) create mode 100644 generic/threadshare/examples/standalone/sink/task/mod.rs diff --git a/generic/threadshare/examples/standalone/main.rs b/generic/threadshare/examples/standalone/main.rs index a033ef5a..28064331 100644 --- a/generic/threadshare/examples/standalone/main.rs +++ b/generic/threadshare/examples/standalone/main.rs @@ -14,7 +14,7 @@ static CAT: Lazy = Lazy::new(|| { fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { src::register(plugin)?; - sink::register(plugin)?; + sink::task::register(plugin)?; Ok(()) } diff --git a/generic/threadshare/examples/standalone/sink/mod.rs b/generic/threadshare/examples/standalone/sink/mod.rs index 6b8ce952..cdafe4ad 100644 --- a/generic/threadshare/examples/standalone/sink/mod.rs +++ b/generic/threadshare/examples/standalone/sink/mod.rs @@ -1,17 +1 @@ -use gst::glib; -use gst::prelude::*; - -mod imp; - -glib::wrapper! { - pub struct TestSink(ObjectSubclass) @extends gst::Element, gst::Object; -} - -pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { - gst::Element::register( - Some(plugin), - "ts-standalone-test-sink", - gst::Rank::None, - TestSink::static_type(), - ) -} +pub mod task; diff --git a/generic/threadshare/examples/standalone/sink/imp.rs b/generic/threadshare/examples/standalone/sink/task/imp.rs similarity index 100% rename from generic/threadshare/examples/standalone/sink/imp.rs rename to generic/threadshare/examples/standalone/sink/task/imp.rs diff --git a/generic/threadshare/examples/standalone/sink/task/mod.rs b/generic/threadshare/examples/standalone/sink/task/mod.rs new file mode 100644 index 00000000..6b8ce952 --- /dev/null +++ b/generic/threadshare/examples/standalone/sink/task/mod.rs @@ -0,0 +1,17 @@ +use gst::glib; +use gst::prelude::*; + +mod imp; + +glib::wrapper! { + pub struct TestSink(ObjectSubclass) @extends gst::Element, gst::Object; +} + +pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { + gst::Element::register( + Some(plugin), + "ts-standalone-test-sink", + gst::Rank::None, + TestSink::static_type(), + ) +}