winegstreamer: Add traces to Unix call wrappers.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-04-04 11:50:57 -05:00 committed by Alexandre Julliard
parent bcd39c5061
commit 3827f0487d
1 changed files with 53 additions and 0 deletions

View File

@ -70,13 +70,20 @@ struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buff
.unlimited_buffering = unlimited_buffering,
};
TRACE("type %#x, unlimited_buffering %d.\n", type, unlimited_buffering);
if (__wine_unix_call(unix_handle, unix_wg_parser_create, &params))
return NULL;
TRACE("Returning parser %p.\n", params.parser);
return params.parser;
}
void wg_parser_destroy(struct wg_parser *parser)
{
TRACE("parser %p.\n", parser);
__wine_unix_call(unix_handle, unix_wg_parser_destroy, parser);
}
@ -88,11 +95,15 @@ HRESULT wg_parser_connect(struct wg_parser *parser, uint64_t file_size)
.file_size = file_size,
};
TRACE("parser %p, file_size %I64u.\n", parser, file_size);
return __wine_unix_call(unix_handle, unix_wg_parser_connect, &params);
}
void wg_parser_disconnect(struct wg_parser *parser)
{
TRACE("parser %p.\n", parser);
__wine_unix_call(unix_handle, unix_wg_parser_disconnect, parser);
}
@ -103,6 +114,8 @@ bool wg_parser_get_next_read_offset(struct wg_parser *parser, uint64_t *offset,
.parser = parser,
};
TRACE("parser %p, offset %p, size %p.\n", parser, offset, size);
if (__wine_unix_call(unix_handle, unix_wg_parser_get_next_read_offset, &params))
return false;
*offset = params.offset;
@ -119,6 +132,8 @@ void wg_parser_push_data(struct wg_parser *parser, const void *data, uint32_t si
.size = size,
};
TRACE("parser %p, data %p, size %u.\n", parser, data, size);
__wine_unix_call(unix_handle, unix_wg_parser_push_data, &params);
}
@ -129,6 +144,8 @@ uint32_t wg_parser_get_stream_count(struct wg_parser *parser)
.parser = parser,
};
TRACE("parser %p.\n", parser);
__wine_unix_call(unix_handle, unix_wg_parser_get_stream_count, &params);
return params.count;
}
@ -141,7 +158,11 @@ struct wg_parser_stream *wg_parser_get_stream(struct wg_parser *parser, uint32_t
.index = index,
};
TRACE("parser %p, index %u.\n", parser, index);
__wine_unix_call(unix_handle, unix_wg_parser_get_stream, &params);
TRACE("Returning stream %p.\n", params.stream);
return params.stream;
}
@ -153,6 +174,8 @@ void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, stru
.format = format,
};
TRACE("stream %p, format %p.\n", stream, format);
__wine_unix_call(unix_handle, unix_wg_parser_stream_get_preferred_format, &params);
}
@ -164,11 +187,15 @@ void wg_parser_stream_enable(struct wg_parser_stream *stream, const struct wg_fo
.format = format,
};
TRACE("stream %p, format %p.\n", stream, format);
__wine_unix_call(unix_handle, unix_wg_parser_stream_enable, &params);
}
void wg_parser_stream_disable(struct wg_parser_stream *stream)
{
TRACE("stream %p.\n", stream);
__wine_unix_call(unix_handle, unix_wg_parser_stream_disable, stream);
}
@ -180,6 +207,8 @@ bool wg_parser_stream_get_buffer(struct wg_parser_stream *stream, struct wg_pars
.buffer = buffer,
};
TRACE("stream %p, buffer %p.\n", stream, buffer);
return !__wine_unix_call(unix_handle, unix_wg_parser_stream_get_buffer, &params);
}
@ -194,11 +223,15 @@ bool wg_parser_stream_copy_buffer(struct wg_parser_stream *stream,
.size = size,
};
TRACE("stream %p, data %p, offset %u, size %u.\n", stream, data, offset, size);
return !__wine_unix_call(unix_handle, unix_wg_parser_stream_copy_buffer, &params);
}
void wg_parser_stream_release_buffer(struct wg_parser_stream *stream)
{
TRACE("stream %p.\n", stream);
__wine_unix_call(unix_handle, unix_wg_parser_stream_release_buffer, stream);
}
@ -214,6 +247,9 @@ void wg_parser_stream_notify_qos(struct wg_parser_stream *stream,
.timestamp = timestamp,
};
TRACE("stream %p, underflow %d, proportion %.16e, diff %I64d, timestamp %I64u.\n",
stream, underflow, proportion, diff, timestamp);
__wine_unix_call(unix_handle, unix_wg_parser_stream_notify_qos, &params);
}
@ -224,7 +260,11 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream)
.stream = stream,
};
TRACE("stream %p.\n", stream);
__wine_unix_call(unix_handle, unix_wg_parser_stream_get_duration, &params);
TRACE("Returning duration %I64u.\n", params.duration);
return params.duration;
}
@ -241,6 +281,9 @@ void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
.stop_flags = stop_flags,
};
TRACE("stream %p, rate %.16e, start_pos %I64u, stop_pos %I64u, start_flags %#lx, stop_flags %#lx.\n",
stream, rate, start_pos, stop_pos, start_flags, stop_flags);
__wine_unix_call(unix_handle, unix_wg_parser_stream_seek, &params);
}
@ -253,13 +296,19 @@ struct wg_transform *wg_transform_create(const struct wg_format *input_format,
.output_format = output_format,
};
TRACE("input_format %p, output_format %p.\n", input_format, output_format);
if (__wine_unix_call(unix_handle, unix_wg_transform_create, &params))
return NULL;
TRACE("Returning transform %p.\n", params.transform);
return params.transform;
}
void wg_transform_destroy(struct wg_transform *transform)
{
TRACE("transform %p.\n", transform);
__wine_unix_call(unix_handle, unix_wg_transform_destroy, transform);
}
@ -272,6 +321,8 @@ HRESULT wg_transform_push_data(struct wg_transform *transform, struct wg_sample
};
NTSTATUS status;
TRACE("transform %p, sample %p.\n", transform, sample);
if ((status = __wine_unix_call(unix_handle, unix_wg_transform_push_data, &params)))
return HRESULT_FROM_NT(status);
@ -287,6 +338,8 @@ HRESULT wg_transform_read_data(struct wg_transform *transform, struct wg_sample
};
NTSTATUS status;
TRACE("transform %p, sample %p.\n", transform, sample);
if ((status = __wine_unix_call(unix_handle, unix_wg_transform_read_data, &params)))
return HRESULT_FROM_NT(status);