v4l2bufferpool: Use unique name for v4l2bufferpool object

Assign unique sequence number to an object name for better debugging
This commit is contained in:
Seungha Yang 2020-03-23 16:34:46 +09:00 committed by GStreamer Merge Bot
parent 6397d2f910
commit b0f4831481
2 changed files with 5 additions and 2 deletions

View file

@ -1669,8 +1669,9 @@ gst_v4l2_buffer_pool_new (GstV4l2Object * obj, GstCaps * caps)
/* setting a significant unique name */
parent_name = gst_object_get_name (GST_OBJECT (obj->element));
name = g_strconcat (parent_name, ":", "pool:",
V4L2_TYPE_IS_OUTPUT (obj->type) ? "sink" : "src", NULL);
name = g_strdup_printf ("%s:pool%u:%s",
parent_name, obj->pool_seq++,
V4L2_TYPE_IS_OUTPUT (obj->type) ? "sink" : "src");
g_free (parent_name);
pool = (GstV4l2BufferPool *) g_object_new (GST_TYPE_V4L2_BUFFER_POOL,

View file

@ -168,6 +168,8 @@ struct _GstV4l2Object {
/* optional pool */
GstBufferPool *pool;
/* the sequence of pool to identify (for debugging) */
guint pool_seq;
/* the video device's capabilities */
struct v4l2_capability vcap;