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