Enums

Details

class Gst.BufferingMode(value)

Bases: GObject.GEnum

The different types of buffering methods.

STREAM = 0

a small amount of data is buffered

DOWNLOAD = 1

the stream is being downloaded

TIMESHIFT = 2

the stream is being downloaded in a ringbuffer

LIVE = 3

the stream is a live stream

class Gst.BusSyncReply(value)

Bases: GObject.GEnum

The result values for a Gst.BusSyncHandler.

DROP = 0

drop the message

PASS = 1

pass the message to the async queue

ASYNC = 2

pass message to async queue, continue if message is handled

class Gst.CapsIntersectMode(value)

Bases: GObject.GEnum

Modes of caps intersection

Gst.CapsIntersectMode.ZIG_ZAG tries to preserve overall order of both caps by iterating on the caps’ structures as the following matrix shows:

caps1
      +-------------
      | 1  2  4  7
caps2 | 3  5  8 10
      | 6  9 11 12

Used when there is no explicit precedence of one caps over the other. e.g. tee’s sink pad getcaps function, it will probe its src pad peers’ for their caps and intersect them with this mode.

Gst.CapsIntersectMode.FIRST is useful when an element wants to preserve another element’s caps priority order when intersecting with its own caps. Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result would be [A, B], maintaining the first caps priority on the intersection.

ZIG_ZAG = 0

Zig-zags over both caps.

FIRST = 1

Keeps the first caps order.

class Gst.ClockEntryType(value)

Bases: GObject.GEnum

The type of the clock entry

SINGLE = 0

a single shot timeout

PERIODIC = 1

a periodic timeout request

class Gst.ClockReturn(value)

Bases: GObject.GEnum

The return value of a clock operation.

OK = 0

The operation succeeded.

EARLY = 1

The operation was scheduled too late.

UNSCHEDULED = 2

The clockID was unscheduled

BUSY = 3

The ClockID is busy

BADTIME = 4

A bad time was provided to a function.

ERROR = 5

An error occurred

UNSUPPORTED = 6

Operation is not supported

DONE = 7

The ClockID is done waiting

class Gst.ClockType(value)

Bases: GObject.GEnum

The different kind of clocks.

REALTIME = 0

time since Epoch

MONOTONIC = 1

monotonic time since some unspecified starting point

OTHER = 2

some other time source is used (Since 1.0.5)

class Gst.CoreError(value)

Bases: GObject.GEnum

Core errors are errors inside the core GStreamer library.

classmethod quark()[source]
Return type:int
FAILED = 1

a general error which doesn’t fit in any other category. Make sure you add a custom message to the error call.

CAPS = 10

used for caps-related errors.

TAG = 11

used for negotiation-related errors.

MISSING_PLUGIN = 12

used if a plugin is missing.

CLOCK = 13

used for clock related errors.

DISABLED = 14

used if functionality has been disabled at compile time.

NUM_ERRORS = 15

the number of core error types.

TOO_LAZY = 2

do not use this except as a placeholder for deciding where to go while developing code.

NOT_IMPLEMENTED = 3

use this when you do not want to implement this functionality yet.

STATE_CHANGE = 4

used for state change errors.

PAD = 5

used for pad-related errors.

THREAD = 6

used for thread-related errors.

NEGOTIATION = 7

used for negotiation-related errors.

EVENT = 8

used for event-related errors.

SEEK = 9

used for seek-related errors.

class Gst.DebugColorFlags(value)

Bases: GObject.GEnum

These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output.

BG_BLACK = 0

Use black as background color.

FG_BLACK = 0

Use black as foreground color.

FG_RED = 1

Use red as foreground color.

BG_WHITE = 112

Use white as background color.

BG_RED = 16

Use red as background color.

FG_GREEN = 2

Use green as foreground color.

BOLD = 256

Make the output bold.

FG_YELLOW = 3

Use yellow as foreground color.

BG_GREEN = 32

Use green as background color.

FG_BLUE = 4

Use blue as foreground color.

BG_YELLOW = 48

Use yellow as background color.

FG_MAGENTA = 5

Use magenta as foreground color.

UNDERLINE = 512

Underline the output.

FG_CYAN = 6

Use cyan as foreground color.

BG_BLUE = 64

Use blue as background color.

FG_WHITE = 7

Use white as foreground color.

BG_MAGENTA = 80

Use magenta as background color.

