add parent to query function

This commit is contained in:
Wim Taymans 2011-11-16 17:27:13 +01:00
parent 445d4d8573
commit 6190312214
23 changed files with 135 additions and 162 deletions

View file

@ -90,7 +90,8 @@ static void gst_cmml_dec_get_property (GObject * dec, guint property_id,
GValue * value, GParamSpec * pspec);
static void gst_cmml_dec_set_property (GObject * dec, guint property_id,
const GValue * value, GParamSpec * pspec);
static gboolean gst_cmml_dec_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_cmml_dec_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_cmml_dec_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_cmml_dec_convert (GstPad * pad, GstFormat src_fmt,
gint64 src_val, GstFormat * dest_fmt, gint64 * dest_val);
@ -253,7 +254,7 @@ gst_cmml_dec_change_state (GstElement * element, GstStateChange transition)
}
static gboolean
gst_cmml_dec_sink_query (GstPad * pad, GstQuery * query)
gst_cmml_dec_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;

View file

@ -95,7 +95,8 @@ static void gst_jpeg_dec_get_property (GObject * object, guint prop_id,
static GstFlowReturn gst_jpeg_dec_chain (GstPad * pad, GstBuffer * buffer);
static GstCaps *gst_jpeg_dec_getcaps (GstPad * pad, GstCaps * filter);
static gboolean gst_jpeg_dec_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_jpeg_dec_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_jpeg_dec_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_jpeg_dec_src_event (GstPad * pad, GstEvent * event);
static GstStateChangeReturn gst_jpeg_dec_change_state (GstElement * element,
@ -1777,7 +1778,7 @@ gst_jpeg_dec_sink_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_jpeg_dec_sink_query (GstPad * pad, GstQuery * query)
gst_jpeg_dec_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
@ -1794,7 +1795,7 @@ gst_jpeg_dec_sink_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;

View file

@ -72,7 +72,8 @@ static void gst_jpegenc_finalize (GObject * object);
static GstFlowReturn gst_jpegenc_chain (GstPad * pad, GstBuffer * buf);
static gboolean gst_jpegenc_sink_event (GstPad * pad, GstEvent * event);
static GstCaps *gst_jpegenc_getcaps (GstPad * pad, GstCaps * filter);
static gboolean gst_jpegenc_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_jpegenc_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static void gst_jpegenc_resync (GstJpegEnc * jpegenc);
static void gst_jpegenc_set_property (GObject * object, guint prop_id,
@ -342,10 +343,9 @@ done:
}
static gboolean
gst_jpegenc_sink_query (GstPad * pad, GstQuery * query)
gst_jpegenc_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
GstJpegEnc *enc = GST_JPEGENC (gst_pad_get_parent (pad));
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_CAPS:
@ -360,12 +360,9 @@ gst_jpegenc_sink_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (enc);
return res;
}

View file

@ -115,12 +115,11 @@ static gboolean gst_pulse_audio_sink_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_pulse_audio_sink_sink_event (GstPad * pad,
GstEvent * event);
static gboolean gst_pulse_audio_sink_sink_query (GstPad * pad,
GstQuery * query);
GstObject * parent, GstQuery * query);
static gboolean gst_pulse_audio_sink_sink_acceptcaps (GstPulseAudioSink * pbin,
GstPad * pad, GstCaps * caps);
static GstStateChangeReturn
gst_pulse_audio_sink_change_state (GstElement * element,
GstStateChange transition);
static GstStateChangeReturn gst_pulse_audio_sink_change_state (GstElement *
element, GstStateChange transition);
static gboolean gst_pulse_audio_sink_set_caps (GstPulseAudioSink * pbin,
GstCaps * caps);
@ -847,9 +846,10 @@ out:
}
static gboolean
gst_pulse_audio_sink_sink_query (GstPad * pad, GstQuery * query)
gst_pulse_audio_sink_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstPulseAudioSink *pbin = GST_PULSE_AUDIO_SINK (gst_pad_get_parent (pad));
GstPulseAudioSink *pbin = GST_PULSE_AUDIO_SINK (parent);
gboolean ret = FALSE;
switch (GST_QUERY_TYPE (query)) {
@ -864,12 +864,9 @@ gst_pulse_audio_sink_sink_query (GstPad * pad, GstQuery * query)
break;
}
default:
ret = gst_pad_query_default (pad, query);
ret = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (pbin);
return ret;
}

