Linking new metadata lib

Sebastian Dröge sebastian at centricular.com
Fri Oct 7 01:25:28 UTC 2016


On Fri, 2016-10-07 at 00:00 +0000, John P Poet wrote:
> I have created new metadata type in:
> 
> gst-plugins-bad/gst-libs/gst/vanc/gstvancmeta.[ch]
> 
> Which creates:
> 
> /opt/gst/lib/libgstvancmeta-1.0.so.0.0.0
> 
> I have run into trouble trying to link against it, though.  I have
> modified
> gst-plugins-bad/sys/decklink/Makefile.am to have:
> 
> libgstdecklink_la_LIBADD = \
>     $(GST_PLUGINS_BASE_LIBS) \
>     -lgstaudio- at GST_API_VERSION@ \
>     -lgstvideo- at GST_API_VERSION@ \
>     -lgstvancmeta- at GST_API_VERSION@ \
>     ...
> 
> But it is not finding it while trying to build gst-plugins-bad.  If I
> install libgstvancmeta first, then build decklink, it finds it.  Does
> this mean that I need to add a 'local' path for the gstvanmeta lib,
> or should gstvanmeta lib be move to gst-plugins-base?

As plugin and library are in the same module, you have to link to the
library .la file, i.e.

  $(top_builddir)/gst-libs/gst/vanc/libgstvancmeta- at GST_API_VERSION@.la

I would also suggest to call the library libgstvanc (i.e. without the
meta part).


Are you planning to submit the code of the library and the changes to
the decklink plugin upstream at some point?

> Also, when the gstvanmeta lib is installed (/opt/gst/lib), I have
> also run into trouble trying to use it with avenc_mpeg2video, I get:
> /opt/gst/lib/gstreamer-1.0/libgstlibav.so: undefined symbol:
> vanc_meta_get_info
> 
> To fix that, I tried changing gst-libav/ext/libav/Makefile.am to
> have:
> libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \
>     -lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
>     -lgstpbutils-$(GST_API_VERSION) -lgstvancmeta-$(GST_API_VERSION)
> \
>    ...
> 
> But that did not seem to help.  It looks like libgstlibav.so is being
> installed in /opt/gst/lib/gstreamer-1.0, but libgstvancmeta.so is
> being installed in /opt/gst/lib.  Does libgstvancmeta.so belong in
> /opt/gst/lib/gstreamer-1.0?  If so, how do I get it there?

It does belong there, yes. If you put it into lib_LTLIBRARIES in the
Makefile.am, it should go to the normal library directory and not the
plugin directory.

Compare your Makefile.am with the ones of other libraries in gst-libs.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161007/a244da37/attachment.sig>


More information about the gstreamer-devel mailing list