BG_CYAN = 96

Use cyan as background color.

class Gst.DebugColorMode(value)

Bases: GObject.GEnum

OFF = 0

Do not use colors in logs.

ON = 1

Paint logs in a platform-specific way.

UNIX = 2

Paint logs with UNIX terminal color codes no matter what platform GStreamer is running on.

class Gst.DebugLevel(value)

Bases: GObject.GEnum

The level defines the importance of a debugging message. The more important a message is, the greater the probability that the debugging system outputs it.

classmethod get_name(level)[source]
Parameters:level (Gst.DebugLevel) – the level to get the name for
Returns:the name
Return type:str

Get the string representation of a debugging level

NONE = 0

No debugging level specified or desired. Used to deactivate debugging output.

ERROR = 1

Error messages are to be used only when an error occurred that stops the application from keeping working correctly. An examples is gst_element_error, which outputs a message with this priority. It does not mean that the application is terminating as with g_error.

COUNT = 10

The number of defined debugging levels.

WARNING = 2

Warning messages are to inform about abnormal behaviour that could lead to problems or weird behaviour later on. An example of this would be clocking issues (“your computer is pretty slow”) or broken input data (“Can’t synchronize to stream.”)

FIXME = 3

Fixme messages are messages that indicate that something in the executed code path is not fully implemented or handled yet. Note that this does not replace proper error handling in any way, the purpose of this message is to make it easier to spot incomplete/unfinished pieces of code when reading the debug log.

INFO = 4

Informational messages should be used to keep the developer updated about what is happening. Examples where this should be used are when a typefind function has successfully determined the type of the stream or when an mp3 plugin detects the format to be used. (“This file has mono sound.”)

DEBUG = 5

Debugging messages should be used when something common happens that is not the expected default behavior, or something that’s useful to know but doesn’t happen all the time (ie. per loop iteration or buffer processed or event handled). An example would be notifications about state changes or receiving/sending of events.

LOG = 6

Log messages are messages that are very common but might be useful to know. As a rule of thumb a pipeline that is running as expected should never output anything else but LOG messages whilst processing data. Use this log level to log recurring information in chain functions and loop functions, for example.

TRACE = 7

Tracing-related messages. Examples for this are referencing/dereferencing of objects.

MEMDUMP = 9

memory dump messages are used to log (small) chunks of data as memory dumps in the log. They will be displayed as hexdump with ASCII characters.

class Gst.EventType(value)

Bases: GObject.GEnum

Gst.EventType lists the standard event types that can be sent in a pipeline.

The custom event types can be used for private messages between elements that can’t be expressed using normal GStreamer buffer passing semantics. Custom events carry an arbitrary Gst.Structure. Specific custom events are distinguished by the name of the structure.

classmethod get_flags(type)[source]
Parameters:type (Gst.EventType) – a Gst.EventType
Returns:a Gst.EventTypeFlags.
Return type:Gst.EventTypeFlags

Gets the Gst.EventTypeFlags associated with type.

classmethod get_name(type)[source]
Parameters:type (Gst.EventType) – the event type
Returns:a reference to the static name of the event.
Return type:str

Get a printable name for the given event type. Do not modify or free.

classmethod to_quark(type)[source]
Parameters:type (Gst.EventType) – the event type
Returns:the quark associated with the event type
Return type:int

Get the unique quark for the given event type.

UNKNOWN = 0

unknown event.

STREAM_START = 10254

Event to mark the start of a new stream. Sent before any other serialized event and only sent at the start of a new stream, not after flushing seeks.

CAPS = 12814

Gst.Caps event. Notify the pad of a new media type.

SEGMENT = 17934

A new media segment follows in the dataflow. The segment events contains information for clipping buffers and converting buffer timestamps to running-time and stream-time.

STREAM_COLLECTION = 19230

A new Gst.StreamCollection is available (Since 1.10)

TAG = 20510

A new set of metadata tags has been found in the stream.

BUFFERSIZE = 23054

Notification of buffering requirements. Currently not used yet.

FLUSH_START = 2563

Start a flush operation. This event clears all data from the pipeline and unblock all streaming threads.

SINK_MESSAGE = 25630

An event that sinks turn into a message. Used to send messages that should be emitted in sync with rendering.

STREAM_GROUP_DONE = 26894

Indicates that there is no more data for the stream group ID in the message. Sent before EOS in some instances and should be handled mostly the same. (Since 1.10)

