## GstStreamCollection GstStreamCollection — Base class for collection of streams |

## Functions

GstStreamCollection * | gst_stream_collection_new ()
gboolean | gst_stream_collection_add_stream ()
const gchar * | gst_stream_collection_get_upstream_id ()
guint | gst_stream_collection_get_size ()
GstStream * | gst_stream_collection_get_stream ()

## Types and Values

struct | GstStreamCollection
struct | GstStreamCollectionClass

## Includes

    #include <gst/gstprotection.h>

## Description

## Functions

### gst_stream_collection_new ()

    GstStreamCollection *
    gst_stream_collection_new (const gchar *upstream_id);

Create a new GstStreamCollection.

#### Parameters

upstream_id | The stream id of the parent stream. | [allow-none]

#### Returns

The new GstStreamCollection.

[transfer full]

Since: 1.10

### gst_stream_collection_add_stream ()

    gboolean
    gst_stream_collection_add_stream (GstStreamCollection *collection,
                                      GstStream *stream);

Add the given `stream` to the `collection` .

#### Parameters

collection | a GstStreamCollection |
stream | the GstStream to add. | [transfer full]

#### Returns

`TRUE` if the `stream` was properly added, else `FALSE`

Since: 1.10

### gst_stream_collection_get_upstream_id ()

    const gchar *
    gst_stream_collection_get_upstream_id (GstStreamCollection *collection);

Returns the upstream id of the `collection` .

#### Parameters

collection | a GstStreamCollection |

#### Returns

The upstream id.

[transfer none]

Since: 1.10

### gst_stream_collection_get_size ()

    guint
    gst_stream_collection_get_size (GstStreamCollection *collection);

Get the number of streams this collection contains

#### Parameters

collection | a GstStreamCollection |

#### Returns

The number of streams that `collection` contains

Since: 1.10

### gst_stream_collection_get_stream ()

    GstStream *
    gst_stream_collection_get_stream (GstStreamCollection *collection,
                                      guint index);

Retrieve the GstStream with index `index` from the collection.

The caller should not modify the returned GstStream

#### Parameters

collection | a GstStreamCollection |
index | Index of the stream to retrieve |

#### Returns

A GstStream.

[transfer none][nullable]

Since: 1.10

## Types and Values

### struct GstStreamCollection

    struct GstStreamCollection {
    };

A collection of GstStream that are available.

A GstStreamCollection 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 `gst_stream_collection_get_stream`()

Once posted, a GstStreamCollection is immutable. Updates are made by sending a new GstStreamCollection message, which may or may not share some of the GstStream 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 GstStreamCollection.

Applications can activate streams from a collection by using the GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element.

Since: 1.10

### struct GstStreamCollectionClass

    struct GstStreamCollectionClass {
      GstObjectClass parent_class;

      /* signals */
      void  (*stream_notify)      (GstStreamCollection *collection, GstStream *stream, GParamSpec * pspec);
    };

GstStreamCollection class structure

#### Members

`stream_notify` () | default signal handler for the stream-notify signal |