Commit 48f3adc0 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

winegstreamer: Add glib threading overrides.

parent 6b897513
......@@ -4,6 +4,7 @@ EXTRAINCL = @GSTREAMER_INCL@
EXTRALIBS = @GSTREAMER_LIBS@ @LIBPTHREAD@
C_SRCS = \
glibthread.c \
main.c
RC_SRCS = \
......
......@@ -37,4 +37,7 @@
/* enum media */
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt);
void g_thread_impl_init(void);
DWORD Gstreamer_init(void);
#endif /* __GST_PRIVATE_INCLUDED__ */
......@@ -64,6 +64,29 @@ void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt)
TRACE("\t%s\n\t%s\n\t...\n\t%s\n", debugstr_guid(&pmt->majortype), debugstr_guid(&pmt->subtype), debugstr_guid(&pmt->formattype));
}
DWORD Gstreamer_init(void) {
static int inited;
if (!inited) {
char argv0[] = "wine";
char argv1[] = "--gst-disable-registry-fork";
char **argv = HeapAlloc(GetProcessHeap(), 0, sizeof(char *)*3);
int argc = 2;
GError *err = NULL;
argv[0] = argv0;
argv[1] = argv1;
argv[2] = NULL;
g_thread_impl_init();
inited = gst_init_check(&argc, &argv, &err);
HeapFree(GetProcessHeap(), 0, argv);
if (err) {
FIXME("Failed to initialize gstreamer: %s\n", err->message);
g_error_free(err);
}
}
return inited;
}
#define INF_SET_ID(id) \
do \
{ \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment