gstreamer/testsuite/plugin/static2.c
Wim Taymans 12bbbd5c1e Lots of modifications to the plugin system.
Original commit message from CVS:
Lots of modifications to the plugin system.
- Added a GstPluginfeature object that serves as a base class for all
plugin contents.
- changed the plugin API, everyhting is now added with
gst_plugin_add_feature
- typefactories are named now so that they can be located easily and filled
in at plugin load.
- mime types like "video/raw image/raw" are gone for now.
- lots of plugin updates (style and API changes)
- tested with an without registry.
- updates to various tools.
- added a little testsuite to test/show how you can load plugins (4 modes)

Test this one, Almost everything has changed :-)
2001-08-21 20:16:48 +00:00

50 lines
777 B
C

#define GST_PLUGIN_STATIC
#include <gst/gst.h>
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
return TRUE;
}
GST_PLUGIN_DESC (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"testplugin",
plugin_init
);
static gboolean
plugin2_init (GModule *module, GstPlugin *plugin)
{
return TRUE;
}
GST_PLUGIN_DESC (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"testplugin2",
plugin2_init
);
int
main (int argc, char *argv[])
{
GstPlugin *plugin;
gst_init (&argc, &argv);
plugin = gst_plugin_find ("testplugin");
g_assert (plugin != NULL);
g_print ("testplugin: %p %s\n", plugin, plugin->name);
plugin = gst_plugin_find ("testplugin2");
g_assert (plugin != NULL);
g_print ("testplugin2: %p %s\n", plugin, plugin->name);
return 0;
}