static GstStateChangeReturn gst_funnel_change_state (GstElement * element,
GstStateChange transition);
-
static GstPad *gst_funnel_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name);
static void gst_funnel_release_pad (GstElement * element, GstPad * pad);
-static GstFlowReturn gst_funnel_buffer_alloc (GstPad * pad, guint64 offset,
+static GstFlowReturn gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer);
+static GstFlowReturn gst_funnel_sink_buffer_alloc (GstPad * pad, guint64 offset,
guint size, GstCaps * caps, GstBuffer ** buf);
-static GstFlowReturn gst_funnel_chain (GstPad * pad, GstBuffer * buffer);
-static gboolean gst_funnel_event (GstPad * pad, GstEvent * event);
+static gboolean gst_funnel_sink_event (GstPad * pad, GstEvent * event);
+static GstCaps *gst_funnel_sink_getcaps (GstPad * pad);
+
static gboolean gst_funnel_src_event (GstPad * pad, GstEvent * event);
-static GstCaps *gst_funnel_getcaps (GstPad * pad);
static void
gst_funnel_base_init (gpointer g_class)
gst_static_pad_template_get (&funnel_src_template));
}
-
static void
gst_funnel_dispose (GObject * object)
{
}
static GstFlowReturn
-gst_funnel_buffer_alloc (GstPad * pad, guint64 offset, guint size,
+gst_funnel_sink_buffer_alloc (GstPad * pad, guint64 offset, guint size,
GstCaps * caps, GstBuffer ** buf)
{
GstFunnel *funnel = GST_FUNNEL (gst_pad_get_parent_element (pad));
return ret;
}
-
static GstPad *
gst_funnel_request_new_pad (GstElement * element, GstPadTemplate * templ,
const gchar * name)
"name", name, "direction", templ->direction, "template", templ,
NULL));
- gst_pad_set_chain_function (sinkpad, GST_DEBUG_FUNCPTR (gst_funnel_chain));
- gst_pad_set_event_function (sinkpad, GST_DEBUG_FUNCPTR (gst_funnel_event));
+ gst_pad_set_chain_function (sinkpad,
+ GST_DEBUG_FUNCPTR (gst_funnel_sink_chain));
+ gst_pad_set_event_function (sinkpad,
+ GST_DEBUG_FUNCPTR (gst_funnel_sink_event));
gst_pad_set_getcaps_function (sinkpad,
- GST_DEBUG_FUNCPTR (gst_funnel_getcaps));
+ GST_DEBUG_FUNCPTR (gst_funnel_sink_getcaps));
gst_pad_set_bufferalloc_function (sinkpad,
- GST_DEBUG_FUNCPTR (gst_funnel_buffer_alloc));
+ GST_DEBUG_FUNCPTR (gst_funnel_sink_buffer_alloc));
gst_pad_set_active (sinkpad, TRUE);
}
static GstCaps *
-gst_funnel_getcaps (GstPad * pad)
+gst_funnel_sink_getcaps (GstPad * pad)
{
GstFunnel *funnel = GST_FUNNEL (gst_pad_get_parent (pad));
GstCaps *caps;
}
static GstFlowReturn
-gst_funnel_chain (GstPad * pad, GstBuffer * buffer)
+gst_funnel_sink_chain (GstPad * pad, GstBuffer * buffer)
{
GstFlowReturn res;
GstFunnel *funnel = GST_FUNNEL (gst_pad_get_parent (pad));
GST_WARNING_OBJECT (funnel, "Could not push out newsegment event");
}
-
GST_OBJECT_LOCK (pad);
padcaps = GST_PAD_CAPS (funnel->srcpad);
GST_OBJECT_UNLOCK (pad);
}
static gboolean
-gst_funnel_event (GstPad * pad, GstEvent * event)
+gst_funnel_sink_event (GstPad * pad, GstEvent * event)
{
GstFunnel *funnel = GST_FUNNEL (gst_pad_get_parent (pad));
GstFunnelPad *fpad = GST_FUNNEL_PAD_CAST (pad);
gst_event_parse_new_segment_full (event, &update, &rate, &arate,
&format, &start, &stop, &time);
-
GST_OBJECT_LOCK (funnel);
gst_segment_set_newsegment_full (&fpad->segment, update, rate, arate,
format, start, stop, time);
break;
}
-
if (forward)
res = gst_pad_push_event (funnel->srcpad, event);