summaryrefslogtreecommitdiffstats
path: root/gst/mixmatrix
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-14 22:34:33 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-14 22:34:33 +0000
commit7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2 (patch)
treef863b467dea9559a6ec9c48affbfae11f8104164 /gst/mixmatrix
parenta19db4bbdc4a15ea0d8f4d28e9a1302c9c3d1657 (diff)
downloadgst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.gz
gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.bz2
gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.zip
gst-indent
Original commit message from CVS: gst-indent
Diffstat (limited to 'gst/mixmatrix')
-rw-r--r--gst/mixmatrix/mixmatrix.c339
1 files changed, 177 insertions, 162 deletions
diff --git a/gst/mixmatrix/mixmatrix.c b/gst/mixmatrix/mixmatrix.c
index 0551cac0..f7095e27 100644
--- a/gst/mixmatrix/mixmatrix.c
+++ b/gst/mixmatrix/mixmatrix.c
@@ -40,7 +40,8 @@
typedef struct _GstMixMatrix GstMixMatrix;
typedef struct _GstMixMatrixClass GstMixMatrixClass;
-struct _GstMixMatrix {
+struct _GstMixMatrix
+{
GstElement element;
GstCaps *caps;
@@ -59,10 +60,11 @@ struct _GstMixMatrix {
gfloat **matrix;
};
-struct _GstMixMatrixClass {
+struct _GstMixMatrixClass
+{
GstElementClass parent_class;
- void (*resize) (GstMixMatrix *mix);
+ void (*resize) (GstMixMatrix * mix);
};
/* elementfactory information */
@@ -73,13 +75,15 @@ static GstElementDetails mixmatrix_details = {
"Erik Walthinsen <omega@temple-baptist.com>"
};
-enum {
+enum
+{
/* FILL ME */
RESIZE_SIGNAL,
LAST_SIGNAL,
};
-enum {
+enum
+{
ARG_0,
ARG_GRPSIZE,
ARG_OUTSIZE,
@@ -89,59 +93,64 @@ enum {
};
static GstStaticPadTemplate mixmatrix_sink_template =
-GST_STATIC_PAD_TEMPLATE (
- "sink%d",
- GST_PAD_SINK,
- GST_PAD_REQUEST,
- GST_STATIC_CAPS ( GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS )
-);
+GST_STATIC_PAD_TEMPLATE ("sink%d",
+ GST_PAD_SINK,
+ GST_PAD_REQUEST,
+ GST_STATIC_CAPS (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS)
+ );
static GstStaticPadTemplate mixmatrix_src_template =
-GST_STATIC_PAD_TEMPLATE (
- "src%d",
- GST_PAD_SRC,
- GST_PAD_REQUEST,
- GST_STATIC_CAPS ( GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS )
-);
+GST_STATIC_PAD_TEMPLATE ("src%d",
+ GST_PAD_SRC,
+ GST_PAD_REQUEST,
+ GST_STATIC_CAPS (GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS)
+ );
-static void gst_mixmatrix_class_init (GstMixMatrixClass *klass);
-static void gst_mixmatrix_base_init (GstMixMatrixClass *klass);
-static void gst_mixmatrix_init (GstMixMatrix *element);
+static void gst_mixmatrix_class_init (GstMixMatrixClass * klass);
+static void gst_mixmatrix_base_init (GstMixMatrixClass * klass);
+static void gst_mixmatrix_init (GstMixMatrix * element);
-static void gst_mixmatrix_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void gst_mixmatrix_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static GstPad * gst_mixmatrix_request_new_pad (GstElement *element, GstPadTemplate *temp, const gchar *name);
+static void gst_mixmatrix_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec);
+static void gst_mixmatrix_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec);
+static GstPad *gst_mixmatrix_request_new_pad (GstElement * element,
+ GstPadTemplate * temp, const gchar * name);
-static GstPadLinkReturn gst_mixmatrix_connect (GstPad *pad, const GstCaps *caps);
+static GstPadLinkReturn gst_mixmatrix_connect (GstPad * pad,
+ const GstCaps * caps);
-static void gst_mixmatrix_loop (GstElement *element);
+static void gst_mixmatrix_loop (GstElement * element);
-static guint gst_mixmatrix_signals[LAST_SIGNAL] = { 0 };
-static GstElementClass *parent_class = NULL;
+static guint gst_mixmatrix_signals[LAST_SIGNAL] = { 0 };
+static GstElementClass *parent_class = NULL;
GType
-gst_mixmatrix_get_type(void) {
+gst_mixmatrix_get_type (void)
+{
static GType mixmatrix_type = 0;
if (!mixmatrix_type) {
static const GTypeInfo mixmatrix_info = {
- sizeof(GstMixMatrixClass),
- (GBaseInitFunc)gst_mixmatrix_base_init,
+ sizeof (GstMixMatrixClass),
+ (GBaseInitFunc) gst_mixmatrix_base_init,
NULL,
- (GClassInitFunc)gst_mixmatrix_class_init,
+ (GClassInitFunc) gst_mixmatrix_class_init,
NULL,
NULL,
- sizeof(GstMixMatrix),
+ sizeof (GstMixMatrix),
0,
- (GInstanceInitFunc)gst_mixmatrix_init,
+ (GInstanceInitFunc) gst_mixmatrix_init,
};
- mixmatrix_type = g_type_register_static(GST_TYPE_ELEMENT, "GstMixMatrix", &mixmatrix_info, 0);
+ mixmatrix_type =
+ g_type_register_static (GST_TYPE_ELEMENT, "GstMixMatrix",
+ &mixmatrix_info, 0);
}
return mixmatrix_type;
}
static void
-gst_mixmatrix_base_init (GstMixMatrixClass *klass)
+gst_mixmatrix_base_init (GstMixMatrixClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
@@ -153,36 +162,34 @@ gst_mixmatrix_base_init (GstMixMatrixClass *klass)
}
static void
-gst_mixmatrix_class_init (GstMixMatrixClass *klass)
+gst_mixmatrix_class_init (GstMixMatrixClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
- gobject_class = (GObjectClass *)klass;
- gstelement_class = (GstElementClass *)klass;
+ gobject_class = (GObjectClass *) klass;
+ gstelement_class = (GstElementClass *) klass;
- parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
+ parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
gst_mixmatrix_signals[RESIZE_SIGNAL] =
- g_signal_new("resize",
- G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(GstMixMatrixClass, resize),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SINKPADS,
- g_param_spec_int("sinkpads","Sink Pads","Number of sink pads in matrix",
- 0, G_MAXINT, 8, G_PARAM_READABLE));
-
- g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SRCPADS,
- g_param_spec_int("srcpads","Src Pads","Number of src pads in matrix",
- 0, G_MAXINT, 8, G_PARAM_READABLE));
-
- g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MATRIXPTR,
- g_param_spec_pointer("matrixptr","Matrix Pointer","Pointer to gfloat mix matrix",
- G_PARAM_READABLE));
+ g_signal_new ("resize",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstMixMatrixClass, resize),
+ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SINKPADS,
+ g_param_spec_int ("sinkpads", "Sink Pads",
+ "Number of sink pads in matrix", 0, G_MAXINT, 8, G_PARAM_READABLE));
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SRCPADS,
+ g_param_spec_int ("srcpads", "Src Pads", "Number of src pads in matrix",
+ 0, G_MAXINT, 8, G_PARAM_READABLE));
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MATRIXPTR,
+ g_param_spec_pointer ("matrixptr", "Matrix Pointer",
+ "Pointer to gfloat mix matrix", G_PARAM_READABLE));
gobject_class->set_property = gst_mixmatrix_set_property;
gobject_class->get_property = gst_mixmatrix_get_property;
@@ -190,32 +197,34 @@ gst_mixmatrix_class_init (GstMixMatrixClass *klass)
}
static gfloat **
-mixmatrix_alloc_matrix (int x,int y)
+mixmatrix_alloc_matrix (int x, int y)
{
gfloat **matrix;
int i;
- GST_DEBUG ("mixmatrix: allocating a %dx%d matrix of floats\n",x,y);
- matrix = g_new(gfloat *,x);
- GST_DEBUG ("mixmatrix: %p: ",matrix);
- for (i=0;i<x;i++) {
- matrix[i] = g_new(gfloat,y);
- GST_DEBUG ("%p, ",matrix[i]);
+
+ GST_DEBUG ("mixmatrix: allocating a %dx%d matrix of floats\n", x, y);
+ matrix = g_new (gfloat *, x);
+ GST_DEBUG ("mixmatrix: %p: ", matrix);
+ for (i = 0; i < x; i++) {
+ matrix[i] = g_new (gfloat, y);
+ GST_DEBUG ("%p, ", matrix[i]);
}
GST_DEBUG ("\n");
return matrix;
}
static void
-mixmatrix_free_matrix (gfloat **matrix,int x)
+mixmatrix_free_matrix (gfloat ** matrix, int x)
{
int i;
- for (i=0;i<x;i++)
- g_free(matrix[i]);
- g_free(matrix);
+
+ for (i = 0; i < x; i++)
+ g_free (matrix[i]);
+ g_free (matrix);
}
static void
-gst_mixmatrix_init (GstMixMatrix *mix)
+gst_mixmatrix_init (GstMixMatrix * mix)
{
mix->grpsize = 8;
mix->outsize = 1024;
@@ -225,29 +234,31 @@ gst_mixmatrix_init (GstMixMatrix *mix)
mix->srcpadalloc = mix->grpsize;
// allocate the pads
- mix->sinkpads = g_new(GstPad *,mix->sinkpadalloc);
- mix->sinkbs = g_new(GstByteStream *,mix->sinkpadalloc);
+ mix->sinkpads = g_new (GstPad *, mix->sinkpadalloc);
+ mix->sinkbs = g_new (GstByteStream *, mix->sinkpadalloc);
- mix->srcpads = g_new(GstPad *,mix->srcpadalloc);
+ mix->srcpads = g_new (GstPad *, mix->srcpadalloc);
// allocate a similarly sized matrix
- mix->matrix = mixmatrix_alloc_matrix(mix->sinkpadalloc,mix->srcpadalloc);
+ mix->matrix = mixmatrix_alloc_matrix (mix->sinkpadalloc, mix->srcpadalloc);
// set the loop function that does all the work
- gst_element_set_loop_function(GST_ELEMENT(mix), gst_mixmatrix_loop);
+ gst_element_set_loop_function (GST_ELEMENT (mix), gst_mixmatrix_loop);
}
#define ROUND_UP(val,bound) ((((val)/bound)+1)*bound)
-static void **grow_ptrlist(void **origlist,int origsize,int newsize) {
- void **newlist = g_new(void *,newsize);
- memcpy(newlist,origlist,sizeof(void*)*origsize);
- g_free(origlist);
+static void **
+grow_ptrlist (void **origlist, int origsize, int newsize)
+{
+ void **newlist = g_new (void *, newsize);
+ memcpy (newlist, origlist, sizeof (void *) * origsize);
+ g_free (origlist);
return newlist;
}
void
-mixmatrix_resize(GstMixMatrix *mix, int sinkpads, int srcpads)
+mixmatrix_resize (GstMixMatrix * mix, int sinkpads, int srcpads)
{
int sinkresize = (sinkpads != mix->sinkpadalloc);
int srcresize = (srcpads != mix->srcpadalloc);
@@ -259,32 +270,37 @@ mixmatrix_resize(GstMixMatrix *mix, int sinkpads, int srcpads)
// check the sinkpads list
if (sinkresize) {
- mix->sinkpads = (GstPad **)grow_ptrlist((void **)mix->sinkpads,mix->sinkpadalloc,sinkpads);
- mix->sinkbs = (GstByteStream **)grow_ptrlist((void **)mix->sinkbs,mix->sinkpadalloc,sinkpads);
+ mix->sinkpads =
+ (GstPad **) grow_ptrlist ((void **) mix->sinkpads, mix->sinkpadalloc,
+ sinkpads);
+ mix->sinkbs =
+ (GstByteStream **) grow_ptrlist ((void **) mix->sinkbs,
+ mix->sinkpadalloc, sinkpads);
}
-
// check the srcpads list
if (srcresize) {
- mix->srcpads = (GstPad **)grow_ptrlist((void **)mix->srcpads,mix->srcpadalloc,srcpads);
+ mix->srcpads =
+ (GstPad **) grow_ptrlist ((void **) mix->srcpads, mix->srcpadalloc,
+ srcpads);
}
-
// now resize the matrix if either has changed
if (sinkresize || srcresize) {
// allocate the new matrix
- newmatrix = mixmatrix_alloc_matrix(sinkpads,srcpads);
+ newmatrix = mixmatrix_alloc_matrix (sinkpads, srcpads);
// if only the srcpad count changed (y axis), we can just copy
if (!sinkresize) {
- memcpy(newmatrix,mix->matrix,sizeof(gfloat *)*sinkpads);
- // otherwise we have to copy line by line
+ memcpy (newmatrix, mix->matrix, sizeof (gfloat *) * sinkpads);
+ // otherwise we have to copy line by line
} else {
- for (i=0;i<mix->srcpadalloc;i++)
- memcpy(newmatrix[i], mix->matrix[i], sizeof(gfloat) * mix->srcpadalloc);
+ for (i = 0; i < mix->srcpadalloc; i++)
+ memcpy (newmatrix[i], mix->matrix[i],
+ sizeof (gfloat) * mix->srcpadalloc);
}
// would signal here!
// free old matrix and replace it
- mixmatrix_free_matrix(mix->matrix, mix->sinkpadalloc);
+ mixmatrix_free_matrix (mix->matrix, mix->sinkpadalloc);
mix->matrix = newmatrix;
}
@@ -319,76 +335,79 @@ gst_mixmatrix_set_all_caps (GstMixMatrix *mix)
*/
static GstPadLinkReturn
-gst_mixmatrix_connect (GstPad *pad, const GstCaps *caps)
+gst_mixmatrix_connect (GstPad * pad, const GstCaps * caps)
{
- GstMixMatrix *mix = GST_MIXMATRIX(GST_PAD_PARENT(pad));
+ GstMixMatrix *mix = GST_MIXMATRIX (GST_PAD_PARENT (pad));
gint i;
- for (i=0;i<mix->srcpadalloc;i++) {
+ for (i = 0; i < mix->srcpadalloc; i++) {
if (mix->srcpads[i]) {
- if (GST_PAD_CAPS(mix->srcpads[i]) == NULL) {
- if (gst_pad_try_set_caps(mix->srcpads[i], caps) <= 0) {
+ if (GST_PAD_CAPS (mix->srcpads[i]) == NULL) {
+ if (gst_pad_try_set_caps (mix->srcpads[i], caps) <= 0) {
return GST_PAD_LINK_REFUSED;
}
}
}
}
- mix->caps = gst_caps_copy(caps);
+ mix->caps = gst_caps_copy (caps);
return GST_PAD_LINK_OK;
}
static GstPad *
-gst_mixmatrix_request_new_pad (GstElement *element, GstPadTemplate *templ, const gchar *name)
+gst_mixmatrix_request_new_pad (GstElement * element, GstPadTemplate * templ,
+ const gchar * name)
{
GstMixMatrix *mix;
gint padnum;
GstPad *pad = NULL;
- g_return_val_if_fail(element != NULL, NULL);
- g_return_val_if_fail(GST_IS_MIXMATRIX(element), NULL);
+ g_return_val_if_fail (element != NULL, NULL);
+ g_return_val_if_fail (GST_IS_MIXMATRIX (element), NULL);
- mix = GST_MIXMATRIX(element);
+ mix = GST_MIXMATRIX (element);
// figure out if it's a sink pad
- if (sscanf(name,"sink%d",&padnum)) {
+ if (sscanf (name, "sink%d", &padnum)) {
// check to see if it already exists
if (padnum < mix->sinkpadalloc && mix->sinkpads[padnum])
return mix->sinkpads[padnum];
// determine if it's bigger than the current size
if (padnum >= mix->sinkpadalloc)
- mixmatrix_resize(mix, ROUND_UP(padnum,mix->grpsize), mix->sinkpadalloc);
-
- pad = gst_pad_new_from_template(
- gst_static_pad_template_get (&mixmatrix_sink_template), name);
- GST_PAD_ELEMENT_PRIVATE(pad) = GINT_TO_POINTER(padnum);
- gst_element_add_pad(GST_ELEMENT(mix), pad);
+ mixmatrix_resize (mix, ROUND_UP (padnum, mix->grpsize),
+ mix->sinkpadalloc);
+
+ pad =
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&mixmatrix_sink_template), name);
+ GST_PAD_ELEMENT_PRIVATE (pad) = GINT_TO_POINTER (padnum);
+ gst_element_add_pad (GST_ELEMENT (mix), pad);
// g_signal_connect(G_OBJECT(pad), "unlink", G_CALLBACK(sink_unlinked), mix);
gst_pad_set_link_function (pad, gst_mixmatrix_connect);
// create a bytestream for it
- mix->sinkbs[padnum] = gst_bytestream_new(pad);
+ mix->sinkbs[padnum] = gst_bytestream_new (pad);
// store away the pad and account for it
mix->sinkpads[padnum] = pad;
}
-
// or it's a src pad
- else if (sscanf(name,"src%d",&padnum)) {
+ else if (sscanf (name, "src%d", &padnum)) {
// check to see if it already exists
if (padnum < mix->srcpadalloc && mix->srcpads[padnum])
return mix->srcpads[padnum];
// determine if it's bigger than the current size
if (padnum >= mix->srcpadalloc)
- mixmatrix_resize(mix, ROUND_UP(padnum,mix->grpsize), mix->srcpadalloc);
+ mixmatrix_resize (mix, ROUND_UP (padnum, mix->grpsize), mix->srcpadalloc);
- pad = gst_pad_new_from_template(
- gst_static_pad_template_get (&mixmatrix_src_template), name);
- GST_PAD_ELEMENT_PRIVATE(pad) = GINT_TO_POINTER(padnum);
- gst_element_add_pad(GST_ELEMENT(mix), pad);
+ pad =
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&mixmatrix_src_template), name);
+ GST_PAD_ELEMENT_PRIVATE (pad) = GINT_TO_POINTER (padnum);
+ gst_element_add_pad (GST_ELEMENT (mix), pad);
// g_signal_connect(G_OBJECT(pad), "unlink", G_CALLBACK(sink_unlinked), mix);
//gst_pad_set_link_function (pad, gst_mixmatrix_connect);
@@ -400,38 +419,38 @@ gst_mixmatrix_request_new_pad (GstElement *element, GstPadTemplate *templ, const
}
static void
-gst_mixmatrix_loop (GstElement *element)
+gst_mixmatrix_loop (GstElement * element)
{
- GstMixMatrix *mix = GST_MIXMATRIX(element);
- int i,j,k;
+ GstMixMatrix *mix = GST_MIXMATRIX (element);
+ int i, j, k;
GstBuffer **inbufs;
gfloat **infloats;
GstBuffer **outbufs;
gfloat **outfloats;
- int bytesize = sizeof(gfloat)*mix->outsize;
+ int bytesize = sizeof (gfloat) * mix->outsize;
gfloat gain;
// create the output buffers
- outbufs = g_new(GstBuffer *,mix->srcpadalloc);
- outfloats = g_new(gfloat *,mix->srcpadalloc);
- for (i=0;i<mix->srcpadalloc;i++) {
+ outbufs = g_new (GstBuffer *, mix->srcpadalloc);
+ outfloats = g_new (gfloat *, mix->srcpadalloc);
+ for (i = 0; i < mix->srcpadalloc; i++) {
if (mix->srcpads[i] != NULL) {
- outbufs[i] = gst_buffer_new_and_alloc(bytesize);
- outfloats[i] = (gfloat *)GST_BUFFER_DATA(outbufs[i]);
- memset(outfloats[i],0,bytesize);
+ outbufs[i] = gst_buffer_new_and_alloc (bytesize);
+ outfloats[i] = (gfloat *) GST_BUFFER_DATA (outbufs[i]);
+ memset (outfloats[i], 0, bytesize);
}
}
// go through all the input buffers and pull them
- inbufs = g_new(GstBuffer *,mix->sinkpadalloc);
- infloats = g_new(gfloat *,mix->sinkpadalloc);
- for (i=0;i<mix->sinkpadalloc;i++) {
+ inbufs = g_new (GstBuffer *, mix->sinkpadalloc);
+ infloats = g_new (gfloat *, mix->sinkpadalloc);
+ for (i = 0; i < mix->sinkpadalloc; i++) {
if (mix->sinkpads[i] != NULL) {
- gst_bytestream_read(mix->sinkbs[i],&inbufs[i],bytesize);
- infloats[i] = (gfloat *)GST_BUFFER_DATA(inbufs[i]);
+ gst_bytestream_read (mix->sinkbs[i], &inbufs[i], bytesize);
+ infloats[i] = (gfloat *) GST_BUFFER_DATA (inbufs[i]);
// loop through each src pad
- for (j=0;j<mix->srcpadalloc;j++) {
- if (mix->srcpads[j] != NULL) {
+ for (j = 0; j < mix->srcpadalloc; j++) {
+ if (mix->srcpads[j] != NULL) {
/*
{
int z;
@@ -442,31 +461,32 @@ gst_mixmatrix_loop (GstElement *element)
}
fprintf(stderr,"attempting to get gain for %dx%d\n",i,j);
*/
- gain = mix->matrix[i][j];
+ gain = mix->matrix[i][j];
// fprintf(stderr,"%d->%d=%0.2f ",i,j,gain);
- for (k=0;k<mix->outsize;k++) {
- outfloats[j][k] += infloats[i][k] * gain;
- }
- }
+ for (k = 0; k < mix->outsize; k++) {
+ outfloats[j][k] += infloats[i][k] * gain;
+ }
+ }
}
}
}
// fprintf(stderr,"\n");
- for (i=0;i<mix->srcpadalloc;i++) {
+ for (i = 0; i < mix->srcpadalloc; i++) {
if (mix->srcpads[i] != NULL) {
- gst_pad_push(mix->srcpads[i],GST_DATA (outbufs[i]));
+ gst_pad_push (mix->srcpads[i], GST_DATA (outbufs[i]));
}
}
}
static void
-gst_mixmatrix_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+gst_mixmatrix_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
{
GstMixMatrix *mix;
- g_return_if_fail(GST_IS_MIXMATRIX(object));
- mix = GST_MIXMATRIX(object);
+ g_return_if_fail (GST_IS_MIXMATRIX (object));
+ mix = GST_MIXMATRIX (object);
switch (prop_id) {
default:
@@ -475,22 +495,23 @@ gst_mixmatrix_set_property (GObject *object, guint prop_id, const GValue *value,
}
static void
-gst_mixmatrix_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+gst_mixmatrix_get_property (GObject * object, guint prop_id, GValue * value,
+ GParamSpec * pspec)
{
GstMixMatrix *mix;
- g_return_if_fail(GST_IS_MIXMATRIX(object));
- mix = GST_MIXMATRIX(object);
+ g_return_if_fail (GST_IS_MIXMATRIX (object));
+ mix = GST_MIXMATRIX (object);
switch (prop_id) {
case ARG_SINKPADS:
- g_value_set_int(value, mix->sinkpadalloc);
+ g_value_set_int (value, mix->sinkpadalloc);
break;
case ARG_SRCPADS:
- g_value_set_int(value, mix->srcpadalloc);
+ g_value_set_int (value, mix->srcpadalloc);
break;
case ARG_MATRIXPTR:
- g_value_set_pointer(value, mix->matrix);
+ g_value_set_pointer (value, mix->matrix);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -499,23 +520,17 @@ gst_mixmatrix_get_property (GObject *object, guint prop_id, GValue *value, GPara
}
static gboolean
-plugin_init (GstPlugin *plugin)
+plugin_init (GstPlugin * plugin)
{
if (!gst_library_load ("gstbytestream"))
return FALSE;
return gst_element_register (plugin, "mixmatrix",
- GST_RANK_NONE, GST_TYPE_MIXMATRIX);
+ GST_RANK_NONE, GST_TYPE_MIXMATRIX);
}
-GST_PLUGIN_DEFINE (
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "mixmatrix",
- "An audio mixer matrix",
- plugin_init,
- VERSION,
- GST_LICENSE,
- GST_PACKAGE,
- GST_ORIGIN
-)
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ "mixmatrix",
+ "An audio mixer matrix",
+ plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)