diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 861885b79a..934b3dbe53 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -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, diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h index eaaff58923..0c127e11d6 100644 --- a/sys/v4l2/gstv4l2object.h +++ b/sys/v4l2/gstv4l2object.h @@ -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;