gst_flups_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
gboolean res = TRUE;
- GstFluPSDemux *demux;
-
- demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad));
+ GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH_START:
break;
}
- gst_object_unref (demux);
-
return res;
}
gst_flups_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
gboolean res = FALSE;
- GstFluPSDemux *demux;
-
- demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad));
+ GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
break;
}
- gst_object_unref (demux);
-
return res;
}
gst_flups_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
- GstFluPSDemux *demux;
-
- demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad));
+ GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
GST_LOG_OBJECT (demux, "Have query of type %d on pad %" GST_PTR_FORMAT,
GST_QUERY_TYPE (query), pad);
}
beach:
- gst_object_unref (demux);
-
return res;
-
not_supported:
- {
- gst_object_unref (demux);
-
- return FALSE;
- }
+ return FALSE;
}
static void
gst_flups_demux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
gboolean active)
{
- GstFluPSDemux *demux;
-
- demux = GST_FLUPS_DEMUX (parent);
+ GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
demux->random_access = FALSE;
gst_flups_demux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
gboolean active)
{
- GstFluPSDemux *demux;
-
- demux = GST_FLUPS_DEMUX (gst_pad_get_parent (sinkpad));
+ GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
if (active) {
GST_DEBUG ("pull mode activated");
demux->random_access = TRUE;
- gst_object_unref (demux);
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_flups_demux_loop,
sinkpad, NULL);
} else {
demux->random_access = FALSE;
- gst_object_unref (demux);
return gst_pad_stop_task (sinkpad);
}
}
static GstFlowReturn
gst_flups_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
{
- GstFluPSDemux *demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad));
+ GstFluPSDemux *demux = GST_FLUPS_DEMUX (parent);
GstFlowReturn ret = GST_FLOW_OK;
guint32 avail;
gboolean save, discont;
}
}
done:
- gst_object_unref (demux);
-
return ret;
}