EOS = 28174

End-Of-Stream. No more data is to be expected to follow without either a STREAM_START event, or a FLUSH_STOP and a SEGMENT event.

TOC = 30750

An event which indicates that a new table of contents (TOC) was found or updated.

PROTECTION = 33310

An event which indicates that new or updated encryption information has been found in the stream.

SEGMENT_DONE = 38406

Marks the end of a segment playback.

GAP = 40966

Marks a gap in the datastream.

QOS = 48641

A quality message. Used to indicate to upstream elements that the downstream elements should adjust their processing rate.

SEEK = 51201

A request for a new playback position and rate.

FLUSH_STOP = 5127

Stop a flush operation. This event resets the running-time of the pipeline.

NAVIGATION = 53761

Navigation events are usually used for communicating user requests, such as mouse or keyboard movements, to upstream elements.

LATENCY = 56321

Notification of new latency adjustment. Sinks will use the latency information to adjust their synchronisation.

STEP = 58881

A request for stepping through the media. Sinks will usually execute the step operation.

RECONFIGURE = 61441

A request for upstream renegotiating caps and reconfiguring.

TOC_SELECT = 64001

A request for a new playback position based on TOC entry’s UID.

SELECT_STREAMS = 66561

A request to select one or more streams (Since 1.10)

CUSTOM_UPSTREAM = 69121

Upstream custom event

CUSTOM_DOWNSTREAM = 71686

Downstream custom event that travels in the data flow.

CUSTOM_DOWNSTREAM_OOB = 74242

Custom out-of-band downstream event.

CUSTOM_DOWNSTREAM_STICKY = 76830

Custom sticky downstream event.

CUSTOM_BOTH = 79367

Custom upstream or downstream event. In-band when travelling downstream.

CUSTOM_BOTH_OOB = 81923

Custom upstream or downstream out-of-band event.

class Gst.FlowReturn(value)

Bases: GObject.GEnum

The result of passing data to a pad.

Note that the custom return values should not be exposed outside of the element scope.

NOT_LINKED = -1

Pad is not linked.

CUSTOM_ERROR = -100

Elements can use values starting from this (and lower) to define custom error codes.

CUSTOM_ERROR_1 = -101

Pre-defined custom error code (define your custom error code to this to avoid compiler warnings).

CUSTOM_ERROR_2 = -102

Pre-defined custom error code.

FLUSHING = -2

Pad is flushing.

EOS = -3

Pad is EOS.

NOT_NEGOTIATED = -4

Pad is not negotiated.

ERROR = -5

Some (fatal) error occurred. Element generating this error should post an error message with more details.

NOT_SUPPORTED = -6

This operation is not supported.

OK = 0

Data passing was ok.

CUSTOM_SUCCESS = 100

Elements can use values starting from this (and higher) to define custom success codes.

CUSTOM_SUCCESS_1 = 101

Pre-defined custom success code (define your custom success code to this to avoid compiler warnings).

CUSTOM_SUCCESS_2 = 102

Pre-defined custom success code.

class Gst.Format(value)

Bases: GObject.GEnum

Standard predefined formats

classmethod get_by_nick(nick)[source]
Parameters:nick (str) – The nick of the format
Returns:The format with nick or Gst.Format.UNDEFINED if the format was not registered.
Return type:Gst.Format

Return the format registered with the given nick.

classmethod get_details(format)[source]
Parameters:format (Gst.Format) – The format to get details of
Returns:The Gst.FormatDefinition for format or None on failure.

MT safe.

Return type:Gst.FormatDefinition or None

Get details about the given format.

classmethod get_name(format)[source]
Parameters:format (Gst.Format) – a Gst.Format
Returns:a reference to the static name of the format or None if the format is unknown.
Return type:str or None

Get a printable name for the given format. Do not modify or free.

classmethod iterate_definitions()[source]
Returns:a Gst.Iterator of Gst.FormatDefinition.
Return type:Gst.Iterator

Iterate all the registered formats. The format definition is read only.

classmethod register(nick, description)[source]
Parameters:
  • nick (str) – The nick of the new format
  • description (str) – The description of the new format
Returns:

A new Gst.Format or an already registered format with the same nick.

MT safe.

Return type:

Gst.Format

Create a new Gst.Format based on the nick or return an already registered format with that nick.

