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
32mod sealed {
33 pub trait Sealed {}
34 impl<T: super::IsA<super::VideoTestSource>> Sealed for T {}
35}
36
37/// Trait containing all [`struct@VideoTestSource`] methods.
38///
39/// # Implementors
40///
41/// [`VideoTestSource`][struct@crate::VideoTestSource]
42pub trait VideoTestSourceExt: IsA<VideoTestSource> + sealed::Sealed + 'static {
43 /// Get the video pattern used by the `self`.
44 ///
45 /// # Returns
46 ///
47 /// The video pattern used by the `self`.
48 #[doc(alias = "ges_video_test_source_get_pattern")]
49 #[doc(alias = "get_pattern")]
50 fn pattern(&self) -> VideoTestPattern {
51 unsafe {
52 from_glib(ffi::ges_video_test_source_get_pattern(
53 self.as_ref().to_glib_none().0,
54 ))
55 }
56 }
57
58 /// Sets the source to use the given `pattern`.
59 /// ## `pattern`
60 /// a [`VideoTestPattern`][crate::VideoTestPattern]
61 #[doc(alias = "ges_video_test_source_set_pattern")]
62 fn set_pattern(&self, pattern: VideoTestPattern) {
63 unsafe {
64 ffi::ges_video_test_source_set_pattern(
65 self.as_ref().to_glib_none().0,
66 pattern.into_glib(),
67 );
68 }
69 }
70}
71
72impl<O: IsA<VideoTestSource>> VideoTestSourceExt for O {}