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 %:func: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

do_stream_notify(self, stream: Stream, pspec: ParamSpec) None#
Parameters:
  • stream

  • pspec

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#

The type of the None singleton.

Signals#

class StreamCollection.signals
stream_notify(prop_stream: Stream, prop: ParamSpec) None#

The type of the None singleton.

Parameters:
  • prop_stream – the Stream that originated the signal

  • prop – the property that changed

Virtual Methods#

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

The type of the None singleton.

Parameters:
  • stream

  • pspec

Fields#

class StreamCollection
object#
priv#
upstream_id#