View file

@ -72,7 +72,7 @@ static gboolean gst_audio_fx_base_fir_filter_setup (GstAudioFilter * base,
const GstAudioInfo * info);
static gboolean gst_audio_fx_base_fir_filter_query (GstPad * pad,
GstQuery * query);
GstObject * parent, GstQuery * query);
/*
* The code below calculates the linear convolution:
@ -942,10 +942,10 @@ gst_audio_fx_base_fir_filter_stop (GstBaseTransform * base)
}
static gboolean
gst_audio_fx_base_fir_filter_query (GstPad * pad, GstQuery * query)
gst_audio_fx_base_fir_filter_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstAudioFXBaseFIRFilter *self =
GST_AUDIO_FX_BASE_FIR_FILTER (gst_pad_get_parent (pad));
GstAudioFXBaseFIRFilter *self = GST_AUDIO_FX_BASE_FIR_FILTER (parent);
gboolean res = TRUE;
switch (GST_QUERY_TYPE (query)) {
@ -954,13 +954,12 @@ gst_audio_fx_base_fir_filter_query (GstPad * pad, GstQuery * query)
GstClockTime min, max;
gboolean live;
guint64 latency;
GstPad *peer;
gint rate = GST_AUDIO_FILTER_RATE (self);
if (rate == 0) {
res = FALSE;
} else if ((peer = gst_pad_get_peer (GST_BASE_TRANSFORM (self)->sinkpad))) {
if ((res = gst_pad_query (peer, query))) {
} else if ((res =
gst_pad_peer_query (GST_BASE_TRANSFORM (self)->sinkpad, query))) {
gst_query_parse_latency (query, &live, &min, &max);
GST_DEBUG_OBJECT (self, "Peer latency: min %"
@ -988,15 +987,12 @@ gst_audio_fx_base_fir_filter_query (GstPad * pad, GstQuery * query)
gst_query_set_latency (query, live, min, max);
}
gst_object_unref (peer);
}
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (self);
return res;
}

View file

@ -80,7 +80,8 @@ static GstFlowReturn gst_au_parse_chain (GstPad * pad, GstBuffer * buf);
static GstStateChangeReturn gst_au_parse_change_state (GstElement * element,
GstStateChange transition);
static void gst_au_parse_reset (GstAuParse * auparse);
static gboolean gst_au_parse_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_au_parse_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_au_parse_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_au_parse_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_au_parse_src_convert (GstAuParse * auparse,
@ -541,12 +542,12 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
}
static gboolean
gst_au_parse_src_query (GstPad * pad, GstQuery * query)
gst_au_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstAuParse *auparse;
gboolean ret = FALSE;
auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
auparse = GST_AU_PARSE (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_DURATION:{
@ -606,11 +607,10 @@ gst_au_parse_src_query (GstPad * pad, GstQuery * query)
break;
}
default:
ret = gst_pad_query_default (pad, query);
ret = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (auparse);
return ret;
}

View file

@ -87,7 +87,8 @@ static gboolean gst_avi_demux_push_event (GstAviDemux * avi, GstEvent * event);
#if 0
static const GstFormat *gst_avi_demux_get_src_formats (GstPad * pad);
#endif
static gboolean gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_avi_demux_handle_src_query (GstPad * pad,
GstObject * parent, GstQuery * query);
static gboolean gst_avi_demux_src_convert (GstPad * pad, GstFormat src_format,
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
@ -417,15 +418,16 @@ done:
}
static gboolean
gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query)
gst_avi_demux_handle_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
gboolean res = TRUE;
GstAviDemux *avi = GST_AVI_DEMUX (gst_pad_get_parent (pad));
GstAviDemux *avi = GST_AVI_DEMUX (parent);
GstAviStream *stream = gst_pad_get_element_private (pad);
if (!stream->strh || !stream->strf.data)
return gst_pad_query_default (pad, query);
return gst_pad_query_default (pad, parent, query);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:{
@ -552,15 +554,14 @@ gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query)
&dest_val)))
gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val);
else
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (avi);
return res;
}

View file

@ -102,7 +102,8 @@ gst_push_file_src_class_init (GstPushFileSrcClass * g_class)
}
static gboolean
gst_push_file_src_ghostpad_query (GstPad * pad, GstQuery * query)
gst_push_file_src_ghostpad_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
gboolean res;
@ -112,7 +113,7 @@ gst_push_file_src_ghostpad_query (GstPad * pad, GstQuery * query)
res = TRUE;
break;
default:
res = gst_proxy_pad_query_default (pad, query);
res = gst_proxy_pad_query_default (pad, parent, query);
break;
}
return res;

View file

@ -93,7 +93,8 @@ static gboolean flv_demux_handle_seek_push (GstFlvDemux * demux,
static gboolean gst_flv_demux_handle_seek_pull (GstFlvDemux * demux,
GstEvent * event, gboolean seeking);
static gboolean gst_flv_demux_query (GstPad * pad, GstQuery * query);
static gboolean gst_flv_demux_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_flv_demux_src_event (GstPad * pad, GstEvent * event);
@ -2966,12 +2967,12 @@ gst_flv_demux_src_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_flv_demux_query (GstPad * pad, GstQuery * query)
gst_flv_demux_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = TRUE;
GstFlvDemux *demux;
demux = GST_FLV_DEMUX (gst_pad_get_parent (pad));
demux = GST_FLV_DEMUX (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_DURATION:
@ -3056,23 +3057,11 @@ gst_flv_demux_query (GstPad * pad, GstQuery * query)
}
case GST_QUERY_LATENCY:
default:
{
GstPad *peer;
if ((peer = gst_pad_get_peer (demux->sinkpad))) {
/* query latency on peer pad */
res = gst_pad_query (peer, query);
gst_object_unref (peer);
} else {
/* no peer, we don't know */
res = FALSE;
}
res = gst_pad_peer_query (demux->sinkpad, query);
break;
}
}
beach:
gst_object_unref (demux);
return res;
}

