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
// 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;
use crate::MetaContainer;
use crate::Source;
use crate::TimelineElement;
use crate::TrackElement;
use crate::VideoSource;
use glib::object::IsA;
use glib::translate::*;
use glib::StaticType;

glib::wrapper! {
    /// Use `GESUriSource` instead
    /// Outputs the video stream from a given image sequence. The start frame chosen
    /// will be determined by the in-point property on the track element.
    ///
    /// This should not be used anymore, the `imagesequence://` protocol should be
    /// used instead. Check the `imagesequencesrc` GStreamer element for more
    /// information.
    ///
    /// # Implements
    ///
    /// [`MultiFileSourceExt`][trait@crate::prelude::MultiFileSourceExt], [`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 = "GESMultiFileSource")]
    pub struct MultiFileSource(Object<ffi::GESMultiFileSource, ffi::GESMultiFileSourceClass>) @extends VideoSource, Source, TrackElement, TimelineElement, @implements Extractable, MetaContainer;

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

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

    #[doc(alias = "ges_multi_file_source_new")]
    pub fn new(uri: &str) -> MultiFileSource {
        assert_initialized_main_thread!();
        unsafe { from_glib_none(ffi::ges_multi_file_source_new(uri.to_glib_none().0)) }
    }
}

/// Trait containing all [`struct@MultiFileSource`] methods.
///
/// # Implementors
///
/// [`MultiFileSource`][struct@crate::MultiFileSource]
pub trait MultiFileSourceExt: 'static {
    /// The uri of the file/resource to use. You can set a start index,
    /// a stop index and a sequence pattern.
    /// The format is <multifile://start:stop\`location`-pattern>.
    /// The pattern uses printf string formating.
    ///
    /// Example uris:
    ///
    /// multifile:///home/you/image\`03d`
    ///
    /// multifile://20:50@/home/you/sequence/\`04d`
    fn uri(&self) -> Option<glib::GString>;
}

impl<O: IsA<MultiFileSource>> MultiFileSourceExt for O {
    fn uri(&self) -> Option<glib::GString> {
        glib::ObjectExt::property(self.as_ref(), "uri")
    }
}