mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
add parent to query function
This commit is contained in:
parent
f65f9938d0
commit
63a890a746
3 changed files with 13 additions and 16 deletions
|
@ -226,7 +226,8 @@ static void gst_ffmpegdec_class_init (GstFFMpegDecClass * klass);
|
|||
static void gst_ffmpegdec_init (GstFFMpegDec * ffmpegdec);
|
||||
static void gst_ffmpegdec_finalize (GObject * object);
|
||||
|
||||
static gboolean gst_ffmpegdec_src_query (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_ffmpegdec_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_ffmpegdec_src_event (GstPad * pad, GstEvent * event);
|
||||
|
||||
static gboolean gst_ffmpegdec_sink_event (GstPad * pad, GstEvent * event);
|
||||
|
@ -467,15 +468,12 @@ gst_ffmpegdec_finalize (GObject * object)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ffmpegdec_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_ffmpegdec_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstFFMpegDec *ffmpegdec;
|
||||
gboolean res;
|
||||
|
||||
ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
|
||||
|
||||
/* just forward to peer */
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
#if 0
|
||||
{
|
||||
GstFormat bfmt;
|
||||
|
@ -494,8 +492,6 @@ gst_ffmpegdec_src_query (GstPad * pad, GstQuery * query)
|
|||
}
|
||||
#endif
|
||||
|
||||
gst_object_unref (ffmpegdec);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ gst_ffmpegdemux_send_event (GstElement * element, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
||||
gst_ffmpegdemux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
GstFFMpegDemux *demux;
|
||||
GstFFStream *stream;
|
||||
|
@ -726,7 +726,7 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
|||
|
||||
avstream = stream->avstream;
|
||||
|
||||
demux = (GstFFMpegDemux *) GST_PAD_PARENT (pad);
|
||||
demux = (GstFFMpegDemux *) parent;
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
|
@ -754,7 +754,7 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
|||
case GST_FORMAT_BYTES:
|
||||
if (demux->videopads + demux->audiopads == 1 &&
|
||||
GST_PAD_PEER (demux->sinkpad) != NULL)
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -791,7 +791,7 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
|||
case GST_FORMAT_BYTES:
|
||||
if (demux->videopads + demux->audiopads == 1 &&
|
||||
GST_PAD_PEER (demux->sinkpad) != NULL)
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -816,7 +816,7 @@ gst_ffmpegdemux_src_query (GstPad * pad, GstQuery * query)
|
|||
}
|
||||
default:
|
||||
/* FIXME : ADD GST_QUERY_CONVERT */
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,8 @@ static GstFlowReturn gst_ffmpegenc_chain_audio (GstPad * pad,
|
|||
GstBuffer * buffer);
|
||||
static gboolean gst_ffmpegenc_event_sink (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ffmpegenc_event_src (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ffmpegenc_query_sink (GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_ffmpegenc_query_sink (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
static void gst_ffmpegenc_set_property (GObject * object,
|
||||
guint prop_id, const GValue * value, GParamSpec * pspec);
|
||||
|
@ -1233,7 +1234,7 @@ gst_ffmpegenc_event_src (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ffmpegenc_query_sink (GstPad * pad, GstQuery * query)
|
||||
gst_ffmpegenc_query_sink (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
|
||||
|
@ -1250,7 +1251,7 @@ gst_ffmpegenc_query_sink (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_query_default (pad, query);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue