Fix the plugin testsuite, only registry.c doesn't work yet

Original commit message from CVS:
Fix the plugin testsuite, only registry.c doesn't work yet
This commit is contained in:
Wim Taymans 2002-05-10 19:24:04 +00:00
parent 2314c02f42
commit 4b8c43a3d9
14 changed files with 58 additions and 58 deletions

View file

@ -1,24 +1,26 @@
plugindir = $(builddir)/testsuite/plugin/
GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd) GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml
plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
# FIXME : tests need fixing # FIXME : tests need fixing
testprogs = # static dynamic linked loading registry static2 testprogs = static dynamic linked loading registry static2
AM_CFLAGS = $(GST_CFLAGS) AM_CFLAGS = $(GST_CFLAGS)
LIBS = $(GST_LIBS) LIBS = $(GST_LIBS)
noinst_LTLIBRARIES = libtestplugin.la libtestplugin2.la
libtestplugin_la_SOURCES = testplugin.c libtestplugin_la_SOURCES = testplugin.c
libtestplugin_la_CFLAGS = $(GST_CFLAGS) libtestplugin_la_CFLAGS = $(GST_CFLAGS)
libtestplugin_la_LIBS = $(GST_LIBS) libtestplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libtestplugin2_la_SOURCES = testplugin2.c libtestplugin2_la_SOURCES = testplugin2.c
libtestplugin2_la_CFLAGS = $(GST_CFLAGS) libtestplugin2_la_CFLAGS = $(GST_CFLAGS)
libtestplugin2_la_LIBS = $(GST_LIBS) libtestplugin2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
# linked_LDFLAGS = -L. -ltestplugin -ltestplugin2 linked_LDFLAGS = -L. -ltestplugin -ltestplugin2
# static_SOURCES = static.c testplugin_s.c testplugin2_s.c static_SOURCES = static.c testplugin_s.c testplugin2_s.c
TESTS = $(testprogs) TESTS = $(testprogs)

View file

@ -9,14 +9,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
gst_plugin_add_path ("."); plugin = gst_plugin_new (".libs/libtestplugin.so");
loaded = gst_plugin_load ("testplugin");
g_assert (loaded == TRUE);
plugin = gst_plugin_find ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
loaded = gst_plugin_load_plugin (plugin);
g_assert (loaded == TRUE);
g_print ("testplugin: %d, %s\n", loaded, plugin->name); g_print ("testplugin: %d, %s\n", loaded, plugin->name);
return 0; return 0;

View file

@ -8,12 +8,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name); g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2"); plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name); g_print ("testplugin2: %p %s\n", plugin, plugin->name);

View file

@ -10,45 +10,45 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
numplugins = g_list_length (gst_plugin_get_list ()); numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins); g_print ("%d plugins loaded\n", numplugins);
g_mem_chunk_info (); g_mem_chunk_info ();
plugin = gst_plugin_find ("ossaudio"); plugin = gst_registry_pool_find_plugin ("ossaudio");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin))); g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
g_print ("ossaudio: %p %d\n", plugin, gst_plugin_is_loaded (plugin)); g_print ("ossaudio: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
loaded = gst_plugin_load_plugin (plugin); loaded = gst_plugin_load_plugin (plugin);
g_assert (loaded == TRUE); g_assert (loaded == TRUE);
numplugins = g_list_length (gst_plugin_get_list ()); numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins); g_print ("%d plugins loaded\n", numplugins);
g_mem_chunk_info (); g_mem_chunk_info ();
plugin = gst_plugin_find ("ossaudio"); plugin = gst_registry_pool_find_plugin ("ossaudio");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("ossaudio: %p %d\n", plugin, gst_plugin_is_loaded (plugin)); g_print ("ossaudio: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin))); g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
loaded = gst_plugin_load_plugin (plugin); loaded = gst_plugin_load_plugin (plugin);
g_assert (loaded == TRUE); g_assert (loaded == TRUE);
numplugins = g_list_length (gst_plugin_get_list ()); numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins); g_print ("%d plugins loaded\n", numplugins);
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin))); g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
g_mem_chunk_info (); g_mem_chunk_info ();
plugin = gst_plugin_find ("ossaudio"); plugin = gst_registry_pool_find_plugin ("ossaudio");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("osssink: %p %d\n", plugin, gst_plugin_is_loaded (plugin)); g_print ("ossaudio: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
return 0; return 0;
} }

View file

@ -8,7 +8,7 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %s\n", plugin->name); g_print ("testplugin: %s\n", plugin->name);

View file

@ -8,12 +8,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name); g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2"); plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name); g_print ("testplugin2: %p %s\n", plugin, plugin->name);

