mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
add parent to query function
This commit is contained in:
parent
94ac7e858f
commit
2202511e77
21 changed files with 158 additions and 197 deletions
|
@ -133,7 +133,8 @@ static GstFlowReturn gst_visual_chain (GstPad * pad, GstBuffer * buffer);
|
|||
static gboolean gst_visual_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_visual_src_event (GstPad * pad, GstEvent * event);
|
||||
|
||||
static gboolean gst_visual_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_visual_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
static gboolean gst_visual_sink_setcaps (GstPad * pad, GstCaps * caps);
|
||||
static GstCaps *gst_visual_getcaps (GstPad * pad, GstCaps * filter);
|
||||
|
@ -593,12 +594,12 @@ gst_visual_src_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_visual_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_visual_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gboolean res;
|
||||
GstVisual *visual;
|
||||
|
||||
visual = GST_VISUAL (GST_PAD_PARENT (pad));
|
||||
visual = GST_VISUAL (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_LATENCY:
|
||||
|
@ -651,7 +652,7 @@ gst_visual_src_query (GstPad * pad, GstQuery * query)
|
|||
res = TRUE;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -896,8 +897,8 @@ gst_visual_change_state (GstElement * element, GstStateChange transition)
|
|||
switch (transition) {
|
||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
visual->actor =
|
||||
visual_actor_new (GST_VISUAL_GET_CLASS (visual)->plugin->info->
|
||||
plugname);
|
||||
visual_actor_new (GST_VISUAL_GET_CLASS (visual)->plugin->
|
||||
info->plugname);
|
||||
visual->video = visual_video_new ();
|
||||
visual->audio = visual_audio_new ();
|
||||
/* can't have a play without actors */
|
||||
|
|
|
@ -131,7 +131,8 @@ static gboolean gst_ogg_demux_receive_event (GstElement * element,
|
|||
static void gst_ogg_pad_dispose (GObject * object);
|
||||
static void gst_ogg_pad_finalize (GObject * object);
|
||||
|
||||
static gboolean gst_ogg_pad_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_ogg_pad_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_ogg_pad_event (GstPad * pad, GstEvent * event);
|
||||
static GstOggPad *gst_ogg_chain_get_stream (GstOggChain * chain,
|
||||
guint32 serialno);
|
||||
|
@ -239,12 +240,12 @@ gst_ogg_pad_finalize (GObject * object)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_ogg_pad_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstOggDemux *ogg;
|
||||
|
||||
ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad));
|
||||
ogg = GST_OGG_DEMUX (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_DURATION:
|
||||
|
@ -336,11 +337,10 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
|
|||
}
|
||||
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (ogg);
|
||||
|
||||
return res;
|
||||
|
||||
|
|
|
@ -152,7 +152,8 @@ static void gst_ogm_audio_parse_init (GstOgmParse * ogm);
|
|||
static void gst_ogm_text_parse_init (GstOgmParse * ogm);
|
||||
|
||||
static gboolean gst_ogm_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_ogm_parse_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_ogm_parse_sink_convert (GstPad * pad, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||
|
||||
|
@ -454,9 +455,9 @@ gst_ogm_parse_sink_convert (GstPad * pad,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_ogm_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstOgmParse *ogm = GST_OGM_PARSE (gst_pad_get_parent (pad));
|
||||
GstOgmParse *ogm = GST_OGM_PARSE (parent);
|
||||
GstFormat format;
|
||||
gboolean res = FALSE;
|
||||
|
||||
|
@ -491,11 +492,10 @@ gst_ogm_parse_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 (ogm);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -315,12 +315,12 @@ static gboolean gst_base_text_overlay_setcaps_txt (GstBaseTextOverlay * overlay,
|
|||
static gboolean gst_base_text_overlay_src_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
static gboolean gst_base_text_overlay_src_query (GstPad * pad,
|
||||
GstQuery * query);
|
||||
GstObject * parent, GstQuery * query);
|
||||
|
||||
static gboolean gst_base_text_overlay_video_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
static gboolean gst_base_text_overlay_video_query (GstPad * pad,
|
||||
GstQuery * query);
|
||||
GstObject * parent, GstQuery * query);
|
||||
static GstFlowReturn gst_base_text_overlay_video_chain (GstPad * pad,
|
||||
GstBuffer * buffer);
|
||||
|
||||
|
@ -993,14 +993,13 @@ gst_base_text_overlay_get_property (GObject * object, guint prop_id,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_text_overlay_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_base_text_overlay_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstBaseTextOverlay *overlay = NULL;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (!overlay))
|
||||
return FALSE;
|
||||
overlay = GST_BASE_TEXT_OVERLAY (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CAPS:
|
||||
|
@ -1019,8 +1018,6 @@ gst_base_text_overlay_src_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (overlay);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2326,15 +2323,10 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_text_overlay_video_query (GstPad * pad, GstQuery * query)
|
||||
gst_base_text_overlay_video_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstBaseTextOverlay *overlay = NULL;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (!overlay)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CAPS:
|
||||
|
@ -2349,12 +2341,10 @@ gst_base_text_overlay_video_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 (overlay);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,10 +97,10 @@ static GstFlowReturn theora_dec_chain (GstPad * pad, GstBuffer * buffer);
|
|||
static GstStateChangeReturn theora_dec_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean theora_dec_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean theora_dec_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean theora_dec_src_convert (GstPad * pad,
|
||||
GstFormat src_format, gint64 src_value,
|
||||
GstFormat * dest_format, gint64 * dest_value);
|
||||
static gboolean theora_dec_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean theora_dec_src_convert (GstPad * pad, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||
|
||||
#if 0
|
||||
static const GstFormat *theora_get_formats (GstPad * pad);
|
||||
|
@ -432,13 +432,12 @@ no_header:
|
|||
#endif
|
||||
|
||||
static gboolean
|
||||
theora_dec_src_query (GstPad * pad, GstQuery * query)
|
||||
theora_dec_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstTheoraDec *dec;
|
||||
|
||||
gboolean res = FALSE;
|
||||
|
||||
dec = GST_THEORA_DEC (gst_pad_get_parent (pad));
|
||||
dec = GST_THEORA_DEC (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
|
@ -492,11 +491,10 @@ theora_dec_src_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (dec);
|
||||
|
||||
return res;
|
||||
|
||||
|
|
|
@ -253,7 +253,8 @@ static gboolean theora_enc_src_event (GstPad * pad, GstEvent * event);
|
|||
static GstFlowReturn theora_enc_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstStateChangeReturn theora_enc_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean theora_enc_sink_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean theora_enc_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean theora_enc_sink_setcaps (GstTheoraEnc * enc, GstCaps * caps);
|
||||
static void theora_enc_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
|
@ -656,7 +657,7 @@ theora_enc_sink_getcaps (GstPad * pad, GstCaps * filter)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_enc_sink_query (GstPad * pad, GstQuery * query)
|
||||
theora_enc_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
|
||||
|
@ -673,7 +674,7 @@ theora_enc_sink_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,8 @@ static GstFlowReturn theora_parse_chain (GstPad * pad, GstBuffer * buffer);
|
|||
static GstStateChangeReturn theora_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean theora_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean theora_parse_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean theora_parse_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
static void
|
||||
gst_theora_parse_class_init (GstTheoraParseClass * klass)
|
||||
|
@ -801,13 +802,12 @@ no_header:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_parse_src_query (GstPad * pad, GstQuery * query)
|
||||
theora_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstTheoraParse *parse;
|
||||
|
||||
gboolean res = FALSE;
|
||||
|
||||
parse = GST_THEORA_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_THEORA_PARSE (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
|
@ -872,11 +872,10 @@ theora_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;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (parse);
|
||||
|
||||
return res;
|
||||
|
||||
|
|
|
@ -79,10 +79,10 @@ static GstFlowReturn vorbis_parse_chain (GstPad * pad, GstBuffer * buffer);
|
|||
static GstStateChangeReturn vorbis_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean vorbis_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean vorbis_parse_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean vorbis_parse_convert (GstPad * pad,
|
||||
GstFormat src_format, gint64 src_value,
|
||||
GstFormat * dest_format, gint64 * dest_value);
|
||||
static gboolean vorbis_parse_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean vorbis_parse_convert (GstPad * pad, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||
static GstFlowReturn vorbis_parse_parse_packet (GstVorbisParse * parse,
|
||||
GstBuffer * buf);
|
||||
|
||||
|
@ -545,13 +545,13 @@ vorbis_parse_convert (GstPad * pad,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
vorbis_parse_src_query (GstPad * pad, GstQuery * query)
|
||||
vorbis_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gint64 granulepos;
|
||||
GstVorbisParse *parse;
|
||||
gboolean res = FALSE;
|
||||
|
||||
parse = GST_VORBIS_PARSE (GST_PAD_PARENT (pad));
|
||||
parse = GST_VORBIS_PARSE (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
|
@ -590,7 +590,7 @@ vorbis_parse_src_query (GstPad * pad, GstQuery * query)
|
|||
parse->sinkpad);
|
||||
goto error;
|
||||
}
|
||||
if (!(res = gst_pad_query (GST_PAD_PEER (parse->sinkpad), query)))
|
||||
if (!(res = gst_pad_peer_query (parse->sinkpad, query)))
|
||||
goto error;
|
||||
break;
|
||||
}
|
||||
|
@ -608,7 +608,7 @@ vorbis_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;
|
||||
|
|
|
@ -282,8 +282,10 @@ static gboolean gst_audio_decoder_sink_setcaps (GstAudioDecoder * dec,
|
|||
GstCaps * caps);
|
||||
gboolean gst_audio_decoder_src_setcaps (GstAudioDecoder * dec, GstCaps * caps);
|
||||
static GstFlowReturn gst_audio_decoder_chain (GstPad * pad, GstBuffer * buf);
|
||||
static gboolean gst_audio_decoder_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_audio_decoder_sink_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_audio_decoder_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static void gst_audio_decoder_reset (GstAudioDecoder * dec, gboolean full);
|
||||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
|
@ -1730,12 +1732,13 @@ exit:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_decoder_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
gboolean res = FALSE;
|
||||
GstAudioDecoder *dec;
|
||||
|
||||
dec = GST_AUDIO_DECODER (gst_pad_get_parent (pad));
|
||||
dec = GST_AUDIO_DECODER (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_FORMATS:
|
||||
|
@ -1758,12 +1761,11 @@ gst_audio_decoder_sink_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
error:
|
||||
gst_object_unref (dec);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1772,17 +1774,12 @@ error:
|
|||
* segment stuff etc at all
|
||||
* Supposedly that's backward compatibility ... */
|
||||
static gboolean
|
||||
gst_audio_decoder_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_audio_decoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstAudioDecoder *dec;
|
||||
GstPad *peerpad;
|
||||
gboolean res = FALSE;
|
||||
|
||||
dec = GST_AUDIO_DECODER (GST_PAD_PARENT (pad));
|
||||
if (G_UNLIKELY (dec == NULL))
|
||||
return FALSE;
|
||||
|
||||
peerpad = gst_pad_get_peer (GST_PAD (dec->sinkpad));
|
||||
dec = GST_AUDIO_DECODER (parent);
|
||||
|
||||
GST_LOG_OBJECT (dec, "handling query: %" GST_PTR_FORMAT, query);
|
||||
|
||||
|
@ -1792,7 +1789,7 @@ gst_audio_decoder_src_query (GstPad * pad, GstQuery * query)
|
|||
GstFormat format;
|
||||
|
||||
/* upstream in any case */
|
||||
if ((res = gst_pad_query_default (pad, query)))
|
||||
if ((res = gst_pad_query_default (pad, parent, query)))
|
||||
break;
|
||||
|
||||
gst_query_parse_duration (query, &format, NULL);
|
||||
|
@ -1886,11 +1883,10 @@ gst_audio_decoder_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 (peerpad);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -303,8 +303,10 @@ static gboolean gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event);
|
|||
static gboolean gst_audio_encoder_sink_setcaps (GstAudioEncoder * enc,
|
||||
GstCaps * caps);
|
||||
static GstFlowReturn gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_audio_encoder_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_audio_encoder_sink_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_audio_encoder_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_audio_encoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
static void
|
||||
gst_audio_encoder_class_init (GstAudioEncoderClass * klass)
|
||||
|
@ -1361,12 +1363,13 @@ gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_encoder_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_audio_encoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
GstAudioEncoder *enc;
|
||||
|
||||
enc = GST_AUDIO_ENCODER (gst_pad_get_parent (pad));
|
||||
enc = GST_AUDIO_ENCODER (parent);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_FORMATS:
|
||||
|
@ -1406,13 +1409,11 @@ gst_audio_encoder_sink_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
error:
|
||||
gst_object_unref (enc);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1494,17 +1495,12 @@ exit:
|
|||
* segment stuff etc at all
|
||||
* Supposedly that's backward compatibility ... */
|
||||
static gboolean
|
||||
gst_audio_encoder_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_audio_encoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstAudioEncoder *enc;
|
||||
GstPad *peerpad;
|
||||
gboolean res = FALSE;
|
||||
|
||||
enc = GST_AUDIO_ENCODER (GST_PAD_PARENT (pad));
|
||||
if (G_UNLIKELY (enc == NULL))
|
||||
return FALSE;
|
||||
|
||||
peerpad = gst_pad_get_peer (GST_PAD (enc->sinkpad));
|
||||
enc = GST_AUDIO_ENCODER (parent);
|
||||
|
||||
GST_LOG_OBJECT (enc, "handling query: %" GST_PTR_FORMAT, query);
|
||||
|
||||
|
@ -1519,17 +1515,14 @@ gst_audio_encoder_src_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!peerpad) {
|
||||
GST_LOG_OBJECT (enc, "no peer");
|
||||
break;
|
||||
}
|
||||
|
||||
gst_query_parse_position (query, &req_fmt, NULL);
|
||||
fmt = GST_FORMAT_TIME;
|
||||
if (!(res = gst_pad_query_position (peerpad, fmt, &pos)))
|
||||
if (!(res = gst_pad_peer_query_position (enc->sinkpad, fmt, &pos)))
|
||||
break;
|
||||
|
||||
if ((res = gst_pad_query_convert (peerpad, fmt, pos, req_fmt, &val))) {
|
||||
if ((res =
|
||||
gst_pad_peer_query_convert (enc->sinkpad, fmt, pos, req_fmt,
|
||||
&val))) {
|
||||
gst_query_set_position (query, req_fmt, val);
|
||||
}
|
||||
break;
|
||||
|
@ -1544,17 +1537,14 @@ gst_audio_encoder_src_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!peerpad) {
|
||||
GST_LOG_OBJECT (enc, "no peer");
|
||||
break;
|
||||
}
|
||||
|
||||
gst_query_parse_duration (query, &req_fmt, NULL);
|
||||
fmt = GST_FORMAT_TIME;
|
||||
if (!(res = gst_pad_query_duration (peerpad, fmt, &dur)))
|
||||
if (!(res = gst_pad_peer_query_duration (enc->sinkpad, fmt, &dur)))
|
||||
break;
|
||||
|
||||
if ((res = gst_pad_query_convert (peerpad, fmt, dur, req_fmt, &val))) {
|
||||
if ((res =
|
||||
gst_pad_peer_query_convert (enc->sinkpad, fmt, dur, req_fmt,
|
||||
&val))) {
|
||||
gst_query_set_duration (query, req_fmt, val);
|
||||
}
|
||||
break;
|
||||
|
@ -1602,11 +1592,10 @@ gst_audio_encoder_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 (peerpad);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,8 @@ static gboolean gst_rtp_base_payload_sink_event (GstPad * pad,
|
|||
GstEvent * event);
|
||||
static gboolean gst_rtp_base_payload_query_default (GstRTPBasePayload *
|
||||
rtpbasepayload, GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_rtp_base_payload_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_rtp_base_payload_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static GstFlowReturn gst_rtp_base_payload_chain (GstPad * pad,
|
||||
GstBuffer * buffer);
|
||||
|
||||
|
@ -439,31 +440,26 @@ gst_rtp_base_payload_query_default (GstRTPBasePayload * rtpbasepayload,
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res =
|
||||
gst_pad_query_default (pad, GST_OBJECT_CAST (rtpbasepayload), query);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_base_payload_query (GstPad * pad, GstQuery * query)
|
||||
gst_rtp_base_payload_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstRTPBasePayload *rtpbasepayload;
|
||||
GstRTPBasePayloadClass *rtpbasepayload_class;
|
||||
gboolean res = FALSE;
|
||||
|
||||
rtpbasepayload = GST_RTP_BASE_PAYLOAD (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (rtpbasepayload == NULL)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rtpbasepayload = GST_RTP_BASE_PAYLOAD (parent);
|
||||
rtpbasepayload_class = GST_RTP_BASE_PAYLOAD_GET_CLASS (rtpbasepayload);
|
||||
|
||||
if (rtpbasepayload_class->query)
|
||||
res = rtpbasepayload_class->query (rtpbasepayload, pad, query);
|
||||
|
||||
gst_object_unref (rtpbasepayload);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -862,8 +858,8 @@ gst_rtp_base_payload_prepare_push (GstRTPBasePayload * payload,
|
|||
(is_list) ? -1 : gst_buffer_get_size (GST_BUFFER (obj)),
|
||||
payload->seqnum, data.rtptime, GST_TIME_ARGS (data.timestamp));
|
||||
|
||||
if (g_atomic_int_compare_and_exchange (&payload->
|
||||
priv->notified_first_timestamp, 1, 0)) {
|
||||
if (g_atomic_int_compare_and_exchange (&payload->priv->
|
||||
notified_first_timestamp, 1, 0)) {
|
||||
g_object_notify (G_OBJECT (payload), "timestamp");
|
||||
g_object_notify (G_OBJECT (payload), "seqnum");
|
||||
}
|
||||
|
|
|
@ -151,7 +151,8 @@ static gboolean gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event);
|
|||
static gboolean gst_tag_demux_sink_activate (GstPad * sinkpad);
|
||||
static GstStateChangeReturn gst_tag_demux_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean gst_tag_demux_pad_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_tag_demux_pad_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux);
|
||||
static void gst_tag_demux_send_pending_events (GstTagDemux * tagdemux);
|
||||
static void gst_tag_demux_send_tag_event (GstTagDemux * tagdemux);
|
||||
|
@ -1322,26 +1323,17 @@ gst_tag_demux_change_state (GstElement * element, GstStateChange transition)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_tag_demux_pad_query (GstPad * pad, GstQuery * query)
|
||||
gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
/* For a position or duration query, adjust the returned
|
||||
* bytes to strip off the end and start areas */
|
||||
|
||||
GstTagDemux *demux = GST_TAG_DEMUX (GST_PAD_PARENT (pad));
|
||||
GstPad *peer = NULL;
|
||||
GstTagDemux *demux = GST_TAG_DEMUX (parent);
|
||||
GstFormat format;
|
||||
gint64 result;
|
||||
|
||||
if ((peer = gst_pad_get_peer (demux->priv->sinkpad)) == NULL)
|
||||
if (!gst_pad_peer_query (demux->priv->sinkpad, query))
|
||||
return FALSE;
|
||||
|
||||
if (!gst_pad_query (peer, query)) {
|
||||
gst_object_unref (peer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gst_object_unref (peer);
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
{
|
||||
|
|
|
@ -106,8 +106,10 @@ static void gst_adder_get_property (GObject * object, guint prop_id,
|
|||
|
||||
static gboolean gst_adder_setcaps (GstAdder * adder, GstPad * pad,
|
||||
GstCaps * caps);
|
||||
static gboolean gst_adder_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_adder_sink_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_adder_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_adder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_adder_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_adder_sink_event (GstPad * pad, GstEvent * event);
|
||||
|
||||
|
@ -209,7 +211,7 @@ gst_adder_sink_getcaps (GstPad * pad, GstCaps * filter)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_adder_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_adder_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
|
||||
|
@ -226,7 +228,7 @@ gst_adder_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;
|
||||
|
@ -498,9 +500,9 @@ gst_adder_query_latency (GstAdder * adder, GstQuery * query)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_adder_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_adder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstAdder *adder = GST_ADDER (gst_pad_get_parent (pad));
|
||||
GstAdder *adder = GST_ADDER (parent);
|
||||
gboolean res = FALSE;
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
|
@ -534,11 +536,10 @@ gst_adder_src_query (GstPad * pad, GstQuery * query)
|
|||
default:
|
||||
/* FIXME, needs a custom query handler because we have multiple
|
||||
* sinkpads */
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (adder);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,8 @@ static gboolean gst_audio_resample_sink_event (GstBaseTransform * base,
|
|||
GstEvent * event);
|
||||
static gboolean gst_audio_resample_start (GstBaseTransform * base);
|
||||
static gboolean gst_audio_resample_stop (GstBaseTransform * base);
|
||||
static gboolean gst_audio_resample_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_audio_resample_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
#define gst_audio_resample_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstAudioResample, gst_audio_resample, GST_TYPE_BASE_TRANSFORM);
|
||||
|
@ -1189,13 +1190,11 @@ gst_audio_resample_transform (GstBaseTransform * base, GstBuffer * inbuf,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_resample_query (GstPad * pad, GstQuery * query)
|
||||
gst_audio_resample_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstAudioResample *resample = GST_AUDIO_RESAMPLE (gst_pad_get_parent (pad));
|
||||
GstAudioResample *resample = GST_AUDIO_RESAMPLE (parent);
|
||||
GstBaseTransform *trans;
|
||||
gboolean res = TRUE;
|
||||
if (G_UNLIKELY (resample == NULL))
|
||||
return FALSE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (resample);
|
||||
|
||||
|
@ -1205,7 +1204,6 @@ gst_audio_resample_query (GstPad * pad, GstQuery * query)
|
|||
GstClockTime min, max;
|
||||
gboolean live;
|
||||
guint64 latency;
|
||||
GstPad *peer;
|
||||
gint rate = resample->inrate;
|
||||
gint resampler_latency;
|
||||
|
||||
|
@ -1218,43 +1216,41 @@ gst_audio_resample_query (GstPad * pad, GstQuery * query)
|
|||
if (gst_base_transform_is_passthrough (trans))
|
||||
resampler_latency = 0;
|
||||
|
||||
if ((peer = gst_pad_get_peer (GST_BASE_TRANSFORM_SINK_PAD (trans)))) {
|
||||
if ((res = gst_pad_query (peer, query))) {
|
||||
gst_query_parse_latency (query, &live, &min, &max);
|
||||
if ((res =
|
||||
gst_pad_peer_query (GST_BASE_TRANSFORM_SINK_PAD (trans),
|
||||
query))) {
|
||||
gst_query_parse_latency (query, &live, &min, &max);
|
||||
|
||||
GST_DEBUG_OBJECT (resample, "Peer latency: min %"
|
||||
GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (min), GST_TIME_ARGS (max));
|
||||
GST_DEBUG_OBJECT (resample, "Peer latency: min %"
|
||||
GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (min), GST_TIME_ARGS (max));
|
||||
|
||||
/* add our own latency */
|
||||
if (rate != 0 && resampler_latency != 0)
|
||||
latency = gst_util_uint64_scale_round (resampler_latency,
|
||||
GST_SECOND, rate);
|
||||
else
|
||||
latency = 0;
|
||||
/* add our own latency */
|
||||
if (rate != 0 && resampler_latency != 0)
|
||||
latency = gst_util_uint64_scale_round (resampler_latency,
|
||||
GST_SECOND, rate);
|
||||
else
|
||||
latency = 0;
|
||||
|
||||
GST_DEBUG_OBJECT (resample, "Our latency: %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (latency));
|
||||
GST_DEBUG_OBJECT (resample, "Our latency: %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (latency));
|
||||
|
||||
min += latency;
|
||||
if (GST_CLOCK_TIME_IS_VALID (max))
|
||||
max += latency;
|
||||
min += latency;
|
||||
if (GST_CLOCK_TIME_IS_VALID (max))
|
||||
max += latency;
|
||||
|
||||
GST_DEBUG_OBJECT (resample, "Calculated total latency : min %"
|
||||
GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (min), GST_TIME_ARGS (max));
|
||||
GST_DEBUG_OBJECT (resample, "Calculated total latency : min %"
|
||||
GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (min), GST_TIME_ARGS (max));
|
||||
|
||||
gst_query_set_latency (query, live, min, max);
|
||||
}
|
||||
gst_object_unref (peer);
|
||||
gst_query_set_latency (query, live, min, max);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
gst_object_unref (resample);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,8 @@ static gboolean setup_recoder_pipeline (GstSmartEncoder * smart_encoder);
|
|||
|
||||
static GstFlowReturn gst_smart_encoder_chain (GstPad * pad, GstBuffer * buf);
|
||||
static gboolean smart_encoder_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean smart_encoder_sink_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean smart_encoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static GstCaps *smart_encoder_sink_getcaps (GstPad * pad, GstCaps * filter);
|
||||
static GstStateChangeReturn
|
||||
gst_smart_encoder_change_state (GstElement * element,
|
||||
|
@ -407,7 +408,7 @@ smart_encoder_sink_getcaps (GstPad * pad, GstCaps * filter)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
smart_encoder_sink_query (GstPad * pad, GstQuery * query)
|
||||
smart_encoder_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
|
@ -424,7 +425,7 @@ smart_encoder_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;
|
||||
|
|
|
@ -132,10 +132,10 @@ gst_stream_combiner_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_combiner_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_stream_combiner_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
GstStreamCombiner *stream_combiner =
|
||||
(GstStreamCombiner *) GST_PAD_PARENT (pad);
|
||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
||||
|
||||
return gst_pad_peer_query (stream_combiner->srcpad, query);
|
||||
}
|
||||
|
@ -162,10 +162,10 @@ gst_stream_combiner_src_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_combiner_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_stream_combiner_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
GstStreamCombiner *stream_combiner =
|
||||
(GstStreamCombiner *) GST_PAD_PARENT (pad);
|
||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
||||
GstPad *sinkpad = NULL;
|
||||
|
||||
STREAMS_LOCK (stream_combiner);
|
||||
|
|
|
@ -303,7 +303,8 @@ beach:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_splitter_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_stream_splitter_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
|
@ -320,7 +321,7 @@ gst_stream_splitter_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;
|
||||
|
@ -392,10 +393,10 @@ gst_stream_splitter_src_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_splitter_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_stream_splitter_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
GstStreamSplitter *stream_splitter =
|
||||
(GstStreamSplitter *) GST_PAD_PARENT (pad);
|
||||
GstStreamSplitter *stream_splitter = (GstStreamSplitter *) parent;
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "%s", GST_QUERY_TYPE_NAME (query));
|
||||
|
||||
|
|
|
@ -407,7 +407,8 @@ gst_play_sink_convert_bin_getcaps (GstPad * pad, GstCaps * filter)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_play_sink_convert_bin_query (GstPad * pad, GstQuery * query)
|
||||
gst_play_sink_convert_bin_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
|
||||
|
@ -424,7 +425,7 @@ gst_play_sink_convert_bin_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;
|
||||
|
|
|
@ -134,7 +134,8 @@ gst_stream_synchronizer_iterate_internal_links (GstPad * pad)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_synchronizer_query (GstPad * pad, GstQuery * query)
|
||||
gst_stream_synchronizer_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
GstPad *opad;
|
||||
gboolean ret = FALSE;
|
||||
|
|
|
@ -2042,9 +2042,9 @@ out:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_subtitle_overlay_subtitle_sink_query (GstPad * pad, GstQuery * query)
|
||||
gst_subtitle_overlay_subtitle_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query)
|
||||
{
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
|
||||
gboolean ret;
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
|
@ -2072,10 +2072,9 @@ gst_subtitle_overlay_subtitle_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;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,8 @@ static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
|
||||
static gboolean gst_sub_parse_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_sub_parse_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_sub_parse_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_sub_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
|
||||
static GstStateChangeReturn gst_sub_parse_change_state (GstElement * element,
|
||||
|
@ -209,9 +210,9 @@ gst_sub_parse_init (GstSubParse * subparse)
|
|||
*/
|
||||
|
||||
static gboolean
|
||||
gst_sub_parse_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_sub_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstSubParse *self = GST_SUBPARSE (gst_pad_get_parent (pad));
|
||||
GstSubParse *self = GST_SUBPARSE (parent);
|
||||
gboolean ret = FALSE;
|
||||
|
||||
GST_DEBUG ("Handling %s query", GST_QUERY_TYPE_NAME (query));
|
||||
|
@ -254,8 +255,6 @@ gst_sub_parse_src_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue