# GstStreams

A GstStream is a high-level object defining a stream of data which is, or can be, present in a GstPipeline.

It is defined by a unique identifier, a "Stream ID". A GstStream does not automatically imply the stream is present within a pipeline or element.

Any element that can introduce new streams in a pipeline should create the appropriate GstStream object, and can convey that object via the GST_EVENT_STREAM_START event and/or the GstStreamCollection.

Elements that do not modify the nature of the stream can add extra information on it (such as enrich the GstCaps, or GstTagList). This is typically done by parsing elements.

## GstStream

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstStream

A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (#GstPad).

A GstStream 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 GstStream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ...

Elements can subclass a GstStream for internal usage (to contain information pertinent to streams of data).

### Members

`stream_id` (const gchar *) –

The Stream Identifier for this GstStream

Since : 1.10

### Class structure

#### GstStreamClass

GstStream class structure

##### Fields

`parent_class` (GstObjectClass) –

the parent class structure

### Gst.StreamClass

GstStream class structure

##### Attributes

`parent_class` (Gst.ObjectClass) –

the parent class structure

### Gst.StreamClass

GstStream class structure

##### Attributes

`parent_class` (Gst.ObjectClass) –

the parent class structure

## Gst.Stream

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Stream

A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (#GstPad).

A 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 Gst.Stream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ...

Elements can subclass a Gst.Stream for internal usage (to contain information pertinent to streams of data).

### Members

`stream_id` (String) –

The Stream Identifier for this Gst.Stream

Since : 1.10

## Gst.Stream

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Stream

A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (#GstPad).

A 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 Gst.Stream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ...

Elements can subclass a Gst.Stream for internal usage (to contain information pertinent to streams of data).

### Members

`stream_id` (str) –

The Stream Identifier for this Gst.Stream

Since : 1.10

### Constructors

#### gst_stream_new

    GstStream *
    gst_stream_new (const gchar * stream_id,
                    GstCaps * caps,
                    GstStreamType type,
                    GstStreamFlags flags)

Create a new GstStream for the given stream_id, caps, type and flags

Parameters:

`stream_id` ( [allow-none]) –

the id for the new stream. If NULL, a new one will be automatically generated

`caps` ( [allow-none][transfer: none]) –

the GstCaps of the stream

`type` –

the GstStreamType of the stream

`flags` –

the GstStreamFlags of the stream

Returns ( [transfer: full]) –

The new GstStream

Since : 1.10

#### Gst.Stream.prototype.new

    function Gst.Stream.prototype.new(stream_id: String, caps: Gst.Caps, type: Gst.StreamType, flags: Gst.StreamFlags): {
        // javascript wrapper for 'gst_stream_new'
    }

Create a new Gst.Stream for the given stream_id, caps, type and flags

Parameters:

`stream_id` (String) –

the id for the new stream. If null, a new one will be automatically generated

`caps` (Gst.Caps) –

the Gst.Caps of the stream

`type` (Gst.StreamType) –

the Gst.StreamType of the stream

`flags` (Gst.StreamFlags) –

the Gst.StreamFlags of the stream

Returns (Gst.Stream) –

The new Gst.Stream

Since : 1.10

#### Gst.Stream.new

    def Gst.Stream.new (stream_id, caps, type, flags):
        #python wrapper for 'gst_stream_new'

Create a new Gst.Stream for the given stream_id, caps, type and flags

Parameters:

`stream_id` (str) –

the id for the new stream. If None, a new one will be automatically generated

`caps` (Gst.Caps) –

the Gst.Caps of the stream

`type` (Gst.StreamType) –

the Gst.StreamType of the stream

`flags` (Gst.StreamFlags) –

the Gst.StreamFlags of the stream

Returns (Gst.Stream) –

The new Gst.Stream

Since : 1.10

### Methods

#### gst_stream_get_caps

    GstCaps *
    gst_stream_get_caps (GstStream * stream)

Retrieve the caps for stream, if any

Parameters:

`stream` –

a GstStream

Returns ( [transfer: full][nullable]) –

The GstCaps for stream

Since : 1.10

#### Gst.Stream.prototype.get_caps

    function Gst.Stream.prototype.get_caps(): {
        // javascript wrapper for 'gst_stream_get_caps'
    }

Retrieve the caps for stream, if any

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.Caps) –

The Gst.Caps for stream

Since : 1.10

#### Gst.Stream.get_caps

    def Gst.Stream.get_caps (self):
        #python wrapper for 'gst_stream_get_caps'

Retrieve the caps for stream, if any

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.Caps) –

The Gst.Caps for stream

Since : 1.10

#### gst_stream_get_stream_flags

    GstStreamFlags
    gst_stream_get_stream_flags (GstStream * stream)

Retrieve the current stream flags for stream

Parameters:

`stream` –

a GstStream

Returns –

The GstStreamFlags for stream

Since : 1.10

#### Gst.Stream.prototype.get_stream_flags

    function Gst.Stream.prototype.get_stream_flags(): {
        // javascript wrapper for 'gst_stream_get_stream_flags'
    }

Retrieve the current stream flags for stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.StreamFlags) –

