Trait gstreamer_editing_services::prelude::TimelineElementExt [−][src]
pub trait TimelineElementExt: 'static {}Show methods
fn copy(&self, deep: bool) -> Result<TimelineElement, BoolError>; fn edit(
&self,
layers: &[Layer],
new_layer_priority: i64,
mode: EditMode,
edge: Edge,
position: u64
) -> bool; fn edit_full(
&self,
new_layer_priority: i64,
mode: EditMode,
edge: Edge,
position: u64
) -> Result<(), Error>; fn child_property(&self, property_name: &str) -> Option<Value>; fn duration(&self) -> ClockTime; fn inpoint(&self) -> Option<ClockTime>; fn layer_priority(&self) -> u32; fn max_duration(&self) -> Option<ClockTime>; fn name(&self) -> Option<GString>; fn natural_framerate(&self) -> Option<(i32, i32)>; fn parent(&self) -> Option<TimelineElement>; fn priority(&self) -> u32; fn start(&self) -> Option<ClockTime>; fn timeline(&self) -> Option<Timeline>; fn toplevel_parent(&self) -> Option<TimelineElement>; fn track_types(&self) -> TrackType; fn paste(
&self,
paste_position: ClockTime
) -> Result<TimelineElement, BoolError>; fn ripple(&self, start: ClockTime) -> Result<(), BoolError>; fn ripple_end(&self, end: ClockTime) -> Result<(), BoolError>; fn roll_end(&self, end: ClockTime) -> Result<(), BoolError>; fn roll_start(&self, start: ClockTime) -> Result<(), BoolError>; fn set_child_property(
&self,
property_name: &str,
value: &Value
) -> Result<(), BoolError>; fn set_child_property_full(
&self,
property_name: &str,
value: &Value
) -> Result<(), Error>; fn set_duration(&self, duration: impl Into<Option<ClockTime>>) -> bool; fn set_inpoint(&self, inpoint: ClockTime) -> bool; fn set_max_duration(
&self,
maxduration: impl Into<Option<ClockTime>>
) -> bool; fn set_name(&self, name: Option<&str>) -> Result<(), BoolError>; fn set_parent<P: IsA<TimelineElement>>(
&self,
parent: &P
) -> Result<(), BoolError>; fn set_priority(&self, priority: u32) -> bool; fn set_start(&self, start: impl Into<Option<ClockTime>>) -> bool; fn set_timeline<P: IsA<Timeline>>(
&self,
timeline: &P
) -> Result<(), BoolError>; fn trim(&self, start: ClockTime) -> Result<(), BoolError>; fn in_point(&self) -> u64; fn set_in_point(&self, in_point: u64); fn is_serialize(&self) -> bool; fn set_serialize(&self, serialize: bool); fn connect_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_in_point_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_max_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_parent_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_serialize_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_start_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_timeline_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Expand description
Required methods
Create a copy of self
. All the properties of self
are copied into
a new element, with the exception of property::TimelineElement::parent
,
property::TimelineElement::timeline
and property::TimelineElement::name
. Other data,
such the list of a Container
’s children, is not copied.
If deep
is true
, then the new element is prepared so that it can be
used in paste()
or TimelineExt::paste_element()
.
In the case of copying a Container
, this ensures that the children
of self
will also be pasted. The new element should not be used for
anything else and can only be used once in a pasting operation. In
particular, the new element itself is not an actual ‘deep’ copy of
self
, but should be thought of as an intermediate object used for a
single paste operation.
deep
Whether the copy is needed for pasting
Returns
The newly create element,
copied from self
.
v1_18
only.See edit_full()
, which also gives an error.
Note that the layers
argument is currently ignored, so you should
just pass None
.
layers
A whitelist of layers
where the edit can be performed, None
allows all layers in the
timeline.
new_layer_priority
The priority/index of the layer self
should be
moved to. -1 means no move
mode
The edit mode
edge
The edge of self
where the edit should occur
position
The edit position: a new location for the edge of self
(in nanoseconds) in the timeline coordinates
Returns
v1_18
only.Edits the element within its timeline by adjusting its
property::TimelineElement::start
, property::TimelineElement::duration
or
property::TimelineElement::in-point
, and potentially doing the same for
other elements in the timeline. See EditMode
for details about each
edit mode. An edit may fail if it would place one of these properties
out of bounds, or if it would place the timeline in an unsupported
configuration.
Note that if you act on a TrackElement
, this will edit its parent
Clip
instead. Moreover, for any TimelineElement
, if you select
Edge::None
for EditMode::Normal
or EditMode::Ripple
, this
will edit the toplevel instead, but still in such a way as to make the
property::TimelineElement::start
of self
reach the edit position
.
Note that if the element’s timeline has a
property::Timeline::snapping-distance
set, then the edit position may be
snapped to the edge of some element under the edited element.
new_layer_priority
can be used to switch self
, and other elements
moved by the edit, to a new layer. New layers may be be created if the
the corresponding layer priority/index does not yet exist for the
timeline.
new_layer_priority
The priority/index of the layer self
should be
moved to. -1 means no move
mode
The edit mode
edge
The edge of self
where the edit should occur
position
The edit position: a new location for the edge of self
(in nanoseconds) in the timeline coordinates
Returns
fn child_property(&self, property_name: &str) -> Option<Value>
[src]
fn child_property(&self, property_name: &str) -> Option<Value>
[src]Gets the property of a child of the element.
property_name
can either be in the format “prop-name” or
“TypeName::prop-name”, where “prop-name” is the name of the property
to get (as used in [ObjectExtManual::get()
][crate::glib::prelude::ObjectExtManual::get()]), and “TypeName” is the type name of
the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is
useful when two children of different types share the same property
name.
The first child found with the given “prop-name” property that was
registered with ges_timeline_element_add_child_property()
(and of the
type “TypeName”, if it was given) will have the corresponding
property copied into value
.
Note that ges_timeline_element_get_child_properties()
may be more
convenient for C programming.
property_name
The name of the child property to get
Returns
true
if the property was found and copied to value
.
value
The return location for the value
Gets the property::TimelineElement::duration
for the element.
Returns
The duration of self
(in nanoseconds).
Gets the property::TimelineElement::in-point
for the element.
Returns
The in-point of self
(in nanoseconds).
fn layer_priority(&self) -> u32
[src]
fn layer_priority(&self) -> u32
[src]v1_16
only.fn max_duration(&self) -> Option<ClockTime>
[src]
fn max_duration(&self) -> Option<ClockTime>
[src]Gets the property::TimelineElement::max-duration
for the element.
Returns
The max-duration of self
(in nanoseconds).
v1_18
only.Get the “natural” framerate of self
. This is to say, for example
for a GESVideoUriSource
the framerate of the source.
Note that a GESAudioSource
may also have a natural framerate if it derives
from the same GESSourceClip
asset as a GESVideoSource
, and its value will
be that of the video source. For example, if the uri of a UriClip
points
to a file that contains both a video and audio stream, then the corresponding
GESAudioUriSource
will share the natural framerate of the corresponding
GESVideoUriSource
.
Returns
Whether self
has a natural framerate or not, framerate_n
and framerate_d
will be set to, respectively, 0 and -1 if it is
not the case.
framerate_n
The framerate numerator
framerate_d
The framerate denominator
fn parent(&self) -> Option<TimelineElement>
[src]
fn parent(&self) -> Option<TimelineElement>
[src]Gets the property::TimelineElement::start
for the element.
Returns
The start of self
(in nanoseconds).
fn toplevel_parent(&self) -> Option<TimelineElement>
[src]
fn toplevel_parent(&self) -> Option<TimelineElement>
[src]Gets the toplevel property::TimelineElement::parent
of the element.
Returns
The toplevel parent of self
.
fn track_types(&self) -> TrackType
[src]
fn track_types(&self) -> TrackType
[src]Gets the track types that the element can interact with, i.e. the type
of Track
it can exist in, or will create TrackElement
-s for.
Returns
The track types that self
supports.
Paste an element inside the same timeline and layer as self
. self
must be the return of ges_timeline_element_copy()
with deep=TRUE
,
and it should not be changed before pasting.
self
is not placed in the timeline, instead a new element is created,
alike to the originally copied element. Note that the originally
copied element must stay within the same timeline and layer, at both
the point of copying and pasting.
Pasting may fail if it would place the timeline in an unsupported configuration.
After calling this function element
should not be used. In particular,
element
can not be pasted again. Instead, you can copy the
returned element and paste that copy (although, this is only possible
if the paste was successful).
See also TimelineExt::paste_element()
.
paste_position
The position in the timeline element
should be pasted
to, i.e. the property::TimelineElement::start
value for the pasted element.
Returns
The newly created element, or
None
if pasting fails.
Edits the start time of an element within its timeline in ripple mode.
See edit()
with EditMode::Ripple
and
Edge::None
.
start
The new start time of self
in ripple mode
Returns
true
if the ripple edit of self
completed, false
on
failure.
Edits the start time of an element within its timeline in roll mode.
See edit()
with EditMode::Roll
and
Edge::Start
.
start
The new start time of self
in roll mode
Returns
See set_child_property_full()
, which also gives an
error.
Note that ges_timeline_element_set_child_properties()
may be more
convenient for C programming.
property_name
The name of the child property to set
value
The value to set the property to
Returns
true
if the property was found and set.
v1_18
only.Sets the property of a child of the element.
property_name
can either be in the format “prop-name” or
“TypeName::prop-name”, where “prop-name” is the name of the property
to set (as used in [ObjectExtManual::set()
][crate::glib::prelude::ObjectExtManual::set()]), and “TypeName” is the type name of
the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is
useful when two children of different types share the same property
name.
The first child found with the given “prop-name” property that was
registered with ges_timeline_element_add_child_property()
(and of the
type “TypeName”, if it was given) will have the corresponding
property set to value
. Other children that may have also matched the
property name (and type name) are left unchanged!
property_name
The name of the child property to set
value
The value to set the property to
Returns
true
if the property was found and set.
Sets property::TimelineElement::duration
for the element.
Whilst the element is part of a Timeline
, this is the same as
editing the element with edit()
under
EditMode::Trim
with Edge::End
. In particular, the
property::TimelineElement::duration
of the element may be snapped to a
different timeline time difference from the one given. In addition,
setting may fail if it would place the timeline in an unsupported
configuration, or the element does not have enough internal content to
last the desired duration.
duration
The desired duration in its timeline
Returns
true
if duration
could be set for self
.
fn set_inpoint(&self, inpoint: ClockTime) -> bool
[src]fn set_parent<P: IsA<TimelineElement>>(
&self,
parent: &P
) -> Result<(), BoolError>
[src]fn set_priority(&self, priority: u32) -> bool
[src]
fn set_priority(&self, priority: u32) -> bool
[src]Since 1.10
fn set_in_point(&self, in_point: u64)
[src]fn is_serialize(&self) -> bool
[src]fn set_serialize(&self, serialize: bool)
[src]fn connect_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_in_point_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_max_duration_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_priority_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]Since 1.10
fn connect_serialize_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]fn connect_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]fn connect_timeline_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]Implementors
v1_18
only.v1_18
only.v1_16
only.v1_18
only.v1_18
only.Since 1.10
Since 1.10