StreamInfo¶
The StreamInfo class provides properties and operations that are common for all elementary streams.
AudioStreamInfo and VideoStreamInfo inherit from this class.
Class¶
- class avblocks.StreamInfo¶
Bases:
IImmutableProvides properties and operations that are common for all elementary streams.
AudioStreamInfo and VideoStreamInfo inherit from this class.
- property bitrate: int¶
The stream bitrate expressed in bits per second.
- property bitrate_mode: BitrateMode¶
The stream bitrate mode.
- clone() StreamInfo¶
Creates a deep copy of this object.
- Returns:
A new StreamInfo object that has the same dynamic type as the cloned object.
- property config_data: MediaBuffer | None¶
Decoder specific configuration data. This data is typically obtained from a demuxer and is required for decoding certain stream types.
- static create(media_type: MediaType) StreamInfo¶
Create a StreamInfo object for the specified media type.
- property duration: float¶
The stream duration in seconds.
- static from_native(native_si: c_void_p) StreamInfo | None¶
Create a StreamInfo object from a native StreamInfo pointer.
- property id: int¶
The ID of the elementary stream.
- property immutable: bool¶
Returns whether the object is immutable. An immutable object cannot be modified and all modifying methods fail to produce a result.
- property media_type: MediaType¶
Media type. The media type of a StreamInfo object cannot be changed.
- property program_number: int¶
The number of the program to which the elementary stream belongs.
If the elementary stream is shared by 2 or more programs this property will return the last parsed program that uses this stream.
- reset()¶
Resets the stream information to its default state.
The full underlying object is reset. The media type of the stream is not changed.
- property stream_sub_type: StreamSubType¶
The stream subtype.
- property stream_type: StreamType¶
The stream type.