[oi-dev] gstreamer1 and OpenGL/EGL
Tim Mooney
Tim.Mooney at ndsu.edu
Wed Oct 27 20:32:14 UTC 2021
In regard to: Re: [oi-dev] gstreamer1 and OpenGL/EGL, Till Wegmüller said...:
> Is there any big change if we let meson decide it itself?
Yes, unfortunately. If I don't specify anything GL-related, it also finds
Qt5 and qmake, but it gets the ABI wrong (it's using qmake to build 64 bit
Qt5-related code during the 32 bit build) and linking fails.
There is no option to just disable qt5, at least for these plugins. There
is for at least one of the later sets of plugins.
Limiting what it could select for OpenGL was the only built-in way I found
to avoid the Qt5 linking failures.
I could go back and try patch out the Qt5 code, instead, but that's likely
more work.
> Usually we only disable stuff if compilation is broken, so there is no
> feature limit on purpose in OI. Just things that are broken or need
> additional deps nobody had the time for.
I'll keep that in mind for future components.
Thanks!
Tim
> On 26.10.21 21:44, Tim Mooney via oi-dev wrote:
>>
>> All-
>>
>> I'm working my way through updating the gstreamer1 components to the
>> latest version (1.16.2 -> 1.18.5). They've switched from autoconf to
>> meson, so the biggest hurdle has been converting the Makefile to use
>> the new configuration options.
>>
>> With the current 1.16.2, gst-plugins-base1 specifies
>>
>> CONFIGURE_OPTIONS += --disable-gles2
>>
>> but nothing else OpenGL related.
>>
>> Unfortunately, gst-plugins-base1 for 1.18.5 with meson doesn't have
>> the same option meanings, so there's no one-to-one mapping between our
>> old configuration and the new. The meson_options related to OpenGL are
>>
>> # OpenGL integration library options
>> option('gl_api', type : 'array', choices : ['opengl', 'gles2', 'auto'],
>> value : ['auto'],
>> description : 'A comma separated list of opengl APIs to enable
>> building against'
>> )
>>
>> option('gl_platform', type : 'array',
>> choices : ['glx', 'egl', 'cgl', 'wgl', 'eagl', 'auto'],
>> value : ['auto'],
>> description : 'A comma separated list of opengl platforms to
>> enable building against'
>> )
>>
>> option('gl_winsys', type : 'array',
>> choices : ['x11', 'wayland', 'win32', 'winrt', 'cocoa',
>> 'dispmanx', 'egl', 'viv-fb', 'gbm', 'android', 'auto'],
>> value : ['auto'],
>> description : 'A comma separated list of opengl windows systems
>> to enable building against. Supported values are x11, wayland,
>> win32, winrt, cocoa, dispmanx, egl, viv-fb, gbm, and android'
>> )
>>
>> option('egl_module_name', type : 'string',
>> value : '',
>> description : 'The file to pass to g_module_open to open the
>> libEGL library (default: libEGL)'
>> )
>>
>> option('opengl_module_name', type : 'string',
>> value : '',
>> description : 'The file to pass to g_module_open to open the
>> libGL library (default: libGL)'
>> )
>>
>> option('gles2_module_name', type : 'string',
>> value : '',
>> description : 'The file to pass to g_module_open to open the
>> libGLESv2 library (default: libGLESv2)'
>> )
>>
>>
>> #
>> # Feature option for opengl plugin and integration library
>> #
>> option('gl', type : 'feature',
>> value : 'auto',
>> description : 'OpenGL integration library and OpenGL plugin'
>> )
>>
>> option('gl-graphene', type : 'feature',
>> value : 'auto',
>> description : 'Use Graphene in OpenGL plugin'
>> )
>>
>> option('gl-jpeg', type : 'feature',
>> value : 'auto',
>> description : 'Use libjpeg in OpenGL plugin'
>> )
>>
>> option('gl-png', type : 'feature',
>> value : 'auto',
>> description : 'Use libpng in OpenGL plugin'
>> )
>>
>>
>> Now, with the available meson options, what I have (so far) specified for
>> the
>> updated build is
>>
>> CONFIGURE_OPTIONS += -Dgl_api=opengl
>> CONFIGURE_OPTIONS += -Dgl_platform=glx,egl
>> CONFIGURE_OPTIONS += -Dgl_winsys=x11,egl
>> CONFIGURE_OPTIONS += -Dgl-graphene=disabled
>>
>>
>> With those options specified, the updated manifest isn't missing anything
>> that was present in the 1.16.2 component.
>>
>> It seems like some new stuff is being added, though:
>>
>> file path=usr/lib/pkgconfig/gstreamer-gl-1.0.pc
>> +file path=usr/lib/pkgconfig/gstreamer-gl-egl-1.0.pc
>> +file path=usr/lib/pkgconfig/gstreamer-gl-prototypes-1.0.pc
>> +file path=usr/lib/pkgconfig/gstreamer-gl-x11-1.0.pc
>>
>> There are also new GL-related header files and several files related to
>> introspection (for the 64 bit build; the 32 bit build has introspection
>> disabled):
>>
>> +file path=usr/lib/$(MACH64)/girepository-1.0/GstGLEGL-1.0.typelib
>> +file path=usr/lib/$(MACH64)/girepository-1.0/GstGLX11-1.0.typelib
>>
>> +file path=usr/share/gir-1.0/GstGLEGL-1.0.gir
>> +file path=usr/share/gir-1.0/GstGLX11-1.0.gir
>>
>>
>> I also note that the existing package has dependency skips for libGL and
>> libEGL:
>>
>> file path=usr/lib/$(MACH64)/libgstgl-1.0.so.0.1602.0 \
>> pkg.depend.bypass-generate=libGL\.so\.1 \
>> pkg.depend.bypass-generate=libEGL\.so\.1
>>
>>
>> This leads me to wonder whether the set of meson options I chose are
>> what we want. Would it be better if I dropped "egl" from gl_platform
>> and gl_winsys?
>>
>> If I include stuff by mistake that we later decide we don't want, it's
>> going to be more difficult to get rid of it later than it is to get the
>> right stuff selected now.
>>
>> Tim
>
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev
>
>
--
Tim Mooney Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure /
Division of Information Technology / 701-231-1076 (Voice)
North Dakota State University, Fargo, ND 58105-5164
More information about the oi-dev
mailing list