classmethod to_quark(format)[source]
Parameters:format (Gst.Format) – a Gst.Format
Returns:the quark associated with the format or 0 if the format is unknown.
Return type:int

Get the unique quark for the given format.

UNDEFINED = 0

undefined format

DEFAULT = 1

the default format of the pad/element. This can be samples for raw audio, frames/fields for raw video (some, but not all, elements support this; use Gst.Format.TIME if you don’t have a good reason to query for samples/frames)

BYTES = 2

bytes

TIME = 3

time in nanoseconds

BUFFERS = 4

buffers (few, if any, elements implement this as of May 2009)

PERCENT = 5

percentage of stream (few, if any, elements implement this as of May 2009)

class Gst.IteratorItem(value)

Bases: GObject.GEnum

The result of a Gst.IteratorItemFunction.

SKIP = 0

Skip this item

PASS = 1

Return item

END = 2

Stop after this item.

class Gst.IteratorResult(value)

Bases: GObject.GEnum

The result of Gst.Iterator.next().

DONE = 0

No more items in the iterator

OK = 1

An item was retrieved

RESYNC = 2

Datastructure changed while iterating

ERROR = 3

An error happened

class Gst.LibraryError(value)

Bases: GObject.GEnum

Library errors are for errors from the library being used by elements (initializing, finalizing, settings, ...)

classmethod quark()[source]
Return type:int
FAILED = 1

a general error which doesn’t fit in any other category. Make sure you add a custom message to the error call.

TOO_LAZY = 2

do not use this except as a placeholder for deciding where to go while developing code.

INIT = 3

used when the library could not be opened.

SHUTDOWN = 4

used when the library could not be closed.

SETTINGS = 5

used when the library doesn’t accept settings.

ENCODE = 6

used when the library generated an encoding error.

NUM_ERRORS = 7

the number of library error types.

class Gst.PadDirection(value)

Bases: GObject.GEnum

The direction of a pad.

UNKNOWN = 0

direction is unknown.

SRC = 1

the pad is a source pad.

SINK = 2

the pad is a sink pad.

class Gst.PadLinkReturn(value)

Bases: GObject.GEnum

Result values from Gst.Pad.link and friends.

WRONG_HIERARCHY = -1

pads have no common grandparent

WAS_LINKED = -2

pad was already linked

WRONG_DIRECTION = -3

pads have wrong direction

NOFORMAT = -4

pads do not have common format

NOSCHED = -5

pads cannot cooperate in scheduling

REFUSED = -6

refused for some reason

OK = 0

link succeeded

class Gst.PadMode(value)

Bases: GObject.GEnum

The status of a Gst.Pad. After activating a pad, which usually happens when the parent element goes from READY to PAUSED, the Gst.PadMode defines if the pad operates in push or pull mode.

classmethod get_name(mode)[source]
Parameters:mode (Gst.PadMode) – the pad mode
Returns:short mnemonic for pad mode mode
Return type:str

Return the name of a pad mode, for use in debug messages mostly.

NONE = 0

Pad will not handle dataflow

PUSH = 1

Pad handles dataflow in downstream push mode

PULL = 2

Pad handles dataflow in upstream pull mode

class Gst.PadPresence(value)

Bases: GObject.GEnum

Indicates when this pad will become available.

ALWAYS = 0

the pad is always available

SOMETIMES = 1

the pad will become available depending on the media stream

REQUEST = 2

the pad is only available on request with Gst.Element.request_pad().

class Gst.PadProbeReturn(value)

Bases: GObject.GEnum

Different return values for the Gst.PadProbeCallback.

DROP = 0

drop data in data probes. For push mode this means that the data item is not sent downstream. For pull mode, it means that the data item is not passed upstream. In both cases, no other probes are called for this item and Gst.FlowReturn.OK or True is returned to the caller.

OK = 1

normal probe return value. This leaves the probe in place, and defers decisions about dropping or passing data to other probes, if any. If there are no other probes, the default behaviour for the probe type applies (‘block’ for blocking probes, and ‘pass’ for non-blocking probes).

REMOVE = 2

remove this probe.

PASS = 3

pass the data item in the block probe and block on the next item.

HANDLED = 4

Data has been handled in the probe and will not be forwarded further. For events and buffers this is the same behaviour as Gst.PadProbeReturn.DROP (except that in this case you need to unref the buffer or event yourself). For queries it will also return True to the caller. The probe can also modify the Gst.FlowReturn value by using the #GST_PAD_PROBE_INFO_FLOW_RETURN() accessor. Note that the resulting query must contain valid entries.

