pulsesrc: disable reconfigure

See https://bugzilla.gnome.org/show_bug.cgi?id=683902
This commit is contained in:
Wim Taymans 2012-09-13 10:15:54 +02:00
parent a27deda053
commit e59498c33d

View file

@ -100,6 +100,7 @@ static guint gst_pulsesrc_delay (GstAudioSrc * asrc);
static void gst_pulsesrc_reset (GstAudioSrc * src);
static gboolean gst_pulsesrc_negotiate (GstBaseSrc * basesrc);
static gboolean gst_pulsesrc_event (GstBaseSrc * basesrc, GstEvent * event);
static GstStateChangeReturn gst_pulsesrc_change_state (GstElement *
element, GstStateChange transition);
@ -148,6 +149,7 @@ gst_pulsesrc_class_init (GstPulseSrcClass * klass)
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_pulsesrc_change_state);
gstbasesrc_class->event = GST_DEBUG_FUNCPTR (gst_pulsesrc_event);
gstbasesrc_class->negotiate = GST_DEBUG_FUNCPTR (gst_pulsesrc_negotiate);
gstaudiosrc_class->open = GST_DEBUG_FUNCPTR (gst_pulsesrc_open);
@ -1296,6 +1298,21 @@ unlock_and_fail:
}
}
static gboolean
gst_pulsesrc_event (GstBaseSrc * basesrc, GstEvent * event)
{
GST_DEBUG_OBJECT (basesrc, "handle event %" GST_PTR_FORMAT, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_RECONFIGURE:
gst_pad_check_reconfigure (GST_BASE_SRC_PAD (basesrc));
break;
default:
break;
}
return GST_BASE_SRC_CLASS (parent_class)->event (basesrc, event);
}
/* This is essentially gst_base_src_negotiate_default() but the caps
* are guaranteed to have a channel layout for > 2 channels
*/