diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-11-16 17:28:56 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-11-16 17:28:56 +0100 |
commit | ee240c1ac073f3f7e34c614d1dcaeb461e17b5ce (patch) | |
tree | 7e7c204d9b12742f6699cddce459efef6e0d2b48 /gst/realmedia | |
parent | d338e41a8502dc7a02202442b4c0857c68e4afbd (diff) |
add parent to query function
Diffstat (limited to 'gst/realmedia')
-rw-r--r-- | gst/realmedia/rademux.c | 11 | ||||
-rw-r--r-- | gst/realmedia/rdtmanager.c | 9 | ||||
-rw-r--r-- | gst/realmedia/rmdemux.c | 10 |
3 files changed, 16 insertions, 14 deletions
diff --git a/gst/realmedia/rademux.c b/gst/realmedia/rademux.c index a0323556..1bb4ba21 100644 --- a/gst/realmedia/rademux.c +++ b/gst/realmedia/rademux.c @@ -69,7 +69,8 @@ static GstStateChangeReturn gst_real_audio_demux_change_state (GstElement * e, static GstFlowReturn gst_real_audio_demux_chain (GstPad * pad, GstBuffer * buf); static gboolean gst_real_audio_demux_sink_event (GstPad * pad, GstEvent * ev); static gboolean gst_real_audio_demux_src_event (GstPad * pad, GstEvent * ev); -static gboolean gst_real_audio_demux_src_query (GstPad * pad, GstQuery * query); +static gboolean gst_real_audio_demux_src_query (GstPad * pad, + GstObject * parent, GstQuery * query); static void gst_real_audio_demux_loop (GstRealAudioDemux * demux); static gboolean gst_real_audio_demux_sink_activate (GstPad * sinkpad); static gboolean gst_real_audio_demux_sink_activate_push (GstPad * sinkpad, @@ -859,12 +860,13 @@ gst_real_audio_demux_src_event (GstPad * pad, GstEvent * event) } static gboolean -gst_real_audio_demux_src_query (GstPad * pad, GstQuery * query) +gst_real_audio_demux_src_query (GstPad * pad, GstObject * parent, + GstQuery * query) { GstRealAudioDemux *demux; gboolean ret = FALSE; - demux = GST_REAL_AUDIO_DEMUX (gst_pad_get_parent (pad)); + demux = GST_REAL_AUDIO_DEMUX (parent); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_DURATION:{ @@ -893,11 +895,10 @@ gst_real_audio_demux_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 (demux); return ret; } diff --git a/gst/realmedia/rdtmanager.c b/gst/realmedia/rdtmanager.c index 50208033..86aebf9b 100644 --- a/gst/realmedia/rdtmanager.c +++ b/gst/realmedia/rdtmanager.c @@ -120,7 +120,8 @@ static void gst_rdt_manager_set_property (GObject * object, static void gst_rdt_manager_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static gboolean gst_rdt_manager_query_src (GstPad * pad, GstQuery * query); +static gboolean gst_rdt_manager_query_src (GstPad * pad, GstObject * parent, + GstQuery * query); static gboolean gst_rdt_manager_src_activate_push (GstPad * pad, gboolean active); @@ -524,12 +525,12 @@ gst_rdt_manager_finalize (GObject * object) } static gboolean -gst_rdt_manager_query_src (GstPad * pad, GstQuery * query) +gst_rdt_manager_query_src (GstPad * pad, GstObject * parent, GstQuery * query) { GstRDTManager *rdtmanager; gboolean res; - rdtmanager = GST_RDT_MANAGER (GST_PAD_PARENT (pad)); + rdtmanager = GST_RDT_MANAGER (parent); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_LATENCY: @@ -547,7 +548,7 @@ gst_rdt_manager_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; diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c index 03f6b3a6..bbf36e6e 100644 --- a/gst/realmedia/rmdemux.c +++ b/gst/realmedia/rmdemux.c @@ -144,7 +144,8 @@ static gboolean gst_rmdemux_sink_activate_pull (GstPad * sinkpad, static gboolean gst_rmdemux_sink_event (GstPad * pad, GstEvent * event); static gboolean gst_rmdemux_src_event (GstPad * pad, GstEvent * event); static void gst_rmdemux_send_event (GstRMDemux * rmdemux, GstEvent * event); -static gboolean gst_rmdemux_src_query (GstPad * pad, GstQuery * query); +static gboolean gst_rmdemux_src_query (GstPad * pad, GstObject * parent, + GstQuery * query); static gboolean gst_rmdemux_perform_seek (GstRMDemux * rmdemux, GstEvent * event); @@ -608,12 +609,12 @@ error: static gboolean -gst_rmdemux_src_query (GstPad * pad, GstQuery * query) +gst_rmdemux_src_query (GstPad * pad, GstObject * parent, GstQuery * query) { gboolean res = FALSE; GstRMDemux *rmdemux; - rmdemux = GST_RMDEMUX (gst_pad_get_parent (pad)); + rmdemux = GST_RMDEMUX (parent); switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: @@ -651,11 +652,10 @@ gst_rmdemux_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 (rmdemux); return res; } |