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;
}
Expand description

Trait containing all Pipeline methods.

Implementors

Pipeline

Required methods

Gets the property::Pipeline::mode of the pipeline.

Returns

The current mode of self.

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 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.

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 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.

Gets the property::Pipeline::audio-sink of the pipeline.

Returns

The audio sink used by self for preview.

Gets the property::Pipeline::video-sink of the pipeline.

Returns

The video sink used by self for preview.

Sets the property::Pipeline::audio-sink of the pipeline.

sink

A audio sink for self to use for preview

Sets the property::Pipeline::video-sink of the pipeline.

sink

A video sink for self to use for preview

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.

Sets the property::Pipeline::mode of the pipeline.

Note that the pipeline will be set to 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 PipelineFlags::RENDER or PipelineFlags::SMART_RENDER, 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.

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

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

output_uri

The URI to save the property::Pipeline::timeline rendering result to

profile

The encoding to use for rendering the property::Pipeline::timeline

Returns

true if the settings were successfully set on self.

Takes the given timeline and sets it as the property::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 property::Pipeline::timeline changed after it has been set.

timeline

The timeline to set for self

Returns

true if timeline was successfully given to self.

The audio filter(s) to apply during playback in preview mode, immediately before the property::Pipeline::audio-sink. This exposes the playsink:audio-filter property of the internal playsink.

The audio filter(s) to apply during playback in preview mode, immediately before the property::Pipeline::audio-sink. This exposes the playsink:audio-filter property of the internal playsink.

The audio sink used for preview. This exposes the playsink:audio-sink property of the internal playsink.

The audio sink used for preview. This exposes the playsink:audio-sink property of the internal playsink.

The timeline used by this pipeline, whose content it will play and render, or None if the pipeline does not yet have a timeline.

Note that after you set the timeline for the first time, subsequent calls to change the timeline will fail.

The video filter(s) to apply during playback in preview mode, immediately before the property::Pipeline::video-sink. This exposes the playsink:video-filter property of the internal playsink.

The video filter(s) to apply during playback in preview mode, immediately before the property::Pipeline::video-sink. This exposes the playsink:video-filter property of the internal playsink.

The video sink used for preview. This exposes the playsink:video-sink property of the internal playsink.

The video sink used for preview. This exposes the playsink:video-sink property of the internal playsink.

Implementors