diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-02-10 19:20:19 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-17 19:29:40 +0100 |
commit | 11328ad67f4b99195453b569e25e47bf47d6482f (patch) | |
tree | ecdeb0b157f83d57b983df851543f098c81aa140 /gst/siren/gstsirendec.c | |
parent | b1efc2f9aaa722420577088eb8bdc2ca53a848ba (diff) | |
download | gst-plugins-bad-11328ad67f4b99195453b569e25e47bf47d6482f.tar.gz gst-plugins-bad-11328ad67f4b99195453b569e25e47bf47d6482f.tar.bz2 gst-plugins-bad-11328ad67f4b99195453b569e25e47bf47d6482f.zip |
Re-indent the siren stuff to be gst style
Diffstat (limited to 'gst/siren/gstsirendec.c')
-rw-r--r-- | gst/siren/gstsirendec.c | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/gst/siren/gstsirendec.c b/gst/siren/gstsirendec.c index 513034c7..7b6caf66 100644 --- a/gst/siren/gstsirendec.c +++ b/gst/siren/gstsirendec.c @@ -33,18 +33,16 @@ GST_DEBUG_CATEGORY (sirendec_debug); /* elementfactory information */ static const GstElementDetails gst_siren_dec_details = -GST_ELEMENT_DETAILS ( - "Siren Decoder element", - "Codec/Decoder/Audio ", - "Decode streams encoded with the Siren7 codec into 16bit PCM", - "Youness Alaoui <kakaroto@kakaroto.homelinux.net>"); +GST_ELEMENT_DETAILS ("Siren Decoder element", + "Codec/Decoder/Audio ", + "Decode streams encoded with the Siren7 codec into 16bit PCM", + "Youness Alaoui <kakaroto@kakaroto.homelinux.net>"); static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-siren, " - "dct-length = (int) 320")); + GST_STATIC_CAPS ("audio/x-siren, " "dct-length = (int) 320")); static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -54,8 +52,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", "depth = (int) 16, " "endianness = (int) 1234, " "signed = (boolean) true, " - "rate = (int) 16000, " - "channels = (int) 1")); + "rate = (int) 16000, " "channels = (int) 1")); /* signals and args */ enum @@ -70,16 +67,14 @@ enum }; -static GstFlowReturn -gst_siren_dec_chain (GstPad *pad, GstBuffer *buf); +static GstFlowReturn gst_siren_dec_chain (GstPad * pad, GstBuffer * buf); -static void gst_siren_dec_dispose (GObject *object); +static void gst_siren_dec_dispose (GObject * object); static void _do_init (GType type) { - GST_DEBUG_CATEGORY_INIT - (sirendec_debug, "sirendec", 0, "sirendec"); + GST_DEBUG_CATEGORY_INIT (sirendec_debug, "sirendec", 0, "sirendec"); } GST_BOILERPLATE_FULL (GstSirenDec, gst_siren_dec, GstElement, @@ -99,7 +94,7 @@ gst_siren_dec_base_init (gpointer klass) } static void -gst_siren_dec_class_init (GstSirenDecClass *klass) +gst_siren_dec_class_init (GstSirenDecClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; @@ -115,7 +110,7 @@ gst_siren_dec_class_init (GstSirenDecClass *klass) } static void -gst_siren_dec_init (GstSirenDec *dec, GstSirenDecClass *klass) +gst_siren_dec_init (GstSirenDec * dec, GstSirenDecClass * klass) { GST_DEBUG_OBJECT (dec, "Initializing"); @@ -136,7 +131,7 @@ gst_siren_dec_init (GstSirenDec *dec, GstSirenDecClass *klass) } static void -gst_siren_dec_dispose (GObject *object) +gst_siren_dec_dispose (GObject * object) { GstSirenDec *dec = GST_SIREN_DEC (object); @@ -147,8 +142,7 @@ gst_siren_dec_dispose (GObject *object) dec->decoder = NULL; } - if (dec->srccaps) - { + if (dec->srccaps) { gst_caps_unref (dec->srccaps); dec->srccaps = NULL; } @@ -157,7 +151,7 @@ gst_siren_dec_dispose (GObject *object) } static GstFlowReturn -gst_siren_dec_chain (GstPad *pad, GstBuffer *buf) +gst_siren_dec_chain (GstPad * pad, GstBuffer * buf) { GstSirenDec *dec = GST_SIREN_DEC (gst_pad_get_parent_element (pad)); GstFlowReturn ret = GST_FLOW_OK; @@ -172,8 +166,7 @@ gst_siren_dec_chain (GstPad *pad, GstBuffer *buf) size = GST_BUFFER_SIZE (buf) * 16; size -= size % 640; - if (size == 0) - { + if (size == 0) { GST_LOG_OBJECT (dec, "Got buffer smaller than framesize: %u < 40", GST_BUFFER_SIZE (buf)); return GST_FLOW_OK; @@ -190,8 +183,7 @@ gst_siren_dec_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_TIMESTAMP (decoded) = GST_BUFFER_TIMESTAMP (buf); - while((in_offset + 40 <= GST_BUFFER_SIZE (buf)) && - ret == GST_FLOW_OK) { + while ((in_offset + 40 <= GST_BUFFER_SIZE (buf)) && ret == GST_FLOW_OK) { GST_LOG_OBJECT (dec, "Decoding frame"); @@ -224,7 +216,7 @@ gst_siren_dec_chain (GstPad *pad, GstBuffer *buf) gboolean -gst_siren_dec_plugin_init (GstPlugin *plugin) +gst_siren_dec_plugin_init (GstPlugin * plugin) { return gst_element_register (plugin, "sirendec", GST_RANK_MARGINAL, GST_TYPE_SIREN_DEC); |