View file

@ -98,7 +98,8 @@ static GstFlowReturn gst_goom_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_goom_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_goom_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_goom_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_goom_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
#define gst_goom_parent_class parent_class
G_DEFINE_TYPE (GstGoom, gst_goom, GST_TYPE_ELEMENT);
@ -400,12 +401,12 @@ gst_goom_sink_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_goom_src_query (GstPad * pad, GstQuery * query)
gst_goom_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
GstGoom *goom;
goom = GST_GOOM (GST_PAD_PARENT (pad));
goom = GST_GOOM (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_LATENCY:
@ -450,7 +451,7 @@ gst_goom_src_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}

View file

@ -695,10 +695,11 @@ gst_qtdemux_get_duration (GstQTDemux * qtdemux, gint64 * duration)
}
static gboolean
gst_qtdemux_handle_src_query (GstPad * pad, GstQuery * query)
gst_qtdemux_handle_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
gboolean res = FALSE;
GstQTDemux *qtdemux = GST_QTDEMUX (gst_pad_get_parent (pad));
GstQTDemux *qtdemux = GST_QTDEMUX (parent);
GST_LOG_OBJECT (pad, "%s query", GST_QUERY_TYPE_NAME (query));
@ -771,12 +772,10 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (qtdemux);
return res;
}

View file

@ -208,7 +208,7 @@ gst_alaw_dec_getcaps (GstPad * pad, GstCaps * filter)
}
static gboolean
gst_alaw_dec_query (GstPad * pad, GstQuery * query)
gst_alaw_dec_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
@ -226,7 +226,7 @@ gst_alaw_dec_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;

View file

@ -360,7 +360,7 @@ gst_alaw_enc_getcaps (GstPad * pad, GstCaps * filter)
}
static gboolean
gst_alaw_enc_query (GstPad * pad, GstQuery * query)
gst_alaw_enc_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
@ -378,7 +378,7 @@ gst_alaw_enc_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;

View file

@ -147,7 +147,7 @@ mulawdec_getcaps (GstPad * pad, GstCaps * filter)
}
static gboolean
gst_mulawdec_query (GstPad * pad, GstQuery * query)
gst_mulawdec_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
@ -165,7 +165,7 @@ gst_mulawdec_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;

View file

