mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
signalprocessor: don't set channel positions in template-caps, Fixes #601775
Revert the changes that added audio positions to template caps. We have an un- fortunate limitation in core that does not allow to do it. Keep a few things commented out, so that the channel position can later on be set in setcaps.
This commit is contained in:
parent
6aedd998d8
commit
38592a566d
4 changed files with 18 additions and 16 deletions
|
@ -82,7 +82,6 @@ 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;
|
||||
|
@ -126,10 +125,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, &mono_position);
|
||||
GST_PAD_SINK, gsp_class->num_audio_in++, 1);
|
||||
else
|
||||
gst_signal_processor_class_add_pad_template (gsp_class, name,
|
||||
GST_PAD_SRC, gsp_class->num_audio_out++, 1, &mono_position);
|
||||
GST_PAD_SRC, gsp_class->num_audio_out++, 1);
|
||||
|
||||
g_free (name);
|
||||
} else if (LADSPA_IS_PORT_CONTROL (p)) {
|
||||
|
|
|
@ -179,7 +179,6 @@ gst_lv2_base_init (gpointer g_class)
|
|||
SLV2Values values, sub_values;
|
||||
GstLV2Group *group = NULL;
|
||||
GstAudioChannelPosition position = GST_AUDIO_CHANNEL_POSITION_INVALID;
|
||||
GstAudioChannelPosition mono_position = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
|
||||
GstAudioChannelPosition *positions = NULL;
|
||||
guint j, in_pad_index = 0, out_pad_index = 0;
|
||||
gchar *klass_tags;
|
||||
|
@ -296,6 +295,11 @@ gst_lv2_base_init (gpointer g_class)
|
|||
gsp_class->num_control_in = klass->control_in_ports->len;
|
||||
gsp_class->num_control_out = klass->control_out_ports->len;
|
||||
|
||||
/* FIXME: see bug #601775
|
||||
* we should set the positions in gst_signal_processor_setup vmethod
|
||||
* but this should pass the caps then as a parameter
|
||||
*/
|
||||
|
||||
/* add input group pad templates */
|
||||
for (j = 0; j < gsp_class->num_group_in; ++j) {
|
||||
group = &g_array_index (klass->in_groups, GstLV2Group, j);
|
||||
|
@ -304,8 +308,8 @@ gst_lv2_base_init (gpointer g_class)
|
|||
}
|
||||
|
||||
gst_signal_processor_class_add_pad_template (gsp_class,
|
||||
slv2_value_as_string (group->symbol),
|
||||
GST_PAD_SINK, j, group->ports->len, positions);
|
||||
slv2_value_as_string (group->symbol), GST_PAD_SINK, j, group->ports->len
|
||||
/*, positions */ );
|
||||
|
||||
if (group->has_roles) {
|
||||
free (positions);
|
||||
|
@ -321,8 +325,8 @@ gst_lv2_base_init (gpointer g_class)
|
|||
}
|
||||
|
||||
gst_signal_processor_class_add_pad_template (gsp_class,
|
||||
slv2_value_as_string (group->symbol),
|
||||
GST_PAD_SRC, j, group->ports->len, positions);
|
||||
slv2_value_as_string (group->symbol), GST_PAD_SRC, j, group->ports->len
|
||||
/*, positions */ );
|
||||
|
||||
if (group->has_roles) {
|
||||
free (positions);
|
||||
|
@ -338,7 +342,7 @@ gst_lv2_base_init (gpointer g_class)
|
|||
const gchar *name =
|
||||
slv2_value_as_string (slv2_port_get_symbol (lv2plugin, port));
|
||||
gst_signal_processor_class_add_pad_template (gsp_class, name, GST_PAD_SINK,
|
||||
j, 1, &mono_position);
|
||||
j, 1);
|
||||
}
|
||||
|
||||
/* add non-grouped output port pad templates */
|
||||
|
@ -349,7 +353,7 @@ gst_lv2_base_init (gpointer g_class)
|
|||
const gchar *name =
|
||||
slv2_value_as_string (slv2_port_get_symbol (lv2plugin, port));
|
||||
gst_signal_processor_class_add_pad_template (gsp_class, name, GST_PAD_SRC,
|
||||
j, 1, &mono_position);
|
||||
j, 1);
|
||||
}
|
||||
|
||||
/* construct the element details struct */
|
||||
|
|
|
@ -96,8 +96,7 @@ gst_signal_processor_pad_template_get_type (void)
|
|||
*/
|
||||
void
|
||||
gst_signal_processor_class_add_pad_template (GstSignalProcessorClass * klass,
|
||||
const gchar * name, GstPadDirection direction, guint index, guint channels,
|
||||
const GstAudioChannelPosition * pos)
|
||||
const gchar * name, GstPadDirection direction, guint index, guint channels)
|
||||
{
|
||||
GstPadTemplate *new;
|
||||
GstCaps *caps;
|
||||
|
@ -110,8 +109,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);
|
||||
/*if (pos)
|
||||
gst_audio_set_caps_channel_positions_list (caps, pos, channels);
|
||||
*/
|
||||
|
||||
new = g_object_new (GST_TYPE_SIGNAL_PROCESSOR_PAD_TEMPLATE,
|
||||
"name", name, "name-template", name,
|
||||
|
|
|
@ -132,8 +132,7 @@ 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 GstAudioChannelPosition *pos);
|
||||
const gchar *name, GstPadDirection direction, guint index, guint channels);
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue