Skip to content

meson: Fix plugin symbol export for C++ sources/plugins

The symbol visibility=hidden flag was only being applied to C compilation, so plugins implemented in C++ would leak extra symbols than the 2 _get_desc() and _register().

That also showed that the gst-libs opencv C++ lib was not marking symbols for export correctly because the BUILDING_GST_OPENCV define wasn't in the C++ args, so fix that too.

This should probably also be fixed in other modules that either have C++ modules, or that might receive them in the future.

I don't know if anyone has a good idea how we could automate a test to prevent this - maybe something in the CI that runs nm -D $pluginfile | grep 'T ' | egrep -v '(_get_desc|_register)$' and checks that it's empty?

Merge request reports