mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
12bbbd5c1e
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 :-)
54 lines
1.4 KiB
C
54 lines
1.4 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_plugin_get_list ());
|
|
g_print ("%d plugins loaded\n", numplugins);
|
|
g_mem_chunk_info ();
|
|
|
|
plugin = gst_plugin_find ("ossaudio");
|
|
g_assert (plugin != NULL);
|
|
|
|
g_print ("%d features in plugin\n", g_list_length (gst_plugin_get_feature_list (plugin)));
|
|
|
|
|
|
g_print ("ossaudio: %p %d\n", plugin, gst_plugin_is_loaded (plugin));
|
|
|
|
loaded = gst_plugin_load_plugin (plugin);
|
|
g_assert (loaded == TRUE);
|
|
|
|
numplugins = g_list_length (gst_plugin_get_list ());
|
|
g_print ("%d plugins loaded\n", numplugins);
|
|
|
|
g_mem_chunk_info ();
|
|
|
|
plugin = gst_plugin_find ("ossaudio");
|
|
g_assert (plugin != NULL);
|
|
g_print ("ossaudio: %p %d\n", plugin, gst_plugin_is_loaded (plugin));
|
|
|
|
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_plugin_get_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_plugin_find ("ossaudio");
|
|
g_assert (plugin != NULL);
|
|
g_print ("osssink: %p %d\n", plugin, gst_plugin_is_loaded (plugin));
|
|
|
|
return 0;
|
|
}
|