summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <mmeeks@ximian.org>2001-12-13 19:00:58 (GMT)
committerWim Taymans <wim.taymans@gmail.com>2001-12-13 19:00:58 (GMT)
commit7943a116f69757406a7c76aaa172446b67bf7176 (patch)
tree641ecb6ffb836346aa58b2b1771d04c36bc92e5a
parentef01376686e95ed685d448d6eb62753ddcba978e (diff)
Aplied a patch from Michael Meeks to add libxml2 support.
Original commit message from CVS: Aplied a patch from Michael Meeks to add libxml2 support.
-rw-r--r--ChangeLog27
-rw-r--r--acconfig.h1
-rwxr-xr-xautogen.sh4
-rw-r--r--configure.ac17
-rw-r--r--examples/mixer/mixer.c1
-rw-r--r--examples/plugins/example.c1
-rw-r--r--examples/typefind/typefind.c6
-rw-r--r--examples/xml/createxml.c8
-rw-r--r--examples/xml/runxml.c4
-rw-r--r--gst/gstconfig.h4
-rw-r--r--test/mp1tomp1.c2
-rw-r--r--test/mp2toavi.c6
-rw-r--r--test/mp2tomp1.c3
-rw-r--r--tests/old/examples/mixer/mixer.c1
-rw-r--r--tests/old/examples/plugins/example.c1
-rw-r--r--tests/old/examples/typefind/typefind.c6
-rw-r--r--tests/old/examples/xml/createxml.c8
-rw-r--r--tests/old/examples/xml/runxml.c4
-rw-r--r--tools/gstreamer-complete.c9
19 files changed, 78 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index ca7a313..8199ae9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2001-12-13 Michael Meeks <michael@ximian.com>
+
+ * plugins/xvideosink/Makefile.am: add $(X_LIBS)
+
+ * examples/typefind/typefind.c (type_found): upd.
+ xml code.
+
+ * plugins/mikmod/gstmikmod.c
+ (gst_mikmod_set_property): same memory bug here -
+ unfixed.
+
+ * plugins/oss/gstosssrc.c
+ (gst_osssrc_set_property): fix memory issue.
+ (gst_osssrc_init): dup the string - argh; quit here -
+ such code should be stuck in a common base class not
+ cut and pasted.
+
+ * plugins/oss/gstosssink.c
+ (gst_osssink_init): manage the device allocation.
+ (gst_osssink_finalize): impl.
+ (gst_osssink_class_init): upd.
+ (gst_osssink_set_property): upd.
+
+ * acconfig.h: cover HAVE_LIBXML2
+
+ * configure.ac: update libxml checks.
+
2001-12-11 22:10 thomasvs
* lots of build fixes for 0.3.0 release
diff --git a/acconfig.h b/acconfig.h
index e5be2eb..9e6271c 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -9,6 +9,7 @@
#undef HAVE_STPCPY
#undef USE_GLIB2
+#undef HAVE_LIBXML2
#undef PLUGINS_DIR
#undef PLUGINS_BUILDDIR
diff --git a/autogen.sh b/autogen.sh
index 1e6cc0d..0ba32c9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -142,8 +142,8 @@ automake -a -c || {
}
# now remove the cache, because it can be considered dangerous in this case
-echo "+ removing config.cache ... "
-rm -f config.cache
+#echo "+ removing config.cache ... "
+#rm -f config.cache
CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG'
diff --git a/configure.ac b/configure.ac
index 76eb0e4..121636d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,18 +278,21 @@ AC_SUBST(GST_PKG_DEPS)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
+if test x$USE_GLIB2 = xno; then
+ LIBXML_PKG='libxml >= 1.8.1'
+else
+ LIBXML_PKG='libxml-2.0'
+ AC_DEFINE(HAVE_LIBXML2)
+fi
+AC_SUBST(LIBXML_PKG)
+
dnl Check for libxml
dnl Thomas tries to convert this to pkg-config
-PKG_CHECK_MODULES(XML, libxml >= 1.8.1, XML_CONFIG=yes, XML_CONFIG=no)
+PKG_CHECK_MODULES(XML, $LIBXML_PKG, XML_CONFIG=yes, XML_CONFIG=no)
dnl AC_PATH_PROG(XML_CONFIG, xml-config, no)
if test x$XML_CONFIG = xno; then
- AC_MSG_ERROR(Couldn't find xml-config)
+ AC_MSG_ERROR(Couldn't find $LIBXML_PKG)
fi
-dnl XML_LIBS="`xml-config --libs`"
-dnl XML_CFLAGS="`xml-config --cflags`"
-dnl AC_CHECK_LIB(xml, xmlDocGetRootElement, :,
-dnl [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
-dnl $XML_LIBS)
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
diff --git a/examples/mixer/mixer.c b/examples/mixer/mixer.c
index ec492ca..0f72231 100644
--- a/examples/mixer/mixer.c
+++ b/examples/mixer/mixer.c
@@ -83,7 +83,6 @@ int main(int argc,char *argv[])
{
int i, j;
int num_channels;
- gboolean done;
char buffer[20];
diff --git a/examples/plugins/example.c b/examples/plugins/example.c
index 1783a82..3b721f9 100644
--- a/examples/plugins/example.c
+++ b/examples/plugins/example.c
@@ -20,6 +20,7 @@
/* First, include the header file for the plugin, to bring in the
* object definition and other useful things.
*/
+#include <string.h>
#include "example.h"
/* The ElementDetails structure gives a human-readable description
diff --git a/examples/typefind/typefind.c b/examples/typefind/typefind.c
index 319bc38..f561ffb 100644
--- a/examples/typefind/typefind.c
+++ b/examples/typefind/typefind.c
@@ -7,9 +7,9 @@ type_found (GstElement *typefind, GstCaps* caps)
xmlNodePtr parent;
doc = xmlNewDoc ("1.0");
- doc->root = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
+ doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
- parent = xmlNewChild (doc->root, NULL, "Caps1", NULL);
+ parent = xmlNewChild (doc->xmlRootNode, NULL, "Caps1", NULL);
gst_caps_save_thyself (caps, parent);
xmlDocDump (stdout, doc);
@@ -44,7 +44,7 @@ main(int argc, char *argv[])
gst_bin_add(GST_BIN(bin), typefind);
g_signal_connect (G_OBJECT (typefind), "have_type",
- type_found, NULL);
+ G_CALLBACK (type_found), NULL);
gst_pad_connect(gst_element_get_pad(disksrc,"src"),
gst_element_get_pad(typefind,"sink"));
diff --git a/examples/xml/createxml.c b/examples/xml/createxml.c
index 92baeb7..50f20f1 100644
--- a/examples/xml/createxml.c
+++ b/examples/xml/createxml.c
@@ -32,12 +32,16 @@ int main(int argc,char *argv[])
//thread = gst_thread_new("thread");
thread = gst_elementfactory_make("thread", "thread");
g_assert(thread != NULL);
- g_signal_connect (G_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread"));
+ g_signal_connect (G_OBJECT (thread), "object_saved",
+ G_CALLBACK (object_saved),
+ g_strdup ("decoder thread"));
thread2 = gst_elementfactory_make("thread", "thread2");
//thread2 = gst_thread_new("thread2");
g_assert(thread2 != NULL);
- g_signal_connect (G_OBJECT (thread2), "object_saved", object_saved, g_strdup ("render thread"));
+ g_signal_connect (G_OBJECT (thread2), "object_saved",
+ G_CALLBACK (object_saved),
+ g_strdup ("render thread"));
/* create a new bin to hold the elements */
bin = gst_bin_new("bin");
diff --git a/examples/xml/runxml.c b/examples/xml/runxml.c
index 76a71bc..36fa425 100644
--- a/examples/xml/runxml.c
+++ b/examples/xml/runxml.c
@@ -1,3 +1,4 @@
+#include <string.h>
#include <stdlib.h>
#include <gst/gst.h>
@@ -35,7 +36,8 @@ int main(int argc,char *argv[])
xml = gst_xml_new ();
- g_signal_connect (G_OBJECT (xml), "object_loaded", xml_loaded, xml);
+ g_signal_connect (G_OBJECT (xml), "object_loaded",
+ G_CALLBACK (xml_loaded), xml);
ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
g_assert (ret == TRUE);
diff --git a/gst/gstconfig.h b/gst/gstconfig.h
index 844c2df..e48d428 100644
--- a/gst/gstconfig.h
+++ b/gst/gstconfig.h
@@ -16,7 +16,11 @@
/***** Deal with XML stuff, we have to handle both loadsave and registry *****/
#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
+#ifdef HAVE_LIBXML2
+ #include <libxml/parser.h>
+#else /* impossibly broken header namespacing */
#include <parser.h>
+#endif
// Include compatability defines: if libxml hasn't already defined these,
// we have an old version 1.x
diff --git a/test/mp1tomp1.c b/test/mp1tomp1.c
index a61c1cf..f67828f 100644
--- a/test/mp1tomp1.c
+++ b/test/mp1tomp1.c
@@ -200,7 +200,7 @@ int main(int argc,char *argv[]) {
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
- g_signal_connect(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline);
+ g_signal_connect(G_OBJECT(parse),"new_pad",G_CALLBACK(mp2tomp1), pipeline);
g_signal_connect(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL);
diff --git a/test/mp2toavi.c b/test/mp2toavi.c
index 3840e25..f777a63 100644
--- a/test/mp2toavi.c
+++ b/test/mp2toavi.c
@@ -254,9 +254,11 @@ main (int argc,char *argv[])
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (mux));
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (fdsink));
- g_signal_connect (G_OBJECT (parse), "new_pad", mp2tomp1_new_pad, pipeline);
+ g_signal_connect (G_OBJECT (parse), "new_pad",
+ G_CALLBACK (mp2tomp1_new_pad), pipeline);
- g_signal_connect (G_OBJECT (src), "eos", eof, NULL);
+ g_signal_connect (G_OBJECT (src), "eos",
+ G_CALLBACK (eof), NULL);
gst_element_connect (src, "src", parse, "sink");
gst_element_connect (mux, "src", fdsink, "sink");
diff --git a/test/mp2tomp1.c b/test/mp2tomp1.c
index ae70185..5d2f841 100644
--- a/test/mp2tomp1.c
+++ b/test/mp2tomp1.c
@@ -248,7 +248,8 @@ int main(int argc,char *argv[]) {
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
- g_signal_connect(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline);
+ g_signal_connect(G_OBJECT(parse),"new_pad",
+ G_CALLBACK (mp2tomp1), pipeline);
g_signal_connect(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL);
diff --git a/tests/old/examples/mixer/mixer.c b/tests/old/examples/mixer/mixer.c
index ec492ca..0f72231 100644
--- a/tests/old/examples/mixer/mixer.c
+++ b/tests/old/examples/mixer/mixer.c
@@ -83,7 +83,6 @@ int main(int argc,char *argv[])
{
int i, j;
int num_channels;
- gboolean done;
char buffer[20];
diff --git a/tests/old/examples/plugins/example.c b/tests/old/examples/plugins/example.c
index 1783a82..3b721f9 100644
--- a/tests/old/examples/plugins/example.c
+++ b/tests/old/examples/plugins/example.c
@@ -20,6 +20,7 @@
/* First, include the header file for the plugin, to bring in the
* object definition and other useful things.
*/
+#include <string.h>
#include "example.h"
/* The ElementDetails structure gives a human-readable description
diff --git a/tests/old/examples/typefind/typefind.c b/tests/old/examples/typefind/typefind.c
index 319bc38..f561ffb 100644
--- a/tests/old/examples/typefind/typefind.c
+++ b/tests/old/examples/typefind/typefind.c
@@ -7,9 +7,9 @@ type_found (GstElement *typefind, GstCaps* caps)
xmlNodePtr parent;
doc = xmlNewDoc ("1.0");
- doc->root = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
+ doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
- parent = xmlNewChild (doc->root, NULL, "Caps1", NULL);
+ parent = xmlNewChild (doc->xmlRootNode, NULL, "Caps1", NULL);
gst_caps_save_thyself (caps, parent);
xmlDocDump (stdout, doc);
@@ -44,7 +44,7 @@ main(int argc, char *argv[])
gst_bin_add(GST_BIN(bin), typefind);
g_signal_connect (G_OBJECT (typefind), "have_type",
- type_found, NULL);
+ G_CALLBACK (type_found), NULL);
gst_pad_connect(gst_element_get_pad(disksrc,"src"),
gst_element_get_pad(typefind,"sink"));
diff --git a/tests/old/examples/xml/createxml.c b/tests/old/examples/xml/createxml.c
index 92baeb7..50f20f1 100644
--- a/tests/old/examples/xml/createxml.c
+++ b/tests/old/examples/xml/createxml.c
@@ -32,12 +32,16 @@ int main(int argc,char *argv[])
//thread = gst_thread_new("thread");
thread = gst_elementfactory_make("thread", "thread");
g_assert(thread != NULL);
- g_signal_connect (G_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread"));
+ g_signal_connect (G_OBJECT (thread), "object_saved",
+ G_CALLBACK (object_saved),
+ g_strdup ("decoder thread"));
thread2 = gst_elementfactory_make("thread", "thread2");
//thread2 = gst_thread_new("thread2");
g_assert(thread2 != NULL);
- g_signal_connect (G_OBJECT (thread2), "object_saved", object_saved, g_strdup ("render thread"));
+ g_signal_connect (G_OBJECT (thread2), "object_saved",
+ G_CALLBACK (object_saved),
+ g_strdup ("render thread"));
/* create a new bin to hold the elements */
bin = gst_bin_new("bin");
diff --git a/tests/old/examples/xml/runxml.c b/tests/old/examples/xml/runxml.c
index 76a71bc..36fa425 100644
--- a/tests/old/examples/xml/runxml.c
+++ b/tests/old/examples/xml/runxml.c
@@ -1,3 +1,4 @@
+#include <string.h>
#include <stdlib.h>
#include <gst/gst.h>
@@ -35,7 +36,8 @@ int main(int argc,char *argv[])
xml = gst_xml_new ();
- g_signal_connect (G_OBJECT (xml), "object_loaded", xml_loaded, xml);
+ g_signal_connect (G_OBJECT (xml), "object_loaded",
+ G_CALLBACK (xml_loaded), xml);
ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
g_assert (ret == TRUE);
diff --git a/tools/gstreamer-complete.c b/tools/gstreamer-complete.c
index 26ad350..6180c5c 100644
--- a/tools/gstreamer-complete.c
+++ b/tools/gstreamer-complete.c
@@ -1,17 +1,10 @@
#include <stdio.h>
#include <string.h>
-#include <parser.h> // NOTE: this is xml-config's fault
-// Include compatability defines: if libxml hasn't already defined these,
-// we have an old version 1.x
-#ifndef xmlChildrenNode
-#define xmlChildrenNode childs
-#define xmlRootNode root
-#endif
+#include <gst/gstconfig.h>
#include <glib.h>
-#include "config.h"
typedef struct {
gchar *name;