summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-05-26 17:52:21 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-05-26 17:52:21 +0000
commit3208d8dca7653aa6c3f362262a9dc691244b2787 (patch)
tree6008640621b27f2f1536da9d88468e6eba343922
parent1c8276c9de90bf4b05e51ddb439c9833115adc85 (diff)
downloadgst-plugins-bad-3208d8dca7653aa6c3f362262a9dc691244b2787.tar.gz
gst-plugins-bad-3208d8dca7653aa6c3f362262a9dc691244b2787.tar.bz2
gst-plugins-bad-3208d8dca7653aa6c3f362262a9dc691244b2787.zip
ext/jack/gstjackaudiosink.c: Include the element name in the port name to avoid duplicate port names.
Original commit message from CVS: * ext/jack/gstjackaudiosink.c: (gst_jack_audio_sink_allocate_channels): Include the element name in the port name to avoid duplicate port names.
-rw-r--r--ChangeLog6
-rw-r--r--ext/jack/gstjackaudiosink.c13
2 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 81c4bbc7..2f20633b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-26 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ * ext/jack/gstjackaudiosink.c:
+ (gst_jack_audio_sink_allocate_channels):
+ Include the element name in the port name to avoid duplicate port names.
+
2008-05-26 Sebastian Dröge <slomo@circular-chaos.org>
* gst/interleave/deinterleave.c:
diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c
index 5223e4d0..27b09792 100644
--- a/ext/jack/gstjackaudiosink.c
+++ b/ext/jack/gstjackaudiosink.c
@@ -29,7 +29,8 @@
* A Sink that outputs data to Jack ports.
* </para>
* <para>
- * It will create N Jack ports named out_&lt;num&gt; where &lt;num&gt; is starting from 1.
+ * It will create N Jack ports named out_&lt;name&gt;_&lt;num&gt; where
+ * &lt;name&gt; is the element name and &lt;num&gt; is starting from 1.
* Each port corresponds to a gstreamer channel.
* </para>
* <para>
@@ -142,11 +143,13 @@ gst_jack_audio_sink_allocate_channels (GstJackAudioSink * sink, gint channels)
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;