GES.Pipeline

g Gst.ChildProxy Gst.ChildProxy Gst.Bin Gst.Bin Gst.ChildProxy->Gst.Bin GObject.GInterface GObject.GInterface GObject.GInterface->Gst.ChildProxy GstVideo.VideoOverlay GstVideo.VideoOverlay GObject.GInterface->GstVideo.VideoOverlay GObject.Object GObject.Object GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.Object->GObject.InitiallyUnowned Gst.Pipeline Gst.Pipeline Gst.Bin->Gst.Pipeline GES.Pipeline GES.Pipeline GstVideo.VideoOverlay->GES.Pipeline Gst.Pipeline->GES.Pipeline Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object Gst.Element Gst.Element Gst.Element->Gst.Bin Gst.Object->Gst.Element

Subclasses:None

Properties

Inherited:Gst.Pipeline (3), Gst.Bin (2), Gst.Object (2)
Name Type Flags Short Description
audio-filter Gst.Element r/w the audio filter(s) to apply, if possible
audio-sink Gst.Element r/w Audio sink for the preview.
mode GES.PipelineFlags r/w Pipeline mode. See GES.Pipeline.set_mode() for more info.
timeline GES.Timeline r/w Timeline to use in this pipeline. See also GES.Pipeline.set_timeline() for more info.
video-filter Gst.Element r/w the Video filter(s) to apply, if possible
video-sink Gst.Element r/w Video sink for the preview.

Fields

Inherited:Gst.Bin (5), Gst.Element (3), Gst.Object (1), GObject.Object (1), Gst.ChildProxy (2)
Name Type Access Description
parent Gst.Pipeline r  

Class Details

class GES.Pipeline(**kwargs)
Bases:Gst.Pipeline, GstVideo.VideoOverlay
Abstract:No
Structure:GES.PipelineClass

GES.Pipeline allows developers to view and render GES.Timeline in a simple fashion. Its usage is inspired by the ‘playbin’ element from gst-plugins-base.

classmethod new()[source]
Returns:the new GES.Pipeline.
Return type:GES.Pipeline

Creates a new conveninence GES.Pipeline.

get_mode()[source]
Returns:the GES.PipelineFlags currently in use.
Return type:GES.PipelineFlags
get_thumbnail(caps)[source]
Parameters:caps (Gst.Caps) – caps specifying current format. Use %GST_CAPS_ANY for native size.
Returns:a Gst.Sample or None
Return type:Gst.Sample or None

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.

get_thumbnail_rgb24(width, height)[source]
Parameters:
  • width (int) – the requested width or -1 for native size
  • height (int) – the requested height or -1 for native size
Returns:

a Gst.Sample or None

Return type:

Gst.Sample or None

A convenience method for ges_pipeline_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.

preview_get_audio_sink()[source]
Returns:a pointer to the playsink audio sink Gst.Element
Return type:Gst.Element

Obtains a pointer to playsink’s audio sink element that is used for displaying audio when the GES.Pipeline is in GES.PipelineFlags.FULL_PREVIEW

The caller is responsible for unreffing the returned element with Gst.Object.unref.

preview_get_video_sink()[source]
Returns:a pointer to the playsink video sink Gst.Element
Return type:Gst.Element

Obtains a pointer to playsink’s video sink element that is used for displaying video when the GES.Pipeline is in GES.PipelineFlags.FULL_PREVIEW

The caller is responsible for unreffing the returned element with Gst.Object.unref.

preview_set_audio_sink(sink)[source]
Parameters:sink (Gst.Element) – a audio sink Gst.Element

Sets playsink’s audio sink element that is used for displaying audio when the GES.Pipeline is in GES.PipelineFlags.FULL_PREVIEW

preview_set_video_sink(sink)[source]
Parameters:sink (Gst.Element) – a video sink Gst.Element

Sets playsink’s video sink element that is used for displaying video when the GES.Pipeline is in GES.PipelineFlags.FULL_PREVIEW

save_thumbnail(width, height, format, location)[source]
Parameters:
  • width (int) – the requested width or -1 for native size
  • height (int) – the requested height or -1 for native size
  • format (str) – a string specifying the desired mime type (for example, image/jpeg)
  • location (str) – the path to save the thumbnail
Raises:

GLib.Error

Returns:

True if the thumbnail was properly save, else False.

Return type:

bool

Saves the current frame to the specified location.

set_mode(mode)[source]
Parameters:mode (GES.PipelineFlags) – the GES.PipelineFlags to use
Returns:True if the mode was properly set, else False.
Return type:bool

switches the self to the specified mode. The default mode when creating a GES.Pipeline is GES.PipelineFlags.FULL_PREVIEW.

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.

set_render_settings(output_uri, profile)[source]
Parameters:
Returns:

True if the settings were aknowledged properly, else False

Return type:

bool

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 GES.PipelineFlags.RENDER

set_timeline(timeline)[source]
Parameters:timeline (GES.Timeline) – the GES.Timeline to set on the self.
Returns:True if the timeline could be successfully set on the self, else False.
Return type:bool

Sets the timeline to use in this pipeline.

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

Property Details

GES.Pipeline.props.audio_filter
Name:audio-filter
Type:Gst.Element
Default Value:None
Flags:READABLE, WRITABLE

the audio filter(s) to apply, if possible

GES.Pipeline.props.audio_sink
Name:audio-sink
Type:Gst.Element
Default Value:None
Flags:READABLE, WRITABLE

Audio sink for the preview.

GES.Pipeline.props.mode
Name:mode
Type:GES.PipelineFlags
Default Value:GES.PipelineFlags.FULL_PREVIEW | GES.PipelineFlags.VIDEO_PREVIEW | GES.PipelineFlags.AUDIO_PREVIEW
Flags:READABLE, WRITABLE

Pipeline mode. See GES.Pipeline.set_mode() for more info.

GES.Pipeline.props.timeline
Name:timeline
Type:GES.Timeline
Default Value:None
Flags:READABLE, WRITABLE

Timeline to use in this pipeline. See also GES.Pipeline.set_timeline() for more info.

GES.Pipeline.props.video_filter
Name:video-filter
Type:Gst.Element
Default Value:None
Flags:READABLE, WRITABLE

the Video filter(s) to apply, if possible

GES.Pipeline.props.video_sink
Name:video-sink
Type:Gst.Element
Default Value:None
Flags:READABLE, WRITABLE

Video sink for the preview.