Commit 8f58b9e1 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Set GST_DEBUG if not set, based on WINEDEBUG channels.

parent 35cb600c
......@@ -33,6 +33,8 @@
#include "wmcodecdsp.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DECLARE_DEBUG_CHANNEL(mfplat);
WINE_DECLARE_DEBUG_CHANNEL(wmvcore);
DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
DEFINE_GUID(MEDIASUBTYPE_VC1S,MAKEFOURCC('V','C','1','S'),0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
......@@ -810,9 +812,15 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
static BOOL CALLBACK init_gstreamer_proc(INIT_ONCE *once, void *param, void **ctx)
{
struct wg_init_gstreamer_params params =
{
.trace_on = TRACE_ON(mfplat) || TRACE_ON(quartz) || TRACE_ON(wmvcore),
.warn_on = WARN_ON(mfplat) || WARN_ON(quartz) || WARN_ON(wmvcore),
.err_on = ERR_ON(mfplat) || ERR_ON(quartz) || ERR_ON(wmvcore),
};
HINSTANCE handle;
if (WINE_UNIX_CALL(unix_wg_init_gstreamer, NULL))
if (WINE_UNIX_CALL(unix_wg_init_gstreamer, &params))
return FALSE;
/* Unloading glib is a bad idea.. it installs atexit handlers,
......
......@@ -246,6 +246,7 @@ bool push_event(GstPad *pad, GstEvent *event)
NTSTATUS wg_init_gstreamer(void *arg)
{
struct wg_init_gstreamer_params *params = arg;
char arg0[] = "wine";
char arg1[] = "--gst-disable-registry-fork";
char *args[] = {arg0, arg1, NULL};
......@@ -253,6 +254,14 @@ NTSTATUS wg_init_gstreamer(void *arg)
char **argv = args;
GError *err;
if (params->trace_on)
setenv("GST_DEBUG", "WINE:9,4", FALSE);
if (params->warn_on)
setenv("GST_DEBUG", "3", FALSE);
if (params->err_on)
setenv("GST_DEBUG", "1", FALSE);
setenv("GST_DEBUG_NO_COLOR", "1", FALSE);
/* GStreamer installs a temporary SEGV handler when it loads plugins
* to initialize its registry calling exit(-1) when any fault is caught.
* We need to make sure any signal reaches our signal handlers to catch
......
......@@ -218,6 +218,13 @@ typedef UINT64 wg_parser_stream_t;
typedef UINT64 wg_transform_t;
typedef UINT64 wg_muxer_t;
struct wg_init_gstreamer_params
{
UINT8 trace_on;
UINT8 warn_on;
UINT8 err_on;
};
struct wg_parser_create_params
{
wg_parser_t parser;
......
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