summaryrefslogtreecommitdiffstats
path: root/ext/ladspa
diff options
context:
space:
mode:
authorDave Robillard <dave@drobilla.net>2009-08-12 01:03:32 -0400
committerDave Robillard <dave@drobilla.net>2009-08-12 01:03:32 -0400
commit47b7c2a9690bd34213cb1bc2d48851874af9d850 (patch)
treefd3d7bcc57b844810e7f0a84c2f4a2ef46ac9c59 /ext/ladspa
parentd462b3b4e849d310fd7f203abf076e26b0d9bddc (diff)
downloadgst-plugins-bad-47b7c2a9690bd34213cb1bc2d48851874af9d850.tar.gz
gst-plugins-bad-47b7c2a9690bd34213cb1bc2d48851874af9d850.tar.bz2
gst-plugins-bad-47b7c2a9690bd34213cb1bc2d48851874af9d850.zip
Multi-channel support with channel positions.
This queries port roles from the LV2 data and converts it into GStreamer channel positions. This should allow any type of multi-channel plugin (including beyond stereo, e.g. surround) to work fine in GStreamer, and with elements that require channel positions to be explicitly stated.
Diffstat (limited to 'ext/ladspa')
-rw-r--r--ext/ladspa/gstladspa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c
index 11da7848..52adcc37 100644
--- a/ext/ladspa/gstladspa.c
+++ b/ext/ladspa/gstladspa.c
@@ -82,6 +82,7 @@ gst_ladspa_base_init (gpointer g_class)
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
GstSignalProcessorClass *gsp_class = GST_SIGNAL_PROCESSOR_CLASS (g_class);
GstElementDetails *details;
+ GstAudioChannelPosition mono_position = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
LADSPA_Descriptor *desc;
guint j, audio_in_count, audio_out_count, control_in_count, control_out_count;
gchar *klass_tags;
@@ -125,10 +126,10 @@ gst_ladspa_base_init (gpointer g_class)
if (LADSPA_IS_PORT_INPUT (p))
gst_signal_processor_class_add_pad_template (gsp_class, name,
- GST_PAD_SINK, gsp_class->num_audio_in++, 1);
+ GST_PAD_SINK, gsp_class->num_audio_in++, 1, &mono_position);
else
gst_signal_processor_class_add_pad_template (gsp_class, name,
- GST_PAD_SRC, gsp_class->num_audio_out++, 1);
+ GST_PAD_SRC, gsp_class->num_audio_out++, 1, &mono_position);
g_free (name);
} else if (LADSPA_IS_PORT_CONTROL (p)) {