summaryrefslogtreecommitdiffstats
path: root/gst/interleave/interleave.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-05-14 07:32:44 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-05-14 07:32:44 +0000
commitafe112e12179246bb32e170f13c379ade4d1389c (patch)
treed9a4bb2399b679c6ea7e9915b7cfcc3955ed4653 /gst/interleave/interleave.c
parent94414c07a67cc0b9112651384bf516d74aef9551 (diff)
gst/interleave/: Split definitions into separate header files for better documentation generation.
Original commit message from CVS: * gst/interleave/Makefile.am: * gst/interleave/deinterleave.h: * gst/interleave/interleave.h: * gst/interleave/plugin.h: Split definitions into separate header files for better documentation generation. * gst/interleave/deinterleave.c: (gst_deinterleave_base_init), (gst_deinterleave_class_init), (gst_deinterleave_sink_setcaps), (gst_deinterleave_process): Don't use alloca, allow caps changes as long as the number of channels does not change, don't use g_warning, return NOT_NEGOTIATED as early as possible and some other cleanup. * gst/interleave/interleave.c: (gst_interleave_base_init), (gst_interleave_class_init): Do some random cleanup. * tests/check/Makefile.am: * tests/check/elements/deinterleave.c: (GST_START_TEST), (deinterleave_chain_func), (deinterleave_pad_added), (deinterleave_suite): Add unit tests for the deinterleave element.
Diffstat (limited to 'gst/interleave/interleave.c')
-rw-r--r--gst/interleave/interleave.c54
1 files changed, 8 insertions, 46 deletions
diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c
index bce077d7..be5b4108 100644
--- a/gst/interleave/interleave.c
+++ b/gst/interleave/interleave.c
@@ -45,45 +45,11 @@
#endif
#include <gst/gst.h>
-
-
-#define GST_TYPE_INTERLEAVE (gst_interleave_get_type())
-#define GST_INTERLEAVE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_INTERLEAVE,GstInterleave))
-#define GST_INTERLEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_INTERLEAVE,GstInterleaveClass))
-#define GST_INTERLEAVE_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_INTERLEAVE,GstInterleaveClass))
-#define GST_IS_INTERLEAVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_INTERLEAVE))
-#define GST_IS_INTERLEAVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_INTERLEAVE))
-
-
-typedef struct _GstInterleave GstInterleave;
-typedef struct _GstInterleaveClass GstInterleaveClass;
-
-
-struct _GstInterleave
-{
- GstElement element;
-
- GstCaps *sinkcaps;
- guint channels;
-
- GstPad *src;
-
- GstActivateMode mode;
-
- guint pending_in;
-};
-
-struct _GstInterleaveClass
-{
- GstElementClass parent_class;
-};
-
+#include "interleave.h"
GST_DEBUG_CATEGORY_STATIC (gst_interleave_debug);
#define GST_CAT_DEFAULT gst_interleave_debug
-
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
@@ -156,20 +122,13 @@ static gboolean gst_interleave_src_setcaps (GstPad * pad, GstCaps * caps);
static gboolean gst_interleave_sink_setcaps (GstPad * pad, GstCaps * caps);
static GstCaps *gst_interleave_src_getcaps (GstPad * pad);
-
-static const GstElementDetails details =
-GST_ELEMENT_DETAILS ("Audio interleaver",
- "Filter/Converter/Audio",
- "Folds many mono channels into one interleaved audio stream",
- "Andy Wingo <wingo at pobox.com>");
-
static void
gst_interleave_base_init (gpointer g_class)
{
- GST_DEBUG_CATEGORY_INIT (gst_interleave_debug, "interleave", 0,
- "interleave element");
-
- gst_element_class_set_details (g_class, &details);
+ gst_element_class_set_details_simple (g_class, "Audio interleaver",
+ "Filter/Converter/Audio",
+ "Folds many mono channels into one interleaved audio stream",
+ "Andy Wingo <wingo at pobox.com>");
gst_element_class_add_pad_template (g_class,
gst_static_pad_template_get (&sink_template));
@@ -184,6 +143,9 @@ gst_interleave_class_init (GstInterleaveClass * klass)
gstelement_class = GST_ELEMENT_CLASS (klass);
+ GST_DEBUG_CATEGORY_INIT (gst_interleave_debug, "interleave", 0,
+ "interleave element");
+
gstelement_class->request_new_pad =
GST_DEBUG_FUNCPTR (gst_interleave_request_new_pad);
}