Trait gstreamer_editing_services::prelude::GESPipelineExt[][src]

pub trait GESPipelineExt: 'static {
Show methods fn mode(&self) -> PipelineFlags;
fn thumbnail(&self, caps: &Caps) -> Option<Sample>;
fn thumbnail_rgb24(&self, width: i32, height: i32) -> Option<Sample>;
fn preview_get_audio_sink(&self) -> Option<Element>;
fn preview_get_video_sink(&self) -> Option<Element>;
fn preview_set_audio_sink<P: IsA<Element>>(&self, sink: &P);
fn preview_set_video_sink<P: IsA<Element>>(&self, sink: &P);
fn save_thumbnail(
        &self,
        width: i32,
        height: i32,
        format: &str,
        location: &str
    ) -> Result<(), Error>;
fn set_mode(&self, mode: PipelineFlags) -> Result<(), BoolError>;
fn set_render_settings<P: IsA<EncodingProfile>>(
        &self,
        output_uri: &str,
        profile: &P
    ) -> Result<(), BoolError>;
fn set_timeline<P: IsA<Timeline>>(
        &self,
        timeline: &P
    ) -> Result<(), BoolError>;
fn audio_filter(&self) -> Option<Element>;
fn set_audio_filter<P: IsA<Element>>(&self, audio_filter: Option<&P>);
fn audio_sink(&self) -> Option<Element>;
fn set_audio_sink<P: IsA<Element>>(&self, audio_sink: Option<&P>);
fn timeline(&self) -> Option<Timeline>;
fn video_filter(&self) -> Option<Element>;
fn set_video_filter<P: IsA<Element>>(&self, video_filter: Option<&P>);
fn video_sink(&self) -> Option<Element>;
fn set_video_sink<P: IsA<Element>>(&self, video_sink: Option<&P>);
fn connect_audio_filter_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_audio_sink_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mode_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_timeline_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_video_filter_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_video_sink_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}

Trait containing all Pipeline methods.

Implementors

crate::Pipeline

Required methods

fn mode(&self) -> PipelineFlags[src]

Gets the [crate::Pipeline:mode] of the pipeline.

Returns

The current mode of self.

fn thumbnail(&self, caps: &Caps) -> Option<Sample>[src]

Gets a sample from the pipeline of the currently displayed image in preview, in the specified format.

Note that if you use “ANY” caps for caps, then the current format of the image is used. You can retrieve these caps from the returned sample with [crate::gst::Sample::get_caps()].

caps

Some caps to specifying the desired format, or GST_CAPS_ANY to use the native format

Returns

A sample of self’s current image preview in the format given by caps, or None if an error prevented fetching the sample.

fn thumbnail_rgb24(&self, width: i32, height: i32) -> Option<Sample>[src]

Gets a sample from the pipeline of the currently displayed image in preview, in the 24-bit “RGB” format and of the desired width and height.

See [Self::get_thumbnail()].

width

The requested pixel width of the image, or -1 to use the native size

height

The requested pixel height of the image, or -1 to use the native size

Returns

A sample of self’s current image preview in the “RGB” format, scaled to width and height, or None if an error prevented fetching the sample.

fn preview_get_audio_sink(&self) -> Option<Element>[src]

Gets the [crate::Pipeline:audio-sink] of the pipeline.

Returns

The audio sink used by self for preview.

fn preview_get_video_sink(&self) -> Option<Element>[src]

Gets the [crate::Pipeline:video-sink] of the pipeline.

Returns

The video sink used by self for preview.

fn preview_set_audio_sink<P: IsA<Element>>(&self, sink: &P)[src]

Sets the [crate::Pipeline:audio-sink] of the pipeline.

sink

A audio sink for self to use for preview

fn preview_set_video_sink<P: IsA<Element>>(&self, sink: &P)[src]

Sets the [crate::Pipeline:video-sink] of the pipeline.

sink

A video sink for self to use for preview

fn save_thumbnail(
    &self,
    width: i32,
    height: i32,
    format: &str,
    location: &str
) -> Result<(), Error>
[src]

Saves the currently displayed image of the pipeline in preview to the given location, in the specified dimensions and format.

width

The requested pixel width of the image, or -1 to use the native size

height

The requested pixel height of the image, or -1 to use the native size

format

