[18713] | 1 | |
---|
| 2 | #include <gst/gst.h> |
---|
| 3 | |
---|
[21004] | 4 | int |
---|
[18713] | 5 | main (int argc, char *argv[]) |
---|
| 6 | { |
---|
| 7 | GstPlugin *plugin; |
---|
| 8 | gboolean loaded = FALSE; |
---|
| 9 | gint numplugins; |
---|
| 10 | |
---|
| 11 | gst_init (&argc, &argv); |
---|
| 12 | |
---|
| 13 | numplugins = g_list_length (gst_registry_pool_plugin_list ()); |
---|
| 14 | g_print ("%d plugins loaded\n", numplugins); |
---|
| 15 | g_mem_chunk_info (); |
---|
| 16 | |
---|
| 17 | plugin = gst_registry_pool_find_plugin ("testplugin"); |
---|
| 18 | g_assert (plugin != NULL); |
---|
| 19 | |
---|
[21004] | 20 | g_print ("%d features in plugin\n", |
---|
| 21 | g_list_length (gst_plugin_get_feature_list (plugin))); |
---|
[18713] | 22 | |
---|
| 23 | |
---|
[21004] | 24 | g_print ("testplugin: %p loaded: %s\n", plugin, |
---|
| 25 | (gst_plugin_is_loaded (plugin) ? "true" : "false")); |
---|
| 26 | |
---|
| 27 | loaded = gst_plugin_load (gst_plugin_get_name (plugin)); |
---|
[18713] | 28 | g_assert (loaded == TRUE); |
---|
| 29 | |
---|
| 30 | numplugins = g_list_length (gst_registry_pool_plugin_list ()); |
---|
| 31 | g_print ("%d plugins loaded\n", numplugins); |
---|
| 32 | |
---|
| 33 | g_mem_chunk_info (); |
---|
| 34 | |
---|
| 35 | plugin = gst_registry_pool_find_plugin ("testplugin"); |
---|
| 36 | g_assert (plugin != NULL); |
---|
[21004] | 37 | g_print ("testplugin: %p loaded: %s\n", plugin, |
---|
| 38 | (gst_plugin_is_loaded (plugin) ? "true" : "false")); |
---|
[18713] | 39 | |
---|
[21004] | 40 | g_print ("%d features in plugin\n", |
---|
| 41 | g_list_length (gst_plugin_get_feature_list (plugin))); |
---|
[18713] | 42 | |
---|
[21004] | 43 | loaded = gst_plugin_load (gst_plugin_get_name (plugin)); |
---|
[18713] | 44 | g_assert (loaded == TRUE); |
---|
| 45 | |
---|
| 46 | numplugins = g_list_length (gst_registry_pool_plugin_list ()); |
---|
| 47 | g_print ("%d plugins loaded\n", numplugins); |
---|
| 48 | |
---|
[21004] | 49 | g_print ("%d features in plugin\n", |
---|
| 50 | g_list_length (gst_plugin_get_feature_list (plugin))); |
---|
[18713] | 51 | |
---|
| 52 | g_mem_chunk_info (); |
---|
| 53 | |
---|
| 54 | plugin = gst_registry_pool_find_plugin ("testplugin"); |
---|
| 55 | g_assert (plugin != NULL); |
---|
[21004] | 56 | g_print ("testplugin: %p loaded: %s\n", plugin, |
---|
| 57 | (gst_plugin_is_loaded (plugin) ? "true" : "false")); |
---|
[18713] | 58 | |
---|
| 59 | return 0; |
---|
| 60 | } |
---|