1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::{ffi, Clip, Container, Extractable, MetaContainer, TimelineElement};
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
use glib::translate::*;

glib::wrapper! {
    /// [`SourceClip`][crate::SourceClip]-s are clips whose core elements are [`Source`][crate::Source]-s.
    ///
    /// ## Effects
    ///
    /// [`SourceClip`][crate::SourceClip]-s can also have [`BaseEffect`][crate::BaseEffect]-s added as non-core
    /// elements. These effects are applied to the core sources of the clip
    /// that they share a [`Track`][crate::Track] with. See [`Clip`][crate::Clip] for how to add and move
    /// these effects from the clip.
    ///
    /// # Implements
    ///
    /// [`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]
    #[doc(alias = "GESSourceClip")]
    pub struct SourceClip(Object<ffi::GESSourceClip, ffi::GESSourceClipClass>) @extends Clip, Container, TimelineElement, @implements Extractable, MetaContainer;

    match fn {
        type_ => || ffi::ges_source_clip_get_type(),
    }
}

impl SourceClip {
    pub const NONE: Option<&'static SourceClip> = None;

    /// Creates a new [`SourceClip`][crate::SourceClip] that renders a time overlay on top
    ///
    /// # Returns
    ///
    /// The newly created [`SourceClip`][crate::SourceClip],
    /// or [`None`] if there was an error.
    #[cfg(feature = "v1_18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
    #[doc(alias = "ges_source_clip_new_time_overlay")]
    pub fn new_time_overlay() -> Option<SourceClip> {
        assert_initialized_main_thread!();
        unsafe { from_glib_none(ffi::ges_source_clip_new_time_overlay()) }
    }
}