New in version 1.6.

class Gst.ParseError(value)

Bases: GObject.GEnum

The different parsing errors that can occur.

classmethod quark()[source]
Returns:the quark of the parse errors.
Return type:int

Get the error quark used by the parsing subsystem.

SYNTAX = 0

A syntax error occurred.

NO_SUCH_ELEMENT = 1

The description contained an unknown element

NO_SUCH_PROPERTY = 2

An element did not have a specified property

There was an error linking two pads.

COULD_NOT_SET_PROPERTY = 4

There was an error setting a property

EMPTY_BIN = 5

An empty bin was specified.

EMPTY = 6

An empty description was specified

A delayed link did not get resolved.

class Gst.PluginError(value)

Bases: GObject.GEnum

The plugin loading errors

classmethod quark()[source]
Returns:The error quark used in GLib.Error messages
Return type:int

Get the error quark.

MODULE = 0

The plugin could not be loaded

DEPENDENCIES = 1

The plugin has unresolved dependencies

NAME_MISMATCH = 2

The plugin has already be loaded from a different file

class Gst.ProgressType(value)

Bases: GObject.GEnum

The type of a Gst.MessageType.PROGRESS. The progress messages inform the application of the status of asynchronous tasks.

START = 0

A new task started.

CONTINUE = 1

A task completed and a new one continues.

COMPLETE = 2

A task completed.

CANCELED = 3

A task was canceled.

ERROR = 4

A task caused an error. An error message is also posted on the bus.

class Gst.QOSType(value)

Bases: GObject.GEnum

The different types of QoS events that can be given to the Gst.Event.new_qos() method.

OVERFLOW = 0

The QoS event type that is produced when upstream elements are producing data too quickly and the element can’t keep up processing the data. Upstream should reduce their production rate. This type is also used when buffers arrive early or in time.

UNDERFLOW = 1

The QoS event type that is produced when upstream elements are producing data too slowly and need to speed up their production rate.

THROTTLE = 2

The QoS event type that is produced when the application enabled throttling to limit the data rate.

class Gst.QueryType(value)

Bases: GObject.GEnum

Standard predefined Query types

classmethod get_flags(type)[source]
Parameters:type (Gst.QueryType) – a Gst.QueryType
Returns:a Gst.QueryTypeFlags.
Return type:Gst.QueryTypeFlags

Gets the Gst.QueryTypeFlags associated with type.

classmethod get_name(type)[source]
Parameters:type (Gst.QueryType) – the query type
Returns:a reference to the static name of the query.
Return type:str

Get a printable name for the given query type. Do not modify or free.

classmethod to_quark(type)[source]
Parameters:type (Gst.QueryType) – the query type
Returns:the quark associated with the query type
Return type:int

Get the unique quark for the given query type.

UNKNOWN = 0

unknown query type

JITTER = 10243

current jitter of stream

RATE = 12803

current rate of the stream

SEEKING = 15363

seeking capabilities

SEGMENT = 17923

segment start/stop positions

CONVERT = 20483

convert values between formats

FORMATS = 23043

query supported formats for convert

POSITION = 2563

current position in stream

BUFFERING = 28163

query available media for efficient seeking.

CUSTOM = 30723

a custom application or element defined query.

URI = 33283

query the URI of the source or sink.

ALLOCATION = 35846

the buffer allocation properties

SCHEDULING = 38401

the scheduling properties

ACCEPT_CAPS = 40963

the accept caps query

CAPS = 43523

the caps query

DRAIN = 46086

wait till all serialized data is consumed downstream

CONTEXT = 48643

query the pipeline-local context from downstream or upstream (since 1.2)

DURATION = 5123

total duration of the stream

LATENCY = 7683

latency of stream

class Gst.Rank(value)

Bases: GObject.GEnum

Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms, such as e.g. Gst.Element.make_from_uri()) will choose this element over an alternative one with the same function.

These constants serve as a rough guidance for defining the rank of a Gst.PluginFeature. Any value is valid, including values bigger than Gst.Rank.PRIMARY.

NONE = 0

will be chosen last or not at all

SECONDARY = 128

likely to be chosen

PRIMARY = 256

will be chosen first

MARGINAL = 64

unlikely to be chosen

class Gst.ResourceError(value)

