summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/signalprocessor/gstsignalprocessor.c8
-rw-r--r--gst-libs/gst/signalprocessor/gstsignalprocessor.h4
2 files changed, 10 insertions, 2 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);
diff --git a/gst-libs/gst/signalprocessor/gstsignalprocessor.h b/gst-libs/gst/signalprocessor/gstsignalprocessor.h
index 30ed0315..b7daf7e5 100644
--- a/gst-libs/gst/signalprocessor/gstsignalprocessor.h
+++ b/gst-libs/gst/signalprocessor/gstsignalprocessor.h
@@ -25,6 +25,7 @@
#define __GST_SIGNAL_PROCESSOR_H__
#include <gst/gst.h>
+#include <gst/audio/multichannel.h>
G_BEGIN_DECLS
@@ -131,7 +132,8 @@ struct _GstSignalProcessorClass {
GType gst_signal_processor_get_type (void);
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);