--- a/gstreamer_core/gst/gstquery.h Fri Mar 19 09:35:09 2010 +0200
+++ b/gstreamer_core/gst/gstquery.h Fri Apr 16 15:15:52 2010 +0300
@@ -46,6 +46,11 @@
* @GST_QUERY_SEGMENT: segment start/stop positions
* @GST_QUERY_CONVERT: convert values between formats
* @GST_QUERY_FORMATS: query supported formats for convert
+ * @GST_QUERY_BUFFERING: query available media for efficient seeking. Since
+ * 0.10.20.
+ * @GST_QUERY_CUSTOM: a custom application or element defined query. Since
+ * 0.10.22.
+ * @GST_QUERY_URI: query the URI of the source or sink. Since 0.10.22.
*
* Standard predefined Query types
*/
@@ -61,9 +66,28 @@
GST_QUERY_SEEKING,
GST_QUERY_SEGMENT,
GST_QUERY_CONVERT,
- GST_QUERY_FORMATS
+ GST_QUERY_FORMATS,
+ GST_QUERY_BUFFERING,
+ GST_QUERY_CUSTOM,
+ GST_QUERY_URI
} GstQueryType;
+/**
+ * GstBufferingMode:
+ * @GST_BUFFERING_STREAM: a small amount of data is buffered
+ * @GST_BUFFERING_DOWNLOAD: the stream is being downloaded
+ * @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer
+ * @GST_BUFFERING_LIVE: the stream is a live stream
+ *
+ * The different types of buffering methods.
+ */
+typedef enum {
+ GST_BUFFERING_STREAM,
+ GST_BUFFERING_DOWNLOAD,
+ GST_BUFFERING_TIMESHIFT,
+ GST_BUFFERING_LIVE
+} GstBufferingMode;
+
typedef struct _GstQueryTypeDefinition GstQueryTypeDefinition;
typedef struct _GstQuery GstQuery;
typedef struct _GstQueryClass GstQueryClass;
@@ -90,8 +114,10 @@
#define GST_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_QUERY))
#define GST_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_QUERY, GstQueryClass))
#define GST_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_QUERY, GstQuery))
+#define GST_QUERY_CAST(obj) ((GstQuery*)(obj)) /* only since 0.10.23 */
#define GST_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_QUERY, GstQueryClass))
+
/**
* GST_QUERY_TYPE:
* @query: the query to query
@@ -128,14 +154,14 @@
GstStructure *structure;
- /*< private > */
+ /*< private >*/
gpointer _gst_reserved;
};
struct _GstQueryClass {
GstMiniObjectClass mini_object_class;
- /*< private > */
+ /*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
#ifdef __SYMBIAN32__
@@ -197,8 +223,19 @@
* @q: a #GstQuery to increase the refcount of.
*
* Increases the refcount of the given query by one.
+ *
+ * Returns: @q
*/
-#define gst_query_ref(q) GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstQuery * gst_query_ref (GstQuery * q);
+#endif
+
+static inline GstQuery *
+gst_query_ref (GstQuery * q)
+{
+ return GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
+}
+
/**
* gst_query_unref:
* @q: a #GstQuery to decrease the refcount of.
@@ -206,7 +243,15 @@
* Decreases the refcount of the query. If the refcount reaches 0, the query
* will be freed.
*/
-#define gst_query_unref(q) gst_mini_object_unref (GST_MINI_OBJECT (q))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC void gst_query_unref (GstQuery * q);
+#endif
+
+static inline void
+gst_query_unref (GstQuery * q)
+{
+ gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
+}
/* copy query */
/**
@@ -215,8 +260,19 @@
*
* Copies the given query using the copy function of the parent #GstData
* structure.
+ *
+ * Returns: a new copy of @q.
*/
-#define gst_query_copy(q) GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstQuery * gst_query_copy (const GstQuery * q);
+#endif
+
+static inline GstQuery *
+gst_query_copy (const GstQuery * q)
+{
+ return GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT_CAST (q)));
+}
+
/**
* gst_query_make_writable:
* @q: a #GstQuery to make writable
@@ -377,6 +433,69 @@
void gst_query_parse_formats_nth (GstQuery *query, guint nth, GstFormat *format);
+/* buffering query */
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+GstQuery* gst_query_new_buffering (GstFormat format);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+
+void gst_query_set_buffering_stats (GstQuery *query, GstBufferingMode mode,
+ gint avg_in, gint avg_out,
+ gint64 buffering_left);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+void gst_query_parse_buffering_stats (GstQuery *query, GstBufferingMode *mode,
+ gint *avg_in, gint *avg_out,
+ gint64 *buffering_left);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+
+void gst_query_set_buffering_range (GstQuery *query, GstFormat format,
+ gint64 start, gint64 stop,
+ gint64 estimated_total);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+void gst_query_parse_buffering_range (GstQuery *query, GstFormat *format,
+ gint64 *start, gint64 *stop,
+ gint64 *estimated_total);
+/* URI query */
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+GstQuery * gst_query_new_uri (void);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+void gst_query_parse_uri (GstQuery *query, gchar **uri);
+#ifdef __SYMBIAN32__
+IMPORT_C
+#endif
+
+void gst_query_set_uri (GstQuery *query, const gchar *uri);
+
G_END_DECLS
#endif /* __GST_QUERY_H__ */