:right-sidebar: True Stream =================================================================== .. currentmodule:: gi.repository.Gst .. versionadded:: 1.10 .. class:: Stream(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (:obj:`~gi.repository.Gst.Pad`\). A :obj:`~gi.repository.Gst.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 :obj:`~gi.repository.Gst.Stream` contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ... Elements can subclass a :obj:`~gi.repository.Gst.Stream` for internal usage (to contain information pertinent to streams of data). Constructors ------------ .. rst-class:: interim-class .. class:: Stream :no-index: .. classmethod:: new(stream_id: str | None, caps: ~gi.repository.Gst.Caps | None, type: ~gi.repository.Gst.StreamType, flags: ~gi.repository.Gst.StreamFlags) -> ~gi.repository.Gst.Stream Create a new :obj:`~gi.repository.Gst.Stream` for the given ``stream_id``\, ``caps``\, ``type`` and ``flags`` .. versionadded:: 1.10 :param stream_id: the id for the new stream. If :const:`None`, a new one will be automatically generated :param caps: the :obj:`~gi.repository.Gst.Caps` of the stream :param type: the :obj:`~gi.repository.Gst.StreamType` of the stream :param flags: the :obj:`~gi.repository.Gst.StreamFlags` of the stream Methods ------- .. rst-class:: interim-class .. class:: Stream :no-index: .. method:: get_caps() -> ~gi.repository.Gst.Caps | None Retrieve the caps for ``stream``\, if any .. versionadded:: 1.10 .. method:: get_stream_flags() -> ~gi.repository.Gst.StreamFlags Retrieve the current stream flags for ``stream`` .. versionadded:: 1.10 .. method:: get_stream_id() -> str | None Returns the stream ID of ``stream``\. .. versionadded:: 1.10 .. method:: get_stream_type() -> ~gi.repository.Gst.StreamType Retrieve the stream type for ``stream`` .. versionadded:: 1.10 .. method:: get_tags() -> ~gi.repository.Gst.TagList | None Retrieve the tags for ``stream``\, if any .. versionadded:: 1.10 .. method:: set_caps(caps: ~gi.repository.Gst.Caps | None = None) -> None Set the caps for the :obj:`~gi.repository.Gst.Stream` .. versionadded:: 1.10 :param caps: a :obj:`~gi.repository.Gst.Caps` .. method:: set_stream_flags(flags: ~gi.repository.Gst.StreamFlags) -> None Set the ``flags`` for the ``stream``\. .. versionadded:: 1.10 :param flags: the flags to set on ``stream`` .. method:: set_stream_type(stream_type: ~gi.repository.Gst.StreamType) -> None Set the stream type of ``stream`` .. versionadded:: 1.10 :param stream_type: the type to set on ``stream`` .. method:: set_tags(tags: ~gi.repository.Gst.TagList | None = None) -> None Set the tags for the :obj:`~gi.repository.Gst.Stream` .. versionadded:: 1.10 :param tags: a :obj:`~gi.repository.Gst.TagList` Properties ---------- .. rst-class:: interim-class .. class:: Stream :no-index: .. attribute:: props.caps :type: ~gi.repository.Gst.Caps The type of the None singleton. .. attribute:: props.stream_flags :type: ~gi.repository.Gst.StreamFlags The type of the None singleton. .. attribute:: props.stream_id :type: str The type of the None singleton. .. attribute:: props.stream_type :type: ~gi.repository.Gst.StreamType The type of the None singleton. .. attribute:: props.tags :type: ~gi.repository.Gst.TagList The type of the None singleton. Fields ------ .. rst-class:: interim-class .. class:: Stream :no-index: .. attribute:: object .. attribute:: priv .. attribute:: stream_id The Stream Identifier for this :obj:`~gi.repository.Gst.Stream`