问题
Can I somehow tell GStreamer to look for plugins in a specified directory?
回答1:
Use the GST_PLUGIN_PATH environment variable to point at the directory you want, or programatically just call:
GstRegistry *registry;
registry = gst_registry_get_default();
gst_registry_add_path(registry, directory);
回答2:
You can no longer do this programmatically in gstreamer 1.0.
In the above answer,
gst_registry_get_default() was replaced with gst_registry_get()
and gst_registry_add_path() was removed.
You can also set GST_PLUGIN_SYSTEM_PATH to the location of the Plugins. Not sure what the difference is between this and GST_PLUGIN_PATH though.
来源:https://stackoverflow.com/questions/2120444/gstreamer-plugin-search-path