mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
improve debug
This commit is contained in:
parent
c658574c01
commit
7febf7ea25
6 changed files with 16 additions and 4 deletions
|
|
@ -840,6 +840,7 @@ static void on_success(pa_operation *o, void *userdata)
|
|||
{
|
||||
struct success_data *d = userdata;
|
||||
pa_context *c = o->context;
|
||||
pw_log_debug("context %p: error %d", c, d->error);
|
||||
if (d->error != 0)
|
||||
pa_context_set_error(c, d->error);
|
||||
if (d->cb)
|
||||
|
|
|
|||
|
|
@ -152,11 +152,15 @@ do { \
|
|||
|
||||
#define PA_FAIL(context, error) \
|
||||
do { \
|
||||
return -pa_context_set_error((context), (error)); \
|
||||
pw_log_debug("fail at %s:%u %s()", \
|
||||
, __FILE__, __LINE__, __func__); \
|
||||
return -pa_context_set_error((context), (error)); \
|
||||
} while(false)
|
||||
|
||||
#define PA_FAIL_RETURN_ANY(context, error, value) \
|
||||
do { \
|
||||
pw_log_debug("fail at %s:%u %s()", \
|
||||
, __FILE__, __LINE__, __func__); \
|
||||
pa_context_set_error((context), (error)); \
|
||||
return value; \
|
||||
} while(false)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ static void on_success(pa_operation *o, void *userdata)
|
|||
{
|
||||
struct success_ack *d = userdata;
|
||||
pa_context *c = o->context;
|
||||
pw_log_debug("error:%d", d->error);
|
||||
if (d->error != 0)
|
||||
pa_context_set_error(c, d->error);
|
||||
if (d->cb)
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ static void update_timing_info(pa_stream *s)
|
|||
pw_stream_get_time(s->stream, &pwt);
|
||||
s->timing_info_valid = false;
|
||||
s->queued = pwt.queued;
|
||||
pw_log_trace("stream %p: %"PRIu64, s, s->queued);
|
||||
pw_log_debug("stream %p: %"PRIu64" rate:%d", s, s->queued, pwt.rate.denom);
|
||||
|
||||
if (pwt.rate.denom == 0)
|
||||
return;
|
||||
|
|
@ -1334,6 +1334,7 @@ pa_operation* pa_stream_drain(pa_stream *s, pa_stream_success_cb_t cb, void *use
|
|||
|
||||
pw_log_debug("stream %p", s);
|
||||
pw_stream_flush(s->stream, true);
|
||||
update_timing_info(s);
|
||||
o = pa_operation_new(s->context, s, on_success, sizeof(struct success_ack));
|
||||
d = o->userdata;
|
||||
d->cb = cb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue