Struct gstreamer_editing_services::TimelineElement [−][src]
pub struct TimelineElement(_);
Expand description
A TimelineElement
will have some temporal extent in its
corresponding property::TimelineElement::timeline
, controlled by its
property::TimelineElement::start
and property::TimelineElement::duration
. This
determines when its content will be displayed, or its effect applied,
in the timeline. Several objects may overlap within a given
Timeline
, in which case their property::TimelineElement::priority
is used
to determine their ordering in the timeline. Priority is mostly handled
internally by Layer
-s and Clip
-s.
A timeline element can have a property::TimelineElement::parent
,
such as a Clip
, which is responsible for controlling its timing.
Editing
Elements can be moved around in their property::TimelineElement::timeline
by
setting their property::TimelineElement::start
and
property::TimelineElement::duration
using TimelineElementExt::set_start()
and TimelineElementExt::set_duration()
. Additionally, which parts of
the underlying content are played in the timeline can be adjusted by
setting the property::TimelineElement::in-point
using
TimelineElementExt::set_inpoint()
. The library also provides
TimelineElementExt::edit()
, with various EditMode
-s, which can
adjust these properties in a convenient way, as well as introduce
similar changes in neighbouring or later elements in the timeline.
However, a timeline may refuse a change in these properties if they
would place the timeline in an unsupported configuration. See
Timeline
for its overlap rules.
Additionally, an edit may be refused if it would place one of the
timing properties out of bounds (such as a negative time value for
property::TimelineElement::start
, or having insufficient internal
content to last for the desired property::TimelineElement::duration
).
Time Coordinates
There are three main sets of time coordinates to consider when using timeline elements:
- Timeline coordinates: these are the time coordinates used in the
output of the timeline in its
Track
-s. Each track share the same coordinates, so there is only one set of coordinates for the timeline. These extend indefinitely from 0. The times used for editing (including settingproperty::TimelineElement::start
andproperty::TimelineElement::duration
) use these coordinates, since these define when an element is present and for how long the element lasts for in the timeline. - Internal source coordinates: these are the time coordinates used
internally at the element’s output. This is only really defined for
TrackElement
-s, where it refers to time coordinates used at the final source pad of the wrappedgst::Element
-s. However, these coordinates may also be used in aClip
in reference to its children. In particular, these are the coordinates used forproperty::TimelineElement::in-point
andproperty::TimelineElement::max-duration
. - Internal sink coordinates: these are the time coordinates used
internally at the element’s input. A
GESSource
has no input, so these would be undefined. Otherwise, for mostTrackElement
-s these will be the same set of coordinates as the internal source coordinates because the element does not change the timing internally. OnlyBaseEffect
can support elements where these are different. SeeBaseEffect
for more information.
You can determine the timeline time for a given internal source time
in a Track
in a Clip
using
ClipExt::timeline_time_from_internal_time()
, and vice versa using
ClipExt::internal_time_from_timeline_time()
, for the purposes of
editing and setting timings properties.
Children Properties
If a timeline element owns another gst::Object
and wishes to expose
some of its properties, it can do so by registering the property as one
of the timeline element’s children properties using
ges_timeline_element_add_child_property()
. The registered property of
the child can then be read and set using the
TimelineElementExt::child_property()
and
TimelineElementExt::set_child_property()
methods, respectively. Some
sub-classed objects will be created with pre-registered children
properties; for example, to expose part of an underlying gst::Element
that is used internally. The registered properties can be listed with
ges_timeline_element_list_children_properties()
.
This is an Abstract Base Class, you cannot instantiate it.
Implements
TimelineElementExt
, glib::ObjectExt
, ExtractableExt
, [TimelineElementExtManual
][trait@crate::prelude::TimelineElementExtManual]
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for TimelineElement
impl !Send for TimelineElement
impl !Sync for TimelineElement
impl Unpin for TimelineElement
impl UnwindSafe for TimelineElement
Blanket Implementations
Mutably borrows from an owned value. Read more
Upcasts an object to a superclass or interface T
. Read more
Upcasts an object to a reference of its superclass or interface T
. Read more
Tries to downcast to a subclass or interface implementor T
. Read more
Tries to downcast to a reference of its subclass or interface implementor T
. Read more
Tries to cast to an object of type T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read more
Tries to cast to reference to an object of type T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read more
Casts to T
unconditionally. Read more
Casts to &T
unconditionally. Read more
Returns true
if the object is an instance of (can be cast to) T
.
pub fn set_properties(
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
[src]pub fn set_properties_from_value(
&self,
property_values: &[(&str, Value)]
) -> Result<(), BoolError>
[src]pub fn set_property<'a, N, V>(
&self,
property_name: N,
value: V
) -> Result<(), BoolError> where
V: ToValue,
N: Into<&'a str>,
[src]pub fn set_property_from_value<'a, N>(
&self,
property_name: N,
value: &Value
) -> Result<(), BoolError> where
N: Into<&'a str>,
[src]pub fn property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
[src]Safety Read more
Safety Read more
Safety Read more
Safety Read more
pub fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
[src]pub fn connect_notify_local<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec),
[src]pub unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
[src]pub fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
[src]pub fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
[src]pub fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
[src]Same as connect
but takes a SignalId
instead of a signal name.
pub fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
[src]Same as connect_local
but takes a SignalId
instead of a signal name.
pub unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
[src]Same as connect_unsafe
but takes a SignalId
instead of a signal name.
Emit signal by signal id.
Emit signal with details by signal id.
Emit signal by it’s name.
pub fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
O: ObjectType,
N: Into<&'a str>,
M: Into<&'a str>,
[src]Same as emit
but takes Value
for the arguments.
Same as emit_by_name
but takes Value
for the arguments.
Returns a SendValue
clone of self
.
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,
[src]