:right-sidebar: True StreamCollection =================================================================== .. currentmodule:: gi.repository.Gst .. versionadded:: 1.10 .. class:: StreamCollection(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` A collection of :obj:`~gi.repository.Gst.Stream` that are available. A :obj:`~gi.repository.Gst.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:`~gi.repository.Gst.StreamCollection.get_stream` Once posted, a :obj:`~gi.repository.Gst.StreamCollection` is immutable. Updates are made by sending a new :obj:`~gi.repository.Gst.StreamCollection` message, which may or may not share some of the :obj:`~gi.repository.Gst.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 :obj:`~gi.repository.Gst.StreamCollection`\. Applications can activate streams from a collection by using the ``GST_EVENT_SELECT_STREAMS`` event on a pipeline, bin or element. Constructors ------------ .. rst-class:: interim-class .. class:: StreamCollection :no-index: .. classmethod:: new(upstream_id: str | None = None) -> ~gi.repository.Gst.StreamCollection Create a new :obj:`~gi.repository.Gst.StreamCollection`\. .. versionadded:: 1.10 :param upstream_id: The stream id of the parent stream Methods ------- .. rst-class:: interim-class .. class:: StreamCollection :no-index: .. method:: add_stream(stream: ~gi.repository.Gst.Stream) -> bool Add the given ``stream`` to the ``collection``\. .. versionadded:: 1.10 :param stream: the :obj:`~gi.repository.Gst.Stream` to add .. method:: do_stream_notify(self, stream: ~gi.repository.Gst.Stream, pspec: ~gi.overrides.GObject.ParamSpec) -> None :param stream: :param pspec: .. method:: get_size() -> int Get the number of streams this collection contains .. versionadded:: 1.10 .. method:: get_stream(index: int) -> ~gi.repository.Gst.Stream | None Retrieve the :obj:`~gi.repository.Gst.Stream` with index ``index`` from the collection. The caller should not modify the returned :obj:`~gi.repository.Gst.Stream` .. versionadded:: 1.10 :param index: Index of the stream to retrieve .. method:: get_upstream_id() -> str | None Returns the upstream id of the ``collection``\. .. versionadded:: 1.10 Properties ---------- .. rst-class:: interim-class .. class:: StreamCollection :no-index: .. attribute:: props.upstream_id :type: str The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: StreamCollection.signals :no-index: .. method:: stream_notify(prop_stream: ~gi.repository.Gst.Stream, prop: ~gi.overrides.GObject.ParamSpec) -> None The type of the None singleton. :param prop_stream: the :obj:`~gi.repository.Gst.Stream` that originated the signal :param prop: the property that changed Virtual Methods --------------- .. rst-class:: interim-class .. class:: StreamCollection :no-index: .. method:: do_stream_notify(stream: ~gi.repository.Gst.Stream, pspec: ~gi.overrides.GObject.ParamSpec) -> None The type of the None singleton. :param stream: :param pspec: Fields ------ .. rst-class:: interim-class .. class:: StreamCollection :no-index: .. attribute:: object .. attribute:: priv .. attribute:: upstream_id