1 | |
---|
2 | #include <gst/gst.h> |
---|
3 | |
---|
4 | int |
---|
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 | |
---|
20 | g_print ("%d features in plugin\n", |
---|
21 | g_list_length (gst_plugin_get_feature_list (plugin))); |
---|
22 | |
---|
23 | |
---|
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)); |
---|
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); |
---|
37 | g_print ("testplugin: %p loaded: %s\n", plugin, |
---|
38 | (gst_plugin_is_loaded (plugin) ? "true" : "false")); |
---|
39 | |
---|
40 | g_print ("%d features in plugin\n", |
---|
41 | g_list_length (gst_plugin_get_feature_list (plugin))); |
---|
42 | |
---|
43 | loaded = gst_plugin_load (gst_plugin_get_name (plugin)); |
---|
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 | |
---|
49 | g_print ("%d features in plugin\n", |
---|
50 | g_list_length (gst_plugin_get_feature_list (plugin))); |
---|
51 | |
---|
52 | g_mem_chunk_info (); |
---|
53 | |
---|
54 | plugin = gst_registry_pool_find_plugin ("testplugin"); |
---|
55 | g_assert (plugin != NULL); |
---|
56 | g_print ("testplugin: %p loaded: %s\n", plugin, |
---|
57 | (gst_plugin_is_loaded (plugin) ? "true" : "false")); |
---|
58 | |
---|
59 | return 0; |
---|
60 | } |
---|