@ -114,7 +114,7 @@ mulawenc_getcaps (GstPad * pad, GstCaps * filter)
}
static gboolean
gst_mulawenc_query (GstPad * pad, GstQuery * query)
gst_mulawenc_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
@ -132,7 +132,7 @@ gst_mulawenc_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;

View file

@ -253,7 +253,7 @@ static GstFlowReturn gst_rtp_jitter_buffer_chain_rtcp (GstPad * pad,
GstBuffer * buffer);
static gboolean gst_rtp_jitter_buffer_sink_query (GstPad * pad,
GstQuery * query);
GstObject * parent, GstQuery * query);
/* srcpad overrides */
static gboolean gst_rtp_jitter_buffer_src_event (GstPad * pad,
@ -262,7 +262,7 @@ static gboolean
gst_rtp_jitter_buffer_src_activate_push (GstPad * pad, gboolean active);
static void gst_rtp_jitter_buffer_loop (GstRtpJitterBuffer * jitterbuffer);
static gboolean gst_rtp_jitter_buffer_src_query (GstPad * pad,
GstQuery * query);
GstObject * parent, GstQuery * query);
static void
gst_rtp_jitter_buffer_clear_pt_map (GstRtpJitterBuffer * jitterbuffer);
@ -2087,15 +2087,11 @@ ignore_buffer:
}
static gboolean
gst_rtp_jitter_buffer_sink_query (GstPad * pad, GstQuery * query)
gst_rtp_jitter_buffer_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstRtpJitterBuffer *jitterbuffer;
gboolean res = FALSE;
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
if (G_UNLIKELY (jitterbuffer == NULL))
return FALSE;
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_CAPS:
{
@ -2109,25 +2105,22 @@ gst_rtp_jitter_buffer_sink_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (jitterbuffer);
return res;
}
static gboolean
gst_rtp_jitter_buffer_src_query (GstPad * pad, GstQuery * query)
gst_rtp_jitter_buffer_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstRtpJitterBuffer *jitterbuffer;
GstRtpJitterBufferPrivate *priv;
gboolean res = FALSE;
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
if (G_UNLIKELY (jitterbuffer == NULL))
return FALSE;
jitterbuffer = GST_RTP_JITTER_BUFFER (parent);
priv = jitterbuffer->priv;
switch (GST_QUERY_TYPE (query)) {
@ -2174,7 +2167,7 @@ gst_rtp_jitter_buffer_src_query (GstPad * pad, GstQuery * query)
gst_query_parse_position (query, &fmt, NULL);
if (fmt != GST_FORMAT_TIME) {
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
@ -2192,7 +2185,7 @@ gst_rtp_jitter_buffer_src_query (GstPad * pad, GstQuery * query)
gst_query_set_position (query, GST_FORMAT_TIME, start + last_out);
res = TRUE;
} else {
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
}
break;
}
@ -2208,12 +2201,10 @@ gst_rtp_jitter_buffer_src_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (jitterbuffer);
return res;
}

View file

