gstreamer_editing_services/auto/
video_test_source.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::{
7    ffi, Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource,
8    VideoTestPattern,
9};
10use glib::{prelude::*, translate::*};
11
12glib::wrapper! {
13    /// ### Children Properties
14    ///
15    ///  {{ libs/GESVideoTestSource-children-props.md }}
16    ///
17    /// # Implements
18    ///
19    /// [`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]
20    #[doc(alias = "GESVideoTestSource")]
21    pub struct VideoTestSource(Object<ffi::GESVideoTestSource, ffi::GESVideoTestSourceClass>) @extends VideoSource, Source, TrackElement, TimelineElement, @implements Extractable, MetaContainer;
22
23    match fn {
24        type_ => || ffi::ges_video_test_source_get_type(),
25    }
26}
27
28impl VideoTestSource {
29    pub const NONE: Option<&'static VideoTestSource> = None;
30}
31
32/// Trait containing all [`struct@VideoTestSource`] methods.
33///
34/// # Implementors
35///
36/// [`VideoTestSource`][struct@crate::VideoTestSource]
37pub trait VideoTestSourceExt: IsA<VideoTestSource> + 'static {
38    /// Get the video pattern used by the `self`.
39    ///
40    /// # Returns
41    ///
42    /// The video pattern used by the `self`.
43    #[doc(alias = "ges_video_test_source_get_pattern")]
44    #[doc(alias = "get_pattern")]
45    fn pattern(&self) -> VideoTestPattern {
46        unsafe {
47            from_glib(ffi::ges_video_test_source_get_pattern(
48                self.as_ref().to_glib_none().0,
49            ))
50        }
51    }
52
53    /// Sets the source to use the given `pattern`.
54    /// ## `pattern`
55    /// a [`VideoTestPattern`][crate::VideoTestPattern]
56    #[doc(alias = "ges_video_test_source_set_pattern")]
57    fn set_pattern(&self, pattern: VideoTestPattern) {
58        unsafe {
59            ffi::ges_video_test_source_set_pattern(
60                self.as_ref().to_glib_none().0,
61                pattern.into_glib(),
62            );
63        }
64    }
65}
66
67impl<O: IsA<VideoTestSource>> VideoTestSourceExt for O {}