![]() |
![]() |
![]() |
GStreamer 1.0 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/gst.h> struct GstStreamCollection; struct GstStreamCollectionClass; GstStreamCollection * gst_stream_collection_new (const gchar *upstream_id
); gboolean gst_stream_collection_add_stream (GstStreamCollection *collection
,GstStream *stream
); const gchar * gst_stream_collection_get_upstream_id (GstStreamCollection *collection
); guint gst_stream_collection_get_size (GstStreamCollection *collection
); GstStream * gst_stream_collection_get_stream (GstStreamCollection *collection
,guint index
);
struct GstStreamCollection { GstObject object; };
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 { GstObjectClass parent_class; /* signals */ void (*stream_notify) (GstStreamCollection *collection, GstStream *stream, GParamSpec * pspec); };
GstStreamCollection class structure
GstObjectClass |
the parent class structure |
default signal handler for the stream-notify signal |
GstStreamCollection * gst_stream_collection_new (const gchar *upstream_id
);
Create a new GstStreamCollection.
|
The stream id of the parent stream. [allow-none] |
Returns : |
The new GstStreamCollection. |
Since 1.10
gboolean gst_stream_collection_add_stream (GstStreamCollection *collection
,GstStream *stream
);
Add the given stream
to the collection
.
|
a GstStreamCollection |
|
the GstStream to add. [transfer full] |
Returns : |
TRUE if the stream was properly added, else FALSE
|
Since 1.10
const gchar * gst_stream_collection_get_upstream_id
(GstStreamCollection *collection
);
Returns the upstream id of the collection
.
|
a GstStreamCollection |
Returns : |
The upstream id. [transfer none] |
Since 1.10
guint gst_stream_collection_get_size (GstStreamCollection *collection
);
Get the number of streams this collection contains
|
a GstStreamCollection |
Returns : |
The number of streams that collection contains |
Since 1.10
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
|
a GstStreamCollection |
|
Index of the stream to retrieve |
Returns : |
A GstStream. [transfer none] |
Since 1.10