);
static void gst_adder_class_init (GstAdderClass * klass);
+
static void gst_adder_init (GstAdder * adder);
+
static void gst_adder_finalize (GObject * object);
static gboolean gst_adder_setcaps (GstPad * pad, GstCaps * caps);
+
static gboolean gst_adder_query (GstPad * pad, GstQuery * query);
+
static gboolean gst_adder_src_event (GstPad * pad, GstEvent * event);
+
static gboolean gst_adder_sink_event (GstPad * pad, GstEvent * event);
static GstPad *gst_adder_request_new_pad (GstElement * element,
gst_adder_sink_getcaps (GstPad * pad)
{
GstAdder *adder;
+
GstCaps *result, *peercaps, *sinkcaps;
adder = GST_ADDER (GST_PAD_PARENT (pad));
gst_adder_setcaps (GstPad * pad, GstCaps * caps)
{
GstAdder *adder;
+
GList *pads;
+
GstStructure *structure;
+
const char *media_type;
adder = GST_ADDER (GST_PAD_PARENT (pad));
gst_adder_query_duration (GstAdder * adder, GstQuery * query)
{
gint64 max;
+
gboolean res;
+
GstFormat format;
+
GstIterator *it;
+
gboolean done;
/* parse format */
it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (adder));
while (!done) {
GstIteratorResult ires;
+
gpointer item;
ires = gst_iterator_next (it, &item);
case GST_ITERATOR_OK:
{
GstPad *pad = GST_PAD_CAST (item);
+
gint64 duration;
/* ask sink peer for duration */
else if (duration > max)
max = duration;
}
+ gst_object_unref (pad);
break;
}
case GST_ITERATOR_RESYNC:
gst_adder_query_latency (GstAdder * adder, GstQuery * query)
{
GstClockTime min, max;
+
gboolean live;
+
gboolean res;
+
GstIterator *it;
+
gboolean done;
res = TRUE;
it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (adder));
while (!done) {
GstIteratorResult ires;
+
gpointer item;
ires = gst_iterator_next (it, &item);
case GST_ITERATOR_OK:
{
GstPad *pad = GST_PAD_CAST (item);
+
GstQuery *peerquery;
+
GstClockTime min_cur, max_cur;
+
gboolean live_cur;
peerquery = gst_query_new_latency ();
}
gst_query_unref (peerquery);
+ gst_object_unref (pad);
break;
}
case GST_ITERATOR_RESYNC:
gst_adder_query (GstPad * pad, GstQuery * query)
{
GstAdder *adder = GST_ADDER (gst_pad_get_parent (pad));
+
gboolean res = FALSE;
switch (GST_QUERY_TYPE (query)) {
forward_event (GstAdder * adder, GstEvent * event)
{
gboolean ret;
+
GstIterator *it;
GValue vret = { 0 };
gst_adder_src_event (GstPad * pad, GstEvent * event)
{
GstAdder *adder;
+
gboolean result;
adder = GST_ADDER (gst_pad_get_parent (pad));
case GST_EVENT_SEEK:
{
GstSeekFlags flags;
+
GstSeekType curtype;
+
gint64 cur;
/* parse the seek parameters */
gst_adder_sink_event (GstPad * pad, GstEvent * event)
{
GstAdder *adder;
+
gboolean ret;
adder = GST_ADDER (gst_pad_get_parent (pad));
gst_adder_class_init (GstAdderClass * klass)
{
GObjectClass *gobject_class;
+
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
const gchar * unused)
{
gchar *name;
+
GstAdder *adder;
+
GstPad *newpad;
+
gint padcount;
if (templ->direction != GST_PAD_SINK)
* - push out the output buffer
*/
GstAdder *adder;
+
guint size;
+
GSList *collected;
+
GstBuffer *outbuf;
+
GstFlowReturn ret;
+
gpointer outbytes;
+
gboolean empty = TRUE;
adder = GST_ADDER (user_data);
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
GstCollectData *data;
+
guint8 *bytes;
+
guint len;
+
GstBuffer *inbuf;
data = (GstCollectData *) collected->data;
gst_adder_change_state (GstElement * element, GstStateChange transition)
{
GstAdder *adder;
+
GstStateChangeReturn ret;
adder = GST_ADDER (element);