add parent to activate functions

This commit is contained in:
Wim Taymans 2011-11-18 13:59:29 +01:00
parent 2679b9432a
commit df3e30ed7e
4 changed files with 36 additions and 26 deletions

View file

@ -91,9 +91,11 @@ static gboolean gst_asf_demux_sink_event (GstPad * pad, GstObject * parent,
GstEvent * event);
static GstFlowReturn gst_asf_demux_process_object (GstASFDemux * demux,
guint8 ** p_data, guint64 * p_size);
static gboolean gst_asf_demux_activate (GstPad * sinkpad);
static gboolean gst_asf_demux_activate_push (GstPad * sinkpad, gboolean active);
static gboolean gst_asf_demux_activate_pull (GstPad * sinkpad, gboolean active);
static gboolean gst_asf_demux_activate (GstPad * sinkpad, GstObject * parent);
static gboolean gst_asf_demux_activate_push (GstPad * sinkpad,
GstObject * parent, gboolean active);
static gboolean gst_asf_demux_activate_pull (GstPad * sinkpad,
GstObject * parent, gboolean active);
static void gst_asf_demux_loop (GstASFDemux * demux);
static void
gst_asf_demux_process_queued_extended_stream_objects (GstASFDemux * demux);
@ -290,7 +292,7 @@ gst_asf_demux_init (GstASFDemux * demux)
}
static gboolean
gst_asf_demux_activate (GstPad * sinkpad)
gst_asf_demux_activate (GstPad * sinkpad, GstObject * parent)
{
GstQuery *query;
gboolean pull_mode;
@ -318,11 +320,12 @@ activate_push:
}
static gboolean
gst_asf_demux_activate_push (GstPad * sinkpad, gboolean active)
gst_asf_demux_activate_push (GstPad * sinkpad, GstObject * parent,
gboolean active)
{
GstASFDemux *demux;
demux = GST_ASF_DEMUX (GST_OBJECT_PARENT (sinkpad));
demux = GST_ASF_DEMUX (parent);
demux->state = GST_ASF_DEMUX_STATE_HEADER;
demux->streaming = TRUE;
@ -331,11 +334,11 @@ gst_asf_demux_activate_push (GstPad * sinkpad, gboolean active)
}
static gboolean
gst_asf_demux_activate_pull (GstPad * pad, gboolean active)
gst_asf_demux_activate_pull (GstPad * pad, GstObject * parent, gboolean active)
{
GstASFDemux *demux;
demux = GST_ASF_DEMUX (GST_OBJECT_PARENT (pad));
demux = GST_ASF_DEMUX (parent);
if (active) {
demux->state = GST_ASF_DEMUX_STATE_HEADER;

View file

@ -75,11 +75,12 @@ static gboolean gst_real_audio_demux_src_event (GstPad * pad,
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 (GstPad * sinkpad,
GstObject * parent);
static gboolean gst_real_audio_demux_sink_activate_push (GstPad * sinkpad,
gboolean active);
GstObject * parent, gboolean active);
static gboolean gst_real_audio_demux_sink_activate_pull (GstPad * sinkpad,
gboolean active);
GstObject * parent, gboolean active);
static void
gst_real_audio_demux_finalize (GObject * obj)
@ -180,7 +181,7 @@ gst_real_audio_demux_init (GstRealAudioDemux * demux)
}
static gboolean
gst_real_audio_demux_sink_activate (GstPad * sinkpad)
gst_real_audio_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
{
GstQuery *query;
gboolean pull_mode;
@ -208,11 +209,12 @@ activate_push:
}
static gboolean
gst_real_audio_demux_sink_activate_push (GstPad * sinkpad, gboolean active)
gst_real_audio_demux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
gboolean active)
{
GstRealAudioDemux *demux;
demux = GST_REAL_AUDIO_DEMUX (GST_OBJECT_PARENT (sinkpad));
demux = GST_REAL_AUDIO_DEMUX (parent);
demux->seekable = FALSE;
@ -220,11 +222,12 @@ gst_real_audio_demux_sink_activate_push (GstPad * sinkpad, gboolean active)
}
static gboolean
gst_real_audio_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
gst_real_audio_demux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
gboolean active)
{
GstRealAudioDemux *demux;
demux = GST_REAL_AUDIO_DEMUX (GST_OBJECT_PARENT (sinkpad));
demux = GST_REAL_AUDIO_DEMUX (parent);
if (active) {
demux->seekable = TRUE;

View file

@ -123,7 +123,7 @@ static void gst_rdt_manager_get_property (GObject * object,
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);
GstObject * parent, gboolean active);
static GstClock *gst_rdt_manager_provide_clock (GstElement * element);
static GstStateChangeReturn gst_rdt_manager_change_state (GstElement * element,
@ -556,7 +556,8 @@ gst_rdt_manager_query_src (GstPad * pad, GstObject * parent, GstQuery * query)
}
static gboolean
gst_rdt_manager_src_activate_push (GstPad * pad, gboolean active)
gst_rdt_manager_src_activate_push (GstPad * pad, GstObject * parent,
gboolean active)
{
gboolean result = TRUE;
GstRDTManager *rdtmanager;

View file

@ -137,11 +137,12 @@ static GstStateChangeReturn gst_rmdemux_change_state (GstElement * element,
static GstFlowReturn gst_rmdemux_chain (GstPad * pad, GstObject * parent,
GstBuffer * buffer);
static void gst_rmdemux_loop (GstPad * pad);
static gboolean gst_rmdemux_sink_activate (GstPad * sinkpad);
static gboolean gst_rmdemux_sink_activate (GstPad * sinkpad,
GstObject * parent);
static gboolean gst_rmdemux_sink_activate_push (GstPad * sinkpad,
gboolean active);
GstObject * parent, gboolean active);
static gboolean gst_rmdemux_sink_activate_pull (GstPad * sinkpad,
gboolean active);
GstObject * parent, gboolean active);
static gboolean gst_rmdemux_sink_event (GstPad * pad, GstObject * parent,
GstEvent * event);
static gboolean gst_rmdemux_src_event (GstPad * pad, GstObject * parent,
@ -743,7 +744,7 @@ gst_rmdemux_change_state (GstElement * element, GstStateChange transition)
* pull based.
*/
static gboolean
gst_rmdemux_sink_activate (GstPad * sinkpad)
gst_rmdemux_sink_activate (GstPad * sinkpad, GstObject * parent)
{
GstQuery *query;
@ -774,11 +775,12 @@ activate_push:
/* this function gets called when we activate ourselves in push mode.
* We cannot seek (ourselves) in the stream */
static gboolean
gst_rmdemux_sink_activate_push (GstPad * pad, gboolean active)
gst_rmdemux_sink_activate_push (GstPad * pad, GstObject * parent,
gboolean active)
{
GstRMDemux *rmdemux;
rmdemux = GST_RMDEMUX (GST_PAD_PARENT (pad));
rmdemux = GST_RMDEMUX (parent);
GST_DEBUG_OBJECT (rmdemux, "activate_push");
@ -791,11 +793,12 @@ gst_rmdemux_sink_activate_push (GstPad * pad, gboolean active)
* We can perform random access to the resource and we start a task
* to start reading */
static gboolean
gst_rmdemux_sink_activate_pull (GstPad * pad, gboolean active)
gst_rmdemux_sink_activate_pull (GstPad * pad, GstObject * parent,
gboolean active)
{
GstRMDemux *rmdemux;
rmdemux = GST_RMDEMUX (GST_PAD_PARENT (pad));
rmdemux = GST_RMDEMUX (parent);
GST_DEBUG_OBJECT (rmdemux, "activate_pull");