Can I somehow tell GStreamer to look for plugins in a specified directory?
            Asked
            
        
        
            Active
            
        
            Viewed 2.7k times
        
    3 Answers
25
            Use the GST_PLUGIN_PATH environment variable to point at the directory you want, or programatically just call:
GstRegistry *registry;
registry = gst_registry_get();
gst_registry_scan_path(registry, directory);
        Xiao
        
- 12,235
 - 2
 - 29
 - 36
 
        Johan Dahlin
        
- 25,300
 - 6
 - 40
 - 55
 
- 
                    1`gst_registry_get_default()` was replaced with `gst_registry_get()` , `gst_registry_add_path()` COULD be replaced with `gst_registry_scan_path()` – Mohammad Kanan Mar 19 '21 at 03:57
 
6
            
            
        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.
- 
                    1In GStreamer 1.0 there is a function gst_registry_add_plugin () https://gstreamer.freedesktop.org/documentation/gstreamer/gstregistry.html?gi-language=c#gst_registry_add_plugin – Corey Cole Jun 16 '20 at 20:48
 - 
                    In GStreamer 1.0 there is a function `gst_registry_scan_path()` :) – Mohammad Kanan Mar 19 '21 at 03:56
 
2
            
            
        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
        Aposhian
        
- 801
 - 1
 - 10
 - 27
 
        Łukasz Gawron
        
- 897
 - 10
 - 20