gstreamer_base/auto/
aggregator.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;
7#[cfg(feature = "v1_18")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
9use crate::{AggregatorPad, AggregatorStartTimeSelection};
10use glib::{
11    prelude::*,
12    signal::{connect_raw, SignalHandlerId},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    /// Manages a set of pads with the purpose of aggregating their buffers.
19    /// Control is given to the subclass when all pads have data.
20    ///
21    ///  * Base class for mixers and muxers. Subclasses should at least implement
22    ///  the `GstAggregatorClass::aggregate` virtual method.
23    ///
24    ///  * Installs a `GstPadChainFunction`, a `GstPadEventFullFunction` and a
25    ///  `GstPadQueryFunction` to queue all serialized data packets per sink pad.
26    ///  Subclasses should not overwrite those, but instead implement
27    ///  `GstAggregatorClass::sink_event` and `GstAggregatorClass::sink_query` as
28    ///  needed.
29    ///
30    ///  * When data is queued on all pads, the aggregate vmethod is called.
31    ///
32    ///  * One can peek at the data on any given GstAggregatorPad with the
33    ///  [`AggregatorPadExt::peek_buffer()`][crate::prelude::AggregatorPadExt::peek_buffer()] method, and remove it from the pad
34    ///  with the gst_aggregator_pad_pop_buffer () method. When a buffer
35    ///  has been taken with pop_buffer (), a new buffer can be queued
36    ///  on that pad.
37    ///
38    ///  * When [`AggregatorPadExt::peek_buffer()`][crate::prelude::AggregatorPadExt::peek_buffer()] or [`AggregatorPadExt::has_buffer()`][crate::prelude::AggregatorPadExt::has_buffer()]
39    ///  are called, a reference is taken to the returned buffer, which stays
40    ///  valid until either:
41    ///
42    ///  - [`AggregatorPadExt::pop_buffer()`][crate::prelude::AggregatorPadExt::pop_buffer()] is called, in which case the caller
43    ///  is guaranteed that the buffer they receive is the same as the peeked
44    ///  buffer.
45    ///  - [`AggregatorPadExt::drop_buffer()`][crate::prelude::AggregatorPadExt::drop_buffer()] is called, in which case the caller
46    ///  is guaranteed that the dropped buffer is the one that was peeked.
47    ///  - the subclass implementation of `GstAggregatorClass.aggregate` returns.
48    ///
49    ///  Subsequent calls to [`AggregatorPadExt::peek_buffer()`][crate::prelude::AggregatorPadExt::peek_buffer()] or
50    ///  [`AggregatorPadExt::has_buffer()`][crate::prelude::AggregatorPadExt::has_buffer()] return / check the same buffer that was
51    ///  returned / checked, until one of the conditions listed above is met.
52    ///
53    ///  Subclasses are only allowed to call these methods from the aggregate
54    ///  thread.
55    ///
56    ///  * If the subclass wishes to push a buffer downstream in its aggregate
57    ///  implementation, it should do so through the
58    ///  [`AggregatorExt::finish_buffer()`][crate::prelude::AggregatorExt::finish_buffer()] method. This method will take care
59    ///  of sending and ordering mandatory events such as stream start, caps
60    ///  and segment. Buffer lists can also be pushed out with
61    ///  [`AggregatorExt::finish_buffer_list()`][crate::prelude::AggregatorExt::finish_buffer_list()].
62    ///
63    ///  * Same goes for EOS events, which should not be pushed directly by the
64    ///  subclass, it should instead return GST_FLOW_EOS in its aggregate
65    ///  implementation.
66    ///
67    ///  * Note that the aggregator logic regarding gap event handling is to turn
68    ///  these into gap buffers with matching PTS and duration. It will also
69    ///  flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE
70    ///  to ease their identification and subsequent processing.
71    ///  In addition, if the gap event was flagged with GST_GAP_FLAG_MISSING_DATA,
72    ///  a custom meta is added to the resulting gap buffer (GstAggregatorMissingDataMeta).
73    ///
74    ///  * Subclasses must use (a subclass of) [`AggregatorPad`][crate::AggregatorPad] for both their
75    ///  sink and source pads.
76    ///  See `gst_element_class_add_static_pad_template_with_gtype()`.
77    ///
78    /// This class used to live in gst-plugins-bad and was moved to core.
79    ///
80    /// This is an Abstract Base Class, you cannot instantiate it.
81    ///
82    /// ## Properties
83    ///
84    ///
85    /// #### `emit-signals`
86    ///  Enables the emission of signals such as [`samples-selected`][struct@crate::Aggregator#samples-selected]
87    ///
88    /// Readable | Writeable
89    ///
90    ///
91    /// #### `latency`
92    ///  Readable | Writeable
93    ///
94    ///
95    /// #### `min-upstream-latency`
96    ///  Force minimum upstream latency (in nanoseconds). When sources with a
97    /// higher latency are expected to be plugged in dynamically after the
98    /// aggregator has started playing, this allows overriding the minimum
99    /// latency reported by the initial source(s). This is only taken into
100    /// account when larger than the actually reported minimum latency.
101    ///
102    /// Readable | Writeable
103    ///
104    ///
105    /// #### `start-time`
106    ///  Readable | Writeable
107    ///
108    ///
109    /// #### `start-time-selection`
110    ///  Readable | Writeable
111    /// <details><summary><h4>Object</h4></summary>
112    ///
113    ///
114    /// #### `name`
115    ///  Readable | Writeable | Construct
116    ///
117    ///
118    /// #### `parent`
119    ///  The parent of the object. Please note, that when changing the 'parent'
120    /// property, we don't emit [`notify`][struct@crate::glib::Object#notify] and [`deep-notify`][struct@crate::gst::Object#deep-notify]
121    /// signals due to locking issues. In some cases one can use
122    /// `GstBin::element-added` or `GstBin::element-removed` signals on the parent to
123    /// achieve a similar effect.
124    ///
125    /// Readable | Writeable
126    /// </details>
127    ///
128    /// ## Signals
129    ///
130    ///
131    /// #### `samples-selected`
132    ///  Signals that the [`Aggregator`][crate::Aggregator] subclass has selected the next set
133    /// of input samples it will aggregate. Handlers may call
134    /// [`AggregatorExt::peek_next_sample()`][crate::prelude::AggregatorExt::peek_next_sample()] at that point.
135    ///
136    ///
137    /// <details><summary><h4>Element</h4></summary>
138    ///
139    ///
140    /// #### `no-more-pads`
141    ///  This signals that the element will not generate more dynamic pads.
142    /// Note that this signal will usually be emitted from the context of
143    /// the streaming thread.
144    ///
145    ///
146    ///
147    ///
148    /// #### `pad-added`
149    ///  a new [`gst::Pad`][crate::gst::Pad] has been added to the element. Note that this signal will
150    /// usually be emitted from the context of the streaming thread. Also keep in
151    /// mind that if you add new elements to the pipeline in the signal handler
152    /// you will need to set them to the desired target state with
153    /// [`ElementExtManual::set_state()`][crate::gst::prelude::ElementExtManual::set_state()] or [`ElementExtManual::sync_state_with_parent()`][crate::gst::prelude::ElementExtManual::sync_state_with_parent()].
154    ///
155    ///
156    ///
157    ///
158    /// #### `pad-removed`
159    ///  a [`gst::Pad`][crate::gst::Pad] has been removed from the element
160    ///
161    ///
162    /// </details>
163    /// <details><summary><h4>Object</h4></summary>
164    ///
165    ///
166    /// #### `deep-notify`
167    ///  The deep notify signal is used to be notified of property changes. It is
168    /// typically attached to the toplevel bin to receive notifications from all
169    /// the elements contained in that bin.
170    ///
171    /// Detailed
172    /// </details>
173    ///
174    /// # Implements
175    ///
176    /// [`AggregatorExt`][trait@crate::prelude::AggregatorExt], [`trait@gst::prelude::ElementExt`], [`trait@gst::prelude::ObjectExt`], [`trait@glib::ObjectExt`], [`AggregatorExtManual`][trait@crate::prelude::AggregatorExtManual]
177    #[doc(alias = "GstAggregator")]
178    pub struct Aggregator(Object<ffi::GstAggregator, ffi::GstAggregatorClass>) @extends gst::Element, gst::Object;
179
180    match fn {
181        type_ => || ffi::gst_aggregator_get_type(),
182    }
183}
184
185impl Aggregator {
186    pub const NONE: Option<&'static Aggregator> = None;
187}
188
189unsafe impl Send for Aggregator {}
190unsafe impl Sync for Aggregator {}
191
192/// Trait containing all [`struct@Aggregator`] methods.
193///
194/// # Implementors
195///
196/// [`Aggregator`][struct@crate::Aggregator]
197pub trait AggregatorExt: IsA<Aggregator> + 'static {
198    /// This method will push the provided output buffer downstream. If needed,
199    /// mandatory events such as stream-start, caps, and segment events will be
200    /// sent before pushing the buffer.
201    /// ## `buffer`
202    /// the [`gst::Buffer`][crate::gst::Buffer] to push.
203    #[doc(alias = "gst_aggregator_finish_buffer")]
204    fn finish_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
205        unsafe {
206            try_from_glib(ffi::gst_aggregator_finish_buffer(
207                self.as_ref().to_glib_none().0,
208                buffer.into_glib_ptr(),
209            ))
210        }
211    }
212
213    /// This method will push the provided output buffer list downstream. If needed,
214    /// mandatory events such as stream-start, caps, and segment events will be
215    /// sent before pushing the buffer.
216    /// ## `bufferlist`
217    /// the [`gst::BufferList`][crate::gst::BufferList] to push.
218    #[cfg(feature = "v1_18")]
219    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
220    #[doc(alias = "gst_aggregator_finish_buffer_list")]
221    fn finish_buffer_list(
222        &self,
223        bufferlist: gst::BufferList,
224    ) -> Result<gst::FlowSuccess, gst::FlowError> {
225        unsafe {
226            try_from_glib(ffi::gst_aggregator_finish_buffer_list(
227                self.as_ref().to_glib_none().0,
228                bufferlist.into_glib_ptr(),
229            ))
230        }
231    }
232
233    ///
234    /// # Returns
235    ///
236    /// the instance of the [`gst::BufferPool`][crate::gst::BufferPool] used
237    /// by `trans`; free it after use it
238    #[doc(alias = "gst_aggregator_get_buffer_pool")]
239    #[doc(alias = "get_buffer_pool")]
240    fn buffer_pool(&self) -> Option<gst::BufferPool> {
241        unsafe {
242            from_glib_full(ffi::gst_aggregator_get_buffer_pool(
243                self.as_ref().to_glib_none().0,
244            ))
245        }
246    }
247
248    /// Subclasses may use the return value to inform whether they should return
249    /// [`gst::FlowReturn::Eos`][crate::gst::FlowReturn::Eos] from their aggregate implementation.
250    ///
251    /// # Returns
252    ///
253    /// whether live status was forced on `self`.
254    #[cfg(feature = "v1_22")]
255    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
256    #[doc(alias = "gst_aggregator_get_force_live")]
257    #[doc(alias = "get_force_live")]
258    fn is_force_live(&self) -> bool {
259        unsafe {
260            from_glib(ffi::gst_aggregator_get_force_live(
261                self.as_ref().to_glib_none().0,
262            ))
263        }
264    }
265
266    ///
267    /// # Returns
268    ///
269    /// whether inactive pads will not be waited on
270    #[cfg(feature = "v1_20")]
271    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
272    #[doc(alias = "gst_aggregator_get_ignore_inactive_pads")]
273    #[doc(alias = "get_ignore_inactive_pads")]
274    fn ignores_inactive_pads(&self) -> bool {
275        unsafe {
276            from_glib(ffi::gst_aggregator_get_ignore_inactive_pads(
277                self.as_ref().to_glib_none().0,
278            ))
279        }
280    }
281
282    /// Retrieves the latency values reported by `self` in response to the latency
283    /// query, or `GST_CLOCK_TIME_NONE` if there is not live source connected and the element
284    /// will not wait for the clock.
285    ///
286    /// Typically only called by subclasses.
287    ///
288    /// # Returns
289    ///
290    /// The latency or `GST_CLOCK_TIME_NONE` if the element does not sync
291    #[doc(alias = "gst_aggregator_get_latency")]
292    #[doc(alias = "get_latency")]
293    fn latency(&self) -> Option<gst::ClockTime> {
294        unsafe {
295            from_glib(ffi::gst_aggregator_get_latency(
296                self.as_ref().to_glib_none().0,
297            ))
298        }
299    }
300
301    /// Negotiates src pad caps with downstream elements.
302    /// Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again
303    /// if `GstAggregatorClass::negotiate` fails.
304    ///
305    /// # Returns
306    ///
307    /// [`true`] if the negotiation succeeded, else [`false`].
308    #[cfg(feature = "v1_18")]
309    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
310    #[doc(alias = "gst_aggregator_negotiate")]
311    fn negotiate(&self) -> bool {
312        unsafe {
313            from_glib(ffi::gst_aggregator_negotiate(
314                self.as_ref().to_glib_none().0,
315            ))
316        }
317    }
318
319    /// Use this function to determine what input buffers will be aggregated
320    /// to produce the next output buffer. This should only be called from
321    /// a [`samples-selected`][struct@crate::Aggregator#samples-selected] handler, and can be used to precisely
322    /// control aggregating parameters for a given set of input samples.
323    ///
324    /// # Returns
325    ///
326    /// The sample that is about to be aggregated. It may hold a [`gst::Buffer`][crate::gst::Buffer]
327    ///  or a [`gst::BufferList`][crate::gst::BufferList]. The contents of its info structure is subclass-dependent,
328    ///  and documented on a subclass basis. The buffers held by the sample are
329    ///  not writable.
330    #[cfg(feature = "v1_18")]
331    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
332    #[doc(alias = "gst_aggregator_peek_next_sample")]
333    fn peek_next_sample(&self, pad: &impl IsA<AggregatorPad>) -> Option<gst::Sample> {
334        unsafe {
335            from_glib_full(ffi::gst_aggregator_peek_next_sample(
336                self.as_ref().to_glib_none().0,
337                pad.as_ref().to_glib_none().0,
338            ))
339        }
340    }
341
342    /// This method will push the provided event downstream. If needed, mandatory
343    /// events such as stream-start, caps, and segment events will be sent before
344    /// pushing the event.
345    ///
346    /// This API does not allow pushing stream-start, caps, segment and EOS events.
347    /// Specific API like [`set_src_caps()`][Self::set_src_caps()] should be used for these.
348    /// ## `event`
349    /// the [`gst::Event`][crate::gst::Event] to push.
350    #[cfg(feature = "v1_26")]
351    #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
352    #[doc(alias = "gst_aggregator_push_src_event")]
353    fn push_src_event(&self, event: gst::Event) -> bool {
354        unsafe {
355            from_glib(ffi::gst_aggregator_push_src_event(
356                self.as_ref().to_glib_none().0,
357                event.into_glib_ptr(),
358            ))
359        }
360    }
361
362    /// Subclasses should call this at construction time in order for `self` to
363    /// aggregate on a timeout even when no live source is connected.
364    #[cfg(feature = "v1_22")]
365    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
366    #[doc(alias = "gst_aggregator_set_force_live")]
367    fn set_force_live(&self, force_live: bool) {
368        unsafe {
369            ffi::gst_aggregator_set_force_live(
370                self.as_ref().to_glib_none().0,
371                force_live.into_glib(),
372            );
373        }
374    }
375
376    /// Subclasses should call this when they don't want to time out
377    /// waiting for a pad that hasn't yet received any buffers in live
378    /// mode.
379    ///
380    /// [`Aggregator`][crate::Aggregator] will still wait once on each newly-added pad, making
381    /// sure upstream has had a fair chance to start up.
382    /// ## `ignore`
383    /// whether inactive pads should not be waited on
384    #[cfg(feature = "v1_20")]
385    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
386    #[doc(alias = "gst_aggregator_set_ignore_inactive_pads")]
387    fn set_ignore_inactive_pads(&self, ignore: bool) {
388        unsafe {
389            ffi::gst_aggregator_set_ignore_inactive_pads(
390                self.as_ref().to_glib_none().0,
391                ignore.into_glib(),
392            );
393        }
394    }
395
396    /// Lets [`Aggregator`][crate::Aggregator] sub-classes tell the baseclass what their internal
397    /// latency is. Will also post a LATENCY message on the bus so the pipeline
398    /// can reconfigure its global latency if the values changed.
399    /// ## `min_latency`
400    /// minimum latency
401    /// ## `max_latency`
402    /// maximum latency
403    #[doc(alias = "gst_aggregator_set_latency")]
404    #[doc(alias = "latency")]
405    fn set_latency(
406        &self,
407        min_latency: gst::ClockTime,
408        max_latency: impl Into<Option<gst::ClockTime>>,
409    ) {
410        unsafe {
411            ffi::gst_aggregator_set_latency(
412                self.as_ref().to_glib_none().0,
413                min_latency.into_glib(),
414                max_latency.into().into_glib(),
415            );
416        }
417    }
418
419    /// Sets the caps to be used on the src pad.
420    /// ## `caps`
421    /// The [`gst::Caps`][crate::gst::Caps] to set on the src pad.
422    #[doc(alias = "gst_aggregator_set_src_caps")]
423    fn set_src_caps(&self, caps: &gst::Caps) {
424        unsafe {
425            ffi::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
426        }
427    }
428
429    /// This is a simple `GstAggregatorClass::get_next_time` implementation that
430    /// just looks at the [`gst::Segment`][crate::gst::Segment] on the srcpad of the aggregator and bases
431    /// the next time on the running time there.
432    ///
433    /// This is the desired behaviour in most cases where you have a live source
434    /// and you have a dead line based aggregator subclass.
435    ///
436    /// # Returns
437    ///
438    /// The running time based on the position
439    #[cfg(feature = "v1_16")]
440    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
441    #[doc(alias = "gst_aggregator_simple_get_next_time")]
442    fn simple_get_next_time(&self) -> Option<gst::ClockTime> {
443        unsafe {
444            from_glib(ffi::gst_aggregator_simple_get_next_time(
445                self.as_ref().to_glib_none().0,
446            ))
447        }
448    }
449
450    /// Enables the emission of signals such as [`samples-selected`][struct@crate::Aggregator#samples-selected]
451    #[cfg(feature = "v1_18")]
452    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
453    #[doc(alias = "emit-signals")]
454    fn emits_signals(&self) -> bool {
455        ObjectExt::property(self.as_ref(), "emit-signals")
456    }
457
458    /// Enables the emission of signals such as [`samples-selected`][struct@crate::Aggregator#samples-selected]
459    #[cfg(feature = "v1_18")]
460    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
461    #[doc(alias = "emit-signals")]
462    fn set_emit_signals(&self, emit_signals: bool) {
463        ObjectExt::set_property(self.as_ref(), "emit-signals", emit_signals)
464    }
465
466    #[doc(alias = "start-time")]
467    fn start_time(&self) -> u64 {
468        ObjectExt::property(self.as_ref(), "start-time")
469    }
470
471    #[doc(alias = "start-time")]
472    fn set_start_time(&self, start_time: u64) {
473        ObjectExt::set_property(self.as_ref(), "start-time", start_time)
474    }
475
476    #[cfg(feature = "v1_18")]
477    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
478    #[doc(alias = "start-time-selection")]
479    fn start_time_selection(&self) -> AggregatorStartTimeSelection {
480        ObjectExt::property(self.as_ref(), "start-time-selection")
481    }
482
483    #[cfg(feature = "v1_18")]
484    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
485    #[doc(alias = "start-time-selection")]
486    fn set_start_time_selection(&self, start_time_selection: AggregatorStartTimeSelection) {
487        ObjectExt::set_property(self.as_ref(), "start-time-selection", start_time_selection)
488    }
489
490    #[cfg(feature = "v1_18")]
491    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
492    #[doc(alias = "emit-signals")]
493    fn connect_emit_signals_notify<F: Fn(&Self) + Send + Sync + 'static>(
494        &self,
495        f: F,
496    ) -> SignalHandlerId {
497        unsafe extern "C" fn notify_emit_signals_trampoline<
498            P: IsA<Aggregator>,
499            F: Fn(&P) + Send + Sync + 'static,
500        >(
501            this: *mut ffi::GstAggregator,
502            _param_spec: glib::ffi::gpointer,
503            f: glib::ffi::gpointer,
504        ) {
505            let f: &F = &*(f as *const F);
506            f(Aggregator::from_glib_borrow(this).unsafe_cast_ref())
507        }
508        unsafe {
509            let f: Box_<F> = Box_::new(f);
510            connect_raw(
511                self.as_ptr() as *mut _,
512                c"notify::emit-signals".as_ptr() as *const _,
513                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
514                    notify_emit_signals_trampoline::<Self, F> as *const (),
515                )),
516                Box_::into_raw(f),
517            )
518        }
519    }
520
521    #[doc(alias = "latency")]
522    fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
523        &self,
524        f: F,
525    ) -> SignalHandlerId {
526        unsafe extern "C" fn notify_latency_trampoline<
527            P: IsA<Aggregator>,
528            F: Fn(&P) + Send + Sync + 'static,
529        >(
530            this: *mut ffi::GstAggregator,
531            _param_spec: glib::ffi::gpointer,
532            f: glib::ffi::gpointer,
533        ) {
534            let f: &F = &*(f as *const F);
535            f(Aggregator::from_glib_borrow(this).unsafe_cast_ref())
536        }
537        unsafe {
538            let f: Box_<F> = Box_::new(f);
539            connect_raw(
540                self.as_ptr() as *mut _,
541                c"notify::latency".as_ptr() as *const _,
542                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
543                    notify_latency_trampoline::<Self, F> as *const (),
544                )),
545                Box_::into_raw(f),
546            )
547        }
548    }
549
550    #[doc(alias = "start-time")]
551    fn connect_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>(
552        &self,
553        f: F,
554    ) -> SignalHandlerId {
555        unsafe extern "C" fn notify_start_time_trampoline<
556            P: IsA<Aggregator>,
557            F: Fn(&P) + Send + Sync + 'static,
558        >(
559            this: *mut ffi::GstAggregator,
560            _param_spec: glib::ffi::gpointer,
561            f: glib::ffi::gpointer,
562        ) {
563            let f: &F = &*(f as *const F);
564            f(Aggregator::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::start-time".as_ptr() as *const _,
571                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
572                    notify_start_time_trampoline::<Self, F> as *const (),
573                )),
574                Box_::into_raw(f),
575            )
576        }
577    }
578
579    #[cfg(feature = "v1_18")]
580    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
581    #[doc(alias = "start-time-selection")]
582    fn connect_start_time_selection_notify<F: Fn(&Self) + Send + Sync + 'static>(
583        &self,
584        f: F,
585    ) -> SignalHandlerId {
586        unsafe extern "C" fn notify_start_time_selection_trampoline<
587            P: IsA<Aggregator>,
588            F: Fn(&P) + Send + Sync + 'static,
589        >(
590            this: *mut ffi::GstAggregator,
591            _param_spec: glib::ffi::gpointer,
592            f: glib::ffi::gpointer,
593        ) {
594            let f: &F = &*(f as *const F);
595            f(Aggregator::from_glib_borrow(this).unsafe_cast_ref())
596        }
597        unsafe {
598            let f: Box_<F> = Box_::new(f);
599            connect_raw(
600                self.as_ptr() as *mut _,
601                c"notify::start-time-selection".as_ptr() as *const _,
602                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
603                    notify_start_time_selection_trampoline::<Self, F> as *const (),
604                )),
605                Box_::into_raw(f),
606            )
607        }
608    }
609}
610
611impl<O: IsA<Aggregator>> AggregatorExt for O {}