plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
-tests_pass = static dynamic static2 linked loading registry
-tests_fail =
+tests_pass = dynamic linked loading registry
+tests_fail = static static2
libtestplugin_la_SOURCES = testplugin.c
{
GstPlugin *plugin;
GError *error = NULL;
- gboolean loaded;
gst_init (&argc, &argv);
- plugin = gst_plugin_new (".libs/libtestplugin.so");
+ plugin = gst_plugin_load_file (".libs/libtestplugin.so", &error);
g_assert (plugin != NULL);
-
- loaded = gst_plugin_load_plugin (plugin, &error);
if (error)
{
g_print ("ERROR loading plug-in: %s\n", error->message);
g_free (error);
+ return 1;
}
- g_assert (loaded == TRUE);
- g_print ("testplugin: %d, %s\n", loaded, plugin->name);
+ g_print ("testplugin: %s\n", gst_plugin_get_name(plugin));
return 0;
}
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name(plugin));
plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL);
- g_print ("testplugin2: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name(plugin));
return 0;
}
GstPlugin *plugin;
gboolean loaded = FALSE;
gint numplugins;
- GError *error = NULL;
gst_init (&argc, &argv);
g_print ("testplugin: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
- loaded = gst_plugin_load_plugin (plugin, &error);
- if (error)
- {
- g_print ("ERROR loading plug-in: %s\n", error->message);
- g_free (error);
- }
+ 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 features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
- loaded = gst_plugin_load_plugin (plugin, &error);
- if (error)
- {
- g_print ("ERROR loading plug-in: %s\n", error->message);
- g_free (error);
- }
+ loaded = gst_plugin_load (gst_plugin_get_name(plugin));
g_assert (loaded == TRUE);
numplugins = g_list_length (gst_registry_pool_plugin_list ());
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %s\n", plugin->name);
+ g_print ("testplugin: %s\n", gst_plugin_get_name(plugin));
return 0;
}
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name(plugin));
plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL);
- g_print ("testplugin2: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name(plugin));
return 0;
}
#define GST_PLUGIN_STATIC
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
return TRUE;
}
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"testplugin",
- plugin_init
+ "a plugin for testing",
+ plugin_init,
+ VERSION,
+ GST_LICENSE,
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
);
static gboolean
-plugin2_init (GModule *module, GstPlugin *plugin)
+plugin2_init (GstPlugin *plugin)
{
return TRUE;
}
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"testplugin2",
- plugin2_init
+ "a second plugin for testing",
+ plugin2_init,
+ VERSION,
+ GST_LICENSE,
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
);
int
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name(plugin));
plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL);
- g_print ("testplugin2: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name(plugin));
return 0;
}
plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
-tests_pass = static dynamic static2 linked loading registry
-tests_fail =
+tests_pass = dynamic linked loading registry
+tests_fail = static static2
libtestplugin_la_SOURCES = testplugin.c
{
GstPlugin *plugin;
GError *error = NULL;
- gboolean loaded;
gst_init (&argc, &argv);
- plugin = gst_plugin_new (".libs/libtestplugin.so");
+ plugin = gst_plugin_load_file (".libs/libtestplugin.so", &error);
g_assert (plugin != NULL);
-
- loaded = gst_plugin_load_plugin (plugin, &error);
if (error)
{
g_print ("ERROR loading plug-in: %s\n", error->message);
g_free (error);
+ return 1;
}
- g_assert (loaded == TRUE);
- g_print ("testplugin: %d, %s\n", loaded, plugin->name);
+ g_print ("testplugin: %s\n", gst_plugin_get_name(plugin));
return 0;
}
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name(plugin));
plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL);
- g_print ("testplugin2: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name(plugin));
return 0;
}
GstPlugin *plugin;
gboolean loaded = FALSE;
gint numplugins;
- GError *error = NULL;
gst_init (&argc, &argv);
g_print ("testplugin: %p loaded: %s\n", plugin, (gst_plugin_is_loaded (plugin) ? "true": "false"));
- loaded = gst_plugin_load_plugin (plugin, &error);
- if (error)
- {
- g_print ("ERROR loading plug-in: %s\n", error->message);
- g_free (error);
- }
+ 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 features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
- loaded = gst_plugin_load_plugin (plugin, &error);
- if (error)
- {
- g_print ("ERROR loading plug-in: %s\n", error->message);
- g_free (error);
- }
+ loaded = gst_plugin_load (gst_plugin_get_name(plugin));
g_assert (loaded == TRUE);
numplugins = g_list_length (gst_registry_pool_plugin_list ());
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %s\n", plugin->name);
+ g_print ("testplugin: %s\n", gst_plugin_get_name(plugin));
return 0;
}
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name(plugin));
plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL);
- g_print ("testplugin2: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name(plugin));
return 0;
}
#define GST_PLUGIN_STATIC
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <gst/gst.h>
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
return TRUE;
}
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"testplugin",
- plugin_init
+ "a plugin for testing",
+ plugin_init,
+ VERSION,
+ GST_LICENSE,
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
);
static gboolean
-plugin2_init (GModule *module, GstPlugin *plugin)
+plugin2_init (GstPlugin *plugin)
{
return TRUE;
}
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"testplugin2",
- plugin2_init
+ "a second plugin for testing",
+ plugin2_init,
+ VERSION,
+ GST_LICENSE,
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
);
int
plugin = gst_registry_pool_find_plugin ("testplugin");
g_assert (plugin != NULL);
- g_print ("testplugin: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name(plugin));
plugin = gst_registry_pool_find_plugin ("testplugin2");
g_assert (plugin != NULL);
- g_print ("testplugin2: %p %s\n", plugin, plugin->name);
+ g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name(plugin));
return 0;
}