Bases: GObject.GEnum

Resource errors are for any resource used by an element: memory, files, network connections, process space, ... They’re typically used by source and sink elements.

classmethod quark()[source]
Return type:int
FAILED = 1

a general error which doesn’t fit in any other category. Make sure you add a custom message to the error call.

WRITE = 10

used when the resource can’t be written to.

SEEK = 11

used when a seek on the resource fails.

SYNC = 12

used when a synchronize on the resource fails.

SETTINGS = 13

used when settings can’t be manipulated on.

NO_SPACE_LEFT = 14

used when the resource has no space left.

NOT_AUTHORIZED = 15

used when the resource can’t be opened due to missing authorization. (Since 1.2.4)

NUM_ERRORS = 16

the number of resource error types.

TOO_LAZY = 2

do not use this except as a placeholder for deciding where to go while developing code.

NOT_FOUND = 3

used when the resource could not be found.

BUSY = 4

used when resource is busy.

OPEN_READ = 5

used when resource fails to open for reading.

OPEN_WRITE = 6

used when resource fails to open for writing.

OPEN_READ_WRITE = 7

used when resource cannot be opened for both reading and writing, or either (but unspecified which).

CLOSE = 8

used when the resource can’t be closed.

READ = 9

used when the resource can’t be read from.

class Gst.SearchMode(value)

Bases: GObject.GEnum

The different search modes.

EXACT = 0

Only search for exact matches.

BEFORE = 1

Search for an exact match or the element just before.

AFTER = 2

Search for an exact match or the element just after.

class Gst.SeekType(value)

Bases: GObject.GEnum

The different types of seek events. When constructing a seek event with Gst.Event.new_seek() or when doing Gst.Segment.do_seek ().

NONE = 0

no change in position is required

SET = 1

absolute position is requested

END = 2

relative position to duration is requested

class Gst.State(value)

Bases: GObject.GEnum

The possible states an element can be in. States can be changed using Gst.Element.set_state() and checked using Gst.Element.get_state().

VOID_PENDING = 0

no pending state.

NULL = 1

the None state or initial state of an element.

READY = 2

the element is ready to go to PAUSED.

PAUSED = 3

the element is PAUSED, it is ready to accept and process data. Sink elements however only accept one buffer and then block.

PLAYING = 4

the element is PLAYING, the Gst.Clock is running and the data is flowing.

class Gst.StateChange(value)

Bases: GObject.GEnum

These are the different state changes an element goes through. Gst.State.NULLGst.State.PLAYING is called an upwards state change and Gst.State.PLAYINGGst.State.NULL a downwards state change.

NULL_TO_READY = 10

state change from None to READY.

  • The element must check if the resources it needs are available. Device sinks and -sources typically try to probe the device to constrain their caps.
  • The element opens the device (in case feature need to be probed).
READY_TO_NULL = 17

state change from READY to None.

  • Elements close devices
  • Elements reset any internal state.
READY_TO_PAUSED = 19

state change from READY to PAUSED.

  • The element pads are activated in order to receive data in PAUSED. Streaming threads are started.
  • Some elements might need to return Gst.StateChangeReturn.ASYNC and complete the state change when they have enough information. It is a requirement for sinks to return Gst.StateChangeReturn.ASYNC and complete the state change when they receive the first buffer or Gst.EventType.EOS (preroll). Sinks also block the dataflow when in PAUSED.
  • A pipeline resets the running_time to 0.
  • Live sources return Gst.StateChangeReturn.NO_PREROLL and don’t generate data.
PAUSED_TO_READY = 26

state change from PAUSED to READY.

  • Sinks unblock any waits in the preroll.
  • Elements unblock any waits on devices
  • Chain or get_range functions return Gst.FlowReturn.FLUSHING.
  • The element pads are deactivated so that streaming becomes impossible and all streaming threads are stopped.
  • The sink forgets all negotiated formats
  • Elements remove all sometimes pads
PAUSED_TO_PLAYING = 28

state change from PAUSED to PLAYING.

  • Most elements ignore this state change.
  • The pipeline selects a Gst.Clock and distributes this to all the children before setting them to PLAYING. This means that it is only allowed to synchronize on the Gst.Clock in the PLAYING state.
  • The pipeline uses the Gst.Clock and the running_time to calculate the base_time. The base_time is distributed to all children when performing the state change.
  • Sink elements stop blocking on the preroll buffer or event and start rendering the data.
  • Sinks can post Gst.MessageType.EOS in the PLAYING state. It is not allowed to post Gst.MessageType.EOS when not in the PLAYING state.
  • While streaming in PAUSED or PLAYING elements can create and remove sometimes pads.
  • Live sources start generating data and return Gst.StateChangeReturn.SUCCESS.
