mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
queue2: Implement gst_event_full_func handling
Same as we do for queue
This commit is contained in:
parent
379d1fee38
commit
8152f3a320
1 changed files with 10 additions and 8 deletions
|
@ -248,8 +248,8 @@ static GstFlowReturn gst_queue2_chain_list (GstPad * pad, GstObject * parent,
|
|||
static GstFlowReturn gst_queue2_push_one (GstQueue2 * queue);
|
||||
static void gst_queue2_loop (GstPad * pad);
|
||||
|
||||
static gboolean gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn gst_queue2_handle_sink_event (GstPad * pad,
|
||||
GstObject * parent, GstEvent * event);
|
||||
static gboolean gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
|
@ -435,7 +435,7 @@ gst_queue2_init (GstQueue2 * queue)
|
|||
GST_DEBUG_FUNCPTR (gst_queue2_chain_list));
|
||||
gst_pad_set_activatemode_function (queue->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_queue2_sink_activate_mode));
|
||||
gst_pad_set_event_function (queue->sinkpad,
|
||||
gst_pad_set_event_full_function (queue->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_queue2_handle_sink_event));
|
||||
gst_pad_set_query_function (queue->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_queue2_handle_sink_query));
|
||||
|
@ -2398,7 +2398,7 @@ no_item:
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static GstFlowReturn
|
||||
gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
|
@ -2532,7 +2532,9 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
|||
}
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
if (ret == FALSE)
|
||||
return GST_FLOW_ERROR;
|
||||
return GST_FLOW_OK;
|
||||
|
||||
/* ERRORS */
|
||||
out_flushing:
|
||||
|
@ -2540,14 +2542,14 @@ out_flushing:
|
|||
GST_DEBUG_OBJECT (queue, "refusing event, we are flushing");
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
out_eos:
|
||||
{
|
||||
GST_DEBUG_OBJECT (queue, "refusing event, we are EOS");
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
return GST_FLOW_EOS;
|
||||
}
|
||||
out_flow_error:
|
||||
{
|
||||
|
@ -2556,7 +2558,7 @@ out_flow_error:
|
|||
gst_flow_get_name (queue->srcresult));
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
return queue->srcresult;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue