Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
46d084ac
Commit
46d084ac
authored
Sep 29, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Respect debug channels configuration for error output.
Avoids spamming stderr when debug output is disabled.
parent
db4ea9ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
main.c
dlls/winegstreamer/main.c
+2
-0
unixlib.h
dlls/winegstreamer/unixlib.h
+2
-0
wg_parser.c
dlls/winegstreamer/wg_parser.c
+13
-5
No files found.
dlls/winegstreamer/main.c
View file @
46d084ac
...
@@ -68,6 +68,8 @@ struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buff
...
@@ -68,6 +68,8 @@ struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buff
{
{
.
type
=
type
,
.
type
=
type
,
.
unlimited_buffering
=
unlimited_buffering
,
.
unlimited_buffering
=
unlimited_buffering
,
.
err_on
=
ERR_ON
(
quartz
),
.
warn_on
=
WARN_ON
(
quartz
),
};
};
TRACE
(
"type %#x, unlimited_buffering %d.
\n
"
,
type
,
unlimited_buffering
);
TRACE
(
"type %#x, unlimited_buffering %d.
\n
"
,
type
,
unlimited_buffering
);
...
...
dlls/winegstreamer/unixlib.h
View file @
46d084ac
...
@@ -157,6 +157,8 @@ struct wg_parser_create_params
...
@@ -157,6 +157,8 @@ struct wg_parser_create_params
struct
wg_parser
*
parser
;
struct
wg_parser
*
parser
;
enum
wg_parser_type
type
;
enum
wg_parser_type
type
;
bool
unlimited_buffering
;
bool
unlimited_buffering
;
bool
err_on
;
bool
warn_on
;
};
};
struct
wg_parser_connect_params
struct
wg_parser_connect_params
...
...
dlls/winegstreamer/wg_parser.c
View file @
46d084ac
...
@@ -76,6 +76,7 @@ struct wg_parser
...
@@ -76,6 +76,7 @@ struct wg_parser
pthread_cond_t
init_cond
;
pthread_cond_t
init_cond
;
bool
no_more_pads
,
has_duration
,
error
;
bool
no_more_pads
,
has_duration
,
error
;
bool
err_on
,
warn_on
;
pthread_cond_t
read_cond
,
read_done_cond
;
pthread_cond_t
read_cond
,
read_done_cond
;
struct
struct
...
@@ -1071,8 +1072,11 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use
...
@@ -1071,8 +1072,11 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use
{
{
case
GST_MESSAGE_ERROR
:
case
GST_MESSAGE_ERROR
:
gst_message_parse_error
(
msg
,
&
err
,
&
dbg_info
);
gst_message_parse_error
(
msg
,
&
err
,
&
dbg_info
);
fprintf
(
stderr
,
"winegstreamer error: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
err
->
message
);
if
(
parser
->
err_on
)
fprintf
(
stderr
,
"winegstreamer error: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
dbg_info
);
{
fprintf
(
stderr
,
"winegstreamer error: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
err
->
message
);
fprintf
(
stderr
,
"winegstreamer error: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
dbg_info
);
}
g_error_free
(
err
);
g_error_free
(
err
);
g_free
(
dbg_info
);
g_free
(
dbg_info
);
pthread_mutex_lock
(
&
parser
->
mutex
);
pthread_mutex_lock
(
&
parser
->
mutex
);
...
@@ -1083,8 +1087,11 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use
...
@@ -1083,8 +1087,11 @@ static GstBusSyncReply bus_handler_cb(GstBus *bus, GstMessage *msg, gpointer use
case
GST_MESSAGE_WARNING
:
case
GST_MESSAGE_WARNING
:
gst_message_parse_warning
(
msg
,
&
err
,
&
dbg_info
);
gst_message_parse_warning
(
msg
,
&
err
,
&
dbg_info
);
fprintf
(
stderr
,
"winegstreamer warning: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
err
->
message
);
if
(
parser
->
warn_on
)
fprintf
(
stderr
,
"winegstreamer warning: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
dbg_info
);
{
fprintf
(
stderr
,
"winegstreamer warning: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
err
->
message
);
fprintf
(
stderr
,
"winegstreamer warning: %s: %s
\n
"
,
GST_OBJECT_NAME
(
msg
->
src
),
dbg_info
);
}
g_error_free
(
err
);
g_error_free
(
err
);
g_free
(
dbg_info
);
g_free
(
dbg_info
);
break
;
break
;
...
@@ -1571,7 +1578,8 @@ static NTSTATUS wg_parser_create(void *args)
...
@@ -1571,7 +1578,8 @@ static NTSTATUS wg_parser_create(void *args)
pthread_cond_init
(
&
parser
->
read_done_cond
,
NULL
);
pthread_cond_init
(
&
parser
->
read_done_cond
,
NULL
);
parser
->
init_gst
=
init_funcs
[
params
->
type
];
parser
->
init_gst
=
init_funcs
[
params
->
type
];
parser
->
unlimited_buffering
=
params
->
unlimited_buffering
;
parser
->
unlimited_buffering
=
params
->
unlimited_buffering
;
parser
->
err_on
=
params
->
err_on
;
parser
->
warn_on
=
params
->
warn_on
;
GST_DEBUG
(
"Created winegstreamer parser %p."
,
parser
);
GST_DEBUG
(
"Created winegstreamer parser %p."
,
parser
);
params
->
parser
=
parser
;
params
->
parser
=
parser
;
return
S_OK
;
return
S_OK
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment