* A Sink that outputs data to Jack ports.
* </para>
* <para>
- * It will create N Jack ports named out_<num> where <num> is starting from 1.
+ * It will create N Jack ports named out_<name>_<num> where
+ * <name> is the element name and <num> is starting from 1.
* Each port corresponds to a gstreamer channel.
* </para>
* <para>
while (sink->port_count < channels) {
gchar *name;
- /* port names start from 1 */
- name = g_strdup_printf ("out_%d", sink->port_count + 1);
+ /* port names start from 1 and are local to the element */
+ name =
+ g_strdup_printf ("out_%s_%d", GST_ELEMENT_NAME (sink),
+ sink->port_count + 1);
sink->ports[sink->port_count] =
- jack_port_register (client, name,
- JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
+ jack_port_register (client, name, JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
if (sink->ports[sink->port_count] == NULL)
return FALSE;