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
Stream
for the givenstream_id
,caps
,type
andflags
Added in version 1.10.
- Parameters:
stream_id – the id for the new stream. If
None
, a new one will be automatically generatedcaps – the
Caps
of the streamtype – the
StreamType
of the streamflags – the
StreamFlags
of the stream
Methods
- class Stream
-
- get_stream_flags() StreamFlags
Retrieve the current stream flags for
stream
Added in version 1.10.
- get_stream_type() StreamType
Retrieve the stream type for
stream
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 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
stream
Added in version 1.10.
- Parameters:
stream_type – the type to set on
stream
Properties
- class Stream
-
- props.stream_flags: StreamFlags
- props.stream_type: StreamType
The
StreamType
of theStream
. Can only be set at construction time.