[][src]Struct gstreamer_editing_services::Track

pub struct Track(_, _);

A Track acts an output source for a Timeline. Each one essentially provides an additional gst::Pad for the timeline, with Track:restriction-caps capabilities. Internally, a track wraps an nlecomposition filtered by a capsfilter.

A track will contain a number of TrackElement-s, and its role is to select and activate these elements according to their timings when the timeline in played. For example, a track would activate a Source when its TimelineElement:start is reached by outputting its data for its TimelineElement:duration. Similarly, a Operation would be activated by applying its effect to the source data, starting from its TimelineElement:start time and lasting for its TimelineElement:duration.

For most users, it will usually be sufficient to add newly created tracks to a timeline, but never directly add an element to a track. Whenever a Clip is added to a timeline, the clip adds its elements to the timeline's tracks and assumes responsibility for updating them.

Implements

GESTrackExt, gst::ElementExt, gst::ObjectExt, glib::object::ObjectExt

Implementations

impl Track[src]

pub fn new(type_: TrackType, caps: &Caps) -> Track[src]

Creates a new track with the given track-type and caps.

If type_ is TrackType::Video, and caps is a subset of "video/x-raw(ANY)", then a VideoTrack is created. This will automatically choose a gap creation method suitable for video data. You will likely want to set Track:restriction-caps separately. You may prefer to use the VideoTrack::new method instead.

If type_ is TrackType::Audio, and caps is a subset of "audio/x-raw(ANY)", then a AudioTrack is created. This will automatically choose a gap creation method suitable for audio data, and will set the Track:restriction-caps to the default for AudioTrack. You may prefer to use the AudioTrack::new method instead.

Otherwise, a plain Track is returned. You will likely want to set the Track:restriction-caps and call GESTrackExt::set_create_element_for_gap_func on the returned track.

type_

The Track:track-type for the track

caps

The Track:caps for the track

Returns

A new track.

Trait Implementations

impl Clone for Track[src]

impl Debug for Track[src]

impl Eq for Track[src]

impl Hash for Track[src]

impl IsA<Element> for Track[src]

impl IsA<Object> for Track[src]

impl Ord for Track[src]

impl<T: ObjectType> PartialEq<T> for Track[src]

impl<T: ObjectType> PartialOrd<T> for Track[src]

impl StaticType for Track[src]

Auto Trait Implementations

impl RefUnwindSafe for Track

impl !Send for Track

impl !Sync for Track

impl Unpin for Track

impl UnwindSafe for Track

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<O> ElementExt for O where
    O: IsA<Element>, 
[src]

impl<O> ElementExtManual for O where
    O: IsA<Element>, 
[src]

impl<T> From<T> for T[src]

impl<O> GObjectExtManualGst for O where
    O: IsA<Object>, 
[src]

impl<O> GstObjectExt for O where
    O: IsA<Object>, 
[src]

impl<O> GstObjectExtManual for O where
    O: IsA<Object>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.