summaryrefslogtreecommitdiffstats
path: root/audio/gstsbcenc.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-10-18 22:46:12 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-10-18 22:46:12 +0000
commit2dda76438063672e2bdccf1709db3615d453ad5b (patch)
treed356158dfc6ec7a42fc3e1ab596e5f4e46391696 /audio/gstsbcenc.c
parent942422b8c90ba6e30339ab066cdc7fd2fc31cb7c (diff)
Fix coding style issues.
Diffstat (limited to 'audio/gstsbcenc.c')
-rw-r--r--audio/gstsbcenc.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/audio/gstsbcenc.c b/audio/gstsbcenc.c
index ea97563e..628d15c9 100644
--- a/audio/gstsbcenc.c
+++ b/audio/gstsbcenc.c
@@ -30,7 +30,6 @@
#include "gstsbcenc.h"
#include "gstsbcutil.h"
-
#define SBC_ENC_DEFAULT_MODE CFG_MODE_AUTO
#define SBC_ENC_DEFAULT_BLOCKS 16
#define SBC_ENC_DEFAULT_SUB_BANDS 8
@@ -83,7 +82,7 @@ enum {
PROP_MODE,
PROP_ALLOCATION,
PROP_BLOCKS,
- PROP_SUB_BANDS
+ PROP_SUBBANDS
};
GST_BOILERPLATE(GstSbcEnc, gst_sbc_enc, GstElement, GST_TYPE_ELEMENT);
@@ -121,6 +120,8 @@ static GstCaps* sbc_enc_generate_srcpad_caps(GstSbcEnc *enc, GstCaps *caps)
gint channels;
GstCaps* src_caps;
GstStructure *structure;
+ const gchar *mode;
+ const gchar *allocation;
structure = gst_caps_get_structure(caps, 0);
@@ -144,14 +145,17 @@ static GstCaps* sbc_enc_generate_srcpad_caps(GstSbcEnc *enc, GstCaps *caps)
else
enc->sbc.allocation = enc->allocation;
- src_caps = gst_caps_new_simple("audio/x-sbc", "rate", G_TYPE_INT,
- enc->sbc.rate, "channels", G_TYPE_INT,
- enc->sbc.channels, "mode", G_TYPE_STRING,
- gst_sbc_get_mode_string(enc->sbc.joint), "subbands",
- G_TYPE_INT, enc->sbc.subbands, "blocks", G_TYPE_INT,
- enc->sbc.blocks, "allocation", G_TYPE_STRING,
- gst_sbc_get_allocation_string(enc->sbc.allocation),
- NULL);
+ mode = gst_sbc_get_mode_string(enc->sbc.joint);
+ allocation = gst_sbc_get_allocation_string(enc->sbc.allocation);
+
+ src_caps = gst_caps_new_simple("audio/x-sbc",
+ "rate", G_TYPE_INT, enc->sbc.rate,
+ "channels", G_TYPE_INT, enc->sbc.channels,
+ "mode", G_TYPE_STRING, mode,
+ "subbands", G_TYPE_INT, enc->sbc.subbands,
+ "blocks", G_TYPE_INT, enc->sbc.blocks,
+ "allocation", G_TYPE_STRING, allocation,
+ NULL);
return src_caps;
}
@@ -280,7 +284,7 @@ static void gst_sbc_enc_set_property(GObject *object, guint prop_id,
/* TODO - verify consistency */
enc->blocks = g_value_get_int(value);
break;
- case PROP_SUB_BANDS:
+ case PROP_SUBBANDS:
/* TODO - verify consistency */
enc->subbands = g_value_get_int(value);
break;
@@ -305,7 +309,7 @@ static void gst_sbc_enc_get_property(GObject *object, guint prop_id,
case PROP_BLOCKS:
g_value_set_int(value, enc->blocks);
break;
- case PROP_SUB_BANDS:
+ case PROP_SUBBANDS:
g_value_set_int(value, enc->subbands);
break;
default:
@@ -341,7 +345,7 @@ static void gst_sbc_enc_class_init(GstSbcEncClass *klass)
"Blocks", 0, G_MAXINT,
SBC_ENC_DEFAULT_BLOCKS, G_PARAM_READWRITE));
- g_object_class_install_property(object_class, PROP_SUB_BANDS,
+ g_object_class_install_property(object_class, PROP_SUBBANDS,
g_param_spec_int("subbands", "Sub Bands",
"Sub Bands", 0, G_MAXINT,
SBC_ENC_DEFAULT_SUB_BANDS, G_PARAM_READWRITE));