Linking new metadata lib

John P Poet jppoet at gmail.com
Fri Oct 7 21:17:06 UTC 2016


On Thu, Oct 6, 2016 at 7:38 PM Sebastian Dröge <sebastian at centricular.com>
wrote:

> 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
>

That fixed that issue.


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

Done.


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

Yes, absolutely.  As a matter of fact, I will attach what I have done so
far to this email, in the hope that you will have time to look at it and
give me other suggestions.


> > 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.
>

I am still having this problem.  When building, I am doing:
```
export PKG_CONFIG_PATH=/opt/gst/lib/pkgconfig
```
and
```
./autogen.sh --prefix=/opt/gst
make
sudo make install
```
In each directory.

In gst-plugins-bad/gst-libs/gst/vanc/Makefile.am, I have:
```
lib_LTLIBRARIES = libgstvanc- at GST_API_VERSION@.la
```
That should be correct, right?

In gst-libav/ext/libav/Makefile.am, I have:
```
libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \
    -lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
    -lgstpbutils-$(GST_API_VERSION) -lgstvanc-$(GST_API_VERSION) \
    $(GST_BASE_LIBS) $(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS) $(LZMA_LIBS)
```

When I inspect libav, I get:
```
gst-inspect-1.0 avenc_mpeg2video

(gst-plugin-scanner:21594): GStreamer-WARNING **: Failed to load plugin
'/opt/gst/lib/gstreamer-1.0/libgstlibav.so':
/opt/gst/lib/gstreamer-1.0/libgstlibav.so: undefined symbol:
vanc_meta_get_info
No such element or plugin 'avenc_mpeg2video'
```

If I run ldd on /opt/gst/lib/gstreamer-1.0/libgstlibav.so, I get:
```
ldd /opt/gst/lib/gstreamer-1.0/libgstlibav.so
    linux-vdso.so.1 (0x00007fff815ba000)
    libgstaudio-1.0.so.0 => /opt/gst/lib/libgstaudio-1.0.so.0
(0x00007f9f871e7000)
    libgstvideo-1.0.so.0 => /opt/gst/lib/libgstvideo-1.0.so.0
(0x00007f9f86f70000)
    libgstpbutils-1.0.so.0 => /opt/gst/lib/libgstpbutils-1.0.so.0
(0x00007f9f86d3b000)
    libgstvanc-1.0.so.0 => /opt/gst/lib/libgstvanc-1.0.so.0
(0x00007f9f86b39000)
    libgstbase-1.0.so.0 => /opt/gst/lib/libgstbase-1.0.so.0
(0x00007f9f868d6000)
    libgstreamer-1.0.so.0 => /opt/gst/lib/libgstreamer-1.0.so.0
(0x00007f9f865a5000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(0x00007f9f86352000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0
(0x00007f9f86043000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9f85d42000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9f85b27000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0
(0x00007f9f85917000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f9f856fa000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9f8534f000)
    libgsttag-1.0.so.0 => /opt/gst/lib/libgsttag-1.0.so.0
(0x00007f9f85115000)
    libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
(0x00007f9f84f11000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9f84d09000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9f84b05000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6
(0x00007f9f848fd000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f9f8468f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9f88b58000)
```
So libgstlibav.so finds libgstvanc it okay.  This makes me think the
problem is with gst-launch-1.0 and gst-inspect-1.0, but that doesn't really
make sense.  Can you spot anything else I am doing wrong?

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161007/819acf91/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-libav-vanc.patch
Type: text/x-patch
Size: 3294 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161007/819acf91/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-plugins-bad-vanc.patch
Type: text/x-patch
Size: 27573 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161007/819acf91/attachment-0003.bin>


More information about the gstreamer-devel mailing list