Enums

Details

class GstPlay.PlayColorBalanceType(value)

Bases: GObject.GEnum

New in version 1.20.

classmethod get_name(type)
Parameters:

type (GstPlay.PlayColorBalanceType) – a GstPlay.PlayColorBalanceType

Returns:

a string with the name of the color balance type.

Return type:

str

Gets a string representing the given color balance type.

New in version 1.20.

BRIGHTNESS = 0

brightness or black level.

CONTRAST = 1

contrast or luma gain.

SATURATION = 2

color saturation or chroma gain.

HUE = 3

hue or color balance.

class GstPlay.PlayError(value)

Bases: GObject.GEnum

New in version 1.20.

classmethod get_name(error)
Parameters:

error (GstPlay.PlayError) – a GstPlay.PlayError

Returns:

a string with the given error.

Return type:

str

Gets a string representing the given error.

New in version 1.20.

classmethod quark()
Return type:

int

New in version 1.20.

FAILED = 0

generic error.

class GstPlay.PlayMessage(value)

Bases: GObject.GEnum

New in version 1.20.

classmethod get_name(message_type)
Parameters:

message_type (GstPlay.PlayMessage) – a GstPlay.PlayMessage

Returns:

a string with the name of the message.

Return type:

str

New in version 1.20.

classmethod get_stream_id(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

The stream ID this message applies to

Return type:

str or None

Reads the stream ID the play message msg applies to, if any.

New in version 1.26.

classmethod get_uri(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

The URI this message applies to

Return type:

str

Reads the URI the play message msg applies to.

New in version 1.26.

classmethod parse_buffering(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting buffering percent

Return type:

percent: int

Parse the given buffering msg and extract the corresponding value

New in version 1.26.

classmethod parse_buffering_percent(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting buffering percent

Return type:

percent: int

Parse the given buffering msg and extract the corresponding value

New in version 1.20.

Deprecated since version 1.26: Use GstPlay.PlayMessage.parse_buffering().

classmethod parse_duration_changed(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting duration

Return type:

duration: int

Parse the given duration-changed msg and extract the corresponding #GstClockTime

New in version 1.26.

classmethod parse_duration_updated(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting duration

Return type:

duration: int

Parse the given duration-changed msg and extract the corresponding #GstClockTime

New in version 1.20.

Deprecated since version 1.26: Use GstPlay.PlayMessage.parse_duration_changed().

classmethod parse_error(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

error:

the resulting error

details:

A Gst.Structure containing additional details about the error

Return type:

(error: GLib.Error, details: Gst.Structure or None)

Parse the given error msg and extract the corresponding GLib.Error.

Since 1.26 the details will always contain the URI this refers to in an “uri” field of type string, and (if known) the string “stream-id” it is referring to.

New in version 1.20.

classmethod parse_error_missing_plugin(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

True if the message contained a missing-plugin error.

descriptions:

a None-terminated array of descriptions

installer_details:

a None-terminated array of installer details

Return type:

(bool, descriptions: [str], installer_details: [str])

Parses missing plugin descriptions and installer details from a GST_PLAY_ERROR_MISSING_PLUGIN error message.

Both arrays will have the same length, and strings at the same index correspond to each other.

The installer details can be passed to GstPbutils.install_plugins_sync() or GstPbutils.install_plugins_async().

New in version 1.26.

classmethod parse_media_info_updated(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting media info

Return type:

info: GstPlay.PlayMediaInfo

Parse the given media-info-updated msg and extract the corresponding media information

New in version 1.20.

classmethod parse_muted_changed(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting audio muted state

Return type:

muted: bool

Parse the given mute-changed msg and extract the corresponding audio muted state

New in version 1.20.

classmethod parse_position_updated(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting position

Return type:

position: int

Parse the given position-updated msg and extract the corresponding #GstClockTime

New in version 1.20.

classmethod parse_seek_done(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting position

Return type:

position: int

Parse the given seek-done msg and extract the corresponding #GstClockTime

New in version 1.26.

classmethod parse_state_changed(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting play state

Return type:

state: GstPlay.PlayState

Parse the given state-changed msg and extract the corresponding GstPlay.PlayState

New in version 1.20.

classmethod parse_type(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting message type

Return type:

type: GstPlay.PlayMessage

Parse the given msg and extract its GstPlay.PlayMessage type.

New in version 1.20.

classmethod parse_uri_loaded(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting URI

Return type:

uri: str

Parse the given uri-loaded msg and extract the corresponding value

New in version 1.26.

classmethod parse_video_dimensions_changed(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

width:

the resulting video width

height:

the resulting video height

Return type:

(width: int, height: int)

Parse the given video-dimensions-changed msg and extract the corresponding video dimensions

New in version 1.20.

classmethod parse_volume_changed(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

the resulting audio volume

Return type:

volume: float

Parse the given volume-changed msg and extract the corresponding audio volume

New in version 1.20.

classmethod parse_warning(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

error:

the resulting warning

details:

A Gst.Structure containing additional details about the warning

Return type:

(error: GLib.Error, details: Gst.Structure or None)

Parse the given warning msg and extract the corresponding GLib.Error.

Since 1.26 the details will always contain the URI this refers to in an “uri” field of type string, and (if known) the string “stream-id” it is referring to.

New in version 1.20.

classmethod parse_warning_missing_plugin(msg)
Parameters:

msg (Gst.Message) – A Gst.Message

Returns:

True if the message contained a missing-plugin error.

descriptions:

a None-terminated array of descriptions

installer_details:

a None-terminated array of installer details

Return type:

(bool, descriptions: [str], installer_details: [str])

Parses missing plugin descriptions and installer details from a GST_PLAY_ERROR_MISSING_PLUGIN warning message.

Both arrays will have the same length, and strings at the same index correspond to each other.

The installer details can be passed to GstPbutils.install_plugins_sync() or GstPbutils.install_plugins_async().

New in version 1.26.

URI_LOADED = 0

Source element was initalized for set URI

POSITION_UPDATED = 1

Sink position changed

VOLUME_CHANGED = 10

The volume of the audio ouput has changed

MUTE_CHANGED = 11

Audio muting flag has been toggled

SEEK_DONE = 12

Any pending seeking operation has been completed

DURATION_CHANGED = 2

Duration of stream changed

STATE_CHANGED = 3

State changed, see GstPlay.PlayState

BUFFERING = 4

Pipeline is in buffering state, message contains the percentage value of the decoding buffer

END_OF_STREAM = 5

Sink has received EOS

ERROR = 6

Message contains an error

WARNING = 7

Message contains an error

VIDEO_DIMENSIONS_CHANGED = 8

Video sink received format in different dimensions than before

MEDIA_INFO_UPDATED = 9

A media-info property has changed, message contains current GstPlay.PlayMediaInfo

class GstPlay.PlaySnapshotFormat(value)

Bases: GLib.Enum

New in version 1.20.

RAW_NATIVE = 0

raw native format.

RAW_XRGB = 1

raw xRGB format.

RAW_BGRX = 2

raw BGRx format.

JPG = 3

jpeg format.

PNG = 4

png format.

class GstPlay.PlayState(value)

Bases: GObject.GEnum

New in version 1.20.

classmethod get_name(state)
Parameters:

state (GstPlay.PlayState) – a GstPlay.PlayState

Returns:

a string with the name of the state.

Return type:

str

Gets a string representing the given state.

New in version 1.20.

STOPPED = 0

the play is stopped.

BUFFERING = 1

the play is buffering.

PAUSED = 2

the play is paused.

PLAYING = 3

the play is currently playing a stream.