On Sun, 24 May 2020, Zebediah Figura wrote: [...]
Yes, this is correct. winegstreamer doesn't use tool programs at all, and libgstreamer doesn't depend on them either.
Whether winegstreamer uses the tool programs or not is a red herring. The GStreamer tools just provide a 3 lines 32-bit process testcase. But we can also got the hard way to reproduce this problem:
winegstreamer needs gst_element_factory_make() to work. From various functions in dlls/winegstreamer/gstdemux.c: if (!(vconv = gst_element_factory_make("videoconvert", NULL))) if (!(convert = gst_element_factory_make("audioconvert", NULL))) GstElement *element = gst_element_factory_make("decodebin", NULL);
So let's test this out in a simple 32-bit program:
----- checkgst.c ----- /* gcc -m32 -o checkgst32 `PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig pkg-config --cflags --libs gstreamer-1.0` checkgst.c */ #include <stdio.h> #include <string.h> #include <gst/gst.h>
static void check_gstreamer_element(const char *name) { GstElement *element = gst_element_factory_make(name, NULL); if (element) { printf("found %s\n", name); gst_object_unref(element); } else printf("could not instantiate %s\n", name); }
int main(int argc, char** argv) { gst_init(&argc, &argv); printf("Bitness: %d bits\n", sizeof(long) * 8); check_gstreamer_element("h264parse"); /* gstreamer-plugins-bad */ check_gstreamer_element("videoconvert"); /* gstreamer-plugins-base */ check_gstreamer_element("vp8dec"); /* gstreamer-plugins-good */ check_gstreamer_element("mpeg2dec"); /* gstreamer-plugins-ugly */ return 0; } ----- checkgst.c -----
Just as a note for myself, from a clean install one needs the following packages to compile it:
# dnf install glibc-devel.x86_64 glibc-devel.i686 # dnf install gstreamer1-devel.x86_64 gstreamer1-devel.i686 # # In fact we really only need one plugin package # dnf install gstreamer1-plugins-base.i686 gstreamer1-plugins-good.i686 # dnf install gstreamer1-plugins-bad-free.i686 gstreamer1-plugins-ugly-free.i686
And do a 32-bit test:
$ gcc -m32 -o checkgst32 `PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config --cflags --libs gstreamer-1.0` checkgst.c $ ./checkgst32 Bitness: 32 bits could not instantiate h264parse could not instantiate videoconvert could not instantiate vp8dec could not instantiate mpeg2dec
Let's try again with a 64-bit binary to make sure this program can actually work:
$ gcc -o checkgst64 `pkg-config --cflags --libs gstreamer-1.0` checkgst.c $ ./checkgst64 Bitness: 64 bits found h264parse found videoconvert found vp8dec found mpeg2dec
And a last check to pinpoint the source of the problem:
$ mv ~/.cache/gstreamer-1.0/registry.i686.bin ~/.cache/gstreamer-1.0/registry.i686.bin.sav $ ./checkgst32 (gst-plugin-scanner:7151): GStreamer-WARNING **: 12:12:57.971: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstdvb.so': /usr/lib/gstreamer-1.0/libgstdvb.so: wrong ELF class: ELFCLASS32
(gst-plugin-scanner:7151): GStreamer-WARNING **: 12:12:57.971: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstvideo4linux2.so': /usr/lib/gstreamer-1.0/libgstvideo4linux2.so: wrong ELF class: ELFCLASS32 [...] Bitness: 32 bits could not instantiate h264parse could not instantiate videoconvert could not instantiate vp8dec could not instantiate mpeg2dec
As for where gst-plugin-scanner comes from and why gst_element_factory_make() may need it, I'll point you to the bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1472160
(and then we can debate whether gst-plugin-scanner is a GStreamer command line tool and whether that means winegstreamer does depend on GStreamer command line tools)