2 * Copyright (C) 2015 Centricular Ltd
3 * @author: Edward Hervey <edward@centricular.com>
4 * @author: Jan Schmidt <jan@centricular.com>
6 * gststreams.h : Header for GstStreamCollection subsystem
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
25 #ifndef __GST_STREAM_COLLECTION_H__
26 #define __GST_STREAM_COLLECTION_H__
28 #include <gst/gstobject.h>
29 #include <gst/gststreams.h>
33 #define GST_TYPE_STREAM_COLLECTION (gst_stream_collection_get_type ())
34 #define GST_IS_STREAM_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_STREAM_COLLECTION))
35 #define GST_IS_STREAM_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_STREAM_COLLECTION))
36 #define GST_STREAM_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_STREAM_COLLECTION, GstStreamCollectionClass))
37 #define GST_STREAM_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_STREAM_COLLECTION, GstStreamCollection))
38 #define GST_STREAM_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_STREAM_COLLECTION, GstStreamCollectionClass))
39 #define GST_STREAM_COLLECTION_CAST(obj) ((GstStreamCollection*)(obj))
41 typedef struct _GstStreamCollection GstStreamCollection;
42 typedef struct _GstStreamCollectionClass GstStreamCollectionClass;
43 typedef struct _GstStreamCollectionPrivate GstStreamCollectionPrivate;
45 * GstStreamCollection:
47 * A collection of #GstStream that are available.
49 * A #GstStreamCollection will be provided by elements that can make those
50 * streams available. Applications can use the collection to show the user
51 * what streams are available by using %gst_stream_collection_get_stream()
53 * Once posted, a #GstStreamCollection is immutable. Updates are made by sending
54 * a new #GstStreamCollection message, which may or may not share some of
55 * the #GstStream objects from the collection it replaces. The receiver can check
56 * the sender of a stream collection message to know which collection is
59 * Several elements in a pipeline can provide #GstStreamCollection.
61 * Applications can activate streams from a collection by using the
62 * #GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element.
65 struct _GstStreamCollection {
70 GstStreamCollectionPrivate *priv;
72 gpointer _gst_reserved[GST_PADDING];
76 * GstStreamCollectionClass:
77 * @parent_class: the parent class structure
78 * @stream_notify: default signal handler for the stream-notify signal
80 * GstStreamCollection class structure
82 struct _GstStreamCollectionClass {
83 GstObjectClass parent_class;
86 void (*stream_notify) (GstStreamCollection *collection, GstStream *stream, GParamSpec * pspec);
89 gpointer _gst_reserved[GST_PADDING];
92 GType gst_stream_collection_get_type (void);
94 GstStreamCollection *gst_stream_collection_new (const gchar *upstream_id);
96 const gchar *gst_stream_collection_get_upstream_id (GstStreamCollection *collection);
98 guint gst_stream_collection_get_size (GstStreamCollection *collection);
99 GstStream *gst_stream_collection_get_stream (GstStreamCollection *collection, guint index);
101 gboolean gst_stream_collection_add_stream (GstStreamCollection *collection,
106 #endif /* __GST_STREAM_COLLECTION_H__ */