if (G_UNLIKELY (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_UPSTREAM) &&
(gst_event_has_name (event, "pulse-format-lost") ||
gst_event_has_name (event, "pulse-sink-changed"))) {
- g_return_val_if_fail (pad->mode != GST_PAD_ACTIVATE_PULL, FALSE);
+ g_return_val_if_fail (pad->mode != GST_PAD_MODE_PULL, FALSE);
GST_PULSE_AUDIO_SINK_LOCK (pbin);
if (gst_event_has_name (event, "pulse-format-lost"))
static gboolean gst_avi_demux_handle_seek_push (GstAviDemux * avi, GstPad * pad,
GstEvent * event);
static void gst_avi_demux_loop (GstPad * pad);
-static gboolean gst_avi_demux_sink_activate (GstPad * sinkpad);
+static gboolean gst_avi_demux_sink_activate (GstPad * sinkpad,
+ GstObject * parent);
static gboolean gst_avi_demux_sink_activate_pull (GstPad * sinkpad,
+ GstObject * parent, gboolean active);
+static gboolean gst_avi_demux_activate_push (GstPad * pad, GstObject * parent,
gboolean active);
-static gboolean gst_avi_demux_activate_push (GstPad * pad, gboolean active);
static GstFlowReturn gst_avi_demux_chain (GstPad * pad, GstObject * parent,
GstBuffer * buf);
}
static gboolean
-gst_avi_demux_sink_activate (GstPad * sinkpad)
+gst_avi_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
{
GstQuery *query;
gboolean pull_mode;
}
static gboolean
-gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
+gst_avi_demux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
+ gboolean active)
{
- GstAviDemux *avi = GST_AVI_DEMUX (GST_OBJECT_PARENT (sinkpad));
+ GstAviDemux *avi = GST_AVI_DEMUX (parent);
if (active) {
avi->streaming = FALSE;
}
static gboolean
-gst_avi_demux_activate_push (GstPad * pad, gboolean active)
+gst_avi_demux_activate_push (GstPad * pad, GstObject * parent, gboolean active)
{
- GstAviDemux *avi = GST_AVI_DEMUX (GST_OBJECT_PARENT (pad));
+ GstAviDemux *avi = GST_AVI_DEMUX (parent);
if (active) {
GST_DEBUG ("avi: activating push/chain function");
static void gst_rnd_buffer_size_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static gboolean gst_rnd_buffer_size_activate (GstPad * pad);
+static gboolean gst_rnd_buffer_size_activate (GstPad * pad, GstObject * parent);
static gboolean gst_rnd_buffer_size_activate_pull (GstPad * pad,
- gboolean active);
+ GstObject * parent, gboolean active);
static void gst_rnd_buffer_size_loop (GstRndBufferSize * self);
static GstStateChangeReturn gst_rnd_buffer_size_change_state (GstElement *
element, GstStateChange transition);
static gboolean
-gst_rnd_buffer_size_activate (GstPad * pad)
+gst_rnd_buffer_size_activate (GstPad * pad, GstObject * parent)
{
GstQuery *query;
gboolean pull_mode;
static gboolean
-gst_rnd_buffer_size_activate_pull (GstPad * pad, gboolean active)
+gst_rnd_buffer_size_activate_pull (GstPad * pad, GstObject * parent,
+ gboolean active)
{
- GstRndBufferSize *self = GST_RND_BUFFER_SIZE (GST_OBJECT_PARENT (pad));
+ GstRndBufferSize *self = GST_RND_BUFFER_SIZE (parent);
if (active) {
GST_INFO_OBJECT (self, "starting pull");
/* If we can pull that's prefered */
static gboolean
-gst_flv_demux_sink_activate (GstPad * sinkpad)
+gst_flv_demux_sink_activate (GstPad * sinkpad, GstObject * parent)
{
GstQuery *query;
gboolean pull_mode;
/* This function gets called when we activate ourselves in push mode.
* We cannot seek (ourselves) in the stream */
static gboolean
-gst_flv_demux_sink_activate_push (GstPad * sinkpad, gboolean active)
+gst_flv_demux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
+ gboolean active)
{
GstFlvDemux *demux;
- demux = GST_FLV_DEMUX (gst_pad_get_parent (sinkpad));
+ demux = GST_FLV_DEMUX (parent);
demux->random_access = FALSE;
- gst_object_unref (demux);
-
return TRUE;
}
* We can perform random access to the resource and we start a task
* to start reading */
static gboolean
-gst_flv_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
+gst_flv_demux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
+ gboolean active)
{
GstFlvDemux *demux;
- demux = GST_FLV_DEMUX (gst_pad_get_parent (sinkpad));
+ demux = GST_FLV_DEMUX (parent);
if (active) {
demux->random_access = TRUE;
- gst_object_unref (demux);
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_flv_demux_loop,
sinkpad);
} else {
demux->random_access = FALSE;
- gst_object_unref (demux);
return gst_pad_stop_task (sinkpad);
}
}
static GstIndex *gst_qtdemux_get_index (GstElement * element);
static GstStateChangeReturn gst_qtdemux_change_state (GstElement * element,
GstStateChange transition);
-static gboolean qtdemux_sink_activate (GstPad * sinkpad);
-static gboolean qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active);
-static gboolean qtdemux_sink_activate_push (GstPad * sinkpad, gboolean active);
+static gboolean qtdemux_sink_activate (GstPad * sinkpad, GstObject * parent);
+static gboolean qtdemux_sink_activate_pull (GstPad * sinkpad,
+ GstObject * parent, gboolean active);
+static gboolean qtdemux_sink_activate_push (GstPad * sinkpad,
+ GstObject * parent, gboolean active);
static void gst_qtdemux_loop (GstPad * pad);
static GstFlowReturn gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent,
}
static gboolean
-qtdemux_sink_activate (GstPad * sinkpad)
+qtdemux_sink_activate (GstPad * sinkpad, GstObject * parent)
{
GstQuery *query;
gboolean pull_mode;
}
static gboolean
-qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active)
+qtdemux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
+ gboolean active)
{
- GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad));
+ GstQTDemux *demux = GST_QTDEMUX (parent);
if (active) {
demux->pullbased = TRUE;
}
static gboolean
-qtdemux_sink_activate_push (GstPad * sinkpad, gboolean active)
+qtdemux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
+ gboolean active)
{
- GstQTDemux *demux = GST_QTDEMUX (GST_PAD_PARENT (sinkpad));
+ GstQTDemux *demux = GST_QTDEMUX (parent);
demux->pullbased = FALSE;
static gboolean gst_rtp_jitter_buffer_src_event (GstPad * pad,
GstObject * parent, GstEvent * event);
static gboolean gst_rtp_jitter_buffer_src_activate_push (GstPad * pad,
- gboolean active);
+ GstObject * parent, gboolean active);
static void gst_rtp_jitter_buffer_loop (GstRtpJitterBuffer * jitterbuffer);
static gboolean gst_rtp_jitter_buffer_src_query (GstPad * pad,
GstObject * parent, GstQuery * query);
}
static gboolean
-gst_rtp_jitter_buffer_src_activate_push (GstPad * pad, gboolean active)
+gst_rtp_jitter_buffer_src_activate_push (GstPad * pad, GstObject * parent,
+ gboolean active)
{
gboolean result = TRUE;
GstRtpJitterBuffer *jitterbuffer = NULL;
- jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
+ jitterbuffer = GST_RTP_JITTER_BUFFER (parent);
if (active) {
/* allow data processing */
result = gst_pad_stop_task (pad);
}
- gst_object_unref (jitterbuffer);
-
return result;
}
break;
case GST_EVENT_FLUSH_STOP:
ret = gst_pad_push_event (priv->srcpad, event);
- ret = gst_rtp_jitter_buffer_src_activate_push (priv->srcpad, TRUE);
+ ret =
+ gst_rtp_jitter_buffer_src_activate_push (priv->srcpad, parent, TRUE);
break;
case GST_EVENT_EOS:
{
static void gst_wavparse_dispose (GObject * object);
-static gboolean gst_wavparse_sink_activate (GstPad * sinkpad);
+static gboolean gst_wavparse_sink_activate (GstPad * sinkpad,
+ GstObject * parent);
static gboolean gst_wavparse_sink_activate_pull (GstPad * sinkpad,
- gboolean active);
+ GstObject * parent, gboolean active);
static gboolean gst_wavparse_send_event (GstElement * element,
GstEvent * event);
static GstStateChangeReturn gst_wavparse_change_state (GstElement * element,
}
static gboolean
-gst_wavparse_sink_activate (GstPad * sinkpad)
+gst_wavparse_sink_activate (GstPad * sinkpad, GstObject * parent)
{
- GstWavParse *wav = GST_WAVPARSE (gst_pad_get_parent (sinkpad));
+ GstWavParse *wav = GST_WAVPARSE (parent);
GstQuery *query;
gboolean pull_mode;
GST_DEBUG_OBJECT (sinkpad, "activating pull");
wav->streaming = FALSE;
- gst_object_unref (wav);
return gst_pad_activate_pull (sinkpad, TRUE);
activate_push:
GST_DEBUG_OBJECT (sinkpad, "activating push");
wav->streaming = TRUE;
wav->adapter = gst_adapter_new ();
- gst_object_unref (wav);
return gst_pad_activate_push (sinkpad, TRUE);
}
}
static gboolean
-gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active)
+gst_wavparse_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
+ gboolean active)
{
if (active) {
/* if we have a scheduler we can start the task */