gstreamer_editing_services/auto/source_clip.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, Clip, Container, Extractable, MetaContainer, TimelineElement};
7#[cfg(feature = "v1_18")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
9use glib::translate::*;
10
11glib::wrapper! {
12 /// [`SourceClip`][crate::SourceClip]-s are clips whose core elements are [`Source`][crate::Source]-s.
13 ///
14 /// ## Effects
15 ///
16 /// [`SourceClip`][crate::SourceClip]-s can also have [`BaseEffect`][crate::BaseEffect]-s added as non-core
17 /// elements. These effects are applied to the core sources of the clip
18 /// that they share a [`Track`][crate::Track] with. See [`Clip`][crate::Clip] for how to add and move
19 /// these effects from the clip.
20 ///
21 /// # Implements
22 ///
23 /// [`ClipExt`][trait@crate::prelude::ClipExt], [`GESContainerExt`][trait@crate::prelude::GESContainerExt], [`TimelineElementExt`][trait@crate::prelude::TimelineElementExt], [`trait@glib::ObjectExt`], [`ExtractableExt`][trait@crate::prelude::ExtractableExt], [`MetaContainerExt`][trait@crate::prelude::MetaContainerExt], [`TimelineElementExtManual`][trait@crate::prelude::TimelineElementExtManual]
24 #[doc(alias = "GESSourceClip")]
25 pub struct SourceClip(Object<ffi::GESSourceClip, ffi::GESSourceClipClass>) @extends Clip, Container, TimelineElement, @implements Extractable, MetaContainer;
26
27 match fn {
28 type_ => || ffi::ges_source_clip_get_type(),
29 }
30}
31
32impl SourceClip {
33 pub const NONE: Option<&'static SourceClip> = None;
34
35 /// Creates a new [`SourceClip`][crate::SourceClip] that renders a time overlay on top
36 ///
37 /// # Returns
38 ///
39 /// The newly created [`SourceClip`][crate::SourceClip],
40 /// or [`None`] if there was an error.
41 #[cfg(feature = "v1_18")]
42 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
43 #[doc(alias = "ges_source_clip_new_time_overlay")]
44 pub fn new_time_overlay() -> Option<SourceClip> {
45 assert_initialized_main_thread!();
46 unsafe { from_glib_none(ffi::ges_source_clip_new_time_overlay()) }
47 }
48}