element: Enforce that elements created by gst_element_factory_create/make() are floating
[platform/upstream/gstreamer.git] / gst / gststreams.h
index a82d81f..e3e52ad 100644 (file)
@@ -26,7 +26,6 @@
 #define __GST_STREAMS_H__
 
 #include <gst/gstobject.h>
-#include <gst/gstevent.h>
 
 G_BEGIN_DECLS
 
@@ -48,6 +47,12 @@ G_BEGIN_DECLS
  *
  * #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.
+ *
+ * Since: 1.10
  */
 typedef enum {
   GST_STREAM_TYPE_UNKNOWN   = 1 << 0,
@@ -65,7 +70,7 @@ typedef struct _GstStreamPrivate GstStreamPrivate;
 /**
  * GstStream:
  * @stream_id: The Stream Identifier for this #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).
  *
@@ -78,8 +83,11 @@ typedef struct _GstStreamPrivate GstStreamPrivate;
  *
  * Elements can subclass a #GstStream for internal usage (to contain information
  * pertinent to streams of data).
+ *
+ * Since: 1.10
  */
 struct _GstStream {
+  /*< private >*/
   GstObject object;
 
   /*< public >*/
@@ -99,33 +107,55 @@ struct _GstStream {
  */
 struct _GstStreamClass {
   GstObjectClass parent_class;
-  
+
   /*< private >*/
   gpointer _gst_reserved[GST_PADDING];
 };
 
+GST_API
 GType     gst_stream_get_type (void);
 
+#include <gst/gstevent.h>
+
+GST_API
 GstStream *gst_stream_new            (const gchar *stream_id,
                                      GstCaps *caps,
                                      GstStreamType type,
                                      GstStreamFlags flags);
+GST_API
+const gchar *  gst_stream_get_stream_id (GstStream *stream);
 
-const gchar *gst_stream_get_stream_id (GstStream *stream);
-
+GST_API
 void           gst_stream_set_stream_flags (GstStream *stream, GstStreamFlags flags);
+
+GST_API
 GstStreamFlags gst_stream_get_stream_flags (GstStream *stream);
 
-void          gst_stream_set_stream_type (GstStream *stream, GstStreamType stream_type);
-GstStreamType gst_stream_get_stream_type (GstStream *stream);
+GST_API
+void           gst_stream_set_stream_type (GstStream *stream, GstStreamType stream_type);
+
+GST_API
+GstStreamType  gst_stream_get_stream_type (GstStream *stream);
+
+GST_API
+void           gst_stream_set_tags (GstStream *stream, GstTagList *tags);
+
+GST_API
+GstTagList *   gst_stream_get_tags (GstStream *stream);
+
+GST_API
+void           gst_stream_set_caps (GstStream *stream, GstCaps *caps);
+
+GST_API
+GstCaps *      gst_stream_get_caps (GstStream *stream);
 
-void        gst_stream_set_tags (GstStream *stream, GstTagList *tags);
-GstTagList *gst_stream_get_tags (GstStream *stream);
+GST_API
+const gchar *  gst_stream_type_get_name (GstStreamType stype);
 
-void     gst_stream_set_caps (GstStream *stream, GstCaps *caps);
-GstCaps *gst_stream_get_caps (GstStream *stream);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstStream, gst_object_unref)
+#endif
 
-const gchar *gst_stream_type_get_name (GstStreamType stype);
 G_END_DECLS
 
 #endif /* __GST_STREAMS_H__ */