The Gst.StreamFlags for stream

Since : 1.10

#### Gst.Stream.get_stream_flags

    def Gst.Stream.get_stream_flags (self):
        #python wrapper for 'gst_stream_get_stream_flags'

Retrieve the current stream flags for stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.StreamFlags) –

The Gst.StreamFlags for stream

Since : 1.10

#### gst_stream_get_stream_id

    const gchar *
    gst_stream_get_stream_id (GstStream * stream)

Returns the stream ID of stream.

Parameters:

`stream` –

a GstStream

Returns ( [transfer: none][nullable]) –

the stream ID of stream. Only valid during the lifetime of stream.

Since : 1.10

#### Gst.Stream.prototype.get_stream_id

    function Gst.Stream.prototype.get_stream_id(): {
        // javascript wrapper for 'gst_stream_get_stream_id'
    }

Returns the stream ID of stream.

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (String) –

the stream ID of stream. Only valid during the lifetime of stream.

Since : 1.10

#### Gst.Stream.get_stream_id

    def Gst.Stream.get_stream_id (self):
        #python wrapper for 'gst_stream_get_stream_id'

Returns the stream ID of stream.

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (str) –

the stream ID of stream. Only valid during the lifetime of stream.

Since : 1.10

#### gst_stream_get_stream_type

    GstStreamType
    gst_stream_get_stream_type (GstStream * stream)

Retrieve the stream type for stream

Parameters:

`stream` –

a GstStream

Returns –

The GstStreamType for stream

Since : 1.10

#### Gst.Stream.prototype.get_stream_type

    function Gst.Stream.prototype.get_stream_type(): {
        // javascript wrapper for 'gst_stream_get_stream_type'
    }

Retrieve the stream type for stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.StreamType) –

The Gst.StreamType for stream

Since : 1.10

#### Gst.Stream.get_stream_type

    def Gst.Stream.get_stream_type (self):
        #python wrapper for 'gst_stream_get_stream_type'

Retrieve the stream type for stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.StreamType) –

The Gst.StreamType for stream

Since : 1.10

#### gst_stream_get_tags

    GstTagList *
    gst_stream_get_tags (GstStream * stream)

Retrieve the tags for stream, if any

Parameters:

`stream` –

a GstStream

Returns ( [transfer: full][nullable]) –

The GstTagList for stream

Since : 1.10

#### Gst.Stream.prototype.get_tags

    function Gst.Stream.prototype.get_tags(): {
        // javascript wrapper for 'gst_stream_get_tags'
    }

Retrieve the tags for stream, if any

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.TagList) –

The Gst.TagList for stream

Since : 1.10

#### Gst.Stream.get_tags

    def Gst.Stream.get_tags (self):
        #python wrapper for 'gst_stream_get_tags'

Retrieve the tags for stream, if any

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

Returns (Gst.TagList) –

The Gst.TagList for stream

Since : 1.10

#### gst_stream_set_caps

    gst_stream_set_caps (GstStream * stream,
                         GstCaps * caps)

Set the caps for the GstStream

Parameters:

`stream` –

a GstStream

`caps` ( [transfer: none][allow-none]) –

a GstCaps

Since : 1.10

#### Gst.Stream.prototype.set_caps

    function Gst.Stream.prototype.set_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_stream_set_caps'
    }

Set the caps for the Gst.Stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`caps` (Gst.Caps) –

a Gst.Caps

Since : 1.10

