## GstStreams GstStreams — Base class for stream objects |

## Functions

GstStream * | gst_stream_new ()
GstCaps * | gst_stream_get_caps ()
GstStreamFlags | gst_stream_get_stream_flags ()
const gchar * | gst_stream_get_stream_id ()
GstStreamType | gst_stream_get_stream_type ()
GstTagList * | gst_stream_get_tags ()
void | gst_stream_set_caps ()
void | gst_stream_set_stream_flags ()
void | gst_stream_set_stream_type ()
void | gst_stream_set_tags ()
const gchar * | gst_stream_type_get_name ()

## Types and Values

struct | GstStream
struct | GstStreamClass
enum | GstStreamType

## Includes

    #include <gst/gstprotection.h>

## Description

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.

## Functions

### 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 | the id for the new stream. If `NULL`, a new one will be automatically generated. | [allow-none]
caps | the GstCaps of the stream. | [allow-none][transfer none]
type | the GstStreamType of the stream |
flags | the GstStreamFlags of the stream |

#### Returns

The new GstStream.

[transfer full]

Since: 1.10

### gst_stream_get_caps ()

    GstCaps *
    gst_stream_get_caps (GstStream *stream);

Retrieve the caps for `stream` , if any

#### Parameters

stream | a GstStream |

#### Returns

The GstCaps for `stream` .

[transfer full][nullable]

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_get_stream_id ()

    const gchar *
    gst_stream_get_stream_id (GstStream *stream);

Returns the stream ID of `stream` .

#### Parameters

stream | a GstStream |

#### Returns

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

[transfer none][nullable]

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_get_tags ()

    GstTagList *
    gst_stream_get_tags (GstStream *stream);

Retrieve the tags for `stream` , if any

#### Parameters

stream | a GstStream |

#### Returns

The GstTagList for `stream` .

[transfer full][nullable]

Since: 1.10

### gst_stream_set_caps ()

    void
    gst_stream_set_caps (GstStream *stream,
                         GstCaps *caps);

Set the caps for the GstStream

#### Parameters

stream | a GstStream |
caps | a GstCaps. | [transfer none][allow-none]

Since: 1.10

### gst_stream_set_stream_flags ()

    void
    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_set_stream_type ()

    void
    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_set_tags ()

    void
    gst_stream_set_tags (GstStream *stream,
                         GstTagList *tags);

Set the tags for the GstStream

#### Parameters

stream | a GstStream |
tags | a GstTagList. | [transfer none][allow-none]

Since: 1.10

### 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.

[nullable]

Since: 1.10

## Types and Values

### struct GstStream

    struct GstStream {
      const gchar *stream_id;
    };

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

const gchar *`stream_id`; | The Stream Identifier for this GstStream |

Since: 1.10

### struct GstStreamClass

    struct GstStreamClass {
      GstObjectClass parent_class;
    };

GstStream class structure

#### Members

### enum 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 | The stream is of unknown (unclassified) type. |
GST_STREAM_TYPE_AUDIO | The stream is of audio data |
GST_STREAM_TYPE_VIDEO | The stream carries video data |
GST_STREAM_TYPE_CONTAINER | The stream is a muxed container type |
GST_STREAM_TYPE_TEXT | The stream contains subtitle / subpicture data. |

Since: 1.10