update for basesink event handler changes
This commit is contained in:
parent
177525f89f
commit
1225aa9a78
@ -249,8 +249,12 @@ gst_gio_base_sink_event (GstBaseSink * base_sink, GstEvent * event)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (ret == GST_FLOW_OK)
|
||||||
return (ret == GST_FLOW_OK);
|
return GST_BASE_SINK_CLASS (parent_class)->event (base_sink, event);
|
||||||
|
else {
|
||||||
|
gst_event_unref (event);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
@ -599,7 +599,7 @@ gst_app_sink_event (GstBaseSink * sink, GstEvent * event)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
@ -174,6 +174,8 @@ static GstFlowReturn gst_audio_base_sink_render (GstBaseSink * bsink,
|
|||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
static gboolean gst_audio_base_sink_event (GstBaseSink * bsink,
|
static gboolean gst_audio_base_sink_event (GstBaseSink * bsink,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
|
static GstFlowReturn gst_audio_base_sink_wait_eos (GstBaseSink * bsink,
|
||||||
|
GstEvent * event);
|
||||||
static void gst_audio_base_sink_get_times (GstBaseSink * bsink,
|
static void gst_audio_base_sink_get_times (GstBaseSink * bsink,
|
||||||
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
|
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
|
||||||
static gboolean gst_audio_base_sink_setcaps (GstBaseSink * bsink,
|
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->fixate = GST_DEBUG_FUNCPTR (gst_audio_base_sink_fixate);
|
||||||
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_audio_base_sink_setcaps);
|
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->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 =
|
gstbasesink_class->get_times =
|
||||||
GST_DEBUG_FUNCPTR (gst_audio_base_sink_get_times);
|
GST_DEBUG_FUNCPTR (gst_audio_base_sink_get_times);
|
||||||
gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_audio_base_sink_preroll);
|
gstbasesink_class->preroll = GST_DEBUG_FUNCPTR (gst_audio_base_sink_preroll);
|
||||||
@ -1008,6 +1012,22 @@ gst_audio_base_sink_drain (GstAudioBaseSink * sink)
|
|||||||
return TRUE;
|
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
|
static gboolean
|
||||||
gst_audio_base_sink_event (GstBaseSink * bsink, GstEvent * event)
|
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)
|
if (sink->ringbuffer)
|
||||||
gst_audio_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
|
gst_audio_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_EOS:
|
|
||||||
/* now wait till we played everything */
|
|
||||||
gst_audio_base_sink_drain (sink);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return GST_BASE_SINK_CLASS (parent_class)->event (bsink, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
@ -1420,10 +1420,7 @@ gst_ximagesink_event (GstBaseSink * sink, GstEvent * event)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (GST_BASE_SINK_CLASS (parent_class)->event)
|
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
|
||||||
else
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1936,10 +1936,7 @@ gst_xvimagesink_event (GstBaseSink * sink, GstEvent * event)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (GST_BASE_SINK_CLASS (parent_class)->event)
|
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
||||||
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
|
|
||||||
else
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user