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

pub trait GESPipelineExt: 'static {
    fn get_mode(&self) -> PipelineFlags;
fn get_thumbnail(&self, caps: &Caps) -> Option<Sample>;
fn get_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 get_property_audio_filter(&self) -> Option<Element>;
fn set_property_audio_filter<P: IsA<Element> + SetValueOptional>(
        &self,
        audio_filter: Option<&P>
    );
fn get_property_audio_sink(&self) -> Option<Element>;
fn set_property_audio_sink<P: IsA<Element> + SetValueOptional>(
        &self,
        audio_sink: Option<&P>
    );
fn get_property_timeline(&self) -> Option<Timeline>;
fn get_property_video_filter(&self) -> Option<Element>;
fn set_property_video_filter<P: IsA<Element> + SetValueOptional>(
        &self,
        video_filter: Option<&P>
    );
fn get_property_video_sink(&self) -> Option<Element>;
fn set_property_video_sink<P: IsA<Element> + SetValueOptional>(
        &self,
        video_sink: Option<&P>
    );
fn connect_property_audio_filter_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_audio_sink_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_mode_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_video_filter_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_video_sink_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Pipeline methods.

Implementors

Pipeline

Required methods

fn get_mode(&self) -> PipelineFlags

Returns

the PipelineFlags currently in use.

fn get_thumbnail(&self, caps: &Caps) -> Option<Sample>

Returns a gst::Sample with the currently playing image in the format specified by caps. The caller should free the sample with gst_sample_unref when finished. If ANY caps are specified, the information will be returned in the whatever format is currently used by the sink. This information can be retrieve from caps associated with the buffer.

caps

caps specifying current format. Use GST_CAPS_ANY for native size.

Returns

a gst::Sample or None

fn get_thumbnail_rgb24(&self, width: i32, height: i32) -> Option<Sample>

A convenience method for GESPipelineExt::get_thumbnail which returns a buffer in 24-bit RGB, optionally scaled to the specified width and height. If -1 is specified for either dimension, it will be left at native size. You can retreive this information from the caps associated with the buffer.

The caller is responsible for unreffing the returned sample with gst_sample_unref.

width

the requested width or -1 for native size

height

the requested height or -1 for native size

Returns

a gst::Sample or None

fn preview_get_audio_sink(&self) -> Option<Element>

Obtains a pointer to playsink's audio sink element that is used for displaying audio when the Pipeline is in PipelineFlags::FullPreview

The caller is responsible for unreffing the returned element with gst::ObjectExt::unref.

Returns

a pointer to the playsink audio sink gst::Element

fn preview_get_video_sink(&self) -> Option<Element>

Obtains a pointer to playsink's video sink element that is used for displaying video when the Pipeline is in PipelineFlags::FullPreview

The caller is responsible for unreffing the returned element with gst::ObjectExt::unref.

Returns

a pointer to the playsink video sink gst::Element

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

Sets playsink's audio sink element that is used for displaying audio when the Pipeline is in PipelineFlags::FullPreview

sink

a audio sink gst::Element

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

Sets playsink's video sink element that is used for displaying video when the Pipeline is in PipelineFlags::FullPreview

sink

a video sink gst::Element

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

Saves the current frame to the specified location.

width

the requested width or -1 for native size

height

the requested height or -1 for native size

format

a string specifying the desired mime type (for example, image/jpeg)

location

the path to save the thumbnail

Returns

true if the thumbnail was properly save, else false.

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

switches the self to the specified mode. The default mode when creating a Pipeline is PipelineFlags::FullPreview.

Note: The self will be set to gst::State::Null during this call due to the internal changes that happen. The caller will therefore have to set the self to the requested state after calling this method.

mode

the PipelineFlags to use

Returns

true if the mode was properly set, else false.

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

Specify where the pipeline shall be rendered and with what settings.

A copy of profile and output_uri will be done internally, the caller can safely free those values afterwards.

This method must be called before setting the pipeline mode to PipelineFlags::Render

output_uri

the URI to which the timeline will be rendered

profile

the gst_pbutils::EncodingProfile to use to render the timeline.

Returns

true if the settings were aknowledged properly, else false

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

Sets the timeline to use in this pipeline.

The reference to the timeline will be stolen by the self.

timeline

the Timeline to set on the self.

Returns

true if the timeline could be successfully set on the self, else false.

fn get_property_audio_filter(&self) -> Option<Element>

fn set_property_audio_filter<P: IsA<Element> + SetValueOptional>(
    &self,
    audio_filter: Option<&P>
)

fn get_property_audio_sink(&self) -> Option<Element>

Audio sink for the preview.

fn set_property_audio_sink<P: IsA<Element> + SetValueOptional>(
    &self,
    audio_sink: Option<&P>
)

Audio sink for the preview.

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

Timeline to use in this pipeline. See also GESPipelineExt::set_timeline for more info.

fn get_property_video_filter(&self) -> Option<Element>

fn set_property_video_filter<P: IsA<Element> + SetValueOptional>(
    &self,
    video_filter: Option<&P>
)

fn get_property_video_sink(&self) -> Option<Element>

Video sink for the preview.

fn set_property_video_sink<P: IsA<Element> + SetValueOptional>(
    &self,
    video_sink: Option<&P>
)

Video sink for the preview.

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

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

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

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

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

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

Loading content...

Implementors

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

Loading content...