The desired mime type (for example, “image/jpeg”)

location

The path to save the thumbnail to

Returns

true if self’s current image preview was successfully saved to location using the given format, height and width.

fn set_mode(&self, mode: PipelineFlags) -> Result<(), BoolError>[src]

Sets the [crate::Pipeline:mode] of the pipeline.

Note that the pipeline will be set to crate::gst::State::Null during this call to perform the necessary changes. You will need to set the state again yourself after calling this.

NOTE: Rendering settings need to be set before setting mode to [crate::PipelineFlags::Render] or [crate::PipelineFlags::SmartRender], the call to this method will fail otherwise.

mode

The mode to set for self

Returns

true if the mode of self was successfully set to mode.

fn set_render_settings<P: IsA<EncodingProfile>>(
    &self,
    output_uri: &str,
    profile: &P
) -> Result<(), BoolError>
[src]

Specifies encoding setting to be used by the pipeline to render its [crate::Pipeline:timeline], and where the result should be written to.

This method must be called before setting the pipeline mode to [crate::PipelineFlags::Render].

output_uri

The URI to save the [crate::Pipeline:timeline] rendering result to

profile

The encoding to use for rendering the [crate::Pipeline:timeline]

Returns

true if the settings were successfully set on self.

fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), BoolError>[src]

Takes the given timeline and sets it as the [crate::Pipeline:timeline] for the pipeline.

Note that you should only call this method once on a given pipeline because a pipeline can not have its [crate::Pipeline:timeline] changed after it has been set.

timeline

The timeline to set for self

Returns

true if timeline was successfully given to self.

fn audio_filter(&self) -> Option<Element>[src]

fn set_audio_filter<P: IsA<Element>>(&self, audio_filter: Option<&P>)[src]

fn audio_sink(&self) -> Option<Element>[src]

fn set_audio_sink<P: IsA<Element>>(&self, audio_sink: Option<&P>)[src]

fn timeline(&self) -> Option<Timeline>[src]

fn video_filter(&self) -> Option<Element>[src]

fn set_video_filter<P: IsA<Element>>(&self, video_filter: Option<&P>)[src]

fn video_sink(&self) -> Option<Element>[src]

fn set_video_sink<P: IsA<Element>>(&self, video_sink: Option<&P>)[src]

fn connect_audio_filter_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_audio_sink_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]

fn connect_timeline_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_video_filter_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_video_sink_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...

Implementors

impl<O: IsA<Pipeline>> GESPipelineExt for O[src]

fn mode(&self) -> PipelineFlags[src]

fn thumbnail(&self, caps: &Caps) -> Option<Sample>[src]

fn thumbnail_rgb24(&self, width: i32, height: i32) -> Option<Sample>[src]

fn preview_get_audio_sink(&self) -> Option<Element>[src]

fn preview_get_video_sink(&self) -> Option<Element>[src]

fn preview_set_audio_sink<P: IsA<Element>>(&self, sink: &P)[src]

fn preview_set_video_sink<P: IsA<Element>>(&self, sink: &P)[src]

fn save_thumbnail(
    &self,
    width: i32,
    height: i32,
    format: &str,
    location: &str
) -> Result<(), Error>
[src]

fn set_mode(&self, mode: PipelineFlags) -> Result<(), BoolError>[src]

fn set_render_settings<P: IsA<EncodingProfile>>(
    &self,
    output_uri: &str,
    profile: &P
) -> Result<(), BoolError>
[src]

fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), BoolError>[src]

fn audio_filter(&self) -> Option<Element>[src]

fn set_audio_filter<P: IsA<Element>>(&self, audio_filter: Option<&P>)[src]

fn audio_sink(&self) -> Option<Element>[src]

fn set_audio_sink<P: IsA<Element>>(&self, audio_sink: Option<&P>)[src]

fn timeline(&self) -> Option<Timeline>[src]

fn video_filter(&self) -> Option<Element>[src]

fn set_video_filter<P: IsA<Element>>(&self, video_filter: Option<&P>)[src]

fn video_sink(&self) -> Option<Element>[src]

fn set_video_sink<P: IsA<Element>>(&self, video_sink: Option<&P>)[src]

fn connect_audio_filter_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_audio_sink_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]

fn connect_timeline_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_video_filter_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_video_sink_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...