Commit b0f48314 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by GStreamer Marge Bot

v4l2bufferpool: Use unique name for v4l2bufferpool object

Assign unique sequence number to an object name for better debugging
parent 6397d2f9
Pipeline #123483 waiting for manual action with stages
in 25 seconds
......@@ -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,
......
......@@ -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;
......
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