gstreamer_editing_services/auto/
group.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, Container, Extractable, MetaContainer, TimelineElement};
7use glib::translate::*;
8
9glib::wrapper! {
10    /// A [`Group`][crate::Group] controls one or more [`Container`][crate::Container]-s (usually [`Clip`][crate::Clip]-s,
11    /// but it can also control other [`Group`][crate::Group]-s). Its children must share
12    /// the same [`Timeline`][crate::Timeline], but can otherwise lie in separate [`Layer`][crate::Layer]-s
13    /// and have different timings.
14    ///
15    /// To initialise a group, you may want to use [`Container::group()`][crate::Container::group()],
16    /// and similarly use [`GESContainerExt::ungroup()`][crate::prelude::GESContainerExt::ungroup()] to dispose of it.
17    ///
18    /// A group will maintain the relative [`start`][struct@crate::TimelineElement#start] times of
19    /// its children, as well as their relative layer [`priority`][struct@crate::Layer#priority].
20    /// Therefore, if one of its children has its [`start`][struct@crate::TimelineElement#start]
21    /// set, all other children will have their [`start`][struct@crate::TimelineElement#start]
22    /// shifted by the same amount. Similarly, if one of its children moves to
23    /// a new layer, the other children will also change layers to maintain the
24    /// difference in their layer priorities. For example, if a child moves
25    /// from a layer with [`priority`][struct@crate::Layer#priority] 1 to a layer with priority 3, then
26    /// another child that was in a layer with priority 0 will move to the
27    /// layer with priority 2.
28    ///
29    /// The [`start`][struct@crate::Group#start] of a group refers to the earliest start
30    /// time of its children. If the group's [`start`][struct@crate::Group#start] is set, all the
31    /// children will be shifted equally such that the earliest start time
32    /// will match the set value. The [`duration`][struct@crate::Group#duration] of a group is the
33    /// difference between the earliest start time and latest end time of its
34    /// children. If the group's [`duration`][struct@crate::Group#duration] is increased, the children
35    /// whose end time matches the end of the group will be extended
36    /// accordingly. If it is decreased, then any child whose end time exceeds
37    /// the new end time will also have their duration decreased accordingly.
38    ///
39    /// A group may span several layers, but for methods such as
40    /// [`TimelineElementExt::layer_priority()`][crate::prelude::TimelineElementExt::layer_priority()] and
41    /// [`TimelineElementExt::edit()`][crate::prelude::TimelineElementExt::edit()] a group is considered to have a layer
42    /// priority that is the highest [`priority`][struct@crate::Layer#priority] (numerically, the
43    /// smallest) of all the layers it spans.
44    ///
45    /// ## Properties
46    ///
47    ///
48    /// #### `duration`
49    ///  An overwrite of the [`duration`][struct@crate::TimelineElement#duration] property. For a
50    /// [`Group`][crate::Group], this is the difference between the earliest
51    /// [`start`][struct@crate::TimelineElement#start] time and the latest end time (given by
52    /// [`start`][struct@crate::TimelineElement#start] + [`duration`][struct@crate::TimelineElement#duration]) amongst
53    /// its children.
54    ///
55    /// Readable | Writeable
56    ///
57    ///
58    /// #### `in-point`
59    ///  An overwrite of the [`in-point`][struct@crate::TimelineElement#in-point] property. This has
60    /// no meaning for a group and should not be set.
61    ///
62    /// Readable | Writeable
63    ///
64    ///
65    /// #### `max-duration`
66    ///  An overwrite of the [`max-duration`][struct@crate::TimelineElement#max-duration] property. This
67    /// has no meaning for a group and should not be set.
68    ///
69    /// Readable | Writeable | Construct
70    ///
71    ///
72    /// #### `priority`
73    ///  An overwrite of the [`priority`][struct@crate::TimelineElement#priority] property.
74    /// Setting [`TimelineElement`][crate::TimelineElement] priorities is deprecated as all priority
75    /// management is now done by GES itself.
76    ///
77    /// Readable | Writeable
78    ///
79    ///
80    /// #### `start`
81    ///  An overwrite of the [`start`][struct@crate::TimelineElement#start] property. For a
82    /// [`Group`][crate::Group], this is the earliest [`start`][struct@crate::TimelineElement#start] time
83    /// amongst its children.
84    ///
85    /// Readable | Writeable
86    /// <details><summary><h4>Container</h4></summary>
87    ///
88    ///
89    /// #### `height`
90    ///  The span of the container's children's [`priority`][struct@crate::TimelineElement#priority]
91    /// values, which is the number of integers that lie between (inclusive)
92    /// the minimum and maximum priorities found amongst the container's
93    /// children (maximum - minimum + 1).
94    ///
95    /// Readable
96    /// </details>
97    /// <details><summary><h4>TimelineElement</h4></summary>
98    ///
99    ///
100    /// #### `duration`
101    ///  The duration that the element is in effect for in the timeline (a
102    /// time difference in nanoseconds using the time coordinates of the
103    /// timeline). For example, for a source element, this would determine
104    /// for how long it should output its internal content for. For an
105    /// operation element, this would determine for how long its effect
106    /// should be applied to any source content.
107    ///
108    /// Readable | Writeable
109    ///
110    ///
111    /// #### `in-point`
112    ///  The initial offset to use internally when outputting content (in
113    /// nanoseconds, but in the time coordinates of the internal content).
114    ///
115    /// For example, for a [`VideoUriSource`][crate::VideoUriSource] that references some media
116    /// file, the "internal content" is the media file data, and the
117    /// in-point would correspond to some timestamp in the media file.
118    /// When playing the timeline, and when the element is first reached at
119    /// timeline-time [`start`][struct@crate::TimelineElement#start], it will begin outputting the
120    /// data from the timestamp in-point **onwards**, until it reaches the
121    /// end of its [`duration`][struct@crate::TimelineElement#duration] in the timeline.
122    ///
123    /// For elements that have no internal content, this should be kept
124    /// as 0.
125    ///
126    /// Readable | Writeable
127    ///
128    ///
129    /// #### `max-duration`
130    ///  The full duration of internal content that is available (a time
131    /// difference in nanoseconds using the time coordinates of the internal
132    /// content).
133    ///
134    /// This will act as a cap on the [`in-point`][struct@crate::TimelineElement#in-point] of the
135    /// element (which is in the same time coordinates), and will sometimes
136    /// be used to limit the [`duration`][struct@crate::TimelineElement#duration] of the element in
137    /// the timeline.
138    ///
139    /// For example, for a [`VideoUriSource`][crate::VideoUriSource] that references some media
140    /// file, this would be the length of the media file.
141    ///
142    /// For elements that have no internal content, or whose content is
143    /// indefinite, this should be kept as `GST_CLOCK_TIME_NONE`.
144    ///
145    /// Readable | Writeable | Construct
146    ///
147    ///
148    /// #### `name`
149    ///  The name of the element. This should be unique within its timeline.
150    ///
151    /// Readable | Writeable | Construct
152    ///
153    ///
154    /// #### `parent`
155    ///  The parent container of the element.
156    ///
157    /// Readable | Writeable
158    ///
159    ///
160    /// #### `priority`
161    ///  The priority of the element.
162    ///
163    /// Readable | Writeable
164    ///
165    ///
166    /// #### `serialize`
167    ///  Whether the element should be serialized.
168    ///
169    /// Readable | Writeable
170    ///
171    ///
172    /// #### `start`
173    ///  The starting position of the element in the timeline (in nanoseconds
174    /// and in the time coordinates of the timeline). For example, for a
175    /// source element, this would determine the time at which it should
176    /// start outputting its internal content. For an operation element, this
177    /// would determine the time at which it should start applying its effect
178    /// to any source content.
179    ///
180    /// Readable | Writeable
181    ///
182    ///
183    /// #### `timeline`
184    ///  The timeline that the element lies within.
185    ///
186    /// Readable | Writeable
187    /// </details>
188    ///
189    /// # Implements
190    ///
191    /// [`GESContainerExt`][trait@crate::prelude::GESContainerExt], [`TimelineElementExt`][trait@crate::prelude::TimelineElementExt], [`trait@glib::ObjectExt`], [`ExtractableExt`][trait@crate::prelude::ExtractableExt], [`MetaContainerExt`][trait@crate::prelude::MetaContainerExt], [`TimelineElementExtManual`][trait@crate::prelude::TimelineElementExtManual]
192    #[doc(alias = "GESGroup")]
193    pub struct Group(Object<ffi::GESGroup, ffi::GESGroupClass>) @extends Container, TimelineElement, @implements Extractable, MetaContainer;
194
195    match fn {
196        type_ => || ffi::ges_group_get_type(),
197    }
198}
199
200impl Group {
201    pub const NONE: Option<&'static Group> = None;
202
203    /// Created a new empty group. You may wish to use
204    /// [`Container::group()`][crate::Container::group()] instead, which can return a different
205    /// [`Container`][crate::Container] subclass if possible.
206    ///
207    /// # Returns
208    ///
209    /// The new empty group.
210    #[doc(alias = "ges_group_new")]
211    pub fn new() -> Group {
212        assert_initialized_main_thread!();
213        unsafe { from_glib_none(ffi::ges_group_new()) }
214    }
215}
216
217impl Default for Group {
218    fn default() -> Self {
219        Self::new()
220    }
221}