G_DEFINE_TYPE_WITH_CODE (GstGDPDepay, gst_gdp_depay,
GST_TYPE_ELEMENT, _do_init);
-static gboolean gst_gdp_depay_sink_event (GstPad * pad, GstEvent * event);
-static gboolean gst_gdp_depay_src_event (GstPad * pad, GstEvent * event);
+static gboolean gst_gdp_depay_sink_event (GstPad * pad, GstObject * parent,
+ GstEvent * event);
+static gboolean gst_gdp_depay_src_event (GstPad * pad, GstObject * parent,
+ GstEvent * event);
-static GstFlowReturn gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer);
+static GstFlowReturn gst_gdp_depay_chain (GstPad * pad, GstObject * parent,
+ GstBuffer * buffer);
static GstStateChangeReturn gst_gdp_depay_change_state (GstElement *
element, GstStateChange transition);
}
static gboolean
-gst_gdp_depay_sink_event (GstPad * pad, GstEvent * event)
+gst_gdp_depay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
GstGDPDepay *this;
gboolean res = TRUE;
- this = GST_GDP_DEPAY (gst_pad_get_parent (pad));
+ this = GST_GDP_DEPAY (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH_START:
gst_event_unref (event);
break;
}
- gst_object_unref (this);
return res;
}
static gboolean
-gst_gdp_depay_src_event (GstPad * pad, GstEvent * event)
+gst_gdp_depay_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
GstGDPDepay *this;
gboolean res = TRUE;
- this = GST_GDP_DEPAY (gst_pad_get_parent (pad));
+ this = GST_GDP_DEPAY (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
res = gst_pad_push_event (this->sinkpad, event);
break;
}
- gst_object_unref (this);
return res;
}
static GstFlowReturn
-gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
+gst_gdp_depay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
{
GstGDPDepay *this;
GstFlowReturn ret = GST_FLOW_OK;
GstEvent *event;
guint available;
- this = GST_GDP_DEPAY (gst_pad_get_parent (pad));
+ this = GST_GDP_DEPAY (parent);
/* On DISCONT, get rid of accumulated data. We assume a buffer after the
* DISCONT contains (part of) a new valid header, if not we error because we
}
done:
- gst_object_unref (this);
return ret;
/* ERRORS */
static void gst_gdp_pay_reset (GstGDPPay * this);
-static GstFlowReturn gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer);
-static gboolean gst_gdp_pay_src_event (GstPad * pad, GstEvent * event);
-static gboolean gst_gdp_pay_sink_event (GstPad * pad, GstEvent * event);
+static GstFlowReturn gst_gdp_pay_chain (GstPad * pad, GstObject * parent,
+ GstBuffer * buffer);
+static gboolean gst_gdp_pay_src_event (GstPad * pad, GstObject * parent,
+ GstEvent * event);
+static gboolean gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent,
+ GstEvent * event);
static GstStateChangeReturn gst_gdp_pay_change_state (GstElement *
element, GstStateChange transition);
}
static GstFlowReturn
-gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer)
+gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
{
GstGDPPay *this;
#if 0
GstBuffer *outbuffer;
GstFlowReturn ret;
- this = GST_GDP_PAY (gst_pad_get_parent (pad));
+ this = GST_GDP_PAY (parent);
/* we should have received a new_segment before, otherwise it's a bug.
* fake one in that case */
done:
gst_buffer_unref (buffer);
- gst_object_unref (this);
+
return ret;
/* ERRORS */
}
static gboolean
-gst_gdp_pay_sink_event (GstPad * pad, GstEvent * event)
+gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
GstBuffer *outbuffer;
- GstGDPPay *this = GST_GDP_PAY (gst_pad_get_parent (pad));
+ GstGDPPay *this = GST_GDP_PAY (parent);
GstFlowReturn flowret;
GstCaps *caps;
gboolean ret = TRUE;
done:
gst_event_unref (event);
- gst_object_unref (this);
return ret;
}
static gboolean
-gst_gdp_pay_src_event (GstPad * pad, GstEvent * event)
+gst_gdp_pay_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
GstGDPPay *this;
gboolean res = TRUE;
- this = GST_GDP_PAY (gst_pad_get_parent (pad));
+ this = GST_GDP_PAY (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
res = gst_pad_push_event (this->sinkpad, event);
break;
}
- gst_object_unref (this);
return res;
}