Stream#
Added in version 1.10.
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
Streamfor the givenstream_id,caps,typeandflagsAdded in version 1.10.
- Parameters:
stream_id – the id for the new stream. If
None, a new one will be automatically generatedcaps – the
Capsof the streamtype – the
StreamTypeof the streamflags – the
StreamFlagsof the stream
Methods#
- class Stream
-
- get_stream_flags() StreamFlags#
Retrieve the current stream flags for
streamAdded in version 1.10.
- get_stream_type() StreamType#
Retrieve the stream type for
streamAdded in version 1.10.
- set_caps(caps: Caps | None = None) None#
Set the caps for the
StreamAdded in version 1.10.
- Parameters:
caps – a
Caps
- set_stream_flags(flags: StreamFlags) None#
Set the
flagsfor thestream.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
streamAdded in version 1.10.
- Parameters:
stream_type – the type to set on
stream
Properties#
- class Stream
-
- props.stream_flags: StreamFlags#
The type of the None singleton.
- props.stream_type: StreamType#
The type of the None singleton.