#### Gst.Stream.set_caps

    def Gst.Stream.set_caps (self, caps):
        #python wrapper for 'gst_stream_set_caps'

Set the caps for the Gst.Stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`caps` (Gst.Caps) –

a Gst.Caps

Since : 1.10

#### gst_stream_set_stream_flags

    gst_stream_set_stream_flags (GstStream * stream,
                                 GstStreamFlags flags)

Set the flags for the stream.

Parameters:

`stream` –

a GstStream

`flags` –

the flags to set on stream

Since : 1.10

#### Gst.Stream.prototype.set_stream_flags

    function Gst.Stream.prototype.set_stream_flags(flags: Gst.StreamFlags): {
        // javascript wrapper for 'gst_stream_set_stream_flags'
    }

Set the flags for the stream.

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`flags` (Gst.StreamFlags) –

the flags to set on stream

Since : 1.10

#### Gst.Stream.set_stream_flags

    def Gst.Stream.set_stream_flags (self, flags):
        #python wrapper for 'gst_stream_set_stream_flags'

Set the flags for the stream.

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`flags` (Gst.StreamFlags) –

the flags to set on stream

Since : 1.10

#### gst_stream_set_stream_type

    gst_stream_set_stream_type (GstStream * stream,
                                GstStreamType stream_type)

Set the stream type of stream

Parameters:

`stream` –

a GstStream

`stream_type` –

the type to set on stream

Since : 1.10

#### Gst.Stream.prototype.set_stream_type

    function Gst.Stream.prototype.set_stream_type(stream_type: Gst.StreamType): {
        // javascript wrapper for 'gst_stream_set_stream_type'
    }

Set the stream type of stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`stream_type` (Gst.StreamType) –

the type to set on stream

Since : 1.10

#### Gst.Stream.set_stream_type

    def Gst.Stream.set_stream_type (self, stream_type):
        #python wrapper for 'gst_stream_set_stream_type'

Set the stream type of stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`stream_type` (Gst.StreamType) –

the type to set on stream

Since : 1.10

#### gst_stream_set_tags

    gst_stream_set_tags (GstStream * stream,
                         GstTagList * tags)

Set the tags for the GstStream

Parameters:

`stream` –

a GstStream

`tags` ( [transfer: none][allow-none]) –

a GstTagList

Since : 1.10

#### Gst.Stream.prototype.set_tags

    function Gst.Stream.prototype.set_tags(tags: Gst.TagList): {
        // javascript wrapper for 'gst_stream_set_tags'
    }

Set the tags for the Gst.Stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`tags` (Gst.TagList) –

a Gst.TagList

Since : 1.10

#### Gst.Stream.set_tags

    def Gst.Stream.set_tags (self, tags):
        #python wrapper for 'gst_stream_set_tags'

Set the tags for the Gst.Stream

Parameters:

`stream` (Gst.Stream) –

a Gst.Stream

`tags` (Gst.TagList) –

a Gst.TagList

Since : 1.10

### Properties

#### caps

    “caps” GstCaps *

The GstCaps of the GstStream.

Flags : Read / Write

#### caps

    “caps” Gst.Caps

The Gst.Caps of the Gst.Stream.

Flags : Read / Write

#### caps

    “self.props.caps” Gst.Caps

The Gst.Caps of the Gst.Stream.

Flags : Read / Write

#### stream-flags

    “stream-flags” GstStreamFlags *

Flags : Read / Write / Construct

#### stream-flags

    “stream-flags” Gst.StreamFlags

Flags : Read / Write / Construct

#### stream_flags

    “self.props.stream_flags” Gst.StreamFlags

Flags : Read / Write / Construct

#### stream-id

    “stream-id” gchar *

The unique identifier of the GstStream. Can only be set at construction time.

Flags : Read / Write / Construct Only

#### stream-id

    “stream-id” String

The unique identifier of the Gst.Stream. Can only be set at construction time.

Flags : Read / Write / Construct Only

#### stream_id

    “self.props.stream_id” str

The unique identifier of the Gst.Stream. Can only be set at construction time.

Flags : Read / Write / Construct Only

#### stream-type

    “stream-type” GstStreamType *

The GstStreamType of the GstStream. Can only be set at construction time.

Flags : Read / Write / Construct