View file

@ -36,12 +36,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name); g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2"); plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name); g_print ("testplugin2: %p %s\n", plugin, plugin->name);

View file

@ -1,24 +1,26 @@
plugindir = $(builddir)/testsuite/plugin/
GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd) GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml
plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
# FIXME : tests need fixing # FIXME : tests need fixing
testprogs = # static dynamic linked loading registry static2 testprogs = static dynamic linked loading registry static2
AM_CFLAGS = $(GST_CFLAGS) AM_CFLAGS = $(GST_CFLAGS)
LIBS = $(GST_LIBS) LIBS = $(GST_LIBS)
noinst_LTLIBRARIES = libtestplugin.la libtestplugin2.la
libtestplugin_la_SOURCES = testplugin.c libtestplugin_la_SOURCES = testplugin.c
libtestplugin_la_CFLAGS = $(GST_CFLAGS) libtestplugin_la_CFLAGS = $(GST_CFLAGS)
libtestplugin_la_LIBS = $(GST_LIBS) libtestplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libtestplugin2_la_SOURCES = testplugin2.c libtestplugin2_la_SOURCES = testplugin2.c
libtestplugin2_la_CFLAGS = $(GST_CFLAGS) libtestplugin2_la_CFLAGS = $(GST_CFLAGS)
libtestplugin2_la_LIBS = $(GST_LIBS) libtestplugin2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
# linked_LDFLAGS = -L. -ltestplugin -ltestplugin2 linked_LDFLAGS = -L. -ltestplugin -ltestplugin2
# static_SOURCES = static.c testplugin_s.c testplugin2_s.c static_SOURCES = static.c testplugin_s.c testplugin2_s.c
TESTS = $(testprogs) TESTS = $(testprogs)

View file

@ -9,14 +9,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
gst_plugin_add_path ("."); plugin = gst_plugin_new (".libs/libtestplugin.so");
loaded = gst_plugin_load ("testplugin");
g_assert (loaded == TRUE);
plugin = gst_plugin_find ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
loaded = gst_plugin_load_plugin (plugin);
g_assert (loaded == TRUE);
g_print ("testplugin: %d, %s\n", loaded, plugin->name); g_print ("testplugin: %d, %s\n", loaded, plugin->name);
return 0; return 0;

View file

@ -8,12 +8,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name); g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2"); plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name); g_print ("testplugin2: %p %s\n", plugin, plugin->name);

View file

@ -10,45 +10,45 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
numplugins = g_list_length (gst_plugin_get_list ()); numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins); g_print ("%d plugins loaded\n", numplugins);
g_mem_chunk_info (); g_mem_chunk_info ();
plugin = gst_plugin_find ("ossaudio"); plugin = gst_registry_pool_find_plugin ("ossaudio");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin))); g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
g_print ("ossaudio: %p %d\n", plugin, gst_plugin_is_loaded (plugin)); g_print ("ossaudio: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
loaded = gst_plugin_load_plugin (plugin); loaded = gst_plugin_load_plugin (plugin);
g_assert (loaded == TRUE); g_assert (loaded == TRUE);
numplugins = g_list_length (gst_plugin_get_list ()); numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins); g_print ("%d plugins loaded\n", numplugins);
g_mem_chunk_info (); g_mem_chunk_info ();
plugin = gst_plugin_find ("ossaudio"); plugin = gst_registry_pool_find_plugin ("ossaudio");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("ossaudio: %p %d\n", plugin, gst_plugin_is_loaded (plugin)); g_print ("ossaudio: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin))); g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
loaded = gst_plugin_load_plugin (plugin); loaded = gst_plugin_load_plugin (plugin);
g_assert (loaded == TRUE); g_assert (loaded == TRUE);
numplugins = g_list_length (gst_plugin_get_list ()); numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins); g_print ("%d plugins loaded\n", numplugins);
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin))); g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
g_mem_chunk_info (); g_mem_chunk_info ();
plugin = gst_plugin_find ("ossaudio"); plugin = gst_registry_pool_find_plugin ("ossaudio");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("osssink: %p %d\n", plugin, gst_plugin_is_loaded (plugin)); g_print ("ossaudio: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
return 0; return 0;
} }

View file

@ -8,7 +8,7 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %s\n", plugin->name); g_print ("testplugin: %s\n", plugin->name);

View file

@ -8,12 +8,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name); g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2"); plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name); g_print ("testplugin2: %p %s\n", plugin, plugin->name);

View file

@ -36,12 +36,12 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin"); plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name); g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2"); plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL); g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name); g_print ("testplugin2: %p %s\n", plugin, plugin->name);