gstfunnel: avoid access of freed pad
[platform/upstream/gstreamer.git] / gst / gstquery.h
index 81c3e6e..c060ce0 100644 (file)
@@ -33,6 +33,7 @@
 #include <gst/gststructure.h>
 #include <gst/gstformat.h>
 #include <gst/gstpad.h>
+#include <gst/gsttoc.h>
 
 G_BEGIN_DECLS
 
@@ -101,6 +102,8 @@ typedef enum {
  * @GST_QUERY_ACCEPT_CAPS: the accept caps query
  * @GST_QUERY_CAPS: the caps query
  * @GST_QUERY_DRAIN: wait till all serialized data is consumed downstream
+ * @GST_QUERY_TOC: query the full table of contents (TOC) with the marker
+ * for an entry which can be used to extend received TOC. Since 0.10.37.
  *
  * Standard predefined Query types
  */
@@ -124,7 +127,8 @@ typedef enum {
   GST_QUERY_SCHEDULING   = GST_QUERY_MAKE_TYPE (150, FLAG(UPSTREAM)),
   GST_QUERY_ACCEPT_CAPS  = GST_QUERY_MAKE_TYPE (160, FLAG(BOTH)),
   GST_QUERY_CAPS         = GST_QUERY_MAKE_TYPE (170, FLAG(BOTH)),
-  GST_QUERY_DRAIN        = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED))
+  GST_QUERY_DRAIN        = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
+  GST_QUERY_TOC          = GST_QUERY_MAKE_TYPE (190, FLAG(BOTH))
 } GstQueryType;
 #undef FLAG
 
@@ -476,6 +480,11 @@ void            gst_query_intersect_caps_result    (GstQuery *query, GstCaps *fi
 /* drain query */
 GstQuery *      gst_query_new_drain                (void) G_GNUC_MALLOC;
 
+/* TOC query */
+GstQuery *      gst_query_new_toc                 (void);
+void            gst_query_set_toc                 (GstQuery *query, GstToc *toc, const gchar *extend_uid);
+void            gst_query_parse_toc               (GstQuery *query, GstToc **toc, gchar **extend_uid);
+
 G_END_DECLS
 
 #endif /* __GST_QUERY_H__ */