1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

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

This commit is contained in:
Rémi Bernon 2024-03-26 16:51:37 +01:00 committed by Alexandre Julliard
parent 35cb600c43
commit 8f58b9e1e1
3 changed files with 25 additions and 1 deletions

View file

@ -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,

View file

@ -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

View file

@ -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;