mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-24 23:16:30 +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);
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||||
GstSignalProcessorClass *gsp_class = GST_SIGNAL_PROCESSOR_CLASS (g_class);
|
GstSignalProcessorClass *gsp_class = GST_SIGNAL_PROCESSOR_CLASS (g_class);
|
||||||
GstElementDetails *details;
|
GstElementDetails *details;
|
||||||
GstAudioChannelPosition mono_position = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
|
|
||||||
LADSPA_Descriptor *desc;
|
LADSPA_Descriptor *desc;
|
||||||
guint j, audio_in_count, audio_out_count, control_in_count, control_out_count;
|
guint j, audio_in_count, audio_out_count, control_in_count, control_out_count;
|
||||||
gchar *klass_tags;
|
gchar *klass_tags;
|
||||||
|
@ -126,10 +125,10 @@ gst_ladspa_base_init (gpointer g_class)
|
||||||
|
|
||||||
if (LADSPA_IS_PORT_INPUT (p))
|
if (LADSPA_IS_PORT_INPUT (p))
|
||||||
gst_signal_processor_class_add_pad_template (gsp_class, name,
|
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
|
else
|
||||||
gst_signal_processor_class_add_pad_template (gsp_class, name,
|
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);
|
g_free (name);
|
||||||
} else if (LADSPA_IS_PORT_CONTROL (p)) {
|
} else if (LADSPA_IS_PORT_CONTROL (p)) {
|
||||||
|
|
|
@ -179,7 +179,6 @@ gst_lv2_base_init (gpointer g_class)
|
||||||
SLV2Values values, sub_values;
|
SLV2Values values, sub_values;
|
||||||
GstLV2Group *group = NULL;
|
GstLV2Group *group = NULL;
|
||||||
GstAudioChannelPosition position = GST_AUDIO_CHANNEL_POSITION_INVALID;
|
GstAudioChannelPosition position = GST_AUDIO_CHANNEL_POSITION_INVALID;
|
||||||
GstAudioChannelPosition mono_position = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
|
|
||||||
GstAudioChannelPosition *positions = NULL;
|
GstAudioChannelPosition *positions = NULL;
|
||||||
guint j, in_pad_index = 0, out_pad_index = 0;
|
guint j, in_pad_index = 0, out_pad_index = 0;
|
||||||
gchar *klass_tags;
|
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_in = klass->control_in_ports->len;
|
||||||
gsp_class->num_control_out = klass->control_out_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 */
|
/* add input group pad templates */
|
||||||
for (j = 0; j < gsp_class->num_group_in; ++j) {
|
for (j = 0; j < gsp_class->num_group_in; ++j) {
|
||||||
group = &g_array_index (klass->in_groups, GstLV2Group, 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,
|
gst_signal_processor_class_add_pad_template (gsp_class,
|
||||||
slv2_value_as_string (group->symbol),
|
slv2_value_as_string (group->symbol), GST_PAD_SINK, j, group->ports->len
|
||||||
GST_PAD_SINK, j, group->ports->len, positions);
|
/*, positions */ );
|
||||||
|
|
||||||
if (group->has_roles) {
|
if (group->has_roles) {
|
||||||
free (positions);
|
free (positions);
|
||||||
|
@ -321,8 +325,8 @@ gst_lv2_base_init (gpointer g_class)
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_signal_processor_class_add_pad_template (gsp_class,
|
gst_signal_processor_class_add_pad_template (gsp_class,
|
||||||
slv2_value_as_string (group->symbol),
|
slv2_value_as_string (group->symbol), GST_PAD_SRC, j, group->ports->len
|
||||||
GST_PAD_SRC, j, group->ports->len, positions);
|
/*, positions */ );
|
||||||
|
|
||||||
if (group->has_roles) {
|
if (group->has_roles) {
|
||||||
free (positions);
|
free (positions);
|
||||||
|
@ -338,7 +342,7 @@ gst_lv2_base_init (gpointer g_class)
|
||||||
const gchar *name =
|
const gchar *name =
|
||||||
slv2_value_as_string (slv2_port_get_symbol (lv2plugin, port));
|
slv2_value_as_string (slv2_port_get_symbol (lv2plugin, port));
|
||||||
gst_signal_processor_class_add_pad_template (gsp_class, name, GST_PAD_SINK,
|
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 */
|
/* add non-grouped output port pad templates */
|
||||||
|
@ -349,7 +353,7 @@ gst_lv2_base_init (gpointer g_class)
|
||||||
const gchar *name =
|
const gchar *name =
|
||||||
slv2_value_as_string (slv2_port_get_symbol (lv2plugin, port));
|
slv2_value_as_string (slv2_port_get_symbol (lv2plugin, port));
|
||||||
gst_signal_processor_class_add_pad_template (gsp_class, name, GST_PAD_SRC,
|
gst_signal_processor_class_add_pad_template (gsp_class, name, GST_PAD_SRC,
|
||||||
j, 1, &mono_position);
|
j, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* construct the element details struct */
|
/* construct the element details struct */
|
||||||
|
|
|
@ -96,8 +96,7 @@ gst_signal_processor_pad_template_get_type (void)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_signal_processor_class_add_pad_template (GstSignalProcessorClass * klass,
|
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;
|
GstPadTemplate *new;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
@ -110,8 +109,9 @@ gst_signal_processor_class_add_pad_template (GstSignalProcessorClass * klass,
|
||||||
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
||||||
"width", G_TYPE_INT, 32, "channels", G_TYPE_INT, channels, NULL);
|
"width", G_TYPE_INT, 32, "channels", G_TYPE_INT, channels, NULL);
|
||||||
|
|
||||||
if (pos)
|
/*if (pos)
|
||||||
gst_audio_set_caps_channel_positions_list (caps, pos, channels);
|
gst_audio_set_caps_channel_positions_list (caps, pos, channels);
|
||||||
|
*/
|
||||||
|
|
||||||
new = g_object_new (GST_TYPE_SIGNAL_PROCESSOR_PAD_TEMPLATE,
|
new = g_object_new (GST_TYPE_SIGNAL_PROCESSOR_PAD_TEMPLATE,
|
||||||
"name", name, "name-template", name,
|
"name", name, "name-template", name,
|
||||||
|
|
|
@ -132,8 +132,7 @@ struct _GstSignalProcessorClass {
|
||||||
|
|
||||||
GType gst_signal_processor_get_type (void);
|
GType gst_signal_processor_get_type (void);
|
||||||
void gst_signal_processor_class_add_pad_template (GstSignalProcessorClass *klass,
|
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);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue