improve debug and error reporting a little

This commit is contained in:
Wim Taymans 2025-03-28 16:08:57 +01:00
parent ae1bbc93d8
commit 5f4c0cdd1e
3 changed files with 8 additions and 4 deletions

View file

@ -62,7 +62,7 @@ void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *b)
uint32_t i;
GstPipeWirePoolData *data;
GST_DEBUG_OBJECT (pool, "wrap buffer");
GST_DEBUG_OBJECT (pool, "wrap buffer, datas:%d", b->buffer->n_datas);
data = g_slice_new (GstPipeWirePoolData);
@ -89,6 +89,10 @@ void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *b)
gmem = gst_memory_new_wrapped (0, d->data, d->maxsize, 0,
d->maxsize, NULL, NULL);
}
else {
GST_WARNING_OBJECT (pool, "unknown data type (%s %d)",
spa_debug_type_find_short_name(spa_type_data_type, d->type), d->type);
}
if (gmem)
gst_buffer_insert_memory (buf, i, gmem);
}

View file

@ -686,7 +686,7 @@ static GstBuffer *dequeue_buffer(GstPipeWireSrc *pwsrc)
}
if (b->buffer->n_datas != gst_buffer_n_memory(data->buf)) {
GST_ERROR_OBJECT(pwsrc, "n_datas != n_memory");
GST_ERROR_OBJECT(pwsrc, "n_datas != n_memory, (%d != %d)", b->buffer->n_datas, gst_buffer_n_memory(data->buf));
}
for (i = 0; i < b->buffer->n_datas; i++) {