diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-02-20 11:46:49 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-02-21 11:22:05 +0000 |
commit | 412df8c74f29992ff93ab88f6d7b7625ebcc8193 (patch) | |
tree | f3967740cf6de2a5df85d2724fcfa4a65ea51f14 | |
parent | c6a112ec93241151a67c217669a5ec2dd2d7a25d (diff) | |
download | gst-omx-412df8c74f29992ff93ab88f6d7b7625ebcc8193.tar.gz |
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
-rw-r--r-- | omx/gstomxbufferpool.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/omx/gstomxbufferpool.c b/omx/gstomxbufferpool.c index 06c9f9c..634527f 100644 --- a/omx/gstomxbufferpool.c +++ b/omx/gstomxbufferpool.c @@ -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 |