GES.Pipeline

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

Subclasses:

None

Methods

Inherited:

Gst.Pipeline (13), Gst.Bin (18), Gst.Element (82), Gst.Object (27), GObject.Object (37), Gst.ChildProxy (9), GstVideo.VideoOverlay (8)

Structs:

Gst.ElementClass (10), GObject.ObjectClass (5)

class

new ()

get_mode ()

get_thumbnail (caps)

get_thumbnail_rgb24 (width, height)

preview_get_audio_sink ()

preview_get_video_sink ()

preview_set_audio_sink (sink)

preview_set_video_sink (sink)

save_thumbnail (width, height, format, location)

set_mode (mode)

set_render_settings (output_uri, profile)

set_timeline (timeline)

Virtual Methods

Inherited:

Gst.Bin (8), Gst.Element (16), Gst.Object (1), GObject.Object (7), Gst.ChildProxy (5), GstVideo.VideoOverlay (4)

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

The pipeline’s mode.

timeline

GES.Timeline

r/w

The timeline to use in this pipeline.

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.

Signals

Inherited:

Gst.Bin (5), Gst.Element (3), Gst.Object (1), GObject.Object (1), Gst.ChildProxy (2)

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

A GES.Pipeline can take an audio-video GES.Timeline and conveniently link its GES.Track-s to an internal #playsink element, for preview/playback, and an internal #encodebin element, for rendering. You can switch between these modes using GES.Pipeline.set_mode().

You can choose the specific audio and video sinks used for previewing the timeline by setting the GES.Pipeline :audio-sink and GES.Pipeline :video-sink properties.

You can set the encoding and save location used in rendering by calling GES.Pipeline.set_render_settings().

classmethod new()[source]
Returns:

The newly created pipeline.

Return type:

GES.Pipeline

Creates a new pipeline.

get_mode()[source]
Returns:

The current mode of self.

Return type:

GES.PipelineFlags

Gets the GES.Pipeline :mode of the pipeline.

get_thumbnail(caps)[source]
Parameters:

caps (Gst.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.

Return type:

Gst.Sample or None

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

get_thumbnail_rgb24(width, height)[source]
Parameters:
  • width (int) – The requested pixel width of the image, or -1 to use the native size

  • height (int) – 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.

Return type:

Gst.Sample or None

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 GES.Pipeline.get_thumbnail().

preview_get_audio_sink()[source]
Returns:

The audio sink used by self for preview.

Return type:

Gst.Element or None

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

preview_get_video_sink()[source]
Returns:

The video sink used by self for preview.

Return type:

Gst.Element or None

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

preview_set_audio_sink(sink)[source]
Parameters:

sink (Gst.Element or None) – A audio sink for self to use for preview

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

preview_set_video_sink(sink)[source]
Parameters:

sink (Gst.Element or None) – A video sink for self to use for preview

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

save_thumbnail(width, height, format, location)[source]
Parameters:
  • width (int) – The requested pixel width of the image, or -1 to use the native size

  • height (int) – The requested pixel height of the image, or -1 to use the native size

  • format (str) – The desired mime type (for example, “image/jpeg”)

  • location (str) – The path to save the thumbnail to

Raises:

GLib.Error

Returns:

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

Return type:

bool

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

set_mode(mode)[source]
Parameters:

mode (GES.PipelineFlags) – The mode to set for self

Returns:

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

Return type:

bool

Sets the GES.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 GES.PipelineFlags.RENDER or GES.PipelineFlags.SMART_RENDER, the call to this method will fail otherwise.

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

True if the settings were successfully set on self.

Return type:

bool

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

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

set_timeline(timeline)[source]
Parameters:

timeline (GES.Timeline) – The timeline to set for self

Returns:

True if timeline was successfully given to self.

Return type:

bool

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

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 during playback in preview mode, immediately before the GES.Pipeline :audio-sink. This exposes the #playsink:audio-filter property of the internal #playsink.

New in version 1.6.0.

GES.Pipeline.props.audio_sink
Name:

audio-sink

Type:

Gst.Element

Default Value:

None

Flags:

READABLE, WRITABLE

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

GES.Pipeline.props.mode
Name:

mode

Type:

GES.PipelineFlags

Default Value:

GES.PipelineFlags.AUDIO_PREVIEW | GES.PipelineFlags.VIDEO_PREVIEW | GES.PipelineFlags.FULL_PREVIEW

Flags:

READABLE, WRITABLE

The pipeline’s mode. In preview mode (for audio or video, or both) the pipeline can display the timeline’s content to an end user. In rendering mode the pipeline can encode the timeline’s content and save it to a file.

GES.Pipeline.props.timeline
Name:

timeline

Type:

GES.Timeline

Default Value:

None

Flags:

READABLE, WRITABLE

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.

GES.Pipeline.props.video_filter
Name:

video-filter

Type:

Gst.Element

Default Value:

None

Flags:

READABLE, WRITABLE

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

New in version 1.6.0.

GES.Pipeline.props.video_sink
Name:

video-sink

Type:

Gst.Element

Default Value:

None

Flags:

READABLE, WRITABLE

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