2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wim.taymans@chello.be>
4 * 2005 Wim Taymans <wim@fluendo.com>
6 * gstquery.h: GstQuery API declaration
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., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
25 #ifndef __GST_QUERY_H__
26 #define __GST_QUERY_H__
30 #include <gst/gstiterator.h>
41 GST_QUERY_SEGMENT_END,
45 /* rate is relative to 1000000 */
46 #define GST_QUERY_TYPE_RATE_DEN G_GINT64_CONSTANT (1000000)
48 typedef struct _GstQueryTypeDefinition GstQueryTypeDefinition;
50 struct _GstQueryTypeDefinition
57 #ifdef G_HAVE_ISO_VARARGS
58 #define GST_QUERY_TYPE_FUNCTION(type, functionname, ...) \
59 static const GstQueryType* \
60 functionname (type object) \
62 static const GstQueryType types[] = { \
68 #elif defined(G_HAVE_GNUC_VARARGS)
69 #define GST_QUERY_TYPE_FUNCTION(type, functionname, a...) \
70 static const GstQueryType* \
71 functionname (type object) \
73 static const GstQueryType types[] = { \
81 void _gst_query_type_initialize (void);
83 /* register a new query */
84 GstQueryType gst_query_type_register (const gchar *nick,
85 const gchar *description);
86 GstQueryType gst_query_type_get_by_nick (const gchar *nick);
88 /* check if a query is in an array of querys */
89 gboolean gst_query_types_contains (const GstQueryType *types, GstQueryType type);
91 /* query for query details */
92 G_CONST_RETURN GstQueryTypeDefinition*
93 gst_query_type_get_details (GstQueryType type);
94 GstIterator* gst_query_type_iterate_definitions (void);
98 #endif /* __GST_QUERY_H__ */