summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <mmeeks@ximian.org>2001-12-13 19:00:58 +0000
committerWim Taymans <wim.taymans@gmail.com>2001-12-13 19:00:58 +0000
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 ca7a313446..8199ae9ba6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
12001-12-13 Michael Meeks <michael@ximian.com>
2
3 * plugins/xvideosink/Makefile.am: add $(X_LIBS)
4
5 * examples/typefind/typefind.c (type_found): upd.
6 xml code.
7
8 * plugins/mikmod/gstmikmod.c
9 (gst_mikmod_set_property): same memory bug here -
10 unfixed.
11
12 * plugins/oss/gstosssrc.c
13 (gst_osssrc_set_property): fix memory issue.
14 (gst_osssrc_init): dup the string - argh; quit here -
15 such code should be stuck in a common base class not
16 cut and pasted.
17
18 * plugins/oss/gstosssink.c
19 (gst_osssink_init): manage the device allocation.
20 (gst_osssink_finalize): impl.
21 (gst_osssink_class_init): upd.
22 (gst_osssink_set_property): upd.
23
24 * acconfig.h: cover HAVE_LIBXML2
25
26 * configure.ac: update libxml checks.
27
12001-12-11 22:10 thomasvs 282001-12-11 22:10 thomasvs
2 29
3 * lots of build fixes for 0.3.0 release 30 * lots of build fixes for 0.3.0 release
diff --git a/acconfig.h b/acconfig.h
index e5be2eb6bb..9e6271c18e 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -9,6 +9,7 @@
9#undef HAVE_STPCPY 9#undef HAVE_STPCPY
10 10
11#undef USE_GLIB2 11#undef USE_GLIB2
12#undef HAVE_LIBXML2
12 13
13#undef PLUGINS_DIR 14#undef PLUGINS_DIR
14#undef PLUGINS_BUILDDIR 15#undef PLUGINS_BUILDDIR
diff --git a/autogen.sh b/autogen.sh
index 1e6cc0d922..0ba32c9716 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -142,8 +142,8 @@ automake -a -c || {
142} 142}
143 143
144# now remove the cache, because it can be considered dangerous in this case 144# now remove the cache, because it can be considered dangerous in this case
145echo "+ removing config.cache ... " 145#echo "+ removing config.cache ... "
146rm -f config.cache 146#rm -f config.cache
147 147
148CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG' 148CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG'
149 149
diff --git a/configure.ac b/configure.ac
index 76eb0e4f33..121636dc6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,18 +278,21 @@ AC_SUBST(GST_PKG_DEPS)
278AC_SUBST(GTK_LIBS) 278AC_SUBST(GTK_LIBS)
279AC_SUBST(GTK_CFLAGS) 279AC_SUBST(GTK_CFLAGS)
280 280
281if test x$USE_GLIB2 = xno; then
282 LIBXML_PKG='libxml >= 1.8.1'
283else
284 LIBXML_PKG='libxml-2.0'
285 AC_DEFINE(HAVE_LIBXML2)
286fi
287AC_SUBST(LIBXML_PKG)
288
281dnl Check for libxml 289dnl Check for libxml
282dnl Thomas tries to convert this to pkg-config 290dnl Thomas tries to convert this to pkg-config
283PKG_CHECK_MODULES(XML, libxml >= 1.8.1, XML_CONFIG=yes, XML_CONFIG=no) 291PKG_CHECK_MODULES(XML, $LIBXML_PKG, XML_CONFIG=yes, XML_CONFIG=no)
284dnl AC_PATH_PROG(XML_CONFIG, xml-config, no) 292dnl AC_PATH_PROG(XML_CONFIG, xml-config, no)
285if test x$XML_CONFIG = xno; then 293if test x$XML_CONFIG = xno; then
286 AC_MSG_ERROR(Couldn't find xml-config) 294 AC_MSG_ERROR(Couldn't find $LIBXML_PKG)
287fi 295fi
288dnl XML_LIBS="`xml-config --libs`"
289dnl XML_CFLAGS="`xml-config --cflags`"
290dnl AC_CHECK_LIB(xml, xmlDocGetRootElement, :,
291dnl [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
292dnl $XML_LIBS)
293AC_SUBST(XML_LIBS) 296AC_SUBST(XML_LIBS)
294AC_SUBST(XML_CFLAGS) 297AC_SUBST(XML_CFLAGS)
295 298
diff --git a/examples/mixer/mixer.c b/examples/mixer/mixer.c
index ec492cad34..0f72231285 100644
--- a/examples/mixer/mixer.c
+++ b/examples/mixer/mixer.c
@@ -83,7 +83,6 @@ int main(int argc,char *argv[])
83{ 83{
84 int i, j; 84 int i, j;
85 int num_channels; 85 int num_channels;
86 gboolean done;
87 86
88 char buffer[20]; 87 char buffer[20];
89 88
diff --git a/examples/plugins/example.c b/examples/plugins/example.c
index 1783a82eba..3b721f9c98 100644
--- a/examples/plugins/example.c
+++ b/examples/plugins/example.c
@@ -20,6 +20,7 @@
20/* First, include the header file for the plugin, to bring in the 20/* First, include the header file for the plugin, to bring in the
21 * object definition and other useful things. 21 * object definition and other useful things.
22 */ 22 */
23#include <string.h>
23#include "example.h" 24#include "example.h"
24 25
25/* The ElementDetails structure gives a human-readable description 26/* The ElementDetails structure gives a human-readable description
diff --git a/examples/typefind/typefind.c b/examples/typefind/typefind.c
index 319bc38444..f561ffb15e 100644
--- a/examples/typefind/typefind.c
+++ b/examples/typefind/typefind.c
@@ -7,9 +7,9 @@ type_found (GstElement *typefind, GstCaps* caps)
7 xmlNodePtr parent; 7 xmlNodePtr parent;
8 8
9 doc = xmlNewDoc ("1.0"); 9 doc = xmlNewDoc ("1.0");
10 doc->root = xmlNewDocNode (doc, NULL, "Capabilities", NULL); 10 doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
11 11
12 parent = xmlNewChild (doc->root, NULL, "Caps1", NULL); 12 parent = xmlNewChild (doc->xmlRootNode, NULL, "Caps1", NULL);
13 gst_caps_save_thyself (caps, parent); 13 gst_caps_save_thyself (caps, parent);
14 14
15 xmlDocDump (stdout, doc); 15 xmlDocDump (stdout, doc);
@@ -44,7 +44,7 @@ main(int argc, char *argv[])
44 gst_bin_add(GST_BIN(bin), typefind); 44 gst_bin_add(GST_BIN(bin), typefind);
45 45
46 g_signal_connect (G_OBJECT (typefind), "have_type", 46 g_signal_connect (G_OBJECT (typefind), "have_type",
47 type_found, NULL); 47 G_CALLBACK (type_found), NULL);
48 48
49 gst_pad_connect(gst_element_get_pad(disksrc,"src"), 49 gst_pad_connect(gst_element_get_pad(disksrc,"src"),
50 gst_element_get_pad(typefind,"sink")); 50 gst_element_get_pad(typefind,"sink"));
diff --git a/examples/xml/createxml.c b/examples/xml/createxml.c
index 92baeb7414..50f20f1f60 100644
--- a/examples/xml/createxml.c
+++ b/examples/xml/createxml.c
@@ -32,12 +32,16 @@ int main(int argc,char *argv[])
32 //thread = gst_thread_new("thread"); 32 //thread = gst_thread_new("thread");
33 thread = gst_elementfactory_make("thread", "thread"); 33 thread = gst_elementfactory_make("thread", "thread");
34 g_assert(thread != NULL); 34 g_assert(thread != NULL);
35 g_signal_connect (G_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread")); 35 g_signal_connect (G_OBJECT (thread), "object_saved",
36 G_CALLBACK (object_saved),
37 g_strdup ("decoder thread"));
36 38
37 thread2 = gst_elementfactory_make("thread", "thread2"); 39 thread2 = gst_elementfactory_make("thread", "thread2");
38 //thread2 = gst_thread_new("thread2"); 40 //thread2 = gst_thread_new("thread2");
39 g_assert(thread2 != NULL); 41 g_assert(thread2 != NULL);
40 g_signal_connect (G_OBJECT (thread2), "object_saved", object_saved, g_strdup ("render thread")); 42 g_signal_connect (G_OBJECT (thread2), "object_saved",
43 G_CALLBACK (object_saved),
44 g_strdup ("render thread"));
41 45
42 /* create a new bin to hold the elements */ 46 /* create a new bin to hold the elements */
43 bin = gst_bin_new("bin"); 47 bin = gst_bin_new("bin");
diff --git a/examples/xml/runxml.c b/examples/xml/runxml.c
index 76a71bc400..36fa425073 100644
--- a/examples/xml/runxml.c
+++ b/examples/xml/runxml.c
@@ -1,3 +1,4 @@
1#include <string.h>
1#include <stdlib.h> 2#include <stdlib.h>
2#include <gst/gst.h> 3#include <gst/gst.h>
3 4
@@ -35,7 +36,8 @@ int main(int argc,char *argv[])
35 36
36 xml = gst_xml_new (); 37 xml = gst_xml_new ();
37 38
38 g_signal_connect (G_OBJECT (xml), "object_loaded", xml_loaded, xml); 39 g_signal_connect (G_OBJECT (xml), "object_loaded",
40 G_CALLBACK (xml_loaded), xml);
39 41
40 ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL); 42 ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
41 g_assert (ret == TRUE); 43 g_assert (ret == TRUE);
diff --git a/gst/gstconfig.h b/gst/gstconfig.h
index 844c2df8a2..e48d428dc2 100644
--- a/gst/gstconfig.h
+++ b/gst/gstconfig.h
@@ -16,7 +16,11 @@
16/***** Deal with XML stuff, we have to handle both loadsave and registry *****/ 16/***** Deal with XML stuff, we have to handle both loadsave and registry *****/
17 17
18#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) ) 18#if (! (defined(GST_DISABLE_LOADSAVE) && defined(GST_DISABLE_REGISTRY)) )
19#ifdef HAVE_LIBXML2
20 #include <libxml/parser.h>
21#else /* impossibly broken header namespacing */
19 #include <parser.h> 22 #include <parser.h>
23#endif
20 24
21 // Include compatability defines: if libxml hasn't already defined these, 25 // Include compatability defines: if libxml hasn't already defined these,
22 // we have an old version 1.x 26 // we have an old version 1.x
diff --git a/test/mp1tomp1.c b/test/mp1tomp1.c
index a61c1cf4f6..f67828fb15 100644
--- a/test/mp1tomp1.c
+++ b/test/mp1tomp1.c
@@ -200,7 +200,7 @@ int main(int argc,char *argv[]) {
200 gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src)); 200 gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
201 gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); 201 gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
202 202
203 g_signal_connect(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline); 203 g_signal_connect(G_OBJECT(parse),"new_pad",G_CALLBACK(mp2tomp1), pipeline);
204 204
205 g_signal_connect(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL); 205 g_signal_connect(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL);
206 206
diff --git a/test/mp2toavi.c b/test/mp2toavi.c
index 3840e25af0..f777a6374e 100644
--- a/test/mp2toavi.c
+++ b/test/mp2toavi.c
@@ -254,9 +254,11 @@ main (int argc,char *argv[])
254 gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (mux)); 254 gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (mux));
255 gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (fdsink)); 255 gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (fdsink));
256 256
257 g_signal_connect (G_OBJECT (parse), "new_pad", mp2tomp1_new_pad, pipeline); 257 g_signal_connect (G_OBJECT (parse), "new_pad",
258 G_CALLBACK (mp2tomp1_new_pad), pipeline);
258 259
259 g_signal_connect (G_OBJECT (src), "eos", eof, NULL); 260 g_signal_connect (G_OBJECT (src), "eos",
261 G_CALLBACK (eof), NULL);
260 262
261 gst_element_connect (src, "src", parse, "sink"); 263 gst_element_connect (src, "src", parse, "sink");
262 gst_element_connect (mux, "src", fdsink, "sink"); 264 gst_element_connect (mux, "src", fdsink, "sink");
diff --git a/test/mp2tomp1.c b/test/mp2tomp1.c
index ae7018536a..5d2f841c20 100644
--- a/test/mp2tomp1.c
+++ b/test/mp2tomp1.c
@@ -248,7 +248,8 @@ int main(int argc,char *argv[]) {
248 gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse)); 248 gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
249 249
250 250
251 g_signal_connect(G_OBJECT(parse),"new_pad",mp2tomp1, pipeline); 251 g_signal_connect(G_OBJECT(parse),"new_pad",
252 G_CALLBACK (mp2tomp1), pipeline);
252 253
253 g_signal_connect(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL); 254 g_signal_connect(G_OBJECT(src),"eos",G_CALLBACK(eof),NULL);
254 255
diff --git a/tests/old/examples/mixer/mixer.c b/tests/old/examples/mixer/mixer.c
index ec492cad34..0f72231285 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[])
83{ 83{
84 int i, j; 84 int i, j;
85 int num_channels; 85 int num_channels;
86 gboolean done;
87 86
88 char buffer[20]; 87 char buffer[20];
89 88
diff --git a/tests/old/examples/plugins/example.c b/tests/old/examples/plugins/example.c
index 1783a82eba..3b721f9c98 100644
--- a/tests/old/examples/plugins/example.c
+++ b/tests/old/examples/plugins/example.c
@@ -20,6 +20,7 @@
20/* First, include the header file for the plugin, to bring in the 20/* First, include the header file for the plugin, to bring in the
21 * object definition and other useful things. 21 * object definition and other useful things.
22 */ 22 */
23#include <string.h>
23#include "example.h" 24#include "example.h"
24 25
25/* The ElementDetails structure gives a human-readable description 26/* 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 319bc38444..f561ffb15e 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)
7 xmlNodePtr parent; 7 xmlNodePtr parent;
8 8
9 doc = xmlNewDoc ("1.0"); 9 doc = xmlNewDoc ("1.0");
10 doc->root = xmlNewDocNode (doc, NULL, "Capabilities", NULL); 10 doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
11 11
12 parent = xmlNewChild (doc->root, NULL, "Caps1", NULL); 12 parent = xmlNewChild (doc->xmlRootNode, NULL, "Caps1", NULL);
13 gst_caps_save_thyself (caps, parent); 13 gst_caps_save_thyself (caps, parent);
14 14
15 xmlDocDump (stdout, doc); 15 xmlDocDump (stdout, doc);
@@ -44,7 +44,7 @@ main(int argc, char *argv[])
44 gst_bin_add(GST_BIN(bin), typefind); 44 gst_bin_add(GST_BIN(bin), typefind);
45 45
46 g_signal_connect (G_OBJECT (typefind), "have_type", 46 g_signal_connect (G_OBJECT (typefind), "have_type",
47 type_found, NULL); 47 G_CALLBACK (type_found), NULL);
48 48
49 gst_pad_connect(gst_element_get_pad(disksrc,"src"), 49 gst_pad_connect(gst_element_get_pad(disksrc,"src"),
50 gst_element_get_pad(typefind,"sink")); 50 gst_element_get_pad(typefind,"sink"));
diff --git a/tests/old/examples/xml/createxml.c b/tests/old/examples/xml/createxml.c
index 92baeb7414..50f20f1f60 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[])
32 //thread = gst_thread_new("thread"); 32 //thread = gst_thread_new("thread");
33 thread = gst_elementfactory_make("thread", "thread"); 33 thread = gst_elementfactory_make("thread", "thread");
34 g_assert(thread != NULL); 34 g_assert(thread != NULL);
35 g_signal_connect (G_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread")); 35 g_signal_connect (G_OBJECT (thread), "object_saved",
36 G_CALLBACK (object_saved),
37 g_strdup ("decoder thread"));
36 38
37 thread2 = gst_elementfactory_make("thread", "thread2"); 39 thread2 = gst_elementfactory_make("thread", "thread2");
38 //thread2 = gst_thread_new("thread2"); 40 //thread2 = gst_thread_new("thread2");
39 g_assert(thread2 != NULL); 41 g_assert(thread2 != NULL);
40 g_signal_connect (G_OBJECT (thread2), "object_saved", object_saved, g_strdup ("render thread")); 42 g_signal_connect (G_OBJECT (thread2), "object_saved",
43 G_CALLBACK (object_saved),
44 g_strdup ("render thread"));
41 45
42 /* create a new bin to hold the elements */ 46 /* create a new bin to hold the elements */
43 bin = gst_bin_new("bin"); 47 bin = gst_bin_new("bin");
diff --git a/tests/old/examples/xml/runxml.c b/tests/old/examples/xml/runxml.c
index 76a71bc400..36fa425073 100644
--- a/tests/old/examples/xml/runxml.c
+++ b/tests/old/examples/xml/runxml.c
@@ -1,3 +1,4 @@
1#include <string.h>
1#include <stdlib.h> 2#include <stdlib.h>
2#include <gst/gst.h> 3#include <gst/gst.h>
3 4
@@ -35,7 +36,8 @@ int main(int argc,char *argv[])
35 36
36 xml = gst_xml_new (); 37 xml = gst_xml_new ();
37 38
38 g_signal_connect (G_OBJECT (xml), "object_loaded", xml_loaded, xml); 39 g_signal_connect (G_OBJECT (xml), "object_loaded",
40 G_CALLBACK (xml_loaded), xml);
39 41
40 ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL); 42 ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
41 g_assert (ret == TRUE); 43 g_assert (ret == TRUE);
diff --git a/tools/gstreamer-complete.c b/tools/gstreamer-complete.c
index 26ad350829..6180c5c560 100644
--- a/tools/gstreamer-complete.c
+++ b/tools/gstreamer-complete.c
@@ -1,17 +1,10 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <string.h> 2#include <string.h>
3#include <parser.h> // NOTE: this is xml-config's fault
4 3
5// Include compatability defines: if libxml hasn't already defined these, 4#include <gst/gstconfig.h>
6// we have an old version 1.x
7#ifndef xmlChildrenNode
8#define xmlChildrenNode childs
9#define xmlRootNode root
10#endif
11 5
12#include <glib.h> 6#include <glib.h>
13 7
14#include "config.h"
15 8
16typedef struct { 9typedef struct {
17 gchar *name; 10 gchar *name;