[][src]Trait gstreamer_editing_services::GESTrackExt

pub trait GESTrackExt: 'static {
    fn add_element<P: IsA<TrackElement>>(
        &self,
        object: &P
    ) -> Result<(), BoolError>;
fn commit(&self) -> bool;
fn get_caps(&self) -> Option<Caps>;
fn get_elements(&self) -> Vec<TrackElement>;
fn get_mixing(&self) -> bool;
fn get_timeline(&self) -> Option<Timeline>;
fn remove_element<P: IsA<TrackElement>>(
        &self,
        object: &P
    ) -> Result<(), BoolError>;
fn set_mixing(&self, mixing: bool);
fn set_restriction_caps(&self, caps: &Caps);
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P);
fn update_restriction_caps(&self, caps: &Caps);
fn get_property_duration(&self) -> u64;
fn get_property_restriction_caps(&self) -> Option<Caps>;
fn get_property_track_type(&self) -> TrackType;
fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Track methods.

Implementors

Track

Required methods

fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), BoolError>

Adds the given object to the track. Sets the object's controlling track, and thus takes ownership of the object.

An object can only be added to one track.

object

the TrackElement to add

Returns

true if the object was properly added. false if the track does not want to accept the object.

fn commit(&self) -> bool

Commits all the pending changes of the TrackElement contained in the track.

When timing changes happen in a timeline, the changes are not directly done inside NLE. This method needs to be called so any changes on a clip contained in the timeline actually happen at the media processing level.

Returns

true if something as been commited false if nothing needed to be commited

fn get_caps(&self) -> Option<Caps>

Get the gst::Caps this track is configured to output.

Returns

The gst::Caps this track is configured to output.

fn get_elements(&self) -> Vec<TrackElement>

Gets the TrackElement contained in self

Returns

the list of TrackElement present in the Track sorted by priority and start.

fn get_mixing(&self) -> bool

Gets if the underlying NleComposition contains an expandable mixer.

Returns

True if there is a mixer, False otherwise.

fn get_timeline(&self) -> Option<Timeline>

Get the Timeline this track belongs to. Can be None.

Returns

The Timeline this track belongs to. Can be None.

fn remove_element<P: IsA<TrackElement>>(
    &self,
    object: &P
) -> Result<(), BoolError>

Removes the object from the track and unparents it. Unparenting it means the reference owned by self on the object will be removed. If you wish to use the object after this function, make sure you call gst::ObjectExt::ref before removing it from the self.

object

the TrackElement to remove

Returns

true if the object was removed, else false if the track could not remove the object (like if it didn't belong to the track).

fn set_mixing(&self, mixing: bool)

Sets if the Track should be mixing.

mixing

TRUE if the track should be mixing, FALSE otherwise.

fn set_restriction_caps(&self, caps: &Caps)

Sets the given caps as the caps the track has to output.

caps

the gst::Caps to set

fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P)

Sets timeline as the timeline controlling self.

timeline

a Timeline

fn update_restriction_caps(&self, caps: &Caps)

Updates the restriction caps by modifying all the fields present in caps in the original restriction caps. If for example the current restriction caps are video/x-raw, format=I420, width=360 and caps is video/x-raw, format=RGB, the restriction caps will be updated to video/x-raw, format=RGB, width=360.

Modification happens for each structure in the new caps, and one can add new fields or structures through that function.

caps

the gst::Caps to update with

fn get_property_duration(&self) -> u64

Current duration of the track

Default value: O

fn get_property_restriction_caps(&self) -> Option<Caps>

Caps used to filter/choose the output stream.

Default value: GST_CAPS_ANY.

fn get_property_track_type(&self) -> TrackType

Type of stream the track outputs. This is used when creating the Track to specify in generic terms what type of content will be outputted.

It also serves as a 'fast' way to check what type of data will be outputted from the Track without having to actually check the Track's caps property.

fn connect_commited<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

fn connect_track_element_added<F: Fn(&Self, &TrackElement) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Will be emitted after a track element was added to the track.

effect

the TrackElement that was added.

fn connect_track_element_removed<F: Fn(&Self, &TrackElement) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Will be emitted after a track element was removed from the track.

effect

the TrackElement that was removed.

fn connect_property_duration_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<Track>> GESTrackExt for O[src]

Loading content...