PLAYING_TO_PAUSED = 35

state change from PLAYING to PAUSED.

  • Most elements ignore this state change.
  • The pipeline calculates the running_time based on the last selected Gst.Clock and the base_time. It stores this information to continue playback when going back to the PLAYING state.
  • Sinks unblock any Gst.Clock wait calls.
  • When a sink does not have a pending buffer to play, it returns Gst.StateChangeReturn.ASYNC from this state change and completes the state change when it receives a new buffer or an Gst.EventType.EOS.
  • Any queued Gst.MessageType.EOS items are removed since they will be reposted when going back to the PLAYING state. The EOS messages are queued in Gst.Bin containers.
  • Live sources stop generating data and return Gst.StateChangeReturn.NO_PREROLL.
class Gst.StateChangeReturn(value)

Bases: GObject.GEnum

The possible return values from a state change function such as Gst.Element.set_state(). Only Gst.StateChangeReturn.FAILURE is a real failure.

FAILURE = 0

the state change failed

SUCCESS = 1

the state change succeeded

ASYNC = 2

the state change will happen asynchronously

NO_PREROLL = 3

the state change succeeded but the element cannot produce data in Gst.State.PAUSED. This typically happens with live sources.

class Gst.StreamError(value)

Bases: GObject.GEnum

Stream errors are for anything related to the stream being processed: format errors, media type errors, ... They’re typically used by decoders, demuxers, converters, ...

classmethod quark()[source]
Return type:int
FAILED = 1

a general error which doesn’t fit in any other category. Make sure you add a custom message to the error call.

MUX = 10

used when muxing fails.

FORMAT = 11

used when the stream is of the wrong format (for example, wrong caps).

DECRYPT = 12

used when the stream is encrypted and can’t be decrypted because this is not supported by the element.

DECRYPT_NOKEY = 13

used when the stream is encrypted and can’t be decrypted because no suitable key is available.

NUM_ERRORS = 14

the number of stream error types.

TOO_LAZY = 2

do not use this except as a placeholder for deciding where to go while developing code.

NOT_IMPLEMENTED = 3

use this when you do not want to implement this functionality yet.

TYPE_NOT_FOUND = 4

used when the element doesn’t know the stream’s type.

WRONG_TYPE = 5

used when the element doesn’t handle this type of stream.

CODEC_NOT_FOUND = 6

used when there’s no codec to handle the stream’s type.

DECODE = 7

used when decoding fails.

ENCODE = 8

used when encoding fails.

DEMUX = 9

used when demuxing fails.

class Gst.StreamStatusType(value)

Bases: GObject.GEnum

The type of a Gst.MessageType.STREAM_STATUS. The stream status messages inform the application of new streaming threads and their status.

CREATE = 0

A new thread need to be created.

ENTER = 1

a thread entered its loop function

STOP = 10

a thread is stopped

LEAVE = 2

a thread left its loop function

DESTROY = 3

a thread is destroyed

START = 8

a thread is started

PAUSE = 9

a thread is paused

class Gst.StructureChangeType(value)

Bases: GObject.GEnum

The type of a Gst.MessageType.STRUCTURE_CHANGE.

Pad linking is starting or done.

Pad unlinking is starting or done.

class Gst.TagFlag(value)

Bases: GObject.GEnum

Extra tag flags used when registering tags.

UNDEFINED = 0

undefined flag

META = 1

tag is meta data

ENCODED = 2

tag is encoded

DECODED = 3

tag is decoded

COUNT = 4

number of tag flags

class Gst.TagMergeMode(value)

Bases: GObject.GEnum

The different tag merging modes are basically replace, overwrite and append, but they can be seen from two directions. Given two taglists: (A) the tags already in the element and (B) the ones that are supplied to the element ( e.g. via Gst.TagSetter.merge_tags() / gst_tag_setter_add_tags() or a Gst.EventType.TAG), how are these tags merged? In the table below this is shown for the cases that a tag exists in the list (A) or does not exists (!A) and combinations thereof.

merge mode

