audio: fix base class vmethods

This commit is contained in:
Wim Taymans 2011-11-10 16:24:12 +01:00
parent 3254e79f04
commit 57eaf388e0
2 changed files with 15 additions and 13 deletions

View file

@ -278,18 +278,14 @@ gst_base_audio_sink_class_init (GstBaseAudioSinkClass * klass)
GST_DEBUG_FUNCPTR (gst_base_audio_sink_provide_clock);
gstelement_class->query = GST_DEBUG_FUNCPTR (gst_base_audio_sink_query);
gstbasesink_class->fixate = GST_DEBUG_FUNCPTR (gst_base_audio_sink_fixate);
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_base_audio_sink_setcaps);
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_base_audio_sink_event);
gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_base_audio_sink_preroll);
gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_base_audio_sink_query_pad);
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_base_audio_sink_render);
gstbasesink_class->get_times =
GST_DEBUG_FUNCPTR (gst_base_audio_sink_get_times);
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_base_audio_sink_setcaps);
gstbasesink_class->fixate = GST_DEBUG_FUNCPTR (gst_base_audio_sink_fixate);
#if 0
gstbasesink_class->async_play =
GST_DEBUG_FUNCPTR (gst_base_audio_sink_async_play);
#endif
gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_base_audio_sink_preroll);
gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_base_audio_sink_render);
gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_base_audio_sink_query_pad);
gstbasesink_class->activate_pull =
GST_DEBUG_FUNCPTR (gst_base_audio_sink_activate_pull);
@ -956,6 +952,8 @@ gst_base_audio_sink_fixate (GstBaseSink * bsink, GstCaps * caps)
gst_structure_fixate_field_boolean (s, "signed", TRUE);
if (gst_structure_has_field (s, "endianness"))
gst_structure_fixate_field_nearest_int (s, "endianness", G_BYTE_ORDER);
GST_BASE_SINK_CLASS (parent_class)->fixate (bsink, caps);
}
static void

View file

@ -663,9 +663,10 @@ static gboolean
gst_base_audio_src_event (GstBaseSrc * bsrc, GstEvent * event)
{
GstBaseAudioSrc *src = GST_BASE_AUDIO_SRC (bsrc);
gboolean res;
gboolean res, forward;
res = TRUE;
res = FALSE;
forward = TRUE;
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH_START:
@ -681,12 +682,15 @@ gst_base_audio_src_event (GstBaseSrc * bsrc, GstEvent * event)
break;
case GST_EVENT_SEEK:
GST_DEBUG_OBJECT (bsrc, "refuse to seek");
res = FALSE;
forward = FALSE;
break;
default:
GST_DEBUG_OBJECT (bsrc, "dropping event %p", event);
GST_DEBUG_OBJECT (bsrc, "forward event %p", event);
break;
}
if (forward)
res = GST_BASE_SRC_CLASS (parent_class)->event (bsrc, event);
return res;
}