static gboolean gst_base_sink_pad_activate_push (GstPad * pad, gboolean active);
static gboolean gst_base_sink_pad_activate_pull (GstPad * pad, gboolean active);
static gboolean gst_base_sink_event (GstPad * pad, GstEvent * event);
-static gboolean gst_base_sink_peer_query (GstBaseSink * sink, GstQuery * query);
static gboolean gst_base_sink_negotiate_pull (GstBaseSink * basesink);
static GstCaps *gst_base_sink_pad_getcaps (GstPad * pad);
query = gst_query_new_latency ();
/* ask the peer for the latency */
- if ((res = gst_base_sink_peer_query (sink, query))) {
+ if ((res = gst_pad_peer_query (sink->sinkpad, query))) {
/* get upstream min and max latency */
gst_query_parse_latency (query, &us_live, &us_min, &us_max);
return result;
}
-static gboolean
-gst_base_sink_peer_query (GstBaseSink * sink, GstQuery * query)
-{
- GstPad *peer;
- gboolean res = FALSE;
-
- if ((peer = gst_pad_get_peer (sink->sinkpad))) {
- res = gst_pad_query (peer, query);
- gst_object_unref (peer);
- }
- return res;
-}
-
/* get the end position of the last seen object, this is used
* for EOS and for making sure that we don't report a position we
* have not reached yet. With LOCK. */
gst_query_set_position (query, format, cur);
} else if (upstream) {
/* fallback to peer query */
- res = gst_base_sink_peer_query (basesink, query);
+ res = gst_pad_peer_query (basesink->sinkpad, query);
}
break;
}
}
} else {
/* in push mode we simply forward upstream */
- res = gst_base_sink_peer_query (basesink, query);
+ res = gst_pad_peer_query (basesink->sinkpad, query);
}
break;
}
case GST_QUERY_CONVERT:
case GST_QUERY_FORMATS:
default:
- res = gst_base_sink_peer_query (basesink, query);
+ res = gst_pad_peer_query (basesink->sinkpad, query);
break;
}
GST_DEBUG_OBJECT (basesink, "query %s returns %d",