From: <en...@fr...> - 2005-08-29 21:41:16
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: ensonic Date: Mon Aug 29 2005 14:41:14 PDT Log message: * docs/gst/tmpl/.cvsignore: * docs/gst/tmpl/gstquery.sgml: * docs/gst/tmpl/gstutils.sgml: * gst/gstquery.c: * gst/gstquery.h: inlined and extended docs Modified files: . : ChangeLog docs/gst/tmpl : .cvsignore gstutils.sgml gst : gstquery.c gstquery.h Removed files: docs/gst/tmpl : gstquery.sgml Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1422&r2=1.1423 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/docs/gst/tmpl/.cvsignore.diff?r1=1.8&r2=1.9 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/docs/gst/tmpl/gstquery.sgml http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/docs/gst/tmpl/gstutils.sgml.diff?r1=1.37&r2=1.38 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstquery.c.diff?r1=1.12&r2=1.13 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstquery.h.diff?r1=1.16&r2=1.17 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1422 retrieving revision 1.1423 diff -u -d -r1.1422 -r1.1423 --- ChangeLog 29 Aug 2005 19:59:51 -0000 1.1422 +++ ChangeLog 29 Aug 2005 21:41:02 -0000 1.1423 @@ -1,5 +1,14 @@ 2005-08-30 Stefan Kost <en...@us...> + * docs/gst/tmpl/.cvsignore: + * docs/gst/tmpl/gstquery.sgml: + * docs/gst/tmpl/gstutils.sgml: + * gst/gstquery.c: + * gst/gstquery.h: + inlined and extended docs + +2005-08-30 Stefan Kost <en...@us...> * check/gst-libs/controller.c: (GST_START_TEST), (gst_controller_suite): more tests Index: .cvsignore RCS file: /cvs/gstreamer/gstreamer/docs/gst/tmpl/.cvsignore,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- .cvsignore 27 Aug 2005 10:57:00 -0000 1.8 +++ .cvsignore 29 Aug 2005 21:41:02 -0000 1.9 @@ -21,5 +21,6 @@ gstminiobject.sgml gstprobe.sgml gstpushsrc.sgml +gstquery.sgml gsttask.sgml gstxmlregistry.sgml --- gstquery.sgml DELETED --- Index: gstutils.sgml RCS file: /cvs/gstreamer/gstreamer/docs/gst/tmpl/gstutils.sgml,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- gstutils.sgml 29 Aug 2005 19:59:52 -0000 1.37 +++ gstutils.sgml 29 Aug 2005 21:41:02 -0000 1.38 @@ -56,6 +56,8 @@ @\ parent_type_as_macro: + parent_type_as_macro: +@\ parent_type_as_macro: @interface_type: @interface_type_as_macro: @@ -90,6 +92,8 @@ interface_as_function: + interface_as_function: interface_as_function: Index: gstquery.c RCS file: /cvs/gstreamer/gstreamer/gst/gstquery.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gstquery.c 24 Aug 2005 15:49:03 -0000 1.12 +++ gstquery.c 29 Aug 2005 21:41:02 -0000 1.13 @@ -20,7 +20,16 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ - +/** + * SECTION:gstquery + * @short_description: Dynamically register new query types and parse results + * @see_also: #GstPad, #GstElement + * + * GstQuery functions are used to register a new query types to the gstreamer core. + * Query types can be used to perform queries on pads and elements. + * Query answer can be parsed using gst_query_parse_xxx() helpers. + */ #include <string.h> #include "gst_private.h" @@ -316,6 +325,15 @@ return query; } + * gst_query_new_position: + * @format: the default #GstFormat for the new query + * Constructs a new query stream position query object. Use gst_query_unref() + * when done with it. + * Returns: A new #GstQuery GstQuery * gst_query_new_position (GstFormat format) { @@ -331,6 +349,15 @@ + * gst_query_set_position: + * @query: the query to fill in + * @format: the requested #GstFormat + * @cur: the current position + * @end: the end position + * Answer a position query by setting the requested values. void gst_query_set_position (GstQuery * query, GstFormat format, gint64 cur, gint64 end) @@ -345,6 +372,16 @@ "cur", G_TYPE_INT64, cur, "end", G_TYPE_INT64, end, NULL); + * gst_query_parse_position: + * @format: the requested #GstFormat or NULL for the default (used when creating + * the query) + * @cur: the storage for the current position + * @end: the storage for the end position + * Parse a position query answer. gst_query_parse_position (GstQuery * query, GstFormat * format, gint64 * cur, gint64 * end) Index: gstquery.h RCS file: /cvs/gstreamer/gstreamer/gst/gstquery.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gstquery.h 20 Jul 2005 17:16:44 -0000 1.16 +++ gstquery.h 29 Aug 2005 21:41:02 -0000 1.17 @@ -34,24 +34,49 @@ G_BEGIN_DECLS + * GstQueryType: + * @GST_QUERY_NONE: invalid query type + * @GST_QUERY_POSITION: current/end position in stream + * @GST_QUERY_LATENCY: latency of stream + * @GST_QUERY_JITTER: current jitter of stream + * @GST_QUERY_RATE: current rate of the stream + * @GST_QUERY_SEEKING: seeking start/stop positions + * @GST_QUERY_CONVERT: convert values + * @GST_QUERY_FORMATS: query supported formats for convert + * Standard predefined Query types typedef enum { GST_QUERY_NONE = 0, - GST_QUERY_POSITION, /* get current/end position */ - GST_QUERY_LATENCY, /* get current latency */ + GST_QUERY_POSITION, + GST_QUERY_LATENCY, GST_QUERY_JITTER, /* not in draft-query, necessary? */ - GST_QUERY_RATE, /* get current playback rate */ - GST_QUERY_SEEKING, /* get seeking start/stop positions */ - GST_QUERY_CONVERT, /* convert values */ - GST_QUERY_FORMATS /* query supported formats for convert */ + GST_QUERY_RATE, + GST_QUERY_SEEKING, + GST_QUERY_CONVERT, + GST_QUERY_FORMATS } GstQueryType; -/* rate is relative to 1000000 */ + * GST_QUERY_TYPE_RATE_DEN: + * Rates are relative to this value #define GST_QUERY_TYPE_RATE_DEN G_GINT64_CONSTANT (1000000) typedef struct _GstQueryTypeDefinition GstQueryTypeDefinition; typedef struct _GstQuery GstQuery; typedef struct _GstQueryClass GstQueryClass; + * GstQueryTypeDefinition: + * @value: the unique id of the Query type + * @nick: a short nick + * @description: a longer description of the query type + * A Query Type definition struct _GstQueryTypeDefinition GstQueryType value; @@ -101,6 +126,7 @@ GstQueryType type); /* query for query details */ G_CONST_RETURN GstQueryTypeDefinition* gst_query_type_get_details (GstQueryType type); GstIterator* gst_query_type_iterate_definitions (void); |