summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--gst/Makefile.am6
-rw-r--r--gst/gst.h1
-rw-r--r--gst/gstpad.h1
-rw-r--r--gst/gstpadtemplate.h1
-rw-r--r--gst/gstquery.c46
-rw-r--r--gst/gstquery.h7
-rw-r--r--gst/gstqueryutils.c106
-rw-r--r--gst/gstqueryutils.h37
9 files changed, 67 insertions, 151 deletions
diff --git a/ChangeLog b/ChangeLog
index 9cd8396c8..3b61ddb31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-09-26 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * gst/Makefile.am:
+ * gst/gst.h:
+ * gst/gstpad.h:
+ * gst/gstpadtemplate.h:
+ * gst/gstquery.c:
+ * gst/gstquery.h:
+ * gst/gstqueryutils.c:
+ * gst/gstqueryutils.h:
+ remove queryutils headers after moving the two used functions
+ to gstquery. also fixes build problem for gstsiddec
+
2005-09-26 Michael Smith <msmith@fluendo.com>
* tools/gst-launch.1.in:
diff --git a/gst/Makefile.am b/gst/Makefile.am
index 549bda997..69fd2e602 100644
--- a/gst/Makefile.am
+++ b/gst/Makefile.am
@@ -96,14 +96,13 @@ libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gstplugin.c \
gstpluginfeature.c \
gstquery.c \
- gstqueryutils.c \
gstqueue.c \
gstregistry.c \
gstregistryxml.c \
gststructure.c \
gstsystemclock.c \
gsttaglist.c \
- gsttagsetter.c \
+ gsttagsetter.c \
gsttask.c \
$(GST_TRACE_SRC) \
gsttypefind.c \
@@ -174,12 +173,11 @@ gst_headers = \
gstplugin.h \
gstpluginfeature.h \
gstquery.h \
- gstqueryutils.h \
gstqueue.h \
gststructure.h \
gstsystemclock.h \
gsttaglist.h \
- gsttagsetter.h \
+ gsttagsetter.h \
gsttask.h \
gsttrace.h \
gsttypefind.h \
diff --git a/gst/gst.h b/gst/gst.h
index a79b3705c..2fba88b43 100644
--- a/gst/gst.h
+++ b/gst/gst.h
@@ -51,7 +51,6 @@
#include <gst/gstpipeline.h>
#include <gst/gstplugin.h>
#include <gst/gstquery.h>
-#include <gst/gstqueryutils.h>
#include <gst/gstregistry.h>
#include <gst/gststructure.h>
#include <gst/gstsystemclock.h>
diff --git a/gst/gstpad.h b/gst/gstpad.h
index 06ea19a2d..36db49f33 100644
--- a/gst/gstpad.h
+++ b/gst/gstpad.h
@@ -31,7 +31,6 @@
#include <gst/gstcaps.h>
#include <gst/gstevent.h>
#include <gst/gstquery.h>
-#include <gst/gstqueryutils.h>
#include <gst/gsttask.h>
G_BEGIN_DECLS
diff --git a/gst/gstpadtemplate.h b/gst/gstpadtemplate.h
index f17e838be..e655e20f1 100644
--- a/gst/gstpadtemplate.h
+++ b/gst/gstpadtemplate.h
@@ -31,7 +31,6 @@
#include <gst/gstcaps.h>
#include <gst/gstevent.h>
#include <gst/gstquery.h>
-#include <gst/gstqueryutils.h>
#include <gst/gsttask.h>
G_BEGIN_DECLS
diff --git a/gst/gstquery.c b/gst/gstquery.c
index 2c6783ed8..e50fb41e5 100644
--- a/gst/gstquery.c
+++ b/gst/gstquery.c
@@ -25,7 +25,8 @@
* @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.
+ * 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.
@@ -34,6 +35,7 @@
#include "gst_private.h"
#include "gstquery.h"
+#include "gstvalue.h"
#include "gstenumtypes.h"
GST_DEBUG_CATEGORY_STATIC (gst_query_debug);
@@ -599,3 +601,45 @@ gst_query_get_structure (GstQuery * query)
return query->structure;
}
+
+void
+gst_query_set_seeking (GstQuery * query, GstFormat format,
+ gboolean seekable, gint64 segment_start, gint64 segment_end)
+{
+ GstStructure *structure;
+
+ g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING);
+
+ structure = gst_query_get_structure (query);
+ gst_structure_set (structure,
+ "format", GST_TYPE_FORMAT, format,
+ "seekable", G_TYPE_BOOLEAN, seekable,
+ "segment-start", G_TYPE_INT64, segment_start,
+ "segment-end", G_TYPE_INT64, segment_end, NULL);
+}
+
+void
+gst_query_set_formats (GstQuery * query, gint n_formats, ...)
+{
+ va_list ap;
+ GValue list = { 0, };
+ GValue item = { 0, };
+ GstStructure *structure;
+ gint i;
+
+ g_value_init (&list, GST_TYPE_LIST);
+
+ va_start (ap, n_formats);
+
+ for (i = 0; i < n_formats; i++) {
+ g_value_init (&item, GST_TYPE_FORMAT);
+ g_value_set_enum (&item, va_arg (ap, GstFormat));
+ gst_value_list_append_value (&list, &item);
+ g_value_unset (&item);
+ }
+
+ va_end (ap);
+
+ structure = gst_query_get_structure (query);
+ gst_structure_set_value (structure, "formats", &list);
+}
diff --git a/gst/gstquery.h b/gst/gstquery.h
index 8ee30e970..a89337de9 100644
--- a/gst/gstquery.h
+++ b/gst/gstquery.h
@@ -167,6 +167,13 @@ GstQuery * gst_query_new_application (GstQueryType type,
GstStructure * gst_query_get_structure (GstQuery *query);
+/* moved from old gstqueryutils.h */
+void gst_query_set_seeking (GstQuery *query, GstFormat format,
+ gboolean seekable,
+ gint64 segment_start,
+ gint64 segment_end);
+void gst_query_set_formats (GstQuery *query, gint n_formats, ...);
+
G_END_DECLS
#endif /* __GST_QUERY_H__ */
diff --git a/gst/gstqueryutils.c b/gst/gstqueryutils.c
deleted file mode 100644
index b2ad6633c..000000000
--- a/gst/gstqueryutils.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* GStreamer
- * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
- *
- * gstqueryutils.c: Utility functions for creating and parsing GstQueries.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#include <stdarg.h>
-
-#include "gstqueryutils.h"
-#include "gstenumtypes.h"
-#include "gstvalue.h"
-#include "gst_private.h"
-
-/* some macros are just waiting to be defined here */
-
-void
-gst_query_parse_seeking_query (GstQuery * query, GstFormat * format)
-{
- GstStructure *structure;
-
- g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING);
-
- structure = gst_query_get_structure (query);
- if (format)
- *format = g_value_get_enum (gst_structure_get_value (structure, "format"));
-}
-
-void
-gst_query_set_seeking (GstQuery * query, GstFormat format,
- gboolean seekable, gint64 segment_start, gint64 segment_end)
-{
- GstStructure *structure;
-
- g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING);
-
- structure = gst_query_get_structure (query);
- gst_structure_set (structure,
- "format", GST_TYPE_FORMAT, format,
- "seekable", G_TYPE_BOOLEAN, seekable,
- "segment-start", G_TYPE_INT64, segment_start,
- "segment-end", G_TYPE_INT64, segment_end, NULL);
-}
-
-void
-gst_query_parse_seeking_response (GstQuery * query, GstFormat * format,
- gboolean * seekable, gint64 * segment_start, gint64 * segment_end)
-{
- GstStructure *structure;
-
- g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_SEEKING);
-
- structure = gst_query_get_structure (query);
- if (format)
- *format = g_value_get_enum (gst_structure_get_value (structure, "format"));
- if (seekable)
- *seekable = g_value_get_boolean (gst_structure_get_value
- (structure, "seekable"));
- if (segment_start)
- *segment_start = g_value_get_int64 (gst_structure_get_value
- (structure, "segment-start"));
- if (segment_end)
- *segment_end = g_value_get_int64 (gst_structure_get_value
- (structure, "segment-end"));
-}
-
-void
-gst_query_set_formats (GstQuery * query, gint n_formats, ...)
-{
- va_list ap;
- GValue list = { 0, };
- GValue item = { 0, };
- GstStructure *structure;
- gint i;
-
- g_value_init (&list, GST_TYPE_LIST);
-
- va_start (ap, n_formats);
-
- for (i = 0; i < n_formats; i++) {
- g_value_init (&item, GST_TYPE_FORMAT);
- g_value_set_enum (&item, va_arg (ap, GstFormat));
- gst_value_list_append_value (&list, &item);
- g_value_unset (&item);
- }
-
- va_end (ap);
-
- structure = gst_query_get_structure (query);
- gst_structure_set_value (structure, "formats", &list);
-}
diff --git a/gst/gstqueryutils.h b/gst/gstqueryutils.h
deleted file mode 100644
index d72c16562..000000000
--- a/gst/gstqueryutils.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* GStreamer
- * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
- *
- * gstqueryutils.c: Utility functions for creating and parsing GstQueries.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#include <glib.h>
-
-#include <gst/gstformat.h>
-#include <gst/gstquery.h>
-
-
-void gst_query_parse_seeking_query (GstQuery *query, GstFormat *format);
-void gst_query_set_seeking (GstQuery *query, GstFormat format,
- gboolean seekable, gint64 segment_start,
- gint64 segment_end);
-void gst_query_parse_seeking_response (GstQuery *query, GstFormat *format,
- gboolean *seekable,
- gint64 *segment_start,
- gint64 *segment_end);
-void gst_query_set_formats (GstQuery *query, gint n_formats, ...);