summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/signalprocessor/gstsignalprocessor.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/signalprocessor/gstsignalprocessor.c')
-rw-r--r--gst-libs/gst/signalprocessor/gstsignalprocessor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst-libs/gst/signalprocessor/gstsignalprocessor.c b/gst-libs/gst/signalprocessor/gstsignalprocessor.c
index 3d3c7204..4cf69e35 100644
--- a/gst-libs/gst/signalprocessor/gstsignalprocessor.c
+++ b/gst-libs/gst/signalprocessor/gstsignalprocessor.c
@@ -90,11 +90,14 @@ gst_signal_processor_pad_template_get_type (void)
* @name: pad name
* @direction: pad direction (src/sink)
* @index: index for the pad per direction (starting from 0)
+ * @channels: number of channels in this pad
+ * @positions: array of channel positions in order
*
*/
void
gst_signal_processor_class_add_pad_template (GstSignalProcessorClass * klass,
- const gchar * name, GstPadDirection direction, guint index, guint channels)
+ const gchar * name, GstPadDirection direction, guint index, guint channels,
+ const GstAudioChannelPosition * pos)
{
GstPadTemplate *new;
GstCaps *caps;
@@ -107,6 +110,9 @@ gst_signal_processor_class_add_pad_template (GstSignalProcessorClass * klass,
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"width", G_TYPE_INT, 32, "channels", G_TYPE_INT, channels, NULL);
+ if (pos)
+ gst_audio_set_caps_channel_positions_list (caps, pos, channels);
+
new = g_object_new (gst_signal_processor_pad_template_get_type (),
"name", name, "name-template", name,
"direction", direction, "presence", GST_PAD_ALWAYS, "caps", caps, NULL);