Luma -> Alpha with v1.18
Florian Echtler
floe at butterbrot.org
Mon Jan 10 09:41:12 UTC 2022
On 10/01/2022 10:36, amindfv at mailbox.org wrote:
> On Mon, Jan 10, 2022 at 09:48:26AM +0100, Florian Echtler wrote:
>> On 10/01/2022 09:21, amindfv at mailbox.org wrote:
>>> On Sun, Jan 09, 2022 at 12:33:24PM -0800, amindfv at mailbox.org wrote:
>>>
>>> Here's my latest, boiled down to a simple example. I hope my inexperienced attempts aren't too horrifying, or if so they're easy enough to get on the right track.
>>>
>>> I've built the .so file, which is in the current directory. I then launch a hello world pipeline (unrelated to the new plugin), and hit an error loading the .so:
>>>
>>> $ GST_PLUGIN_PATH=$GST_PLUGIN_PATH:. gst-launch-1.0 videotestsrc ! autovideosink
>>> (gst-plugin-scanner:149635): GStreamer-WARNING **: 00:02:44.715: Failed to load plugin './libgstalphacombine.so': ./libgstalphacombine.so: undefined symbol: gst_video_info_init
>>> Setting pipeline to PAUSED ...
>>> Pipeline is PREROLLING ...
>>> Pipeline is PREROLLED ...
>>> Setting pipeline to PLAYING ...
>>>
>>> gstalphacombine.c contains "#include <gst/video/video.h>", which in turn includes gst/video/video-info.h. In other words, gst_video_info_init "shouldn't" be undefined.
>>
>> It's defined for compile time, but apparently not for link time (which is
>> partially deferred until the library is actually loaded in this case).
>
> Thanks for the fast reply!
>
>> You can check with `ldd ./libgstalphacombine.so` whether there's just a
>> library path missing at load time;
>
> Here's the output; seems to my untrained eye not to be missing anything:
>
> $ ldd ./libgstalphacombine.so
> linux-vdso.so.1 (0x00007ffdbeded000)
> libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f75529fa000)
> libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f75529a0000)
> libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f7552871000)
> libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f755286b000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7552727000)
> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7552721000)
> libunwind.so.8 => /usr/lib/x86_64-linux-gnu/libunwind.so.8 (0x00007f7552704000)
> libdw.so.1 => /usr/lib/x86_64-linux-gnu/libdw.so.1 (0x00007f755265b000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7552639000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7552474000)
> libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007f7552468000)
> libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f75523f5000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f7552b8b000)
> liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f75523cb000)
> libelf.so.1 => /usr/lib/x86_64-linux-gnu/libelf.so.1 (0x00007f75523b0000)
> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7552393000)
> libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f7552380000)
Yes, this looks okay, but...
>> if this is not the case, then you would
>> need to modify your compiler flags to include whatever GStreamer sub-library
>> contains gst_video_info_init.
>
> The Makefile includes
>
> -I/usr/include/gstreamer-1.0
>
> and /usr/include/gstreamer-1.0/gst/video/video-info.h appears to define `gst_video_info_init`.
I think you also need to add `-lgstvideo-1.0` to the link step (where all the
other -lgst... options are defined).
Best, Florian
--
SENT FROM MY DEC VT50 TERMINAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220110/52bda420/attachment.sig>
More information about the gstreamer-devel
mailing list