Luma -> Alpha with v1.18

amindfv at mailbox.org amindfv at mailbox.org
Mon Jan 10 08:21:31 UTC 2022


On Sun, Jan 09, 2022 at 12:33:24PM -0800, amindfv at mailbox.org wrote:
> On Sun, Jan 09, 2022 at 01:53:00PM +0100, Florian Echtler via gstreamer-devel wrote:
> > FWIW, I once was in a similar situation and hacked together an example of
> > how to build a standalone GStreamer plugin without the library build
> > environment:
> > 
> > https://github.com/floe/gst-plugin-minimal
> > 
> > Maybe this can give you some hints.
> > 
> > Best, Florian
> 
> Thank you, this was extremely helpful! I had to make a couple tweaks which are hopefully correct:
> 
> Remove some newer pixel formats from `format_map[]`, as well as:
> 
>     -GST_ELEMENT_REGISTER_DEFINE (alpha_combine, "alphacombine",
>     -    GST_RANK_NONE, GST_TYPE_ALPHA_COMBINE);
>     +GST_ELEMENT_REGISTER_DEFINE (alpha_combine);
> 
> ...but I'm now the proud owner of a libgstalphacombine.so!
> 
> I'm now working on integrating this with gst_element_factory_{make,create} or similar. I'll do some digging on my own before asking questions here, but of course if anyone has a working example to share I'd be very glad to read about it. :)

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.

Any help, even for novice mistakes, very appreciated!

Tom

P.S. I've read the Meson docs on Nirbheek's advice, but if the answer is "re-read the Meson docs" I can see if I've missed something.


More information about the gstreamer-devel mailing list