mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
1f0374782c
Original commit message from CVS: * fix refcounting tests so that they compile and run, but they fail currently: gst leaks obscene amounts of memory ;) * fix plugin loading test so that it only refers to plugins within the gstreamer/ tree * store gst plugin paths in the registry * is GST_REGISTRY is set, only use the user registry with the PLUGIN_PATH explictly specified by the user * all tests should pass now except refcounting
54 lines
1.5 KiB
C
54 lines
1.5 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_plugin (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_plugin (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;
|
|
}
|