Commit 09a8294d authored by Wim Taymans's avatar Wim Taymans

pad: add parent to the query function

parent 54e11740
......@@ -176,6 +176,7 @@ done:
/**
* gst_proxy_pad_query_default:
* @pad: a #GstPad to invoke the default query on.
* @parent: the parent of @pad or NULL
* @query: (transfer none): the #GstQuery to perform.
*
* Invoke the default query function of the proxy pad.
......@@ -185,7 +186,7 @@ done:
* Since: 0.10.36
*/
gboolean
gst_proxy_pad_query_default (GstPad * pad, GstQuery * query)
gst_proxy_pad_query_default (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
GstPad *target;
......
......@@ -63,7 +63,8 @@ GstProxyPad* gst_proxy_pad_get_internal (GstProxyPad *pad);
gboolean gst_proxy_pad_event_default (GstPad *pad, GstEvent *event);
gboolean gst_proxy_pad_query_default (GstPad *pad, GstQuery *query);
gboolean gst_proxy_pad_query_default (GstPad *pad, GstObject *parent,
GstQuery *query);
GstIterator* gst_proxy_pad_iterate_internal_links_default (GstPad *pad);
GstFlowReturn gst_proxy_pad_chain_default (GstPad *pad, GstBuffer *buffer);
GstFlowReturn gst_proxy_pad_chain_list_default (GstPad *pad, GstBufferList *list);
......
......@@ -2776,6 +2776,7 @@ done:
/**
* gst_pad_query_default:
* @pad: a #GstPad to call the default query handler on.
* @parent: the parent of @pad or NULL
* @query: (transfer none): the #GstQuery to handle.
*
* Invokes the default query handler for the given pad.
......@@ -2787,7 +2788,7 @@ done:
* Returns: TRUE if the query was performed successfully.
*/
gboolean
gst_pad_query_default (GstPad * pad, GstQuery * query)
gst_pad_query_default (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean forward = TRUE, ret = FALSE;
......@@ -3182,7 +3183,7 @@ gst_pad_query (GstPad * pad, GstQuery * query)
if ((func = GST_PAD_QUERYFUNC (pad)) == NULL)
goto no_func;
res = func (pad, query);
res = func (pad, parent, query);
RELEASE_PARENT (parent);
......
......@@ -369,13 +369,17 @@ typedef GstIterator* (*GstPadIterIntLinkFunction) (GstPad *pad);
/**
* GstPadQueryFunction:
* @pad: the #GstPad to query.
* @parent: the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set,
* @parent is guaranteed to be not-NULL and remain valid during the
* execution of this function.
* @query: the #GstQuery object to execute
*
* The signature of the query function.
*
* Returns: TRUE if the query could be performed.
*/
typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstQuery *query);
typedef gboolean (*GstPadQueryFunction) (GstPad *pad, GstObject *parent,
GstQuery *query);
/* linking */
......@@ -879,7 +883,8 @@ GstIterator * gst_pad_iterate_internal_links_default (GstPad * pad);
gboolean gst_pad_query (GstPad *pad, GstQuery *query);
gboolean gst_pad_peer_query (GstPad *pad, GstQuery *query);
void gst_pad_set_query_function (GstPad *pad, GstPadQueryFunction query);
gboolean gst_pad_query_default (GstPad *pad, GstQuery *query);
gboolean gst_pad_query_default (GstPad *pad, GstObject *parent,
GstQuery *query);
/* misc helper functions */
gboolean gst_pad_forward (GstPad *pad, GstPadForwardFunction forward,
......
......@@ -384,10 +384,12 @@ static gboolean gst_base_parse_handle_seek (GstBaseParse * parse,
static void gst_base_parse_handle_tag (GstBaseParse * parse, GstEvent * event);
static gboolean gst_base_parse_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_base_parse_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_base_parse_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_base_parse_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_base_parse_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_base_parse_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static GstFlowReturn gst_base_parse_chain (GstPad * pad, GstBuffer * buffer);
static void gst_base_parse_loop (GstPad * pad);
......@@ -1119,13 +1121,13 @@ gst_base_parse_sink_eventfunc (GstBaseParse * parse, GstEvent * event)
}
static gboolean
gst_base_parse_sink_query (GstPad * pad, GstQuery * query)
gst_base_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstBaseParse *parse;
GstBaseParseClass *bclass;
gboolean res;
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
parse = GST_BASE_PARSE (parent);
bclass = GST_BASE_PARSE_GET_CLASS (parse);
switch (GST_QUERY_TYPE (query)) {
......@@ -1148,11 +1150,10 @@ gst_base_parse_sink_query (GstPad * pad, GstQuery * query)
}
default:
{
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
}
gst_object_unref (parse);
return res;
}
......@@ -3310,12 +3311,12 @@ gst_base_parse_get_duration (GstBaseParse * parse, GstFormat format,
}
static gboolean
gst_base_parse_src_query (GstPad * pad, GstQuery * query)
gst_base_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstBaseParse *parse;
gboolean res = FALSE;
parse = GST_BASE_PARSE (GST_PAD_PARENT (pad));
parse = GST_BASE_PARSE (parent);
GST_LOG_OBJECT (parse, "handling query: %" GST_PTR_FORMAT, query);
......@@ -3329,7 +3330,7 @@ gst_base_parse_src_query (GstPad * pad, GstQuery * query)
gst_query_parse_position (query, &format, NULL);
/* try upstream first */
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
if (!res) {
/* Fall back on interpreting segment */
GST_OBJECT_LOCK (parse);
......@@ -3363,7 +3364,7 @@ gst_base_parse_src_query (GstPad * pad, GstQuery * query)
gst_query_parse_duration (query, &format, NULL);
/* consult upstream */
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
/* otherwise best estimate from us */
if (!res) {
......@@ -3383,7 +3384,7 @@ gst_base_parse_src_query (GstPad * pad, GstQuery * query)
gst_query_parse_seeking (query, &fmt, NULL, NULL, NULL);
/* consult upstream */
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
/* we may be able to help if in TIME */
if (fmt == GST_FORMAT_TIME && gst_base_parse_is_seekable (parse)) {
......@@ -3452,7 +3453,7 @@ gst_base_parse_src_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
......
......@@ -385,7 +385,8 @@ static gboolean gst_base_sink_default_prepare_seek_segment (GstBaseSink * sink,
static GstStateChangeReturn gst_base_sink_change_state (GstElement * element,
GstStateChange transition);
static gboolean gst_base_sink_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_base_sink_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static GstFlowReturn gst_base_sink_chain (GstPad * pad, GstBuffer * buffer);
static GstFlowReturn gst_base_sink_chain_list (GstPad * pad,
GstBufferList * list);
......@@ -2056,8 +2057,8 @@ gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time,
/* FIXME: Casting to GstClockEntry only works because the types
* are the same */
if (G_LIKELY (sink->priv->cached_clock_id != NULL
&& GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->
priv->cached_clock_id) == clock)) {
&& GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->priv->
cached_clock_id) == clock)) {
if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id,
time)) {
gst_clock_id_unref (sink->priv->cached_clock_id);
......@@ -4860,25 +4861,22 @@ default_sink_query (GstBaseSink * basesink, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (basesink->sinkpad, query);
res =
gst_pad_query_default (basesink->sinkpad, GST_OBJECT_CAST (basesink),
query);
break;
}
return res;
}
static gboolean
gst_base_sink_sink_query (GstPad * pad, GstQuery * query)
gst_base_sink_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstBaseSink *basesink;
GstBaseSinkClass *bclass;
gboolean res;
basesink = GST_BASE_SINK_CAST (gst_pad_get_parent (pad));
if (G_UNLIKELY (basesink == NULL)) {
gst_query_unref (query);
return FALSE;
}
basesink = GST_BASE_SINK_CAST (parent);
bclass = GST_BASE_SINK_GET_CLASS (basesink);
if (bclass->query)
......@@ -4886,8 +4884,6 @@ gst_base_sink_sink_query (GstPad * pad, GstQuery * query)
else
res = FALSE;
gst_object_unref (basesink);
return res;
}
......
......@@ -294,7 +294,8 @@ static gboolean gst_base_src_event_handler (GstPad * pad, GstEvent * event);
static gboolean gst_base_src_send_event (GstElement * elem, GstEvent * event);
static gboolean gst_base_src_default_event (GstBaseSrc * src, GstEvent * event);
static gboolean gst_base_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_base_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_base_src_activate_pool (GstBaseSrc * basesrc,
gboolean active);
......@@ -1145,23 +1146,18 @@ gst_base_src_default_query (GstBaseSrc * src, GstQuery * query)
}
static gboolean
gst_base_src_query (GstPad * pad, GstQuery * query)
gst_base_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstBaseSrc *src;
GstBaseSrcClass *bclass;
gboolean result = FALSE;
src = GST_BASE_SRC (gst_pad_get_parent (pad));
if (G_UNLIKELY (src == NULL))
return FALSE;
src = GST_BASE_SRC (parent);
bclass = GST_BASE_SRC_GET_CLASS (src);
if (bclass->query)
result = bclass->query (src, query);
gst_object_unref (src);
return result;
}
......
......@@ -327,7 +327,8 @@ static gboolean gst_base_transform_acceptcaps_default (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps);
static gboolean gst_base_transform_setcaps (GstBaseTransform * trans,
GstPad * pad, GstCaps * caps);
static gboolean gst_base_transform_query (GstPad * pad, GstQuery * query);
static gboolean gst_base_transform_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_base_transform_default_query (GstBaseTransform * trans,
GstPadDirection direction, GstQuery * query);
static gboolean gst_base_transform_default_transform_size (GstBaseTransform *
......@@ -1380,23 +1381,18 @@ done:
}
static gboolean
gst_base_transform_query (GstPad * pad, GstQuery * query)
gst_base_transform_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstBaseTransform *trans;
GstBaseTransformClass *bclass;
gboolean ret = FALSE;
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
if (G_UNLIKELY (trans == NULL))
return FALSE;
trans = GST_BASE_TRANSFORM (parent);
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
if (bclass->query)
ret = bclass->query (trans, GST_PAD_DIRECTION (pad), query);
gst_object_unref (trans);
return ret;
}
......
......@@ -106,7 +106,7 @@ static void gst_fd_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void gst_fd_sink_dispose (GObject * obj);
static gboolean gst_fd_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_fd_sink_query (GstBaseSink * bsink, GstQuery * query);
static GstFlowReturn gst_fd_sink_render (GstBaseSink * sink,
GstBuffer * buffer);
static gboolean gst_fd_sink_start (GstBaseSink * basesink);
......@@ -145,6 +145,7 @@ gst_fd_sink_class_init (GstFdSinkClass * klass)
gstbasesink_class->unlock = GST_DEBUG_FUNCPTR (gst_fd_sink_unlock);
gstbasesink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_fd_sink_unlock_stop);
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_fd_sink_event);
gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_fd_sink_query);
g_object_class_install_property (gobject_class, ARG_FD,
g_param_spec_int ("fd", "fd", "An open file descriptor to write to",
......@@ -154,11 +155,6 @@ gst_fd_sink_class_init (GstFdSinkClass * klass)
static void
gst_fd_sink_init (GstFdSink * fdsink)
{
GstPad *pad;
pad = GST_BASE_SINK_PAD (fdsink);
gst_pad_set_query_function (pad, GST_DEBUG_FUNCPTR (gst_fd_sink_query));
fdsink->fd = 1;
fdsink->uri = g_strdup_printf ("fd://%d", fdsink->fd);
fdsink->bytes_written = 0;
......@@ -179,36 +175,45 @@ gst_fd_sink_dispose (GObject * obj)
}
static gboolean
gst_fd_sink_query (GstPad * pad, GstQuery * query)
gst_fd_sink_query (GstBaseSink * bsink, GstQuery * query)
{
gboolean res = FALSE;
GstFdSink *fdsink;
GstFormat format;
fdsink = GST_FD_SINK (GST_PAD_PARENT (pad));
fdsink = GST_FD_SINK (bsink);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
{
GstFormat format;
gst_query_parse_position (query, &format, NULL);
switch (format) {
case GST_FORMAT_DEFAULT:
case GST_FORMAT_BYTES:
gst_query_set_position (query, GST_FORMAT_BYTES, fdsink->current_pos);
return TRUE;
res = TRUE;
break;
default:
return FALSE;
break;
}
break;
}
case GST_QUERY_FORMATS:
gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
return TRUE;
res = TRUE;
break;
case GST_QUERY_URI:
gst_query_set_uri (query, fdsink->uri);
return TRUE;
res = TRUE;
break;
default:
return gst_pad_query_default (pad, query);
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
break;
}
return res;
}
static GstFlowReturn
......
......@@ -118,7 +118,8 @@ static void gst_funnel_release_pad (GstElement * element, GstPad * pad);
static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_funnel_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_funnel_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_funnel_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_funnel_src_event (GstPad * pad, GstEvent * event);
......@@ -318,9 +319,9 @@ gst_funnel_sink_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_funnel_sink_query (GstPad * pad, GstQuery * query)
gst_funnel_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstFunnel *funnel = GST_FUNNEL (GST_PAD_PARENT (pad));
GstFunnel *funnel = GST_FUNNEL (parent);
gboolean forward = TRUE;
gboolean res = TRUE;
......
......@@ -179,7 +179,8 @@ static void gst_selector_pad_set_property (GObject * object,
static gint64 gst_selector_pad_get_running_time (GstSelectorPad * pad);
static void gst_selector_pad_reset (GstSelectorPad * pad);
static gboolean gst_selector_pad_event (GstPad * pad, GstEvent * event);
static gboolean gst_selector_pad_query (GstPad * pad, GstQuery * query);
static gboolean gst_selector_pad_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static GstIterator *gst_selector_pad_iterate_linked_pads (GstPad * pad);
static GstFlowReturn gst_selector_pad_chain (GstPad * pad, GstBuffer * buf);
......@@ -482,13 +483,13 @@ gst_selector_pad_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_selector_pad_query (GstPad * pad, GstQuery * query)
gst_selector_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
switch (GST_QUERY_TYPE (query)) {
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
......@@ -753,7 +754,8 @@ static GstStateChangeReturn gst_input_selector_change_state (GstElement *
element, GstStateChange transition);
static gboolean gst_input_selector_event (GstPad * pad, GstEvent * event);
static gboolean gst_input_selector_query (GstPad * pad, GstQuery * query);
static gboolean gst_input_selector_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gint64 gst_input_selector_block (GstInputSelector * self);
/* FIXME: create these marshallers using glib-genmarshal */
......@@ -1083,12 +1085,12 @@ gst_input_selector_event (GstPad * pad, GstEvent * event)
/* query on the srcpad. We override this function because by default it will
* only forward the query to one random sinkpad */
static gboolean
gst_input_selector_query (GstPad * pad, GstQuery * query)
gst_input_selector_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
GstInputSelector *sel;
sel = GST_INPUT_SELECTOR (GST_PAD_PARENT (pad));
sel = GST_INPUT_SELECTOR (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_LATENCY:
......@@ -1146,7 +1148,7 @@ gst_input_selector_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
......
......@@ -1503,7 +1503,7 @@ was_eos:
}
static gboolean
gst_multi_queue_sink_query (GstPad * pad, GstQuery * query)
gst_multi_queue_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
......@@ -1512,7 +1512,7 @@ gst_multi_queue_sink_query (GstPad * pad, GstQuery * query)
case GST_QUERY_CAPS:
default:
/* default handling */
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
......@@ -1549,17 +1549,15 @@ gst_multi_queue_src_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_multi_queue_src_query (GstPad * pad, GstQuery * query)
gst_multi_queue_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
/* FIXME, Handle position offset depending on queue size */
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_ACCEPT_CAPS:
case GST_QUERY_CAPS:
default:
/* default handling */
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
......
......@@ -106,7 +106,8 @@ static GstFlowReturn gst_output_selector_chain (GstPad * pad, GstBuffer * buf);
static GstStateChangeReturn gst_output_selector_change_state (GstElement *
element, GstStateChange transition);
static gboolean gst_output_selector_event (GstPad * pad, GstEvent * event);
static gboolean gst_output_selector_query (GstPad * pad, GstQuery * query);
static gboolean gst_output_selector_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static void gst_output_selector_switch_pad_negotiation_mode (GstOutputSelector *
sel, gint mode);
......@@ -563,13 +564,13 @@ gst_output_selector_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_output_selector_query (GstPad * pad, GstQuery * query)
gst_output_selector_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = TRUE;
GstOutputSelector *sel;
GstPad *active = NULL;
sel = GST_OUTPUT_SELECTOR (GST_PAD_PARENT (pad));
sel = GST_OUTPUT_SELECTOR (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_CAPS:
......@@ -595,8 +596,8 @@ gst_output_selector_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
}
......@@ -197,10 +197,12 @@ static GstFlowReturn gst_queue_push_one (GstQueue * queue);
static void gst_queue_loop (GstPad * pad);
static gboolean gst_queue_handle_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_queue_handle_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_queue_handle_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_queue_handle_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_queue_handle_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_queue_handle_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static GstPadLinkReturn gst_queue_link_sink (GstPad * pad, GstPad * peer);
static GstPadLinkReturn gst_queue_link_src (GstPad * pad, GstPad * peer);
......@@ -810,20 +812,15 @@ out_eos:
}
static gboolean
gst_queue_handle_sink_query (GstPad * pad, GstQuery * query)
gst_queue_handle_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstQueue *queue = GST_QUEUE (GST_PAD_PARENT (pad));
gboolean res;
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_ACCEPT_CAPS:
case GST_QUERY_CAPS:
default:
if (!(res = gst_pad_peer_query (queue->srcpad, query)))
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
}
......@@ -1214,15 +1211,14 @@ gst_queue_handle_src_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_queue_handle_src_query (GstPad * pad, GstQuery * query)
gst_queue_handle_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstQueue *queue = GST_QUEUE (GST_PAD_PARENT (pad));
GstQueue *queue = GST_QUEUE (parent);
gboolean res;
res = gst_pad_peer_query (queue->sinkpad, query);
if (!res) {
if (!res)
return FALSE;
}
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
......
......@@ -228,10 +228,12 @@ static GstFlowReturn gst_queue2_push_one (GstQueue2 * queue);
static void gst_queue2_loop (GstPad * pad);
static gboolean gst_queue2_handle_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_queue2_handle_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_queue2_handle_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_queue2_handle_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_queue2_handle_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_queue2_handle_query (GstElement * element,
GstQuery * query);
......@@ -2014,13 +2016,14 @@ out_eos:
}
static gboolean
gst_queue2_handle_sink_query (GstPad * pad, GstQuery * query)
gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
gboolean res;
switch (GST_QUERY_TYPE (query)) {
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;