Remove now unnecessary Send+Sync impls for element/etc subclasses

This is now automatically implemented.
This commit is contained in:
Sebastian Dröge 2022-02-28 18:32:36 +02:00
parent d9f3e8e9e7
commit b38f6cc731
73 changed files with 5 additions and 323 deletions

View file

@ -16,9 +16,6 @@ glib::wrapper! {
pub struct AudioEcho(ObjectSubclass<imp::AudioEcho>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct AudioLoudNorm(ObjectSubclass<imp::AudioLoudNorm>) @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),

View file

@ -16,9 +16,6 @@ glib::wrapper! {
pub struct AudioRNNoise(ObjectSubclass<imp::AudioRNNoise>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct EbuR128Level(ObjectSubclass<imp::EbuR128Level>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct HrtfRender(ObjectSubclass<imp::HrtfRender>) @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),

View file

@ -17,9 +17,6 @@ glib::wrapper! {
pub struct ClaxonDec(ObjectSubclass<imp::ClaxonDec>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct CsoundFilter(ObjectSubclass<imp::CsoundFilter>) @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),

View file

@ -17,9 +17,6 @@ glib::wrapper! {
pub struct LewtonDec(ObjectSubclass<imp::LewtonDec>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct SpotifyAudioSrc(ObjectSubclass<imp::SpotifyAudioSrc>) @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),

View file

@ -19,9 +19,6 @@ glib::wrapper! {
pub struct FileSink(ObjectSubclass<imp::FileSink>) @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),

View file

@ -18,9 +18,6 @@ glib::wrapper! {
pub struct FileSrc(ObjectSubclass<imp::FileSrc>) @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),

View file

@ -16,30 +16,18 @@ glib::wrapper! {
pub(crate) struct FMP4Mux(ObjectSubclass<imp::FMP4Mux>) @extends gst::Element, gst::Object;
}
unsafe impl Send for FMP4Mux {}
unsafe impl Sync for FMP4Mux {}
glib::wrapper! {
pub(crate) struct ISOFMP4Mux(ObjectSubclass<imp::ISOFMP4Mux>) @extends FMP4Mux, gst::Element, gst::Object;
}
unsafe impl Send for ISOFMP4Mux {}
unsafe impl Sync for ISOFMP4Mux {}
glib::wrapper! {
pub(crate) struct CMAFMux(ObjectSubclass<imp::CMAFMux>) @extends FMP4Mux, gst::Element, gst::Object;
}
unsafe impl Send for CMAFMux {}
unsafe impl Sync for CMAFMux {}
glib::wrapper! {
pub(crate) struct DASHMP4Mux(ObjectSubclass<imp::DASHMP4Mux>) @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),

View file

@ -31,9 +31,6 @@ glib::wrapper! {
pub struct Decrypter(ObjectSubclass<imp::Decrypter>) @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),

View file

@ -31,9 +31,6 @@ glib::wrapper! {
pub struct Encrypter(ObjectSubclass<imp::Encrypter>) @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),

View file

@ -27,11 +27,6 @@ glib::wrapper! {
pub struct AppSrc(ObjectSubclass<imp::AppSrc>) @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),

View file

@ -26,11 +26,6 @@ glib::wrapper! {
pub struct InputSelector(ObjectSubclass<imp::InputSelector>) @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),

View file

@ -29,11 +29,6 @@ glib::wrapper! {
pub struct JitterBuffer(ObjectSubclass<imp::JitterBuffer>) @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),

View file

@ -26,20 +26,10 @@ glib::wrapper! {
pub struct ProxySink(ObjectSubclass<imp::ProxySink>) @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<imp::ProxySrc>) @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),

View file

@ -26,11 +26,6 @@ glib::wrapper! {
pub struct Queue(ObjectSubclass<imp::Queue>) @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),

View file

@ -27,11 +27,6 @@ glib::wrapper! {
pub struct TcpClientSrc(ObjectSubclass<imp::TcpClientSrc>) @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),

View file

@ -26,11 +26,6 @@ glib::wrapper! {
pub struct UdpSink(ObjectSubclass<imp::UdpSink>) @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),

View file

@ -26,11 +26,6 @@ glib::wrapper! {
pub struct UdpSrc(ObjectSubclass<imp::UdpSrc>) @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),

View file

@ -461,8 +461,6 @@ mod imp_src {
glib::wrapper! {
pub struct ElementSrcTest(ObjectSubclass<imp_src::ElementSrcTest>) @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<imp_sink::ElementSinkTest>) @extends gst::Element, gst::Object;
}
unsafe impl Send for ElementSinkTest {}
unsafe impl Sync for ElementSinkTest {}
fn setup(
context_name: &str,

View file

@ -17,9 +17,6 @@ glib::wrapper! {
pub struct HlsSink3(ObjectSubclass<imp::HlsSink3>) @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),

View file

@ -17,9 +17,6 @@ glib::wrapper! {
pub struct ReqwestHttpSrc(ObjectSubclass<imp::ReqwestHttpSrc>) @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),

View file

@ -35,8 +35,6 @@ impl Default for State {
}
}
unsafe impl Send for State {}
pub struct TranscribeParse {
srcpad: gst::Pad,
sinkpad: gst::Pad,

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct TranscribeParse(ObjectSubclass<imp::TranscribeParse>) @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),

View file

@ -35,9 +35,6 @@ glib::wrapper! {
pub struct Transcriber(ObjectSubclass<imp::Transcriber>) @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),

View file

@ -30,9 +30,6 @@ glib::wrapper! {
pub struct S3Sink(ObjectSubclass<imp::S3Sink>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct S3Src(ObjectSubclass<imp::S3Src>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct TextAhead(ObjectSubclass<imp::TextAhead>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct JsonGstEnc(ObjectSubclass<imp::JsonGstEnc>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct JsonGstParse(ObjectSubclass<imp::JsonGstParse>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct RegEx(ObjectSubclass<imp::RegEx>) @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())
}

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct TextWrap(ObjectSubclass<imp::TextWrap>) @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),

View file

@ -18,11 +18,6 @@ glib::wrapper! {
pub struct Identity(ObjectSubclass<imp::Identity>) @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().

View file

@ -37,11 +37,6 @@ glib::wrapper! {
pub struct ProgressBin(ObjectSubclass<imp::ProgressBin>) @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().

View file

@ -18,11 +18,6 @@ glib::wrapper! {
pub struct Rgb2Gray(ObjectSubclass<imp::Rgb2Gray>) @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().

View file

@ -18,11 +18,6 @@ glib::wrapper! {
pub struct SineSrc(ObjectSubclass<imp::SineSrc>) @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().

View file

@ -190,11 +190,6 @@ glib::wrapper! {
pub struct Rgb2Gray(ObjectSubclass<imp::Rgb2Gray>) @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<imp::Rgb2Gray>) @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),

View file

@ -371,11 +371,6 @@ glib::wrapper! {
pub struct SineSrc(ObjectSubclass<imp::SineSrc>) @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().

View file

@ -14,11 +14,6 @@ glib::wrapper! {
pub struct CustomSource(ObjectSubclass<imp::CustomSource>) @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()

View file

@ -38,11 +38,6 @@ glib::wrapper! {
pub struct FallbackSrc(ObjectSubclass<imp::FallbackSrc>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct VideoFallbackSource(ObjectSubclass<imp::VideoFallbackSource>) @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()

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct FallbackSwitch(ObjectSubclass<imp::FallbackSwitch>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct ToggleRecord(ObjectSubclass<imp::ToggleRecord>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct UriPlaylistBin(ObjectSubclass<imp::UriPlaylistBin>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct CdgDec(ObjectSubclass<imp::CdgDec>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct CdgParse(ObjectSubclass<imp::CdgParse>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct CCDetect(ObjectSubclass<imp::CCDetect>) @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),

View file

@ -59,6 +59,11 @@ struct State {
last_cc_pts: Option<gst::ClockTime>,
}
// 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,

View file

@ -21,11 +21,6 @@ glib::wrapper! {
pub struct Cea608Overlay(ObjectSubclass<imp::Cea608Overlay>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct Cea608ToJson(ObjectSubclass<imp::Cea608ToJson>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct Cea608ToTt(ObjectSubclass<imp::Cea608ToTt>) @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),

View file

@ -16,11 +16,6 @@ glib::wrapper! {
pub struct JsonToVtt(ObjectSubclass<imp::JsonToVtt>) @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),

View file

@ -16,11 +16,6 @@ glib::wrapper! {
pub struct MccEnc(ObjectSubclass<imp::MccEnc>) @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),

View file

@ -16,11 +16,6 @@ glib::wrapper! {
pub struct MccParse(ObjectSubclass<imp::MccParse>) @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),

View file

@ -16,11 +16,6 @@ glib::wrapper! {
pub struct SccEnc(ObjectSubclass<imp::SccEnc>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct SccParse(ObjectSubclass<imp::SccParse>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct TranscriberBin(ObjectSubclass<imp::TranscriberBin>) @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),

View file

@ -15,11 +15,6 @@ glib::wrapper! {
pub struct TtToCea608(ObjectSubclass<imp::TtToCea608>) @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),

View file

@ -15,9 +15,6 @@ glib::wrapper! {
pub struct TtToJson(ObjectSubclass<imp::TtToJson>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct Dav1dDec(ObjectSubclass<imp::Dav1dDec>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct Ffv1Dec(ObjectSubclass<imp::Ffv1Dec>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct FlvDemux(ObjectSubclass<imp::FlvDemux>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct GifEnc(ObjectSubclass<imp::GifEnc>) @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),

View file

@ -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")

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct HsvDetector(ObjectSubclass<imp::HsvDetector>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct HsvFilter(ObjectSubclass<imp::HsvFilter>) @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),

View file

@ -17,11 +17,6 @@ glib::wrapper! {
pub struct Rav1Enc(ObjectSubclass<imp::Rav1Enc>) @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),

View file

@ -85,11 +85,6 @@ glib::wrapper! {
pub struct PngEncoder(ObjectSubclass<imp::PngEncoder>) @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),

View file

@ -16,9 +16,6 @@ glib::wrapper! {
pub struct RoundedCorners(ObjectSubclass<roundedcorners::RoundedCorners>) @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),

View file

@ -19,11 +19,6 @@ glib::wrapper! {
pub struct WebPDec(ObjectSubclass<imp::WebPDec>) @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),