Commit 80d4778b authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/adder/: Ported adder as an example of a mixer element using collect pads....

gst/adder/: Ported adder as an example of a mixer element using collect pads. Needs more negotiation work.

Original commit message from CVS:
* gst/adder/Makefile.am:
* gst/adder/gstadder.c: (gst_adder_setcaps),
(gst_adder_class_init), (gst_adder_init),
(gst_adder_request_new_pad), (gst_adder_collected),
(gst_adder_change_state):
* gst/adder/gstadder.h:
Ported adder as an example of a mixer element using
collect pads. Needs more negotiation work.
parent 4a77aadd
2005-05-05 Wim Taymans <wim@fluendo.com>
* gst/adder/Makefile.am:
* gst/adder/gstadder.c: (gst_adder_setcaps),
(gst_adder_class_init), (gst_adder_init),
(gst_adder_request_new_pad), (gst_adder_collected),
(gst_adder_change_state):
* gst/adder/gstadder.h:
Ported adder as an example of a mixer element using
collect pads. Needs more negotiation work.
2005-05-05 Wim Taymans <wim@fluendo.com>
 
* ext/theora/theoradec.c: (_inc_granulepos),
......
......@@ -4,6 +4,6 @@ plugin_LTLIBRARIES = libgstadder.la
libgstadder_la_SOURCES = gstadder.c
libgstadder_la_CFLAGS = $(GST_CFLAGS)
libgstadder_la_LIBADD =
libgstadder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstadder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS)
noinst_HEADERS = gstadder.h
This diff is collapsed.
......@@ -24,11 +24,9 @@
#define __GST_ADDER_H__
#include <gst/gst.h>
#include <gst/bytestream/bytestream.h>
#include <gst/base/gstcollectpads.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
G_BEGIN_DECLS
extern GstElementDetails gst_adder_details;
......@@ -54,19 +52,14 @@ enum _GstAdderFormat {
GST_ADDER_FORMAT_FLOAT
};
struct _GstAdderInputChannel {
GstPad *sinkpad;
GstByteStream *bytestream;
};
typedef void (*GstAdderFunction) (gpointer out, gpointer in, guint size);
struct _GstAdder {
GstElement element;
GstPad *srcpad;
/* keep track of the sinkpads */
guint numsinkpads;
GSList *input_channels;
GstCollectPads *collect;
gint numpads;
/* the next are valid for both int and float */
GstAdderFormat format;
......@@ -79,6 +72,9 @@ struct _GstAdder {
guint depth;
gboolean is_signed;
/* function to add samples */
GstAdderFunction func;
/* counters to keep track of timestamps */
gint64 timestamp;
gint64 offset;
......@@ -91,9 +87,7 @@ struct _GstAdderClass {
GType gst_adder_get_type (void);
gboolean gst_adder_factory_init (GstElementFactory *factory);
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_END_DECLS
#endif /* __GST_ADDER_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment