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:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
the audio filter(s) to apply, if possible |
||
r/w |
Audio sink for the preview. |
||
r/w |
The pipeline’s mode. |
||
r/w |
The timeline to use in this pipeline. |
||
r/w |
the Video filter(s) to apply, if possible |
||
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 |
r |
Class Details¶
- class GES.Pipeline(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
GES.Pipeline
can take an audio-videoGES.Timeline
and conveniently link itsGES.Track
-s to an internal #playsink element, for preview/playback, and an internal #encodebin element, for rendering. You can switch between these modes usingGES.Pipeline.set_mode
().You can choose the specific audio and video sinks used for previewing the timeline by setting the
GES.Pipeline
:audio-sink
andGES.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:
Creates a new pipeline.
- get_mode()[source]¶
- Returns:
The current mode of self.
- Return type:
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
orNone
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:
- 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
orNone
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
orNone
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
orNone
Gets the
GES.Pipeline
:video-sink
of the pipeline.
- preview_set_audio_sink(sink)[source]¶
- Parameters:
sink (
Gst.Element
orNone
) – 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
orNone
) – 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:
- Raises:
- Returns:
True
if self's current image preview was successfully saved to location using the given format, height and width.- Return type:
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:
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
orGES.PipelineFlags.SMART_RENDER
, the call to this method will fail otherwise.
- set_render_settings(output_uri, profile)[source]¶
- Parameters:
output_uri (
str
) – The URI to save theGES.Pipeline
:timeline
rendering result toprofile (
GstPbutils.EncodingProfile
) – The encoding to use for rendering theGES.Pipeline
:timeline
- Returns:
True
if the settings were successfully set on self.- Return type:
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:
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:
- Default Value:
- Flags:
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:
- Default Value:
- Flags:
The audio sink used for preview. This exposes the #playsink:audio-sink property of the internal #playsink.
- GES.Pipeline.props.mode¶
- Name:
mode
- Type:
- Default Value:
GES.PipelineFlags.AUDIO_PREVIEW
|GES.PipelineFlags.VIDEO_PREVIEW
|GES.PipelineFlags.FULL_PREVIEW
- Flags:
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:
- Default Value:
- Flags:
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:
- Default Value:
- Flags:
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:
- Default Value:
- Flags:
The video sink used for preview. This exposes the #playsink:video-sink property of the internal #playsink.