mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
update for basesink event handler changes
This commit is contained in:
parent
177525f89f
commit
1225aa9a78
5 changed files with 30 additions and 16 deletions
|
@ -249,8 +249,12 @@ gst_gio_base_sink_event (GstBaseSink * base_sink, GstEvent * event)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return (ret == GST_FLOW_OK);
|
||||
if (ret == GST_FLOW_OK)
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (base_sink, event);
|
||||
else {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
|
@ -599,7 +599,7 @@ gst_app_sink_event (GstBaseSink * sink, GstEvent * event)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
|
@ -174,6 +174,8 @@ static GstFlowReturn gst_audio_base_sink_render (GstBaseSink * bsink,
|
|||
GstBuffer * buffer);
|
||||
static gboolean gst_audio_base_sink_event (GstBaseSink * bsink,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn gst_audio_base_sink_wait_eos (GstBaseSink * bsink,
|
||||
GstEvent * event);
|
||||
static void gst_audio_base_sink_get_times (GstBaseSink * bsink,
|
||||
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
|
||||
static gboolean gst_audio_base_sink_setcaps (GstBaseSink * bsink,
|
||||
|
@ -281,6 +283,8 @@ gst_audio_base_sink_class_init (GstAudioBaseSinkClass * klass)
|
|||
gstbasesink_class->fixate = GST_DEBUG_FUNCPTR (gst_audio_base_sink_fixate);
|
||||
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_audio_base_sink_setcaps);
|
||||
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_audio_base_sink_event);
|
||||
gstbasesink_class->wait_eos =
|
||||
GST_DEBUG_FUNCPTR (gst_audio_base_sink_wait_eos);
|
||||
gstbasesink_class->get_times =
|
||||
GST_DEBUG_FUNCPTR (gst_audio_base_sink_get_times);
|
||||
gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_audio_base_sink_preroll);
|
||||
|
@ -1008,6 +1012,22 @@ gst_audio_base_sink_drain (GstAudioBaseSink * sink)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_audio_base_sink_wait_eos (GstBaseSink * bsink, GstEvent * event)
|
||||
{
|
||||
GstAudioBaseSink *sink = GST_AUDIO_BASE_SINK (bsink);
|
||||
GstFlowReturn ret;
|
||||
|
||||
ret = GST_BASE_SINK_CLASS (parent_class)->event (bsink, event);
|
||||
if (ret != GST_FLOW_OK)
|
||||
return ret;
|
||||
|
||||
/* now wait till we played everything */
|
||||
gst_audio_base_sink_drain (sink);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_base_sink_event (GstBaseSink * bsink, GstEvent * event)
|
||||
{
|
||||
|
@ -1027,14 +1047,10 @@ gst_audio_base_sink_event (GstBaseSink * bsink, GstEvent * event)
|
|||
if (sink->ringbuffer)
|
||||
gst_audio_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
/* now wait till we played everything */
|
||||
gst_audio_base_sink_drain (sink);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (bsink, event);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
|
@ -1420,10 +1420,7 @@ gst_ximagesink_event (GstBaseSink * sink, GstEvent * event)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (GST_BASE_SINK_CLASS (parent_class)->event)
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||
else
|
||||
return TRUE;
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -1936,10 +1936,7 @@ gst_xvimagesink_event (GstBaseSink * sink, GstEvent * event)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (GST_BASE_SINK_CLASS (parent_class)->event)
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||
else
|
||||
return TRUE;
|
||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue