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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// 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::{
    Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource,
    VideoTestPattern,
};
use glib::{prelude::*, translate::*};

glib::wrapper! {
    /// ### Children Properties
    ///
    ///  {{ libs/GESVideoTestSource-children-props.md }}
    ///
    /// # Implements
    ///
    /// [`VideoTestSourceExt`][trait@crate::prelude::VideoTestSourceExt], [`VideoSourceExt`][trait@crate::prelude::VideoSourceExt], [`SourceExt`][trait@crate::prelude::SourceExt], [`TrackElementExt`][trait@crate::prelude::TrackElementExt], [`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 = "GESVideoTestSource")]
    pub struct VideoTestSource(Object<ffi::GESVideoTestSource, ffi::GESVideoTestSourceClass>) @extends VideoSource, Source, TrackElement, TimelineElement, @implements Extractable, MetaContainer;

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

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

mod sealed {
    pub trait Sealed {}
    impl<T: super::IsA<super::VideoTestSource>> Sealed for T {}
}

/// Trait containing all [`struct@VideoTestSource`] methods.
///
/// # Implementors
///
/// [`VideoTestSource`][struct@crate::VideoTestSource]
pub trait VideoTestSourceExt: IsA<VideoTestSource> + sealed::Sealed + 'static {
    /// Get the video pattern used by the `self`.
    ///
    /// # Returns
    ///
    /// The video pattern used by the `self`.
    #[doc(alias = "ges_video_test_source_get_pattern")]
    #[doc(alias = "get_pattern")]
    fn pattern(&self) -> VideoTestPattern {
        unsafe {
            from_glib(ffi::ges_video_test_source_get_pattern(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    /// Sets the source to use the given `pattern`.
    /// ## `pattern`
    /// a [`VideoTestPattern`][crate::VideoTestPattern]
    #[doc(alias = "ges_video_test_source_set_pattern")]
    fn set_pattern(&self, pattern: VideoTestPattern) {
        unsafe {
            ffi::ges_video_test_source_set_pattern(
                self.as_ref().to_glib_none().0,
                pattern.into_glib(),
            );
        }
    }
}

impl<O: IsA<VideoTestSource>> VideoTestSourceExt for O {}