#### stream-type

    “stream-type” Gst.StreamType

The Gst.StreamType of the Gst.Stream. Can only be set at construction time.

Flags : Read / Write / Construct

#### stream_type

    “self.props.stream_type” Gst.StreamType

The Gst.StreamType of the Gst.Stream. Can only be set at construction time.

Flags : Read / Write / Construct

#### tags

    “tags” GstTagList *

The GstTagList of the GstStream.

Flags : Read / Write

#### tags

    “tags” Gst.TagList

The Gst.TagList of the Gst.Stream.

Flags : Read / Write

#### tags

    “self.props.tags” Gst.TagList

The Gst.TagList of the Gst.Stream.

Flags : Read / Write

## Functions

### gst_stream_type_get_name

    const gchar *
    gst_stream_type_get_name (GstStreamType stype)

Get a descriptive string for a given GstStreamType

Parameters:

`stype` –

a GstStreamType

Returns –

A string describing the stream type

Since : 1.10

### Gst.prototype.stream_type_get_name

    function Gst.prototype.stream_type_get_name(stype: Gst.StreamType): {
        // javascript wrapper for 'gst_stream_type_get_name'
    }

Get a descriptive string for a given Gst.StreamType

Parameters:

`stype` (Gst.StreamType) –

a Gst.StreamType

Returns (String) –

A string describing the stream type

Since : 1.10

### Gst.stream_type_get_name

    def Gst.stream_type_get_name (stype):
        #python wrapper for 'gst_stream_type_get_name'

Get a descriptive string for a given Gst.StreamType

Parameters:

`stype` (Gst.StreamType) –

a Gst.StreamType

Returns (str) –

A string describing the stream type

Since : 1.10

## Function Macros

### GST_STREAM_CAST

    #define GST_STREAM_CAST(obj)        ((GstStream*)(obj))

## Enumerations

### GstStreamType

GstStreamType describes a high level classification set for flows of data in GstStream objects.

Note that this is a flag, and therefore users should not assume it will be a single value. Do not use the equality operator for checking whether a stream is of a certain type.

##### Members

`GST_STREAM_TYPE_UNKNOWN` (1) –

The stream is of unknown (unclassified) type.

`GST_STREAM_TYPE_AUDIO` (2) –

The stream is of audio data

`GST_STREAM_TYPE_VIDEO` (4) –

The stream carries video data

`GST_STREAM_TYPE_CONTAINER` (8) –

The stream is a muxed container type

`GST_STREAM_TYPE_TEXT` (16) –

The stream contains subtitle / subpicture data.

`GST_STREAM_TYPE_METADATA` (32) –

The stream contains metadata.

(Since: 1.28)

Since : 1.10

### Gst.StreamType

Gst.StreamType describes a high level classification set for flows of data in Gst.Stream objects.

Note that this is a flag, and therefore users should not assume it will be a single value. Do not use the equality operator for checking whether a stream is of a certain type.

##### Members

`Gst.StreamType.UNKNOWN` (1) –

The stream is of unknown (unclassified) type.

`Gst.StreamType.AUDIO` (2) –

The stream is of audio data

`Gst.StreamType.VIDEO` (4) –

The stream carries video data

`Gst.StreamType.CONTAINER` (8) –

The stream is a muxed container type

`Gst.StreamType.TEXT` (16) –

The stream contains subtitle / subpicture data.

`Gst.StreamType.METADATA` (32) –

The stream contains metadata.

(Since: 1.28)

Since : 1.10

### Gst.StreamType

Gst.StreamType describes a high level classification set for flows of data in Gst.Stream objects.

Note that this is a flag, and therefore users should not assume it will be a single value. Do not use the equality operator for checking whether a stream is of a certain type.

##### Members

`Gst.StreamType.UNKNOWN` (1) –

The stream is of unknown (unclassified) type.

`Gst.StreamType.AUDIO` (2) –

The stream is of audio data

`Gst.StreamType.VIDEO` (4) –

The stream carries video data

`Gst.StreamType.CONTAINER` (8) –

The stream is a muxed container type

`Gst.StreamType.TEXT` (16) –

The stream contains subtitle / subpicture data.

`Gst.StreamType.METADATA` (32) –

The stream contains metadata.

(Since: 1.28)

Since : 1.10

The results of the search are