Commit 412df8c7 authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐 Committed by Tim-Philipp Müller

omxbufferpool: add PERFORMANCE DEBUG message when copying output frames

I spent quiet some time figuring out why performance of my pipeline were
terrible. Turned out it was because of output frames being copied
because of stride/offset mismatch.

Add a PERFORMANCE DEBUG message to make it easier to spot and debug from logs.

https://bugzilla.gnome.org/show_bug.cgi?id=793637
parent c6a112ec
......@@ -30,6 +30,7 @@
GST_DEBUG_CATEGORY_STATIC (gst_omx_buffer_pool_debug_category);
#define GST_CAT_DEFAULT gst_omx_buffer_pool_debug_category
GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
typedef struct _GstOMXMemory GstOMXMemory;
typedef struct _GstOMXMemoryAllocator GstOMXMemoryAllocator;
......@@ -462,6 +463,12 @@ gst_omx_buffer_pool_alloc_buffer (GstBufferPool * bpool,
for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&pool->video_info); i++) {
if (info.stride[i] != stride[i] || info.offset[i] != offset[i]) {
GST_CAT_DEBUG_OBJECT (CAT_PERFORMANCE, pool,
"Need to copy output frames because of stride/offset mismatch: plane %d stride %d (expected: %d) offset %"
G_GSIZE_FORMAT " (expected: %" G_GSIZE_FORMAT
") nStride: %d nSliceHeight: %d ", i, stride[i], info.stride[i],
offset[i], info.offset[i], nstride, nslice);
need_copy = TRUE;
break;
}
......@@ -647,6 +654,8 @@ gst_omx_buffer_pool_class_init (GstOMXBufferPoolClass * klass)
gstbufferpool_class->free_buffer = gst_omx_buffer_pool_free_buffer;
gstbufferpool_class->acquire_buffer = gst_omx_buffer_pool_acquire_buffer;
gstbufferpool_class->release_buffer = gst_omx_buffer_pool_release_buffer;
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment