pub trait GESPipelineExt: IsA<Pipeline> + Sealed + 'static {
Show 26 methods
// Provided 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(&self, sink: Option<&impl IsA<Element>>) { ... }
fn preview_set_video_sink(&self, sink: Option<&impl IsA<Element>>) { ... }
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(
&self,
output_uri: &str,
profile: &impl IsA<EncodingProfile>,
) -> Result<(), BoolError> { ... }
fn set_timeline(
&self,
timeline: &impl IsA<Timeline>,
) -> 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 { ... }
}
Provided Methods§
sourcefn mode(&self) -> PipelineFlags
fn mode(&self) -> PipelineFlags
sourcefn thumbnail(&self, caps: &Caps) -> Option<Sample>
fn thumbnail(&self, caps: &Caps) -> Option<Sample>
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.
sourcefn thumbnail_rgb24(&self, width: i32, height: i32) -> Option<Sample>
fn thumbnail_rgb24(&self, width: i32, height: i32) -> Option<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.
sourcefn preview_get_audio_sink(&self) -> Option<Element>
fn preview_get_audio_sink(&self) -> Option<Element>
sourcefn preview_get_video_sink(&self) -> Option<Element>
fn preview_get_video_sink(&self) -> Option<Element>
sourcefn preview_set_audio_sink(&self, sink: Option<&impl IsA<Element>>)
fn preview_set_audio_sink(&self, sink: Option<&impl IsA<Element>>)
sourcefn preview_set_video_sink(&self, sink: Option<&impl IsA<Element>>)
fn preview_set_video_sink(&self, sink: Option<&impl IsA<Element>>)
sourcefn save_thumbnail(
&self,
width: i32,
height: i32,
format: &str,
location: &str,
) -> Result<(), Error>
fn save_thumbnail( &self, width: i32, height: i32, format: &str, location: &str, ) -> Result<(), Error>
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
.
sourcefn set_mode(&self, mode: PipelineFlags) -> Result<(), BoolError>
fn set_mode(&self, mode: PipelineFlags) -> Result<(), BoolError>
Sets the 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
toPipelineFlags::RENDER
orPipelineFlags::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
.
sourcefn set_render_settings(
&self,
output_uri: &str,
profile: &impl IsA<EncodingProfile>,
) -> Result<(), BoolError>
fn set_render_settings( &self, output_uri: &str, profile: &impl IsA<EncodingProfile>, ) -> Result<(), BoolError>
Specifies encoding setting to be used by the pipeline to render its
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 timeline
rendering
result to
§profile
The encoding to use for rendering the timeline
§Returns
true
if the settings were successfully set on self
.
sourcefn set_timeline(&self, timeline: &impl IsA<Timeline>) -> Result<(), BoolError>
fn set_timeline(&self, timeline: &impl IsA<Timeline>) -> Result<(), BoolError>
Takes the given timeline and sets it as the timeline
for
the pipeline.
Note that you should only call this method once on a given pipeline
because a pipeline can not have its timeline
changed after
it has been set.
§timeline
The timeline to set for self
§Returns
true
if timeline
was successfully given to self
.
sourcefn audio_filter(&self) -> Option<Element>
fn audio_filter(&self) -> Option<Element>
The audio filter(s) to apply during playback in preview mode,
immediately before the audio-sink
. This exposes the
playsink:audio-filter
property of the internal playsink
.
sourcefn set_audio_filter<P: IsA<Element>>(&self, audio_filter: Option<&P>)
fn set_audio_filter<P: IsA<Element>>(&self, audio_filter: Option<&P>)
The audio filter(s) to apply during playback in preview mode,
immediately before the audio-sink
. This exposes the
playsink:audio-filter
property of the internal playsink
.
sourcefn audio_sink(&self) -> Option<Element>
fn audio_sink(&self) -> Option<Element>
The audio sink used for preview. This exposes the
playsink:audio-sink
property of the internal playsink
.
sourcefn set_audio_sink<P: IsA<Element>>(&self, audio_sink: Option<&P>)
fn set_audio_sink<P: IsA<Element>>(&self, audio_sink: Option<&P>)
The audio sink used for preview. This exposes the
playsink:audio-sink
property of the internal playsink
.
sourcefn timeline(&self) -> Option<Timeline>
fn timeline(&self) -> Option<Timeline>
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.
sourcefn video_filter(&self) -> Option<Element>
fn video_filter(&self) -> Option<Element>
The video filter(s) to apply during playback in preview mode,
immediately before the video-sink
. This exposes the
playsink:video-filter
property of the internal playsink
.
sourcefn set_video_filter<P: IsA<Element>>(&self, video_filter: Option<&P>)
fn set_video_filter<P: IsA<Element>>(&self, video_filter: Option<&P>)
The video filter(s) to apply during playback in preview mode,
immediately before the video-sink
. This exposes the
playsink:video-filter
property of the internal playsink
.
sourcefn video_sink(&self) -> Option<Element>
fn video_sink(&self) -> Option<Element>
The video sink used for preview. This exposes the
playsink:video-sink
property of the internal playsink
.
sourcefn set_video_sink<P: IsA<Element>>(&self, video_sink: Option<&P>)
fn set_video_sink<P: IsA<Element>>(&self, video_sink: Option<&P>)
The video sink used for preview. This exposes the
playsink:video-sink
property of the internal playsink
.