gstreamer/testsuite/plugin/loading.c
David Schleef aa63f65fc8 Update for new plugin API. static and static2 now fail
Original commit message from CVS:
Update for new plugin API.  static and static2 now fail
2003-11-04 05:48:16 +00:00

54 lines
1.6 KiB
C

#include <gst/gst.h>
int
main (int argc, char *argv[])
{
GstPlugin *plugin;
gboolean loaded = FALSE;
gint numplugins;
gst_init (&argc, &argv);
numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins);
g_mem_chunk_info ();
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
g_print ("testplugin: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
loaded = gst_plugin_load (gst_plugin_get_name(plugin));
g_assert (loaded == TRUE);
numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins);
g_mem_chunk_info ();
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
g_print ("testplugin: %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)));
loaded = gst_plugin_load (gst_plugin_get_name(plugin));
g_assert (loaded == TRUE);
numplugins = g_list_length (gst_registry_pool_plugin_list ());
g_print ("%d plugins loaded\n", numplugins);
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
g_mem_chunk_info ();
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
g_print ("testplugin: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
return 0;
}