Stream

Added in version 1.10.

class Stream(**properties: Any)

Superclasses: Object, InitiallyUnowned, Object

A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (Pad).

A Stream does not care about data changes (such as decoding, encoding, parsing,…) as long as the underlying data flow corresponds to the same high-level flow (ex: a certain audio track).

A Stream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, …

Elements can subclass a Stream for internal usage (to contain information pertinent to streams of data).

Constructors

class Stream
classmethod new(stream_id: str | None, caps: Caps | None, type: StreamType, flags: StreamFlags) Stream

Create a new Stream for the given stream_id, caps, type and flags

Added in version 1.10.

Parameters:
  • stream_id – the id for the new stream. If None, a new one will be automatically generated

  • caps – the Caps of the stream

  • type – the StreamType of the stream

  • flags – the StreamFlags of the stream

Methods

class Stream
get_caps() Caps | None

Retrieve the caps for stream, if any

Added in version 1.10.

get_stream_flags() StreamFlags

Retrieve the current stream flags for stream

Added in version 1.10.

get_stream_id() str | None

Returns the stream ID of stream.

Added in version 1.10.

get_stream_type() StreamType

Retrieve the stream type for stream

Added in version 1.10.

get_tags() TagList | None

Retrieve the tags for stream, if any

Added in version 1.10.

set_caps(caps: Caps | None = None) None

Set the caps for the Stream

Added in version 1.10.

Parameters:

caps – a Caps

set_stream_flags(flags: StreamFlags) None

Set the flags for the stream.

Added in version 1.10.

Parameters:

flags – the flags to set on stream

set_stream_type(stream_type: StreamType) None

Set the stream type of stream

Added in version 1.10.

Parameters:

stream_type – the type to set on stream

set_tags(tags: TagList | None = None) None

Set the tags for the Stream

Added in version 1.10.

Parameters:

tags – a TagList

Properties

class Stream
props.caps: Caps

The Caps of the Stream.

props.stream_flags: StreamFlags
props.stream_id: str

The unique identifier of the Stream. Can only be set at construction time.

props.stream_type: StreamType

The StreamType of the Stream. Can only be set at construction time.

props.tags: TagList

The TagList of the Stream.

Fields

class Stream
object
priv
stream_id

The Stream Identifier for this Stream