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