简体   繁体   English

GStreamer插件搜索路径?

[英]GStreamer plugin search path?

我可以以某种方式告诉 GStreamer 在指定目录中查找插件吗?

Use the GST_PLUGIN_PATH environment variable to point at the directory you want, or programatically just call:使用GST_PLUGIN_PATH环境变量指向您想要的目录,或者以编程方式调用:

GstRegistry *registry;
registry = gst_registry_get_default();
gst_registry_add_path(registry, directory);

You can no longer do this programmatically in gstreamer 1.0.您不能再在 gstreamer 1.0 中以编程方式执行此操作。

In the above answer,在上面的回答中,

gst_registry_get_default() was replaced with gst_registry_get() and gst_registry_add_path() was removed. gst_registry_get_default()被替换gst_registry_get()gst_registry_add_path()除去。

You can also set GST_PLUGIN_SYSTEM_PATH to the location of the Plugins.您还可以将GST_PLUGIN_SYSTEM_PATH设置为插件的位置。 Not sure what the difference is between this and GST_PLUGIN_PATH though.不知道这和GST_PLUGIN_PATH之间有什么区别。

In case you are running GStreamer from command line you may add --gst-plugin-path=PATHS to the command如果您从命令行运行 GStreamer,您可以在命令中添加--gst-plugin-path=PATHS

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM