[18713] | 1 | The following plugin modes are supported: |
---|
| 2 | |
---|
| 3 | 1) registry based |
---|
| 4 | ----------------- |
---|
| 5 | |
---|
| 6 | All known plugins are listed in the registry file. |
---|
| 7 | |
---|
| 8 | gst_plugin_find ("pluginname"); |
---|
| 9 | |
---|
| 10 | Works right after gst_init (), along with the elements in it. |
---|
| 11 | dynamic loading of the plugin is performed when a feature inside |
---|
| 12 | it is requested. |
---|
| 13 | |
---|
| 14 | example: registry.c. (You might want to run gstreamer-register with |
---|
| 15 | the --gst-plugin-path=. to added the test dir to the plugin path so |
---|
| 16 | that the testplugins can be found) |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | 2) non registry based, dynmic loading |
---|
| 20 | ------------------------------------- |
---|
| 21 | |
---|
| 22 | Plugins are know after a gst_plugin_load ("pluginname"). This |
---|
| 23 | function will scan de plugin paths, so you might want to perform |
---|
| 24 | a gst_plugin_add_path ("path"). |
---|
| 25 | |
---|
| 26 | After the gst_plugin_load(), the features are available without any |
---|
| 27 | further actions. |
---|
| 28 | |
---|
| 29 | example: dynamic.c |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | 3) non registry based, shared linking |
---|
| 33 | ------------------------------------- |
---|
| 34 | |
---|
| 35 | You can add the plugin .so (or equivalent) file to the LDFLAGS at |
---|
| 36 | compile time. The plugin will be known after the gst_init() without |
---|
| 37 | any further actions. |
---|
| 38 | |
---|
| 39 | example: linked.c |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | 4) non registry based, static linking |
---|
| 43 | ------------------------------------- |
---|
| 44 | |
---|
| 45 | Plugin compiled with the GST_PLUGIN_STATIC defined can be statically |
---|
| 46 | linked to the executable. The plugin is available after gst_init () |
---|
| 47 | without any further actions. |
---|
| 48 | |
---|
| 49 | example: static.c (plugins are statically linked from another file) |
---|
| 50 | static2.c (plugins are included in the main file) |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | Any combination of the above is possible too, for example, you can use |
---|
| 54 | a registry, have some plugins load dynamically and have another few |
---|
| 55 | linked in as a shared lib. |
---|
| 56 | |
---|
| 57 | You cannot statically link multiple plugins that are compiled without the |
---|
| 58 | GST_PLUGIN_STATIC symbol defined (this will cause multiple defined at link |
---|
| 59 | time for obvious reasons) |
---|