gstreamer_base/auto/
base_sink.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::{
8    prelude::*,
9    signal::{connect_raw, SignalHandlerId},
10    translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15    #[doc(alias = "GstBaseSink")]
16    pub struct BaseSink(Object<ffi::GstBaseSink, ffi::GstBaseSinkClass>) @extends gst::Element, gst::Object;
17
18    match fn {
19        type_ => || ffi::gst_base_sink_get_type(),
20    }
21}
22
23impl BaseSink {
24    pub const NONE: Option<&'static BaseSink> = None;
25}
26
27unsafe impl Send for BaseSink {}
28unsafe impl Sync for BaseSink {}
29
30pub trait BaseSinkExt: IsA<BaseSink> + 'static {
31    //#[doc(alias = "gst_base_sink_do_preroll")]
32    //fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> Result<gst::FlowSuccess, gst::FlowError> {
33    //    unsafe { TODO: call ffi:gst_base_sink_do_preroll() }
34    //}
35
36    #[doc(alias = "gst_base_sink_get_blocksize")]
37    #[doc(alias = "get_blocksize")]
38    fn blocksize(&self) -> u32 {
39        unsafe { ffi::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0) }
40    }
41
42    #[doc(alias = "gst_base_sink_get_drop_out_of_segment")]
43    #[doc(alias = "get_drop_out_of_segment")]
44    fn drops_out_of_segment(&self) -> bool {
45        unsafe {
46            from_glib(ffi::gst_base_sink_get_drop_out_of_segment(
47                self.as_ref().to_glib_none().0,
48            ))
49        }
50    }
51
52    #[doc(alias = "gst_base_sink_get_last_sample")]
53    #[doc(alias = "get_last_sample")]
54    #[doc(alias = "last-sample")]
55    fn last_sample(&self) -> Option<gst::Sample> {
56        unsafe {
57            from_glib_full(ffi::gst_base_sink_get_last_sample(
58                self.as_ref().to_glib_none().0,
59            ))
60        }
61    }
62
63    #[doc(alias = "gst_base_sink_get_latency")]
64    #[doc(alias = "get_latency")]
65    fn latency(&self) -> gst::ClockTime {
66        unsafe {
67            try_from_glib(ffi::gst_base_sink_get_latency(
68                self.as_ref().to_glib_none().0,
69            ))
70            .expect("mandatory glib value is None")
71        }
72    }
73
74    #[doc(alias = "gst_base_sink_get_max_bitrate")]
75    #[doc(alias = "get_max_bitrate")]
76    #[doc(alias = "max-bitrate")]
77    fn max_bitrate(&self) -> u64 {
78        unsafe { ffi::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0) }
79    }
80
81    #[doc(alias = "gst_base_sink_get_max_lateness")]
82    #[doc(alias = "get_max_lateness")]
83    #[doc(alias = "max-lateness")]
84    fn max_lateness(&self) -> i64 {
85        unsafe { ffi::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0) }
86    }
87
88    #[cfg(feature = "v1_16")]
89    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
90    #[doc(alias = "gst_base_sink_get_processing_deadline")]
91    #[doc(alias = "get_processing_deadline")]
92    #[doc(alias = "processing-deadline")]
93    fn processing_deadline(&self) -> gst::ClockTime {
94        unsafe {
95            try_from_glib(ffi::gst_base_sink_get_processing_deadline(
96                self.as_ref().to_glib_none().0,
97            ))
98            .expect("mandatory glib value is None")
99        }
100    }
101
102    #[doc(alias = "gst_base_sink_get_render_delay")]
103    #[doc(alias = "get_render_delay")]
104    #[doc(alias = "render-delay")]
105    fn render_delay(&self) -> gst::ClockTime {
106        unsafe {
107            try_from_glib(ffi::gst_base_sink_get_render_delay(
108                self.as_ref().to_glib_none().0,
109            ))
110            .expect("mandatory glib value is None")
111        }
112    }
113
114    #[cfg(feature = "v1_18")]
115    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
116    #[doc(alias = "gst_base_sink_get_stats")]
117    #[doc(alias = "get_stats")]
118    fn stats(&self) -> gst::Structure {
119        unsafe { from_glib_full(ffi::gst_base_sink_get_stats(self.as_ref().to_glib_none().0)) }
120    }
121
122    #[doc(alias = "gst_base_sink_get_sync")]
123    #[doc(alias = "get_sync")]
124    #[doc(alias = "sync")]
125    fn is_sync(&self) -> bool {
126        unsafe { from_glib(ffi::gst_base_sink_get_sync(self.as_ref().to_glib_none().0)) }
127    }
128
129    #[doc(alias = "gst_base_sink_get_throttle_time")]
130    #[doc(alias = "get_throttle_time")]
131    #[doc(alias = "throttle-time")]
132    fn throttle_time(&self) -> u64 {
133        unsafe { ffi::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0) }
134    }
135
136    #[doc(alias = "gst_base_sink_get_ts_offset")]
137    #[doc(alias = "get_ts_offset")]
138    #[doc(alias = "ts-offset")]
139    fn ts_offset(&self) -> gst::ClockTimeDiff {
140        unsafe { ffi::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0) }
141    }
142
143    #[doc(alias = "gst_base_sink_set_blocksize")]
144    #[doc(alias = "blocksize")]
145    fn set_blocksize(&self, blocksize: u32) {
146        unsafe {
147            ffi::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
148        }
149    }
150
151    #[doc(alias = "gst_base_sink_set_drop_out_of_segment")]
152    fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) {
153        unsafe {
154            ffi::gst_base_sink_set_drop_out_of_segment(
155                self.as_ref().to_glib_none().0,
156                drop_out_of_segment.into_glib(),
157            );
158        }
159    }
160
161    #[doc(alias = "gst_base_sink_set_max_bitrate")]
162    #[doc(alias = "max-bitrate")]
163    fn set_max_bitrate(&self, max_bitrate: u64) {
164        unsafe {
165            ffi::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate);
166        }
167    }
168
169    #[doc(alias = "gst_base_sink_set_max_lateness")]
170    #[doc(alias = "max-lateness")]
171    fn set_max_lateness(&self, max_lateness: i64) {
172        unsafe {
173            ffi::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness);
174        }
175    }
176
177    #[cfg(feature = "v1_16")]
178    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
179    #[doc(alias = "gst_base_sink_set_processing_deadline")]
180    #[doc(alias = "processing-deadline")]
181    fn set_processing_deadline(&self, processing_deadline: gst::ClockTime) {
182        unsafe {
183            ffi::gst_base_sink_set_processing_deadline(
184                self.as_ref().to_glib_none().0,
185                processing_deadline.into_glib(),
186            );
187        }
188    }
189
190    #[doc(alias = "gst_base_sink_set_render_delay")]
191    #[doc(alias = "render-delay")]
192    fn set_render_delay(&self, delay: gst::ClockTime) {
193        unsafe {
194            ffi::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.into_glib());
195        }
196    }
197
198    #[doc(alias = "gst_base_sink_set_sync")]
199    #[doc(alias = "sync")]
200    fn set_sync(&self, sync: bool) {
201        unsafe {
202            ffi::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.into_glib());
203        }
204    }
205
206    #[doc(alias = "gst_base_sink_set_throttle_time")]
207    #[doc(alias = "throttle-time")]
208    fn set_throttle_time(&self, throttle: u64) {
209        unsafe {
210            ffi::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle);
211        }
212    }
213
214    #[doc(alias = "gst_base_sink_set_ts_offset")]
215    #[doc(alias = "ts-offset")]
216    fn set_ts_offset(&self, offset: gst::ClockTimeDiff) {
217        unsafe {
218            ffi::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset);
219        }
220    }
221
222    #[doc(alias = "gst_base_sink_wait")]
223    fn wait(
224        &self,
225        time: impl Into<Option<gst::ClockTime>>,
226    ) -> (Result<gst::FlowSuccess, gst::FlowError>, gst::ClockTimeDiff) {
227        unsafe {
228            let mut jitter = std::mem::MaybeUninit::uninit();
229            let ret = try_from_glib(ffi::gst_base_sink_wait(
230                self.as_ref().to_glib_none().0,
231                time.into().into_glib(),
232                jitter.as_mut_ptr(),
233            ));
234            (ret, jitter.assume_init())
235        }
236    }
237
238    #[doc(alias = "gst_base_sink_wait_clock")]
239    fn wait_clock(
240        &self,
241        time: gst::ClockTime,
242    ) -> (
243        Result<gst::ClockSuccess, gst::ClockError>,
244        gst::ClockTimeDiff,
245    ) {
246        unsafe {
247            let mut jitter = std::mem::MaybeUninit::uninit();
248            let ret = try_from_glib(ffi::gst_base_sink_wait_clock(
249                self.as_ref().to_glib_none().0,
250                time.into_glib(),
251                jitter.as_mut_ptr(),
252            ));
253            (ret, jitter.assume_init())
254        }
255    }
256
257    #[doc(alias = "gst_base_sink_wait_preroll")]
258    fn wait_preroll(&self) -> Result<gst::FlowSuccess, gst::FlowError> {
259        unsafe {
260            try_from_glib(ffi::gst_base_sink_wait_preroll(
261                self.as_ref().to_glib_none().0,
262            ))
263        }
264    }
265
266    #[doc(alias = "async")]
267    fn is_async(&self) -> bool {
268        ObjectExt::property(self.as_ref(), "async")
269    }
270
271    #[doc(alias = "async")]
272    fn set_async(&self, async_: bool) {
273        ObjectExt::set_property(self.as_ref(), "async", async_)
274    }
275
276    #[doc(alias = "enable-last-sample")]
277    fn enables_last_sample(&self) -> bool {
278        ObjectExt::property(self.as_ref(), "enable-last-sample")
279    }
280
281    #[doc(alias = "enable-last-sample")]
282    fn set_enable_last_sample(&self, enable_last_sample: bool) {
283        ObjectExt::set_property(self.as_ref(), "enable-last-sample", enable_last_sample)
284    }
285
286    fn is_qos(&self) -> bool {
287        ObjectExt::property(self.as_ref(), "qos")
288    }
289
290    fn set_qos(&self, qos: bool) {
291        ObjectExt::set_property(self.as_ref(), "qos", qos)
292    }
293
294    #[doc(alias = "async")]
295    fn connect_async_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
296        unsafe extern "C" fn notify_async_trampoline<
297            P: IsA<BaseSink>,
298            F: Fn(&P) + Send + Sync + 'static,
299        >(
300            this: *mut ffi::GstBaseSink,
301            _param_spec: glib::ffi::gpointer,
302            f: glib::ffi::gpointer,
303        ) {
304            let f: &F = &*(f as *const F);
305            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
306        }
307        unsafe {
308            let f: Box_<F> = Box_::new(f);
309            connect_raw(
310                self.as_ptr() as *mut _,
311                c"notify::async".as_ptr() as *const _,
312                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
313                    notify_async_trampoline::<Self, F> as *const (),
314                )),
315                Box_::into_raw(f),
316            )
317        }
318    }
319
320    #[doc(alias = "blocksize")]
321    fn connect_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(
322        &self,
323        f: F,
324    ) -> SignalHandlerId {
325        unsafe extern "C" fn notify_blocksize_trampoline<
326            P: IsA<BaseSink>,
327            F: Fn(&P) + Send + Sync + 'static,
328        >(
329            this: *mut ffi::GstBaseSink,
330            _param_spec: glib::ffi::gpointer,
331            f: glib::ffi::gpointer,
332        ) {
333            let f: &F = &*(f as *const F);
334            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
335        }
336        unsafe {
337            let f: Box_<F> = Box_::new(f);
338            connect_raw(
339                self.as_ptr() as *mut _,
340                c"notify::blocksize".as_ptr() as *const _,
341                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
342                    notify_blocksize_trampoline::<Self, F> as *const (),
343                )),
344                Box_::into_raw(f),
345            )
346        }
347    }
348
349    #[doc(alias = "enable-last-sample")]
350    fn connect_enable_last_sample_notify<F: Fn(&Self) + Send + Sync + 'static>(
351        &self,
352        f: F,
353    ) -> SignalHandlerId {
354        unsafe extern "C" fn notify_enable_last_sample_trampoline<
355            P: IsA<BaseSink>,
356            F: Fn(&P) + Send + Sync + 'static,
357        >(
358            this: *mut ffi::GstBaseSink,
359            _param_spec: glib::ffi::gpointer,
360            f: glib::ffi::gpointer,
361        ) {
362            let f: &F = &*(f as *const F);
363            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
364        }
365        unsafe {
366            let f: Box_<F> = Box_::new(f);
367            connect_raw(
368                self.as_ptr() as *mut _,
369                c"notify::enable-last-sample".as_ptr() as *const _,
370                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
371                    notify_enable_last_sample_trampoline::<Self, F> as *const (),
372                )),
373                Box_::into_raw(f),
374            )
375        }
376    }
377
378    #[doc(alias = "last-sample")]
379    fn connect_last_sample_notify<F: Fn(&Self) + Send + Sync + 'static>(
380        &self,
381        f: F,
382    ) -> SignalHandlerId {
383        unsafe extern "C" fn notify_last_sample_trampoline<
384            P: IsA<BaseSink>,
385            F: Fn(&P) + Send + Sync + 'static,
386        >(
387            this: *mut ffi::GstBaseSink,
388            _param_spec: glib::ffi::gpointer,
389            f: glib::ffi::gpointer,
390        ) {
391            let f: &F = &*(f as *const F);
392            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
393        }
394        unsafe {
395            let f: Box_<F> = Box_::new(f);
396            connect_raw(
397                self.as_ptr() as *mut _,
398                c"notify::last-sample".as_ptr() as *const _,
399                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
400                    notify_last_sample_trampoline::<Self, F> as *const (),
401                )),
402                Box_::into_raw(f),
403            )
404        }
405    }
406
407    #[doc(alias = "max-bitrate")]
408    fn connect_max_bitrate_notify<F: Fn(&Self) + Send + Sync + 'static>(
409        &self,
410        f: F,
411    ) -> SignalHandlerId {
412        unsafe extern "C" fn notify_max_bitrate_trampoline<
413            P: IsA<BaseSink>,
414            F: Fn(&P) + Send + Sync + 'static,
415        >(
416            this: *mut ffi::GstBaseSink,
417            _param_spec: glib::ffi::gpointer,
418            f: glib::ffi::gpointer,
419        ) {
420            let f: &F = &*(f as *const F);
421            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
422        }
423        unsafe {
424            let f: Box_<F> = Box_::new(f);
425            connect_raw(
426                self.as_ptr() as *mut _,
427                c"notify::max-bitrate".as_ptr() as *const _,
428                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
429                    notify_max_bitrate_trampoline::<Self, F> as *const (),
430                )),
431                Box_::into_raw(f),
432            )
433        }
434    }
435
436    #[doc(alias = "max-lateness")]
437    fn connect_max_lateness_notify<F: Fn(&Self) + Send + Sync + 'static>(
438        &self,
439        f: F,
440    ) -> SignalHandlerId {
441        unsafe extern "C" fn notify_max_lateness_trampoline<
442            P: IsA<BaseSink>,
443            F: Fn(&P) + Send + Sync + 'static,
444        >(
445            this: *mut ffi::GstBaseSink,
446            _param_spec: glib::ffi::gpointer,
447            f: glib::ffi::gpointer,
448        ) {
449            let f: &F = &*(f as *const F);
450            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
451        }
452        unsafe {
453            let f: Box_<F> = Box_::new(f);
454            connect_raw(
455                self.as_ptr() as *mut _,
456                c"notify::max-lateness".as_ptr() as *const _,
457                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
458                    notify_max_lateness_trampoline::<Self, F> as *const (),
459                )),
460                Box_::into_raw(f),
461            )
462        }
463    }
464
465    #[cfg(feature = "v1_16")]
466    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
467    #[doc(alias = "processing-deadline")]
468    fn connect_processing_deadline_notify<F: Fn(&Self) + Send + Sync + 'static>(
469        &self,
470        f: F,
471    ) -> SignalHandlerId {
472        unsafe extern "C" fn notify_processing_deadline_trampoline<
473            P: IsA<BaseSink>,
474            F: Fn(&P) + Send + Sync + 'static,
475        >(
476            this: *mut ffi::GstBaseSink,
477            _param_spec: glib::ffi::gpointer,
478            f: glib::ffi::gpointer,
479        ) {
480            let f: &F = &*(f as *const F);
481            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
482        }
483        unsafe {
484            let f: Box_<F> = Box_::new(f);
485            connect_raw(
486                self.as_ptr() as *mut _,
487                c"notify::processing-deadline".as_ptr() as *const _,
488                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
489                    notify_processing_deadline_trampoline::<Self, F> as *const (),
490                )),
491                Box_::into_raw(f),
492            )
493        }
494    }
495
496    #[doc(alias = "qos")]
497    fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
498        unsafe extern "C" fn notify_qos_trampoline<
499            P: IsA<BaseSink>,
500            F: Fn(&P) + Send + Sync + 'static,
501        >(
502            this: *mut ffi::GstBaseSink,
503            _param_spec: glib::ffi::gpointer,
504            f: glib::ffi::gpointer,
505        ) {
506            let f: &F = &*(f as *const F);
507            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
508        }
509        unsafe {
510            let f: Box_<F> = Box_::new(f);
511            connect_raw(
512                self.as_ptr() as *mut _,
513                c"notify::qos".as_ptr() as *const _,
514                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
515                    notify_qos_trampoline::<Self, F> as *const (),
516                )),
517                Box_::into_raw(f),
518            )
519        }
520    }
521
522    #[doc(alias = "render-delay")]
523    fn connect_render_delay_notify<F: Fn(&Self) + Send + Sync + 'static>(
524        &self,
525        f: F,
526    ) -> SignalHandlerId {
527        unsafe extern "C" fn notify_render_delay_trampoline<
528            P: IsA<BaseSink>,
529            F: Fn(&P) + Send + Sync + 'static,
530        >(
531            this: *mut ffi::GstBaseSink,
532            _param_spec: glib::ffi::gpointer,
533            f: glib::ffi::gpointer,
534        ) {
535            let f: &F = &*(f as *const F);
536            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
537        }
538        unsafe {
539            let f: Box_<F> = Box_::new(f);
540            connect_raw(
541                self.as_ptr() as *mut _,
542                c"notify::render-delay".as_ptr() as *const _,
543                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
544                    notify_render_delay_trampoline::<Self, F> as *const (),
545                )),
546                Box_::into_raw(f),
547            )
548        }
549    }
550
551    #[cfg(feature = "v1_18")]
552    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
553    #[doc(alias = "stats")]
554    fn connect_stats_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
555        unsafe extern "C" fn notify_stats_trampoline<
556            P: IsA<BaseSink>,
557            F: Fn(&P) + Send + Sync + 'static,
558        >(
559            this: *mut ffi::GstBaseSink,
560            _param_spec: glib::ffi::gpointer,
561            f: glib::ffi::gpointer,
562        ) {
563            let f: &F = &*(f as *const F);
564            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
565        }
566        unsafe {
567            let f: Box_<F> = Box_::new(f);
568            connect_raw(
569                self.as_ptr() as *mut _,
570                c"notify::stats".as_ptr() as *const _,
571                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
572                    notify_stats_trampoline::<Self, F> as *const (),
573                )),
574                Box_::into_raw(f),
575            )
576        }
577    }
578
579    #[doc(alias = "sync")]
580    fn connect_sync_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
581        unsafe extern "C" fn notify_sync_trampoline<
582            P: IsA<BaseSink>,
583            F: Fn(&P) + Send + Sync + 'static,
584        >(
585            this: *mut ffi::GstBaseSink,
586            _param_spec: glib::ffi::gpointer,
587            f: glib::ffi::gpointer,
588        ) {
589            let f: &F = &*(f as *const F);
590            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
591        }
592        unsafe {
593            let f: Box_<F> = Box_::new(f);
594            connect_raw(
595                self.as_ptr() as *mut _,
596                c"notify::sync".as_ptr() as *const _,
597                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
598                    notify_sync_trampoline::<Self, F> as *const (),
599                )),
600                Box_::into_raw(f),
601            )
602        }
603    }
604
605    #[doc(alias = "throttle-time")]
606    fn connect_throttle_time_notify<F: Fn(&Self) + Send + Sync + 'static>(
607        &self,
608        f: F,
609    ) -> SignalHandlerId {
610        unsafe extern "C" fn notify_throttle_time_trampoline<
611            P: IsA<BaseSink>,
612            F: Fn(&P) + Send + Sync + 'static,
613        >(
614            this: *mut ffi::GstBaseSink,
615            _param_spec: glib::ffi::gpointer,
616            f: glib::ffi::gpointer,
617        ) {
618            let f: &F = &*(f as *const F);
619            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
620        }
621        unsafe {
622            let f: Box_<F> = Box_::new(f);
623            connect_raw(
624                self.as_ptr() as *mut _,
625                c"notify::throttle-time".as_ptr() as *const _,
626                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
627                    notify_throttle_time_trampoline::<Self, F> as *const (),
628                )),
629                Box_::into_raw(f),
630            )
631        }
632    }
633
634    #[doc(alias = "ts-offset")]
635    fn connect_ts_offset_notify<F: Fn(&Self) + Send + Sync + 'static>(
636        &self,
637        f: F,
638    ) -> SignalHandlerId {
639        unsafe extern "C" fn notify_ts_offset_trampoline<
640            P: IsA<BaseSink>,
641            F: Fn(&P) + Send + Sync + 'static,
642        >(
643            this: *mut ffi::GstBaseSink,
644            _param_spec: glib::ffi::gpointer,
645            f: glib::ffi::gpointer,
646        ) {
647            let f: &F = &*(f as *const F);
648            f(BaseSink::from_glib_borrow(this).unsafe_cast_ref())
649        }
650        unsafe {
651            let f: Box_<F> = Box_::new(f);
652            connect_raw(
653                self.as_ptr() as *mut _,
654                c"notify::ts-offset".as_ptr() as *const _,
655                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
656                    notify_ts_offset_trampoline::<Self, F> as *const (),
657                )),
658                Box_::into_raw(f),
659            )
660        }
661    }
662}
663
664impl<O: IsA<BaseSink>> BaseSinkExt for O {}