@ -1598,12 +1598,13 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstBuffer * buffer)
}
static gboolean
gst_rtp_session_query_send_rtcp_src (GstPad * pad, GstQuery * query)
gst_rtp_session_query_send_rtcp_src (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstRtpSession *rtpsession;
gboolean ret = FALSE;
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
rtpsession = GST_RTP_SESSION (parent);
GST_DEBUG_OBJECT (rtpsession, "received QUERY");
@ -1618,8 +1619,6 @@ gst_rtp_session_query_send_rtcp_src (GstPad * pad, GstQuery * query)
break;
}
gst_object_unref (rtpsession);
return ret;
}
@ -1769,7 +1768,8 @@ gst_rtp_session_getcaps_send_rtp (GstPad * pad, GstCaps * filter)
}
static gboolean
gst_rtp_session_query_send_rtp (GstPad * pad, GstQuery * query)
gst_rtp_session_query_send_rtp (GstPad * pad, GstObject * parent,
GstQuery * query)
{
gboolean res = FALSE;
@ -1786,7 +1786,7 @@ gst_rtp_session_query_send_rtp (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}

View file

@ -124,7 +124,8 @@ static GstIterator *gst_rtp_ssrc_demux_iterate_internal_links_sink (GstPad *
static gboolean gst_rtp_ssrc_demux_src_event (GstPad * pad, GstEvent * event);
static GstIterator *gst_rtp_ssrc_demux_iterate_internal_links_src (GstPad *
pad);
static gboolean gst_rtp_ssrc_demux_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_rtp_ssrc_demux_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static guint gst_rtp_ssrc_demux_signals[LAST_SIGNAL] = { 0 };
@ -760,14 +761,13 @@ gst_rtp_ssrc_demux_iterate_internal_links_sink (GstPad * pad)
static gboolean
gst_rtp_ssrc_demux_src_query (GstPad * pad, GstQuery * query)
gst_rtp_ssrc_demux_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstRtpSsrcDemux *demux;
gboolean res = FALSE;
demux = GST_RTP_SSRC_DEMUX (gst_pad_get_parent (pad));
if (G_UNLIKELY (demux == NULL))
return FALSE;
demux = GST_RTP_SSRC_DEMUX (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_LATENCY:
@ -792,10 +792,9 @@ gst_rtp_ssrc_demux_src_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (demux);
return res;
}

View file

@ -433,7 +433,7 @@ gst_rtp_dec_finalize (GObject * object)
}
static gboolean
gst_rtp_dec_query_src (GstPad * pad, GstQuery * query)
gst_rtp_dec_query_src (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
@ -446,7 +446,7 @@ gst_rtp_dec_query_src (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
return res;

View file

@ -1994,7 +1994,8 @@ gst_rtspsrc_handle_internal_src_event (GstPad * pad, GstEvent * event)
/* this is the final query function we receive on the internal source pad when
* we deal with TCP connections */
static gboolean
gst_rtspsrc_handle_internal_src_query (GstPad * pad, GstQuery * query)
gst_rtspsrc_handle_internal_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstRTSPSrc *src;
gboolean res = TRUE;
@ -2042,12 +2043,13 @@ gst_rtspsrc_handle_internal_src_query (GstPad * pad, GstQuery * query)
/* this query is executed on the ghost source pad exposed on rtspsrc. */
static gboolean
gst_rtspsrc_handle_src_query (GstPad * pad, GstQuery * query)
gst_rtspsrc_handle_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstRTSPSrc *src;
gboolean res = FALSE;
src = GST_RTSPSRC_CAST (gst_pad_get_parent (pad));
src = GST_RTSPSRC_CAST (parent);
GST_DEBUG_OBJECT (src, "pad %s:%s received query %s",
GST_DEBUG_PAD_NAME (pad), GST_QUERY_TYPE_NAME (query));
@ -2101,7 +2103,6 @@ gst_rtspsrc_handle_src_query (GstPad * pad, GstQuery * query)
break;
}
}
gst_object_unref (src);
return res;
}

View file

@ -73,7 +73,7 @@ static gboolean gst_shape_wipe_video_sink_setcaps (GstShapeWipe * self,
static GstCaps *gst_shape_wipe_video_sink_getcaps (GstPad * pad,
GstCaps * filter);
static gboolean gst_shape_wipe_video_sink_query (GstPad * pad,
GstQuery * query);
GstObject * parent, GstQuery * query);
static GstFlowReturn gst_shape_wipe_mask_sink_chain (GstPad * pad,
GstBuffer * buffer);
static gboolean gst_shape_wipe_mask_sink_event (GstPad * pad, GstEvent * event);
@ -81,10 +81,12 @@ static gboolean gst_shape_wipe_mask_sink_setcaps (GstShapeWipe * self,
GstCaps * caps);
static GstCaps *gst_shape_wipe_mask_sink_getcaps (GstPad * pad,
GstCaps * filter);
static gboolean gst_shape_wipe_mask_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_shape_wipe_mask_sink_query (GstPad * pad,
GstObject * parent, GstQuery * query);
static gboolean gst_shape_wipe_src_event (GstPad * pad, GstEvent * event);
static GstCaps *gst_shape_wipe_src_getcaps (GstPad * pad, GstCaps * filter);
static gboolean gst_shape_wipe_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_shape_wipe_src_query (GstPad * pad, GstObject * parent,
GstQuery * query);
enum
{
@ -625,9 +627,10 @@ done:
}
static gboolean
gst_shape_wipe_video_sink_query (GstPad * pad, GstQuery * query)
gst_shape_wipe_video_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstShapeWipe *self = GST_SHAPE_WIPE (gst_pad_get_parent (pad));
GstShapeWipe *self = GST_SHAPE_WIPE (parent);
gboolean ret;
GST_LOG_OBJECT (pad, "Handling query of type '%s'",
@ -650,14 +653,13 @@ gst_shape_wipe_video_sink_query (GstPad * pad, GstQuery * query)
break;
}
gst_object_unref (self);
return ret;
}
static gboolean
gst_shape_wipe_src_query (GstPad * pad, GstQuery * query)
gst_shape_wipe_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstShapeWipe *self = GST_SHAPE_WIPE (gst_pad_get_parent (pad));
GstShapeWipe *self = GST_SHAPE_WIPE (parent);
gboolean ret;
GST_LOG_OBJECT (pad, "Handling query of type '%s'",
@ -680,7 +682,6 @@ gst_shape_wipe_src_query (GstPad * pad, GstQuery * query)
break;
}
gst_object_unref (self);
return ret;
}
@ -1077,9 +1078,9 @@ gst_shape_wipe_mask_sink_event (GstPad * pad, GstEvent * event)
}
static gboolean
gst_shape_wipe_mask_sink_query (GstPad * pad, GstQuery * query)
gst_shape_wipe_mask_sink_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
GstShapeWipe *self = GST_SHAPE_WIPE (gst_pad_get_parent (pad));
gboolean ret;
GST_LOG_OBJECT (pad, "Handling query of type '%s'",
@ -1098,11 +1099,10 @@ gst_shape_wipe_mask_sink_query (GstPad * pad, GstQuery * query)
break;
}
default:
ret = gst_pad_query_default (pad, query);
ret = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (self);
return ret;
}

