diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-15 19:32:27 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-15 19:32:27 +0000 |
commit | 6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch) | |
tree | 82b5546809a42a56a7bc18bacf8ed6e209ad006e /ext/speex | |
parent | d07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff) |
don't mix tabs and spaces
Original commit message from CVS:
don't mix tabs and spaces
Diffstat (limited to 'ext/speex')
-rw-r--r-- | ext/speex/gstspeex.c | 4 | ||||
-rw-r--r-- | ext/speex/gstspeexdec.c | 29 | ||||
-rw-r--r-- | ext/speex/gstspeexenc.c | 37 |
3 files changed, 36 insertions, 34 deletions
diff --git a/ext/speex/gstspeex.c b/ext/speex/gstspeex.c index 0b0de0bf..cde74576 100644 --- a/ext/speex/gstspeex.c +++ b/ext/speex/gstspeex.c @@ -27,11 +27,11 @@ static gboolean plugin_init (GstPlugin * plugin) { if (!gst_element_register (plugin, "speexenc", GST_RANK_NONE, - GST_TYPE_SPEEXENC)) + GST_TYPE_SPEEXENC)) return FALSE; if (!gst_element_register (plugin, "speexdec", GST_RANK_PRIMARY, - GST_TYPE_SPEEXDEC)) + GST_TYPE_SPEEXDEC)) return FALSE; return TRUE; diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index 364ae669..2338f348 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -77,9 +77,10 @@ gst_speexdec_get_type (void) 0, (GInstanceInitFunc) gst_speexdec_init, }; + speexdec_type = - g_type_register_static (GST_TYPE_ELEMENT, "GstSpeexDec", &speexdec_info, - 0); + g_type_register_static (GST_TYPE_ELEMENT, "GstSpeexDec", &speexdec_info, + 0); } return speexdec_type; } @@ -89,18 +90,18 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-speex, " - "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") + "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") ); static GstStaticPadTemplate speex_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) BYTE_ORDER, " - "signed = (boolean) true, " - "width = (int) 16, " - "depth = (int) 16, " - "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") + "endianness = (int) BYTE_ORDER, " + "signed = (boolean) true, " + "width = (int) 16, " + "depth = (int) 16, " + "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") ); static void @@ -157,12 +158,12 @@ gst_speexdec_sinkconnect (GstPad * pad, const GstCaps * caps) gst_structure_get_int (structure, "rate", &rate); if (gst_pad_set_explicit_caps (speexdec->srcpad, - gst_caps_new_simple ("audio/x-raw-int", - "endianness", G_TYPE_INT, G_BYTE_ORDER, - "signed", G_TYPE_BOOLEAN, TRUE, - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, 1, NULL))) { + gst_caps_new_simple ("audio/x-raw-int", + "endianness", G_TYPE_INT, G_BYTE_ORDER, + "signed", G_TYPE_BOOLEAN, TRUE, + "width", G_TYPE_INT, 16, + "depth", G_TYPE_INT, 16, + "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, 1, NULL))) { return GST_PAD_LINK_OK; } return GST_PAD_LINK_REFUSED; diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index d1b4ae39..d33a1d9c 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -77,9 +77,10 @@ gst_speexenc_get_type (void) 0, (GInstanceInitFunc) gst_speexenc_init, }; + speexenc_type = - g_type_register_static (GST_TYPE_ELEMENT, "GstSpeexEnc", &speexenc_info, - 0); + g_type_register_static (GST_TYPE_ELEMENT, "GstSpeexEnc", &speexenc_info, + 0); } return speexenc_type; } @@ -89,18 +90,18 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-int, " - "endianness = (int) BYTE_ORDER, " - "signed = (boolean) true, " - "width = (int) 16, " - "depth = (int) 16, " - "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") + "endianness = (int) BYTE_ORDER, " + "signed = (boolean) true, " + "width = (int) 16, " + "depth = (int) 16, " + "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") ); static GstStaticPadTemplate speex_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-speex, " - "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") + "rate = (int) [ 1000, 48000 ], " "channels = (int) 1") ); static void @@ -165,15 +166,15 @@ gst_speexenc_sinkconnect (GstPad * pad, const GstCaps * caps) structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "rate", &speexenc->rate); if (gst_pad_try_set_caps (speexenc->srcpad, - gst_caps_new_simple ("audio/x-speex", - "rate", G_TYPE_INT, speexenc->rate, - "channels", G_TYPE_INT, 1, NULL))) { + gst_caps_new_simple ("audio/x-speex", + "rate", G_TYPE_INT, speexenc->rate, + "channels", G_TYPE_INT, 1, NULL))) { speex_init_header (&speexenc->header, speexenc->rate, 1, speexenc->mode); speexenc->header.frames_per_packet = speexenc->n_packets; speexenc->state = speex_encoder_init (speexenc->mode); speex_encoder_ctl (speexenc->state, SPEEX_GET_FRAME_SIZE, - &speexenc->frame_size); + &speexenc->frame_size); return GST_PAD_LINK_OK; } @@ -203,9 +204,9 @@ gst_speexenc_chain (GstPad * pad, GstData * _data) if (!GST_PAD_CAPS (speexenc->srcpad)) { if (!gst_pad_try_set_caps (speexenc->srcpad, - gst_caps_new_simple ("audio/x-speex", - "rate", G_TYPE_INT, speexenc->rate, - "channels", G_TYPE_INT, 1, NULL))) { + gst_caps_new_simple ("audio/x-speex", + "rate", G_TYPE_INT, speexenc->rate, + "channels", G_TYPE_INT, 1, NULL))) { GST_ELEMENT_ERROR (speexenc, CORE, NEGOTIATION, (NULL), (NULL)); return; } @@ -228,7 +229,7 @@ gst_speexenc_chain (GstPad * pad, GstData * _data) if (speexenc->bufsize && (speexenc->bufsize + size >= frame_size)) { memcpy (speexenc->buffer + speexenc->bufsize, data, - (frame_size - speexenc->bufsize) * sizeof (gint16)); + (frame_size - speexenc->bufsize) * sizeof (gint16)); for (i = 0; i < frame_size; i++) input[i] = speexenc->buffer[i]; @@ -241,7 +242,7 @@ gst_speexenc_chain (GstPad * pad, GstData * _data) outbuf = gst_buffer_new_and_alloc (frame_size * speexenc->n_packets); GST_BUFFER_SIZE (outbuf) = speex_bits_write (&speexenc->bits, - GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf)); + GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf)); GST_BUFFER_TIMESTAMP (outbuf) = speexenc->next_ts; speex_bits_reset (&speexenc->bits); @@ -267,7 +268,7 @@ gst_speexenc_chain (GstPad * pad, GstData * _data) outbuf = gst_buffer_new_and_alloc (frame_size * speexenc->n_packets); GST_BUFFER_SIZE (outbuf) = speex_bits_write (&speexenc->bits, - GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf)); + GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf)); GST_BUFFER_TIMESTAMP (outbuf) = speexenc->next_ts; speex_bits_reset (&speexenc->bits); |