From 47b7c2a9690bd34213cb1bc2d48851874af9d850 Mon Sep 17 00:00:00 2001 From: Dave Robillard Date: Wed, 12 Aug 2009 01:03:32 -0400 Subject: 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. --- ext/ladspa/gstladspa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/ladspa') 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)) { -- cgit v1.2.1