I have built a minimal program that only uses the bare essentials.
This runs perfectly under Linux.
// === Linux
// gcc main.c -o main `pkg-config --cflags --libs gstreamer-1.0 gstreamer-audio-1.0`
// === Windows
// x86_64-w64-mingw32-gcc main.c -o main -lgstreamer-1.0-0 -L.
#include <stdio.h>
extern void gst_init(int *argc, char **argv[]);
extern void * gst_parse_launch(const char * pipeline_description, void ** error) ;
extern int gst_element_set_state(void *element, int state);
int main (int argc, char *argv[]) {
gst_init (&argc, &argv);
void * pipeline = gst_parse_launch("'filesrc location=/home/tux/Desktop/sound/test.mp3 ! decodebin ! audioconvert ! audioresample ! autoaudiosink", NULL);
gst_element_set_state(pipeline, 4);
printf("<CTRL+C> = stop\n");
while (1) { }
}
If I do a cross-compilation, it also runs without errors.
Only when I start the EXE do I get the following error:
$ wine main.exe
(main.exe:0): GModule-[1;35mCRITICAL[0m **: [34m17:03:41.938[0m: Cannot get symbol 'gst_init_static_plugins' from the current process since GLib was built f
or Universal Windows Platform apps
00dc:err:ole:ensure_mta Failed, hr 0x800401f0.
wine: Unhandled exception 0xe06d7363 in thread dc at address 00006FFFFF483F07 (thread 00dc), starting debugger...
It doesn’t matter whether you use wine or dewr VB with Win10.
I suspect that gst_init_static_plugins
still needs something.
I have the following DLLs available: ``` -rw-rw-rw- 1 tux tux 29184 Jul 27 2023 ffi-7.dll -rw-rw-rw- 1 tux tux 1480704 Jul 27 2023 glib-2.0-0.dll -rw-rw-rw- 1 tux tux 1 9968 Jul 27 2023 gmodule-2.0-0.dll -rw-rw-rw- 1 tux tux 314368 Jul 27 2023 gobject-2.0-0.dll -rw-rw-rw- 1 tux tux 1302016 Jul 27 2023 gstreamer-1.0-0.dll -rw-rw-rw- 1 tux tux 11776 Jul 27 2023 intl-8.dll -rwxrwxr-x 1 tux tux 16064 Sep 10 17:00 main -rw-rw-r-- 1 tux tux 819 Sep 10 17:01 main .c -rwxrwxr-x 1 tux tux 250735 Sep 10 16:56 main.exe -rw-rw-r-- 1 tux tux 618440 Jan 17 2018 msvcp140_app.dll -rw-rw-r-- 1 tux tux 35320 Mar 7, 2021 vcruntime140_1_app.dll
-rw-rw-r-- 1 tux tux 86784 Feb 8 2018 vcruntime140_app.dll
Anyone have any idea how I can get it to work under Windows?