summaryrefslogtreecommitdiff
path: root/ext/ladspa
diff options
context:
space:
mode:
authorDave Robillard <dave@drobilla.net>2009-08-12 01:03:32 -0400
committerStefan Kost <ensonic@users.sf.net>2009-09-17 09:46:49 +0300
commit374d52d257b07e2fc20b405a091ed0d7085e1298 (patch)
tree9b4741c9f33c905c18f1d3a06dc73a4f26f50491 /ext/ladspa
parent8538d382e3efd9a7a44b268134801a223871e751 (diff)
downloadgstreamer-plugins-bad-374d52d257b07e2fc20b405a091ed0d7085e1298.tar.gz
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 11da78486..52adcc373 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)) {