From b38f6cc731b1b4bcec1e19f7e5b9767d1804d343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 28 Feb 2022 18:32:36 +0200 Subject: Remove now unnecessary `Send+Sync` impls for element/etc subclasses This is now automatically implemented. --- tutorial/src/identity/mod.rs | 5 ----- tutorial/src/progressbin/mod.rs | 5 ----- tutorial/src/rgb2gray/mod.rs | 5 ----- tutorial/src/sinesrc/mod.rs | 5 ----- tutorial/tutorial-1.md | 8 -------- tutorial/tutorial-2.md | 5 ----- 6 files changed, 33 deletions(-) (limited to 'tutorial') diff --git a/tutorial/src/identity/mod.rs b/tutorial/src/identity/mod.rs index 67fbac191..19bfd861e 100644 --- a/tutorial/src/identity/mod.rs +++ b/tutorial/src/identity/mod.rs @@ -18,11 +18,6 @@ glib::wrapper! { pub struct Identity(ObjectSubclass) @extends gst::Element, gst::Object; } -// GStreamer elements need to be thread-safe. For the private implementation this is automatically -// enforced but for the public wrapper type we need to specify this manually. -unsafe impl Send for Identity {} -unsafe impl Sync for Identity {} - // Registers the type for our element, and then registers in GStreamer under // the name "rsidentity" for being able to instantiate it via e.g. // gst::ElementFactory::make(). diff --git a/tutorial/src/progressbin/mod.rs b/tutorial/src/progressbin/mod.rs index a572125ed..52efa9a33 100644 --- a/tutorial/src/progressbin/mod.rs +++ b/tutorial/src/progressbin/mod.rs @@ -37,11 +37,6 @@ glib::wrapper! { pub struct ProgressBin(ObjectSubclass) @extends gst::Bin, gst::Element, gst::Object; } -// GStreamer elements need to be thread-safe. For the private implementation this is automatically -// enforced but for the public wrapper type we need to specify this manually. -unsafe impl Send for ProgressBin {} -unsafe impl Sync for ProgressBin {} - // Registers the type for our element, and then registers in GStreamer under // the name "rsprogressbin" for being able to instantiate it via e.g. // gst::ElementFactory::make(). diff --git a/tutorial/src/rgb2gray/mod.rs b/tutorial/src/rgb2gray/mod.rs index 3473f29c6..345cc5196 100644 --- a/tutorial/src/rgb2gray/mod.rs +++ b/tutorial/src/rgb2gray/mod.rs @@ -18,11 +18,6 @@ glib::wrapper! { pub struct Rgb2Gray(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -// GStreamer elements need to be thread-safe. For the private implementation this is automatically -// enforced but for the public wrapper type we need to specify this manually. -unsafe impl Send for Rgb2Gray {} -unsafe impl Sync for Rgb2Gray {} - // Registers the type for our element, and then registers in GStreamer under // the name "rsrgb2gray" for being able to instantiate it via e.g. // gst::ElementFactory::make(). diff --git a/tutorial/src/sinesrc/mod.rs b/tutorial/src/sinesrc/mod.rs index 7f1887a24..a6dc81eeb 100644 --- a/tutorial/src/sinesrc/mod.rs +++ b/tutorial/src/sinesrc/mod.rs @@ -18,11 +18,6 @@ glib::wrapper! { pub struct SineSrc(ObjectSubclass) @extends gst_base::BaseSrc, gst::Element, gst::Object; } -// GStreamer elements need to be thread-safe. For the private implementation this is automatically -// enforced but for the public wrapper type we need to specify this manually. -unsafe impl Send for SineSrc {} -unsafe impl Sync for SineSrc {} - // Registers the type for our element, and then registers in GStreamer under // the name "sinesrc" for being able to instantiate it via e.g. // gst::ElementFactory::make(). diff --git a/tutorial/tutorial-1.md b/tutorial/tutorial-1.md index fc997b766..a190e275f 100644 --- a/tutorial/tutorial-1.md +++ b/tutorial/tutorial-1.md @@ -190,11 +190,6 @@ glib::wrapper! { pub struct Rgb2Gray(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -// GStreamer elements need to be thread-safe. For the private implementation this is automatically -// enforced but for the public wrapper type we need to specify this manually. -unsafe impl Send for Rgb2Gray {} -unsafe impl Sync for Rgb2Gray {} - // Registers the type for our element, and then registers in GStreamer under // the name "rsrgb2gray" for being able to instantiate it via e.g. // gst::ElementFactory::make(). @@ -296,9 +291,6 @@ glib::wrapper! { pub struct Rgb2Gray(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for Rgb2Gray {} -unsafe impl Sync for Rgb2Gray {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/tutorial/tutorial-2.md b/tutorial/tutorial-2.md index dcea6c8a2..9f30a71f8 100644 --- a/tutorial/tutorial-2.md +++ b/tutorial/tutorial-2.md @@ -371,11 +371,6 @@ glib::wrapper! { pub struct SineSrc(ObjectSubclass) @extends gst_base::BaseSrc, gst::Element, gst::Object; } -// GStreamer elements need to be thread-safe. For the private implementation this is automatically -// enforced but for the public wrapper type we need to specify this manually. -unsafe impl Send for SineSrc {} -unsafe impl Sync for SineSrc {} - // Registers the type for our element, and then registers in GStreamer under // the name "rssinesrc" for being able to instantiate it via e.g. // gst::ElementFactory::make(). -- cgit v1.2.3