GstObject: add support for setting uniquely numbered names for simplicity, e.g. videoqueue-%u
Submitted by Nirbheek Chauhan
Created attachment 302051
gstobject: Add support for a format-specifier suffix
Similar to how the default name for an element is automatically assigned to be unique, it would be useful to be able to pass a custom name that can be automatically made unique.
For instance, if I have a program with a complex pipeline with queues in several different contexts (after decoders, after tees, etc), I want to be able to specify a context-specific name such as "video-decoder-queue-%u", "tee-queue-%u", etc which will become "video-decoder-queue-0", "video-decoder-queue-1", and so on. This makes parsing debug logs much easier when you see "video-decoder-queue-12" instead of "queue34".
The attached patch implements this.
gst_element_factory_make (queue, "somequeue-%u");
will create "some-queue-0", "some-queue-1", etc using the same infrastructure as the code that does the default name generation.
Patch 302051, "gstobject: Add support for a format-specifier suffix":