StreamCollection

Added in version 1.10.

class StreamCollection(**properties: Any)

Superclasses: Object, InitiallyUnowned, Object

A collection of Stream that are available.

A StreamCollection will be provided by elements that can make those streams available. Applications can use the collection to show the user what streams are available by using ``%gst_stream_collection_get_stream``()

Once posted, a StreamCollection is immutable. Updates are made by sending a new StreamCollection message, which may or may not share some of the Stream objects from the collection it replaces. The receiver can check the sender of a stream collection message to know which collection is obsoleted.

Several elements in a pipeline can provide StreamCollection.

Applications can activate streams from a collection by using the GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element.

Constructors

class StreamCollection
classmethod new(upstream_id: str | None = None) StreamCollection

Create a new StreamCollection.

Added in version 1.10.

Parameters:

upstream_id – The stream id of the parent stream

Methods

class StreamCollection
add_stream(stream: Stream) bool

Add the given stream to the collection.

Added in version 1.10.

Parameters:

stream – the Stream to add

get_size() int

Get the number of streams this collection contains

Added in version 1.10.

get_stream(index: int) Stream | None

Retrieve the Stream with index index from the collection.

The caller should not modify the returned Stream

Added in version 1.10.

Parameters:

index – Index of the stream to retrieve

get_upstream_id() str | None

Returns the upstream id of the collection.

Added in version 1.10.

Properties

class StreamCollection
props.upstream_id: str

Signals

class StreamCollection.signals
stream_notify(object: Stream, p0: ParamSpec) None
Parameters:
  • object

  • p0

Virtual Methods

class StreamCollection
do_stream_notify(stream: Stream, pspec: ParamSpec) None

default signal handler for the stream-notify signal

Parameters:
  • stream

  • pspec

Fields

class StreamCollection
object
priv
upstream_id