GStreamer multimedia framework
Find a file
Nirbheek Chauhan c18ef6d8a1 aggregator: Don't try to be too smart while allocating pad names
Previously, while allocating the pad number for a new pad, aggregator was
maintaining an interesting relationship between the pad count and the pad
number.

If you requested a sink pad called "sink_6", padcount (which is badly named and
actually means number-of-pads-minus-one) would be set to 6. Which means that if
you then requested a sink pad called "sink_0", it would be assigned the name
"sink_6" again, which fails the non-uniqueness test inside gstelement.c.

This can be fixed by instead setting padcount to be 7 in that case, but this
breaks manual management of pad names by the application since it then becomes
impossible to request a pad called "sink_2". Instead, we fix this by always
directly using the requested name as the sink pad name. Uniqueness of the pad
name is tested separately inside gstreamer core. If no name is requested, we use
the next available pad number.

Note that this is important since the sinkpad numbering in aggregator is not
meaningless. Videoaggregator uses it to decide the Z-order of video frames.
2017-12-02 15:10:26 +00:00
libs/gst/base aggregator: Don't try to be too smart while allocating pad names 2017-12-02 15:10:26 +00:00
tests/check/libs bad: use new gst_element_class_add_static_pad_template() 2017-12-02 15:10:26 +00:00