);
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_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 */
gst_adder_query_latency (GstAdder * adder, GstQuery * query)
{
GstClockTime min, max;
-
gboolean live;
-
gboolean res;
-
GstIterator *it;
-
gboolean done;
res = TRUE;
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_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 */
* when all pads received a FLUSH_STOP. */
gst_pad_push_event (adder->srcpad, gst_event_new_flush_start ());
}
-
/* now wait for the collected to be finished and mark a new
* segment */
GST_OBJECT_LOCK (adder->collect);
gst_adder_sink_event (GstPad * pad, GstEvent * event)
{
GstAdder *adder;
-
gboolean ret;
adder = GST_ADDER (gst_pad_get_parent (pad));
static void
gst_adder_class_init (GstAdderClass * klass)
{
- GObjectClass *gobject_class;
-
- GstElementClass *gstelement_class;
-
- gobject_class = (GObjectClass *) klass;
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+ GstElementClass *gstelement_class = (GstElementClass *) klass;
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_adder_finalize);
- gstelement_class = (GstElementClass *) klass;
-
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_adder_src_template));
gst_element_class_add_pad_template (gstelement_class,
* - 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);