gstreamer_editing_services/auto/
multi_file_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::{ffi, Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    /// Use `GESUriSource` instead
11    /// Outputs the video stream from a given image sequence. The start frame chosen
12    /// will be determined by the in-point property on the track element.
13    ///
14    /// This should not be used anymore, the `imagesequence://` protocol should be
15    /// used instead. Check the `imagesequencesrc` GStreamer element for more
16    /// information.
17    ///
18    /// ## Properties
19    ///
20    ///
21    /// #### `uri`
22    ///  The uri of the file/resource to use. You can set a start index,
23    /// a stop index and a sequence pattern.
24    /// The format is <multifile://start:stop\`location`-pattern>.
25    /// The pattern uses printf string formating.
26    ///
27    /// Example uris:
28    ///
29    /// multifile:///home/you/image\`03d`
30    ///
31    /// multifile://20:50@/home/you/sequence/\`04d`
32    ///
33    /// Readable | Writeable | Construct Only
34    /// <details><summary><h4>TrackElement</h4></summary>
35    ///
36    ///
37    /// #### `active`
38    ///  Whether the effect of the element should be applied in its
39    /// [`track`][struct@crate::TrackElement#track]. If set to [`false`], it will not be used in
40    /// the output of the track.
41    ///
42    /// Readable | Writeable
43    ///
44    ///
45    /// #### `auto-clamp-control-sources`
46    ///  Whether the control sources on the element (see
47    /// [`TrackElementExt::set_control_source()`][crate::prelude::TrackElementExt::set_control_source()]) will be automatically
48    /// updated whenever the [`in-point`][struct@crate::TimelineElement#in-point] or out-point of the
49    /// element change in value.
50    ///
51    /// See [`TrackElementExt::clamp_control_source()`][crate::prelude::TrackElementExt::clamp_control_source()] for how this is done
52    /// per control source.
53    ///
54    /// Default value: [`true`]
55    ///
56    /// Readable | Writeable
57    ///
58    ///
59    /// #### `has-internal-source`
60    ///  This property is used to determine whether the 'internal time'
61    /// properties of the element have any meaning. In particular, unless
62    /// this is set to [`true`], the [`in-point`][struct@crate::TimelineElement#in-point] and
63    /// [`max-duration`][struct@crate::TimelineElement#max-duration] can not be set to any value other
64    /// than the default 0 and `GST_CLOCK_TIME_NONE`, respectively.
65    ///
66    /// If an element has some *internal* *timed* source [`gst::Element`][crate::gst::Element] that it
67    /// reads stream data from as part of its function in a [`Track`][crate::Track], then
68    /// you'll likely want to set this to [`true`] to allow the
69    /// [`in-point`][struct@crate::TimelineElement#in-point] and [`max-duration`][struct@crate::TimelineElement#max-duration] to
70    /// be set.
71    ///
72    /// The default value is determined by the `GESTrackElementClass`
73    /// `default_has_internal_source` class property. For most
74    /// `GESSourceClass`-es, this will be [`true`], with the exception of those
75    /// that have a potentially *static* source, such as `GESImageSourceClass`
76    /// and `GESTitleSourceClass`. Otherwise, this will usually be [`false`].
77    ///
78    /// For most [`Operation`][crate::Operation]-s you will likely want to leave this set to
79    /// [`false`]. The exception may be for an operation that reads some stream
80    /// data from some private internal source as part of manipulating the
81    /// input data from the usual linked upstream [`TrackElement`][crate::TrackElement].
82    ///
83    /// For example, you may want to set this to [`true`] for a
84    /// [`TrackType::VIDEO`][crate::TrackType::VIDEO] operation that wraps a `textoverlay` that reads
85    /// from a subtitle file and places its text on top of the received video
86    /// data. The [`in-point`][struct@crate::TimelineElement#in-point] of the element would be used
87    /// to shift the initial seek time on the `textoverlay` away from 0, and
88    /// the [`max-duration`][struct@crate::TimelineElement#max-duration] could be set to reflect the
89    /// time at which the subtitle file runs out of data.
90    ///
91    /// Note that GES can not support track elements that have both internal
92    /// content and manipulate the timing of their data streams (time
93    /// effects).
94    ///
95    /// Readable | Writeable
96    ///
97    ///
98    /// #### `track`
99    ///  The track that this element belongs to, or [`None`] if it does not
100    /// belong to a track.
101    ///
102    /// Readable
103    ///
104    ///
105    /// #### `track-type`
106    ///  The track type of the element, which determines the type of track the
107    /// element can be added to (see [`track-type`][struct@crate::Track#track-type]). This should
108    /// correspond to the type of data that the element can produce or
109    /// process.
110    ///
111    /// Readable | Writeable | Construct
112    /// </details>
113    /// <details><summary><h4>TimelineElement</h4></summary>
114    ///
115    ///
116    /// #### `duration`
117    ///  The duration that the element is in effect for in the timeline (a
118    /// time difference in nanoseconds using the time coordinates of the
119    /// timeline). For example, for a source element, this would determine
120    /// for how long it should output its internal content for. For an
121    /// operation element, this would determine for how long its effect
122    /// should be applied to any source content.
123    ///
124    /// Readable | Writeable
125    ///
126    ///
127    /// #### `in-point`
128    ///  The initial offset to use internally when outputting content (in
129    /// nanoseconds, but in the time coordinates of the internal content).
130    ///
131    /// For example, for a [`VideoUriSource`][crate::VideoUriSource] that references some media
132    /// file, the "internal content" is the media file data, and the
133    /// in-point would correspond to some timestamp in the media file.
134    /// When playing the timeline, and when the element is first reached at
135    /// timeline-time [`start`][struct@crate::TimelineElement#start], it will begin outputting the
136    /// data from the timestamp in-point **onwards**, until it reaches the
137    /// end of its [`duration`][struct@crate::TimelineElement#duration] in the timeline.
138    ///
139    /// For elements that have no internal content, this should be kept
140    /// as 0.
141    ///
142    /// Readable | Writeable
143    ///
144    ///
145    /// #### `max-duration`
146    ///  The full duration of internal content that is available (a time
147    /// difference in nanoseconds using the time coordinates of the internal
148    /// content).
149    ///
150    /// This will act as a cap on the [`in-point`][struct@crate::TimelineElement#in-point] of the
151    /// element (which is in the same time coordinates), and will sometimes
152    /// be used to limit the [`duration`][struct@crate::TimelineElement#duration] of the element in
153    /// the timeline.
154    ///
155    /// For example, for a [`VideoUriSource`][crate::VideoUriSource] that references some media
156    /// file, this would be the length of the media file.
157    ///
158    /// For elements that have no internal content, or whose content is
159    /// indefinite, this should be kept as `GST_CLOCK_TIME_NONE`.
160    ///
161    /// Readable | Writeable | Construct
162    ///
163    ///
164    /// #### `name`
165    ///  The name of the element. This should be unique within its timeline.
166    ///
167    /// Readable | Writeable | Construct
168    ///
169    ///
170    /// #### `parent`
171    ///  The parent container of the element.
172    ///
173    /// Readable | Writeable
174    ///
175    ///
176    /// #### `priority`
177    ///  The priority of the element.
178    ///
179    /// Readable | Writeable
180    ///
181    ///
182    /// #### `serialize`
183    ///  Whether the element should be serialized.
184    ///
185    /// Readable | Writeable
186    ///
187    ///
188    /// #### `start`
189    ///  The starting position of the element in the timeline (in nanoseconds
190    /// and in the time coordinates of the timeline). For example, for a
191    /// source element, this would determine the time at which it should
192    /// start outputting its internal content. For an operation element, this
193    /// would determine the time at which it should start applying its effect
194    /// to any source content.
195    ///
196    /// Readable | Writeable
197    ///
198    ///
199    /// #### `timeline`
200    ///  The timeline that the element lies within.
201    ///
202    /// Readable | Writeable
203    /// </details>
204    ///
205    /// # Implements
206    ///
207    /// [`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]
208    #[doc(alias = "GESMultiFileSource")]
209    pub struct MultiFileSource(Object<ffi::GESMultiFileSource, ffi::GESMultiFileSourceClass>) @extends VideoSource, Source, TrackElement, TimelineElement, @implements Extractable, MetaContainer;
210
211    match fn {
212        type_ => || ffi::ges_multi_file_source_get_type(),
213    }
214}
215
216impl MultiFileSource {
217    pub const NONE: Option<&'static MultiFileSource> = None;
218
219    #[doc(alias = "ges_multi_file_source_new")]
220    pub fn new(uri: &str) -> MultiFileSource {
221        assert_initialized_main_thread!();
222        unsafe { from_glib_none(ffi::ges_multi_file_source_new(uri.to_glib_none().0)) }
223    }
224}
225
226/// Trait containing all [`struct@MultiFileSource`] methods.
227///
228/// # Implementors
229///
230/// [`MultiFileSource`][struct@crate::MultiFileSource]
231pub trait MultiFileSourceExt: IsA<MultiFileSource> + 'static {
232    /// The uri of the file/resource to use. You can set a start index,
233    /// a stop index and a sequence pattern.
234    /// The format is <multifile://start:stop\`location`-pattern>.
235    /// The pattern uses printf string formating.
236    ///
237    /// Example uris:
238    ///
239    /// multifile:///home/you/image\`03d`
240    ///
241    /// multifile://20:50@/home/you/sequence/\`04d`
242    fn uri(&self) -> Option<glib::GString> {
243        ObjectExt::property(self.as_ref(), "uri")
244    }
245}
246
247impl<O: IsA<MultiFileSource>> MultiFileSourceExt for O {}