View file

@ -81,7 +81,7 @@ static void gst_aspect_ratio_crop_set_cropping (GstAspectRatioCrop *
aspect_ratio_crop, gint top, gint right, gint bottom, gint left);
static GstCaps *gst_aspect_ratio_crop_get_caps (GstPad * pad, GstCaps * filter);
static gboolean gst_aspect_ratio_crop_src_query (GstPad * pad,
GstQuery * query);
GstObject * parent, GstQuery * query);
static gboolean gst_aspect_ratio_crop_set_caps (GstAspectRatioCrop *
aspect_ratio_crop, GstCaps * caps);
static gboolean gst_aspect_ratio_crop_sink_event (GstPad * pad, GstEvent * evt);
@ -419,7 +419,8 @@ gst_aspect_ratio_crop_get_caps (GstPad * pad, GstCaps * filter)
}
static gboolean
gst_aspect_ratio_crop_src_query (GstPad * pad, GstQuery * query)
gst_aspect_ratio_crop_src_query (GstPad * pad, GstObject * parent,
GstQuery * query)
{
gboolean res = FALSE;
@ -436,7 +437,7 @@ gst_aspect_ratio_crop_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;

View file

@ -71,9 +71,9 @@ static gboolean gst_wavparse_send_event (GstElement * element,
static GstStateChangeReturn gst_wavparse_change_state (GstElement * element,
GstStateChange transition);
static gboolean gst_wavparse_pad_query (GstPad * pad, GstQuery * query);
static gboolean gst_wavparse_pad_convert (GstPad * pad,
GstFormat src_format,
static gboolean gst_wavparse_pad_query (GstPad * pad, GstObject * parent,
GstQuery * query);
static gboolean gst_wavparse_pad_convert (GstPad * pad, GstFormat src_format,
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
static GstFlowReturn gst_wavparse_chain (GstPad * pad, GstBuffer * buf);
@ -2402,14 +2402,13 @@ no_bps_fact:
/* handle queries for location and length in requested format */
static gboolean
gst_wavparse_pad_query (GstPad * pad, GstQuery * query)
gst_wavparse_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = TRUE;
GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (pad));
GstWavParse *wav = GST_WAVPARSE (parent);
/* only if we know */
if (wav->state != GST_WAVPARSE_DATA) {
gst_object_unref (wav);
return FALSE;
}
@ -2505,10 +2504,9 @@ gst_wavparse_pad_query (GstPad * pad, GstQuery * query)
break;
}
default:
res = gst_pad_query_default (pad, query);
res = gst_pad_query_default (pad, parent, query);
break;
}
gst_object_unref (wav);
return res;
}