我可以以某种方式告诉 GStreamer 在指定目录中查找插件吗?
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);
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.
In case you are running GStreamer from command line you may add --gst-plugin-path=PATHS to the command
Example adding current directory as plugins path
gst-inspect-1.0 kvssink --gst-plugin-path=$PWD
There is much more useful commands available just check:
gst-launch-1.0 --help-gst
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.