From 11328ad67f4b99195453b569e25e47bf47d6482f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 10 Feb 2009 19:20:19 +0000 Subject: Re-indent the siren stuff to be gst style --- gst/siren/gstsirendec.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) (limited to 'gst/siren/gstsirendec.c') 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 "); +GST_ELEMENT_DETAILS ("Siren Decoder element", + "Codec/Decoder/Audio ", + "Decode streams encoded with the Siren7 codec into 16bit PCM", + "Youness Alaoui "); 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); -- cgit v1.2.1