diff --git a/audio/audiofx/src/audioecho/mod.rs b/audio/audiofx/src/audioecho/mod.rs index cfc986e5..e6fe9508 100644 --- a/audio/audiofx/src/audioecho/mod.rs +++ b/audio/audiofx/src/audioecho/mod.rs @@ -16,9 +16,6 @@ glib::wrapper! { pub struct AudioEcho(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for AudioEcho {} -unsafe impl Sync for AudioEcho {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/audiofx/src/audioloudnorm/mod.rs b/audio/audiofx/src/audioloudnorm/mod.rs index 61000fcb..1e18750d 100644 --- a/audio/audiofx/src/audioloudnorm/mod.rs +++ b/audio/audiofx/src/audioloudnorm/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct AudioLoudNorm(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for AudioLoudNorm {} -unsafe impl Sync for AudioLoudNorm {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/audiofx/src/audiornnoise/mod.rs b/audio/audiofx/src/audiornnoise/mod.rs index 37423fd2..ec971e09 100644 --- a/audio/audiofx/src/audiornnoise/mod.rs +++ b/audio/audiofx/src/audiornnoise/mod.rs @@ -16,9 +16,6 @@ glib::wrapper! { pub struct AudioRNNoise(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for AudioRNNoise {} -unsafe impl Sync for AudioRNNoise {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/audiofx/src/ebur128level/mod.rs b/audio/audiofx/src/ebur128level/mod.rs index f3d67809..722789ba 100644 --- a/audio/audiofx/src/ebur128level/mod.rs +++ b/audio/audiofx/src/ebur128level/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct EbuR128Level(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for EbuR128Level {} -unsafe impl Sync for EbuR128Level {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/audiofx/src/hrtfrender/mod.rs b/audio/audiofx/src/hrtfrender/mod.rs index 6e9e0144..48f79535 100644 --- a/audio/audiofx/src/hrtfrender/mod.rs +++ b/audio/audiofx/src/hrtfrender/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct HrtfRender(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for HrtfRender {} -unsafe impl Sync for HrtfRender {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/claxon/src/claxondec/mod.rs b/audio/claxon/src/claxondec/mod.rs index 1b2a0ba7..4e345f0c 100644 --- a/audio/claxon/src/claxondec/mod.rs +++ b/audio/claxon/src/claxondec/mod.rs @@ -17,9 +17,6 @@ glib::wrapper! { pub struct ClaxonDec(ObjectSubclass) @extends gst_audio::AudioDecoder, gst::Element, gst::Object; } -unsafe impl Send for ClaxonDec {} -unsafe impl Sync for ClaxonDec {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/csound/src/filter/mod.rs b/audio/csound/src/filter/mod.rs index 095d3a59..271a21b6 100644 --- a/audio/csound/src/filter/mod.rs +++ b/audio/csound/src/filter/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct CsoundFilter(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for CsoundFilter {} -unsafe impl Sync for CsoundFilter {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/lewton/src/lewtondec/mod.rs b/audio/lewton/src/lewtondec/mod.rs index 319fc535..8db59b65 100644 --- a/audio/lewton/src/lewtondec/mod.rs +++ b/audio/lewton/src/lewtondec/mod.rs @@ -17,9 +17,6 @@ glib::wrapper! { pub struct LewtonDec(ObjectSubclass) @extends gst_audio::AudioDecoder, gst::Element, gst::Object; } -unsafe impl Send for LewtonDec {} -unsafe impl Sync for LewtonDec {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/audio/spotify/src/spotifyaudiosrc/mod.rs b/audio/spotify/src/spotifyaudiosrc/mod.rs index b046619b..cfed1572 100644 --- a/audio/spotify/src/spotifyaudiosrc/mod.rs +++ b/audio/spotify/src/spotifyaudiosrc/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct SpotifyAudioSrc(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 SpotifyAudioSrc {} -unsafe impl Sync for SpotifyAudioSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/file/src/filesink/mod.rs b/generic/file/src/filesink/mod.rs index 3df7c152..d814e2db 100644 --- a/generic/file/src/filesink/mod.rs +++ b/generic/file/src/filesink/mod.rs @@ -19,9 +19,6 @@ glib::wrapper! { pub struct FileSink(ObjectSubclass) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler; } -unsafe impl Send for FileSink {} -unsafe impl Sync for FileSink {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/file/src/filesrc/mod.rs b/generic/file/src/filesrc/mod.rs index 7ad38da5..97be7d59 100644 --- a/generic/file/src/filesrc/mod.rs +++ b/generic/file/src/filesrc/mod.rs @@ -18,9 +18,6 @@ glib::wrapper! { pub struct FileSrc(ObjectSubclass) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; } -unsafe impl Send for FileSrc {} -unsafe impl Sync for FileSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/fmp4/src/fmp4mux/mod.rs b/generic/fmp4/src/fmp4mux/mod.rs index 45bbc383..567195ff 100644 --- a/generic/fmp4/src/fmp4mux/mod.rs +++ b/generic/fmp4/src/fmp4mux/mod.rs @@ -16,30 +16,18 @@ glib::wrapper! { pub(crate) struct FMP4Mux(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for FMP4Mux {} -unsafe impl Sync for FMP4Mux {} - glib::wrapper! { pub(crate) struct ISOFMP4Mux(ObjectSubclass) @extends FMP4Mux, gst::Element, gst::Object; } -unsafe impl Send for ISOFMP4Mux {} -unsafe impl Sync for ISOFMP4Mux {} - glib::wrapper! { pub(crate) struct CMAFMux(ObjectSubclass) @extends FMP4Mux, gst::Element, gst::Object; } -unsafe impl Send for CMAFMux {} -unsafe impl Sync for CMAFMux {} - glib::wrapper! { pub(crate) struct DASHMP4Mux(ObjectSubclass) @extends FMP4Mux, gst::Element, gst::Object; } -unsafe impl Send for DASHMP4Mux {} -unsafe impl Sync for DASHMP4Mux {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/sodium/src/decrypter/mod.rs b/generic/sodium/src/decrypter/mod.rs index 3875815d..2ef8e22f 100644 --- a/generic/sodium/src/decrypter/mod.rs +++ b/generic/sodium/src/decrypter/mod.rs @@ -31,9 +31,6 @@ glib::wrapper! { pub struct Decrypter(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for Decrypter {} -unsafe impl Sync for Decrypter {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/sodium/src/encrypter/mod.rs b/generic/sodium/src/encrypter/mod.rs index 75a19cde..ef6722fc 100644 --- a/generic/sodium/src/encrypter/mod.rs +++ b/generic/sodium/src/encrypter/mod.rs @@ -31,9 +31,6 @@ glib::wrapper! { pub struct Encrypter(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for Encrypter {} -unsafe impl Sync for Encrypter {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/appsrc/mod.rs b/generic/threadshare/src/appsrc/mod.rs index 90f55d90..154c8b66 100644 --- a/generic/threadshare/src/appsrc/mod.rs +++ b/generic/threadshare/src/appsrc/mod.rs @@ -27,11 +27,6 @@ glib::wrapper! { pub struct AppSrc(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 AppSrc {} -unsafe impl Sync for AppSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/inputselector/mod.rs b/generic/threadshare/src/inputselector/mod.rs index 5b69afa0..e0c8ef71 100644 --- a/generic/threadshare/src/inputselector/mod.rs +++ b/generic/threadshare/src/inputselector/mod.rs @@ -26,11 +26,6 @@ glib::wrapper! { pub struct InputSelector(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 InputSelector {} -unsafe impl Sync for InputSelector {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/jitterbuffer/mod.rs b/generic/threadshare/src/jitterbuffer/mod.rs index 9c37b31f..4bf9f5d5 100644 --- a/generic/threadshare/src/jitterbuffer/mod.rs +++ b/generic/threadshare/src/jitterbuffer/mod.rs @@ -29,11 +29,6 @@ glib::wrapper! { pub struct JitterBuffer(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 JitterBuffer {} -unsafe impl Sync for JitterBuffer {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/proxy/mod.rs b/generic/threadshare/src/proxy/mod.rs index f1ee96ac..c03110cb 100644 --- a/generic/threadshare/src/proxy/mod.rs +++ b/generic/threadshare/src/proxy/mod.rs @@ -26,20 +26,10 @@ glib::wrapper! { pub struct ProxySink(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 ProxySink {} -unsafe impl Sync for ProxySink {} - glib::wrapper! { pub struct ProxySrc(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 ProxySrc {} -unsafe impl Sync for ProxySrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/queue/mod.rs b/generic/threadshare/src/queue/mod.rs index 1a5aba03..2d872c5b 100644 --- a/generic/threadshare/src/queue/mod.rs +++ b/generic/threadshare/src/queue/mod.rs @@ -26,11 +26,6 @@ glib::wrapper! { pub struct Queue(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 Queue {} -unsafe impl Sync for Queue {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/tcpclientsrc/mod.rs b/generic/threadshare/src/tcpclientsrc/mod.rs index d61ff3df..33669c24 100644 --- a/generic/threadshare/src/tcpclientsrc/mod.rs +++ b/generic/threadshare/src/tcpclientsrc/mod.rs @@ -27,11 +27,6 @@ glib::wrapper! { pub struct TcpClientSrc(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 TcpClientSrc {} -unsafe impl Sync for TcpClientSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/udpsink/mod.rs b/generic/threadshare/src/udpsink/mod.rs index 5ddba71a..8305a4ee 100644 --- a/generic/threadshare/src/udpsink/mod.rs +++ b/generic/threadshare/src/udpsink/mod.rs @@ -26,11 +26,6 @@ glib::wrapper! { pub struct UdpSink(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 UdpSink {} -unsafe impl Sync for UdpSink {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/src/udpsrc/mod.rs b/generic/threadshare/src/udpsrc/mod.rs index f482a19c..36fa865b 100644 --- a/generic/threadshare/src/udpsrc/mod.rs +++ b/generic/threadshare/src/udpsrc/mod.rs @@ -26,11 +26,6 @@ glib::wrapper! { pub struct UdpSrc(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 UdpSrc {} -unsafe impl Sync for UdpSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs index 52b6e6ba..15b1bc23 100644 --- a/generic/threadshare/tests/pad.rs +++ b/generic/threadshare/tests/pad.rs @@ -461,8 +461,6 @@ mod imp_src { glib::wrapper! { pub struct ElementSrcTest(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for ElementSrcTest {} -unsafe impl Sync for ElementSrcTest {} // Sink @@ -753,8 +751,6 @@ mod imp_sink { glib::wrapper! { pub struct ElementSinkTest(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for ElementSinkTest {} -unsafe impl Sync for ElementSinkTest {} fn setup( context_name: &str, diff --git a/net/hlssink3/src/lib.rs b/net/hlssink3/src/lib.rs index c30425f9..2d323b64 100644 --- a/net/hlssink3/src/lib.rs +++ b/net/hlssink3/src/lib.rs @@ -17,9 +17,6 @@ glib::wrapper! { pub struct HlsSink3(ObjectSubclass) @extends gst::Bin, gst::Element, gst::Object; } -unsafe impl Send for HlsSink3 {} -unsafe impl Sync for HlsSink3 {} - pub fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/net/reqwest/src/reqwesthttpsrc/mod.rs b/net/reqwest/src/reqwesthttpsrc/mod.rs index e2d5852d..1729b7d4 100644 --- a/net/reqwest/src/reqwesthttpsrc/mod.rs +++ b/net/reqwest/src/reqwesthttpsrc/mod.rs @@ -17,9 +17,6 @@ glib::wrapper! { pub struct ReqwestHttpSrc(ObjectSubclass) @extends gst_base::PushSrc, gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; } -unsafe impl Send for ReqwestHttpSrc {} -unsafe impl Sync for ReqwestHttpSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/net/rusoto/src/aws_transcribe_parse/imp.rs b/net/rusoto/src/aws_transcribe_parse/imp.rs index 572d344c..bf9d9517 100644 --- a/net/rusoto/src/aws_transcribe_parse/imp.rs +++ b/net/rusoto/src/aws_transcribe_parse/imp.rs @@ -35,8 +35,6 @@ impl Default for State { } } -unsafe impl Send for State {} - pub struct TranscribeParse { srcpad: gst::Pad, sinkpad: gst::Pad, diff --git a/net/rusoto/src/aws_transcribe_parse/mod.rs b/net/rusoto/src/aws_transcribe_parse/mod.rs index 2fbdb4c4..0191f2a0 100644 --- a/net/rusoto/src/aws_transcribe_parse/mod.rs +++ b/net/rusoto/src/aws_transcribe_parse/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct TranscribeParse(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for TranscribeParse {} -unsafe impl Sync for TranscribeParse {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/net/rusoto/src/aws_transcriber/mod.rs b/net/rusoto/src/aws_transcriber/mod.rs index 19de173e..02b50ba8 100644 --- a/net/rusoto/src/aws_transcriber/mod.rs +++ b/net/rusoto/src/aws_transcriber/mod.rs @@ -35,9 +35,6 @@ glib::wrapper! { pub struct Transcriber(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for Transcriber {} -unsafe impl Sync for Transcriber {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/net/rusoto/src/s3sink/mod.rs b/net/rusoto/src/s3sink/mod.rs index b767c6b9..9aa6be2d 100644 --- a/net/rusoto/src/s3sink/mod.rs +++ b/net/rusoto/src/s3sink/mod.rs @@ -30,9 +30,6 @@ glib::wrapper! { pub struct S3Sink(ObjectSubclass) @extends gst_base::BaseSink, gst::Element, gst::Object; } -unsafe impl Send for S3Sink {} -unsafe impl Sync for S3Sink {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/net/rusoto/src/s3src/mod.rs b/net/rusoto/src/s3src/mod.rs index 3c28209e..33a4b3be 100644 --- a/net/rusoto/src/s3src/mod.rs +++ b/net/rusoto/src/s3src/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct S3Src(ObjectSubclass) @extends gst_base::BaseSrc, gst::Element, gst::Object; } -unsafe impl Send for S3Src {} -unsafe impl Sync for S3Src {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/text/ahead/src/textahead/mod.rs b/text/ahead/src/textahead/mod.rs index 65b688d9..106111ad 100644 --- a/text/ahead/src/textahead/mod.rs +++ b/text/ahead/src/textahead/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct TextAhead(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 TextAhead {} -unsafe impl Sync for TextAhead {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/text/json/src/jsongstenc/mod.rs b/text/json/src/jsongstenc/mod.rs index 8aa98329..f469b432 100644 --- a/text/json/src/jsongstenc/mod.rs +++ b/text/json/src/jsongstenc/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct JsonGstEnc(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for JsonGstEnc {} -unsafe impl Sync for JsonGstEnc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/text/json/src/jsongstparse/mod.rs b/text/json/src/jsongstparse/mod.rs index 1be7a6ab..5a466f48 100644 --- a/text/json/src/jsongstparse/mod.rs +++ b/text/json/src/jsongstparse/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct JsonGstParse(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for JsonGstParse {} -unsafe impl Sync for JsonGstParse {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/text/regex/src/gstregex/mod.rs b/text/regex/src/gstregex/mod.rs index bf3f07e2..02b84cb6 100644 --- a/text/regex/src/gstregex/mod.rs +++ b/text/regex/src/gstregex/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct RegEx(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for RegEx {} -unsafe impl Sync for RegEx {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register(Some(plugin), "regex", gst::Rank::None, RegEx::static_type()) } diff --git a/text/wrap/src/gsttextwrap/mod.rs b/text/wrap/src/gsttextwrap/mod.rs index 4493d5ef..173c74a3 100644 --- a/text/wrap/src/gsttextwrap/mod.rs +++ b/text/wrap/src/gsttextwrap/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct TextWrap(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for TextWrap {} -unsafe impl Sync for TextWrap {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/tutorial/src/identity/mod.rs b/tutorial/src/identity/mod.rs index 67fbac19..19bfd861 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 a572125e..52efa9a3 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 3473f29c..345cc519 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 7f1887a2..a6dc81ee 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 fc997b76..a190e275 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 dcea6c8a..9f30a71f 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(). diff --git a/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs b/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs index 311b1518..439b6df7 100644 --- a/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs +++ b/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs @@ -14,11 +14,6 @@ glib::wrapper! { pub struct CustomSource(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 CustomSource {} -unsafe impl Sync for CustomSource {} - impl CustomSource { pub fn new(source: &gst::Element) -> CustomSource { glib::Object::new(&[("source", source)]).unwrap() diff --git a/utils/fallbackswitch/src/fallbacksrc/mod.rs b/utils/fallbackswitch/src/fallbacksrc/mod.rs index b639e7ad..514d7a37 100644 --- a/utils/fallbackswitch/src/fallbacksrc/mod.rs +++ b/utils/fallbackswitch/src/fallbacksrc/mod.rs @@ -38,11 +38,6 @@ glib::wrapper! { pub struct FallbackSrc(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 FallbackSrc {} -unsafe impl Sync for FallbackSrc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs b/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs index d3220760..0dad207c 100644 --- a/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs +++ b/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct VideoFallbackSource(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 VideoFallbackSource {} -unsafe impl Sync for VideoFallbackSource {} - impl VideoFallbackSource { pub fn new(uri: Option<&str>, min_latency: gst::ClockTime) -> VideoFallbackSource { glib::Object::new(&[("uri", &uri), ("min-latency", &min_latency.nseconds())]).unwrap() diff --git a/utils/fallbackswitch/src/fallbackswitch/mod.rs b/utils/fallbackswitch/src/fallbackswitch/mod.rs index c1a24728..21593bc4 100644 --- a/utils/fallbackswitch/src/fallbackswitch/mod.rs +++ b/utils/fallbackswitch/src/fallbackswitch/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct FallbackSwitch(ObjectSubclass) @extends gst_base::Aggregator, 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 FallbackSwitch {} -unsafe impl Sync for FallbackSwitch {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/utils/togglerecord/src/togglerecord/mod.rs b/utils/togglerecord/src/togglerecord/mod.rs index d742fef0..fcf9259b 100644 --- a/utils/togglerecord/src/togglerecord/mod.rs +++ b/utils/togglerecord/src/togglerecord/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct ToggleRecord(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 ToggleRecord {} -unsafe impl Sync for ToggleRecord {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/utils/uriplaylistbin/src/uriplaylistbin/mod.rs b/utils/uriplaylistbin/src/uriplaylistbin/mod.rs index a3fa7c16..00c0713a 100644 --- a/utils/uriplaylistbin/src/uriplaylistbin/mod.rs +++ b/utils/uriplaylistbin/src/uriplaylistbin/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct UriPlaylistBin(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 UriPlaylistBin {} -unsafe impl Sync for UriPlaylistBin {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/cdg/src/cdgdec/mod.rs b/video/cdg/src/cdgdec/mod.rs index 71d51993..0f824779 100644 --- a/video/cdg/src/cdgdec/mod.rs +++ b/video/cdg/src/cdgdec/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct CdgDec(ObjectSubclass) @extends gst_video::VideoDecoder, 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 CdgDec {} -unsafe impl Sync for CdgDec {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/cdg/src/cdgparse/mod.rs b/video/cdg/src/cdgparse/mod.rs index b5cb2618..ec2b1254 100644 --- a/video/cdg/src/cdgparse/mod.rs +++ b/video/cdg/src/cdgparse/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct CdgParse(ObjectSubclass) @extends gst_base::BaseParse, 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 CdgParse {} -unsafe impl Sync for CdgParse {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/ccdetect/mod.rs b/video/closedcaption/src/ccdetect/mod.rs index 0aa65d0d..c9fd1b74 100644 --- a/video/closedcaption/src/ccdetect/mod.rs +++ b/video/closedcaption/src/ccdetect/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct CCDetect(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 CCDetect {} -unsafe impl Sync for CCDetect {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index 430bc5d6..ead742e9 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -59,6 +59,11 @@ struct State { last_cc_pts: Option, } +// SAFETY: Required because `pango::Layout` is not `Send` but the whole `State` needs to be. +// We ensure that no additional references to the layout are ever created, which makes it safe +// to send it to other threads as long as only a single thread uses it concurrently. +unsafe impl Send for State {} + impl Default for State { fn default() -> Self { Self { @@ -74,8 +79,6 @@ impl Default for State { } } -unsafe impl Send for State {} - pub struct Cea608Overlay { srcpad: gst::Pad, sinkpad: gst::Pad, diff --git a/video/closedcaption/src/cea608overlay/mod.rs b/video/closedcaption/src/cea608overlay/mod.rs index bdc62cac..739830ad 100644 --- a/video/closedcaption/src/cea608overlay/mod.rs +++ b/video/closedcaption/src/cea608overlay/mod.rs @@ -21,11 +21,6 @@ glib::wrapper! { pub struct Cea608Overlay(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 Cea608Overlay {} -unsafe impl Sync for Cea608Overlay {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/cea608tojson/mod.rs b/video/closedcaption/src/cea608tojson/mod.rs index 02ffc768..b684d990 100644 --- a/video/closedcaption/src/cea608tojson/mod.rs +++ b/video/closedcaption/src/cea608tojson/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct Cea608ToJson(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 Cea608ToJson {} -unsafe impl Sync for Cea608ToJson {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/cea608tott/mod.rs b/video/closedcaption/src/cea608tott/mod.rs index 86f8b69d..905ffe1d 100644 --- a/video/closedcaption/src/cea608tott/mod.rs +++ b/video/closedcaption/src/cea608tott/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct Cea608ToTt(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 Cea608ToTt {} -unsafe impl Sync for Cea608ToTt {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/jsontovtt/mod.rs b/video/closedcaption/src/jsontovtt/mod.rs index 8e57133f..b75cf908 100644 --- a/video/closedcaption/src/jsontovtt/mod.rs +++ b/video/closedcaption/src/jsontovtt/mod.rs @@ -16,11 +16,6 @@ glib::wrapper! { pub struct JsonToVtt(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 JsonToVtt {} -unsafe impl Sync for JsonToVtt {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/mcc_enc/mod.rs b/video/closedcaption/src/mcc_enc/mod.rs index 978bed90..9ffa8249 100644 --- a/video/closedcaption/src/mcc_enc/mod.rs +++ b/video/closedcaption/src/mcc_enc/mod.rs @@ -16,11 +16,6 @@ glib::wrapper! { pub struct MccEnc(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 MccEnc {} -unsafe impl Sync for MccEnc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/mcc_parse/mod.rs b/video/closedcaption/src/mcc_parse/mod.rs index 15b9b4cf..73ba24ef 100644 --- a/video/closedcaption/src/mcc_parse/mod.rs +++ b/video/closedcaption/src/mcc_parse/mod.rs @@ -16,11 +16,6 @@ glib::wrapper! { pub struct MccParse(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 MccParse {} -unsafe impl Sync for MccParse {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/scc_enc/mod.rs b/video/closedcaption/src/scc_enc/mod.rs index 44527fc7..d7840656 100644 --- a/video/closedcaption/src/scc_enc/mod.rs +++ b/video/closedcaption/src/scc_enc/mod.rs @@ -16,11 +16,6 @@ glib::wrapper! { pub struct SccEnc(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 SccEnc {} -unsafe impl Sync for SccEnc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/scc_parse/mod.rs b/video/closedcaption/src/scc_parse/mod.rs index 6d6714ff..120ac5c7 100644 --- a/video/closedcaption/src/scc_parse/mod.rs +++ b/video/closedcaption/src/scc_parse/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct SccParse(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 SccParse {} -unsafe impl Sync for SccParse {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/transcriberbin/mod.rs b/video/closedcaption/src/transcriberbin/mod.rs index 8c7d194c..ef2f7d8d 100644 --- a/video/closedcaption/src/transcriberbin/mod.rs +++ b/video/closedcaption/src/transcriberbin/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct TranscriberBin(ObjectSubclass) @extends gst::Bin, gst::Element, gst::Object; } -unsafe impl Send for TranscriberBin {} -unsafe impl Sync for TranscriberBin {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/tttocea608/mod.rs b/video/closedcaption/src/tttocea608/mod.rs index 24279b01..e0a2ca55 100644 --- a/video/closedcaption/src/tttocea608/mod.rs +++ b/video/closedcaption/src/tttocea608/mod.rs @@ -15,11 +15,6 @@ glib::wrapper! { pub struct TtToCea608(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 TtToCea608 {} -unsafe impl Sync for TtToCea608 {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/closedcaption/src/tttojson/mod.rs b/video/closedcaption/src/tttojson/mod.rs index 60a2df9d..8ca1632c 100644 --- a/video/closedcaption/src/tttojson/mod.rs +++ b/video/closedcaption/src/tttojson/mod.rs @@ -15,9 +15,6 @@ glib::wrapper! { pub struct TtToJson(ObjectSubclass) @extends gst::Element, gst::Object; } -unsafe impl Send for TtToJson {} -unsafe impl Sync for TtToJson {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/dav1d/src/dav1ddec/mod.rs b/video/dav1d/src/dav1ddec/mod.rs index 83e11587..f714b023 100644 --- a/video/dav1d/src/dav1ddec/mod.rs +++ b/video/dav1d/src/dav1ddec/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct Dav1dDec(ObjectSubclass) @extends gst_video::VideoDecoder, 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 Dav1dDec {} -unsafe impl Sync for Dav1dDec {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/ffv1/src/ffv1dec/mod.rs b/video/ffv1/src/ffv1dec/mod.rs index dfbc2dd8..4a941b1d 100644 --- a/video/ffv1/src/ffv1dec/mod.rs +++ b/video/ffv1/src/ffv1dec/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct Ffv1Dec(ObjectSubclass) @extends gst_video::VideoDecoder, 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 Ffv1Dec {} -unsafe impl Sync for Ffv1Dec {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/flavors/src/flvdemux/mod.rs b/video/flavors/src/flvdemux/mod.rs index f0415bcc..9ee44eda 100644 --- a/video/flavors/src/flvdemux/mod.rs +++ b/video/flavors/src/flvdemux/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct FlvDemux(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 FlvDemux {} -unsafe impl Sync for FlvDemux {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/gif/src/gifenc/mod.rs b/video/gif/src/gifenc/mod.rs index 87ebc62c..3a5ed0ce 100644 --- a/video/gif/src/gifenc/mod.rs +++ b/video/gif/src/gifenc/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct GifEnc(ObjectSubclass) @extends gst_video::VideoEncoder, 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 GifEnc {} -unsafe impl Sync for GifEnc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/gtk4/src/sink/mod.rs b/video/gtk4/src/sink/mod.rs index 696579f7..0a35baa4 100644 --- a/video/gtk4/src/sink/mod.rs +++ b/video/gtk4/src/sink/mod.rs @@ -33,11 +33,6 @@ glib::wrapper! { @extends gst_video::VideoSink, gst_base::BaseSink, 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 PaintableSink {} -unsafe impl Sync for PaintableSink {} - impl PaintableSink { pub fn new(name: Option<&str>) -> Self { glib::Object::new(&[("name", &name)]).expect("Failed to create a GTK4Sink") diff --git a/video/hsv/src/hsvdetector/mod.rs b/video/hsv/src/hsvdetector/mod.rs index 66140707..cc1ff36d 100644 --- a/video/hsv/src/hsvdetector/mod.rs +++ b/video/hsv/src/hsvdetector/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct HsvDetector(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 HsvDetector {} -unsafe impl Sync for HsvDetector {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/hsv/src/hsvfilter/mod.rs b/video/hsv/src/hsvfilter/mod.rs index 95f83202..8f054cdb 100644 --- a/video/hsv/src/hsvfilter/mod.rs +++ b/video/hsv/src/hsvfilter/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct HsvFilter(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 HsvFilter {} -unsafe impl Sync for HsvFilter {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/rav1e/src/rav1enc/mod.rs b/video/rav1e/src/rav1enc/mod.rs index 09269cf7..26a16798 100644 --- a/video/rav1e/src/rav1enc/mod.rs +++ b/video/rav1e/src/rav1enc/mod.rs @@ -17,11 +17,6 @@ glib::wrapper! { pub struct Rav1Enc(ObjectSubclass) @extends gst_video::VideoEncoder, 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 Rav1Enc {} -unsafe impl Sync for Rav1Enc {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/rspng/src/pngenc/mod.rs b/video/rspng/src/pngenc/mod.rs index ca7c62a3..1934e51d 100644 --- a/video/rspng/src/pngenc/mod.rs +++ b/video/rspng/src/pngenc/mod.rs @@ -85,11 +85,6 @@ glib::wrapper! { pub struct PngEncoder(ObjectSubclass) @extends gst_video::VideoEncoder, 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 PngEncoder {} -unsafe impl Sync for PngEncoder {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/videofx/src/border/mod.rs b/video/videofx/src/border/mod.rs index 794af19f..6d612eda 100644 --- a/video/videofx/src/border/mod.rs +++ b/video/videofx/src/border/mod.rs @@ -16,9 +16,6 @@ glib::wrapper! { pub struct RoundedCorners(ObjectSubclass) @extends gst_base::BaseTransform, gst::Element, gst::Object; } -unsafe impl Send for RoundedCorners {} -unsafe impl Sync for RoundedCorners {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), diff --git a/video/webp/src/dec/mod.rs b/video/webp/src/dec/mod.rs index 823520f0..9bbd1830 100644 --- a/video/webp/src/dec/mod.rs +++ b/video/webp/src/dec/mod.rs @@ -19,11 +19,6 @@ glib::wrapper! { pub struct WebPDec(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 WebPDec {} -unsafe impl Sync for WebPDec {} - pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin),