Skip to content
  • Nicolas Dufresne's avatar
    plugin: Unify static and dynamic plugin interface · e7ede5a4
    Nicolas Dufresne authored
    This patch changes the entry point of each plugin in order to unify the
    interface for static and dynamic plugin. What we do is replace the
    current static plugin interface and extend the dymamic one. The plugin
    entry was a C structure, name "gst_plugin_desc". With this patch, the
    interface is now:
    
      GstPpluginDesc *gst_plugin_<name>_get_desc(void);
    
    The reason we change the C structure into function, is that it is
    potentially more common to have function pointers, avoiding possible
    binding language limitation. Additionally to that. This change prevents
    the symbols from clashing between plugins, allowing to build once the
    plugin (assuming you have -fPIC).
    
    On the plugin loader side, we symply derive the shared object basename
    to extract the plugin name. If this symbol is not found, we fallback to
    gst_plugin_desc for backward compatibility.
    
    This has one side effect, which is that the shared objects now need to
    be named after their plugin name. This is generally the case with few
    exceptions. The benifit of this limitation is that you can control the
    gst_plugin_<name>_desc clash at file level.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779344
    e7ede5a4