[Bug 779344] plugin: Unify static and dynamic plugin interface

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Mar 2 02:41:14 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=779344

Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #346879|reviewed                    |none
             status|                            |
 Attachment #346879|0                           |1
        is obsolete|                            |

--- Comment #5 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Created attachment 347015
  --> https://bugzilla.gnome.org/attachment.cgi?id=347015&action=edit
[v2] plugin: Unify static and dynamic plugin interface

v2 note: GstPluginDesc are now const.

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list