merge mode A + B A + !B !A + B !A + !B

REPLACE_ALL B - B -

REPLACE B A B -

APPEND A, B A B -

PREPEND B, A A B -

KEEP A A B -

KEEP_ALL A A - -

UNDEFINED = 0

undefined merge mode

REPLACE_ALL = 1

replace all tags (clear list and append)

REPLACE = 2

replace tags

APPEND = 3

append tags

PREPEND = 4

prepend tags

KEEP = 5

keep existing tags

KEEP_ALL = 6

keep all existing tags

COUNT = 7

the number of merge modes

class Gst.TagScope(value)

Bases: GObject.GEnum

Gst.TagScope specifies if a taglist applies to the complete medium or only to one single stream.

STREAM = 0

tags specific to this single stream

GLOBAL = 1

global tags for the complete medium

class Gst.TaskState(value)

Bases: GObject.GEnum

The different states a task can be in

STARTED = 0

the task is started and running

STOPPED = 1

the task is stopped

PAUSED = 2

the task is paused

class Gst.TocEntryType(value)

Bases: GObject.GEnum

The different types of TOC entries (see Gst.TocEntry).

There are two types of TOC entries: alternatives or parts in a sequence.

classmethod get_nick(type)[source]
Parameters:type (Gst.TocEntryType) – a Gst.TocEntryType.
Returns:Returns a human-readable string for type. This string is only for debugging purpose and should not be displayed in a user interface.
Return type:str

Converts type to a string representation.

EDITION = -1

entry is an edition (i.e. alternative)

VERSION = -2

entry is a version (i.e. alternative)

ANGLE = -3

entry is an angle (i.e. an alternative)

INVALID = 0

invalid entry type value

TITLE = 1

entry is a title (i.e. a part of a sequence)

TRACK = 2

entry is a track (i.e. a part of a sequence)

CHAPTER = 3

entry is a chapter (i.e. a part of a sequence)

class Gst.TocLoopType(value)

Bases: GObject.GEnum

How a Gst.TocEntry should be repeated. By default, entries are played a single time.

New in version 1.4.

NONE = 0

single forward playback

FORWARD = 1

repeat forward

REVERSE = 2

repeat backward

PING_PONG = 3

repeat forward and backward

class Gst.TocScope(value)

Bases: GObject.GEnum

The scope of a TOC.

GLOBAL = 1

global TOC representing all selectable options (this is what applications are usually interested in)

CURRENT = 2

TOC for the currently active/selected stream (this is a TOC representing the current stream from start to EOS, and is what a TOC writer / muxer is usually interested in; it will usually be a subset of the global TOC, e.g. just the chapters of the current title, or the chapters selected for playback from the current title)

class Gst.TracerValueScope(value)

Bases: GObject.GEnum

Tracing record will contain fields that contain a meassured value or extra meta-data. One such meta data are values that tell where a measurement was taken. This enumerating declares to which scope such a meta data field relates to. If it is e.g. Gst.TracerValueScope.PAD, then each of the log events may contain values for different Gst.Pads.

New in version 1.8.

PROCESS = 0

the value is related to the process

THREAD = 1

the value is related to a thread

ELEMENT = 2

the value is related to an Gst.Element

PAD = 3

the value is related to a Gst.Pad

class Gst.TypeFindProbability(value)

Bases: GObject.GEnum

The probability of the typefind function. Higher values have more certainty in doing a reliable typefind.

NONE = 0

type undetected.

MINIMUM = 1

unlikely typefind.

MAXIMUM = 100

very certain a type was detected.

POSSIBLE = 50

possible type detected.

LIKELY = 80

likely a type was detected.

NEARLY_CERTAIN = 99

nearly certain that a type was detected.

class Gst.URIError(value)

Bases: GObject.GEnum

Different URI-related errors that can occur.

classmethod quark()[source]
Return type:int
UNSUPPORTED_PROTOCOL = 0

The protocol is not supported

BAD_URI = 1

There was a problem with the URI

BAD_STATE = 2

Could not set or change the URI because the URI handler was in a state where that is not possible or not permitted

BAD_REFERENCE = 3

There was a problem with the entity that the URI references

class Gst.URIType(value)

Bases: GObject.GEnum

The different types of URI direction.

UNKNOWN = 0

The URI direction is unknown

SINK = 1

The URI is a consumer.

SRC = 2

The URI is a producer.