2001-08-21 20:16:48 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
int
|
2001-08-21 20:16:48 +00:00
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
GstPlugin *plugin;
|
|
|
|
gboolean loaded = FALSE;
|
|
|
|
gint numplugins;
|
|
|
|
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
|
2002-05-10 19:24:04 +00:00
|
|
|
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
2001-08-21 20:16:48 +00:00
|
|
|
g_print ("%d plugins loaded\n", numplugins);
|
|
|
|
|
2002-05-11 20:30:05 +00:00
|
|
|
plugin = gst_registry_pool_find_plugin ("testplugin");
|
2001-08-21 20:16:48 +00:00
|
|
|
g_assert (plugin != NULL);
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("%d features in plugin\n",
|
|
|
|
g_list_length (gst_plugin_get_feature_list (plugin)));
|
2001-08-21 20:16:48 +00:00
|
|
|
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("testplugin: %p loaded: %s\n", plugin,
|
|
|
|
(gst_plugin_is_loaded (plugin) ? "true" : "false"));
|
|
|
|
|
|
|
|
loaded = gst_plugin_load (gst_plugin_get_name (plugin));
|
2001-08-21 20:16:48 +00:00
|
|
|
g_assert (loaded == TRUE);
|
|
|
|
|
2002-05-10 19:24:04 +00:00
|
|
|
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
2001-08-21 20:16:48 +00:00
|
|
|
g_print ("%d plugins loaded\n", numplugins);
|
|
|
|
|
2002-05-11 20:30:05 +00:00
|
|
|
plugin = gst_registry_pool_find_plugin ("testplugin");
|
2001-08-21 20:16:48 +00:00
|
|
|
g_assert (plugin != NULL);
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("testplugin: %p loaded: %s\n", plugin,
|
|
|
|
(gst_plugin_is_loaded (plugin) ? "true" : "false"));
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("%d features in plugin\n",
|
|
|
|
g_list_length (gst_plugin_get_feature_list (plugin)));
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
loaded = gst_plugin_load (gst_plugin_get_name (plugin));
|
2001-08-21 20:16:48 +00:00
|
|
|
g_assert (loaded == TRUE);
|
|
|
|
|
2002-05-10 19:24:04 +00:00
|
|
|
numplugins = g_list_length (gst_registry_pool_plugin_list ());
|
2001-08-21 20:16:48 +00:00
|
|
|
g_print ("%d plugins loaded\n", numplugins);
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("%d features in plugin\n",
|
|
|
|
g_list_length (gst_plugin_get_feature_list (plugin)));
|
2001-08-21 20:16:48 +00:00
|
|
|
|
2002-05-11 20:30:05 +00:00
|
|
|
plugin = gst_registry_pool_find_plugin ("testplugin");
|
2001-08-21 20:16:48 +00:00
|
|
|
g_assert (plugin != NULL);
|
2004-03-13 15:27:01 +00:00
|
|
|
g_print ("testplugin: %p loaded: %s\n", plugin,
|
|
|
|
(gst_plugin_is_loaded (plugin) ? "true" : "false"));
|
2001-08-21 20:16:48 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|