diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-12-22 09:23:22 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-12-22 09:23:22 -0500 |
commit | fd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch) | |
tree | 42d2a87726d196f4db1c68489007520a4c597062 /formats | |
parent | 9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff) |
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'formats')
-rw-r--r-- | formats/Makefile | 2 | ||||
-rw-r--r-- | formats/format_g719.c | 3 | ||||
-rw-r--r-- | formats/format_g723.c | 12 | ||||
-rw-r--r-- | formats/format_g726.c | 10 | ||||
-rw-r--r-- | formats/format_g729.c | 6 | ||||
-rw-r--r-- | formats/format_gsm.c | 2 | ||||
-rw-r--r-- | formats/format_h263.c | 2 | ||||
-rw-r--r-- | formats/format_h264.c | 2 | ||||
-rw-r--r-- | formats/format_ilbc.c | 4 | ||||
-rw-r--r-- | formats/format_jpeg.c | 4 | ||||
-rw-r--r-- | formats/format_ogg_vorbis.c | 6 | ||||
-rw-r--r-- | formats/format_pcm.c | 8 | ||||
-rw-r--r-- | formats/format_siren14.c | 2 | ||||
-rw-r--r-- | formats/format_siren7.c | 2 | ||||
-rw-r--r-- | formats/format_sln.c | 2 | ||||
-rw-r--r-- | formats/format_vox.c | 6 | ||||
-rw-r--r-- | formats/format_wav.c | 18 | ||||
-rw-r--r-- | formats/format_wav_gsm.c | 4 | ||||
-rw-r--r-- | formats/msgsm.h | 4 |
19 files changed, 49 insertions, 50 deletions
diff --git a/formats/Makefile b/formats/Makefile index 069d30be4..08c627fa3 100644 --- a/formats/Makefile +++ b/formats/Makefile @@ -1,6 +1,6 @@ # # Asterisk -- An open source telephony toolkit. -# +# # Makefile for file format modules # # Copyright (C) 1999-2006, Digium, Inc. diff --git a/formats/format_g719.c b/formats/format_g719.c index e6ecd794f..673ec0704 100644 --- a/formats/format_g719.c +++ b/formats/format_g719.c @@ -26,7 +26,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" @@ -156,4 +156,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "ITU G.719", .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND ); - diff --git a/formats/format_g723.c b/formats/format_g723.c index a88d132d9..458709393 100644 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -16,11 +16,11 @@ * at the top of the source tree. */ -/*! +/*! * \file * * \brief Old-style G.723.1 frame/timestamp format. - * + * * \arg Extensions: g723, g723sf * \ingroup formats */ @@ -28,7 +28,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" @@ -44,7 +44,7 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext) int delay; /* Read the delay for the next packet, and schedule again if necessary */ /* XXX is this ignored ? */ - if (fread(&delay, 1, 4, s->f) == 4) + if (fread(&delay, 1, 4, s->f) == 4) delay = ntohl(delay); else delay = -1; @@ -58,7 +58,7 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext) if (size > G723_MAX_SIZE) { ast_log(LOG_WARNING, "Size %d is invalid\n", size); /* The file is apparently no longer any good, as we - shouldn't ever get frames even close to this + shouldn't ever get frames even close to this size. */ return NULL; } @@ -99,7 +99,7 @@ static int g723_write(struct ast_filestream *s, struct ast_frame *f) if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) { ast_log(LOG_WARNING, "Unable to write frame: res=%d (%s)\n", res, strerror(errno)); return -1; - } + } return 0; } diff --git a/formats/format_g726.c b/formats/format_g726.c index 366f85d8d..bb769bc60 100644 --- a/formats/format_g726.c +++ b/formats/format_g726.c @@ -19,7 +19,7 @@ /*!\file * * \brief Headerless G.726 (16/24/32/40kbps) data format for Asterisk. - * + * * File name extensions: * \arg 40 kbps: g726-40 * \arg 32 kbps: g726-32 @@ -31,7 +31,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" @@ -49,7 +49,7 @@ #define BUF_SIZE (5*FRAME_TIME) /* max frame size in bytes ? */ /* Frame sizes in bytes */ -static int frame_size[4] = { +static int frame_size[4] = { FRAME_TIME * 5, FRAME_TIME * 4, FRAME_TIME * 3, @@ -141,12 +141,12 @@ static int g726_write(struct ast_filestream *s, struct ast_frame *f) struct g726_desc *fs = (struct g726_desc *)s->_private; if (f->datalen % frame_size[fs->rate]) { - ast_log(LOG_WARNING, "Invalid data length %d, should be multiple of %d\n", + ast_log(LOG_WARNING, "Invalid data length %d, should be multiple of %d\n", f->datalen, frame_size[fs->rate]); return -1; } if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) { - ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", + ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, frame_size[fs->rate], strerror(errno)); return -1; } diff --git a/formats/format_g729.c b/formats/format_g729.c index 324371c33..a6539a3b6 100644 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -22,14 +22,14 @@ * \note This is not an encoder/decoder. The codec for g729 is only * available with a commercial license from Digium, due to patent * restrictions. Check http://www.digium.com for information. - * \arg Extensions: g729 + * \arg Extensions: g729 * \ingroup formats */ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" @@ -86,7 +86,7 @@ static int g729_seek(struct ast_filestream *fs, off_t sample_offset, int whence) cur = ftello(fs->f); fseeko(fs->f, 0, SEEK_END); max = ftello(fs->f); - + bytes = BUF_SIZE * (sample_offset / G729A_SAMPLES); if (whence == SEEK_SET) offset = bytes; diff --git a/formats/format_gsm.c b/formats/format_gsm.c index 70600b47f..48699b6ac 100644 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -26,7 +26,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_h263.c b/formats/format_h263.c index 97bca21f0..49313b4fb 100644 --- a/formats/format_h263.c +++ b/formats/format_h263.c @@ -27,7 +27,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_h264.c b/formats/format_h264.c index 8860d8831..9ab15f89c 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -27,7 +27,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c index 326a04ebd..7de5abb84 100644 --- a/formats/format_ilbc.c +++ b/formats/format_ilbc.c @@ -2,7 +2,7 @@ * Asterisk -- An open source telephony toolkit. * * Brian K. West <brian@bkw.org> - * + * * Copyright (C) 1999 - 2005, Digium, Inc. * * Mark Spencer <markster@digium.com> @@ -83,7 +83,7 @@ static int ilbc_seek(struct ast_filestream *fs, off_t sample_offset, int whence) cur = ftello(fs->f); fseeko(fs->f, 0, SEEK_END); max = ftello(fs->f); - + bytes = ILBC_BUF_SIZE * (sample_offset / ILBC_SAMPLES); if (whence == SEEK_SET) offset = bytes; diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c index 798141d55..250939c22 100644 --- a/formats/format_jpeg.c +++ b/formats/format_jpeg.c @@ -19,7 +19,7 @@ /*! \file * * \brief JPEG File format support. - * + * * \arg File name extension: jpeg, jpg * \ingroup formats */ @@ -27,7 +27,7 @@ /*** MODULEINFO <support_level>extended</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c index 4fdd1c411..be5bb2bf9 100644 --- a/formats/format_ogg_vorbis.c +++ b/formats/format_ogg_vorbis.c @@ -62,13 +62,13 @@ struct ogg_vorbis_desc { /* format specific parameters */ ogg_stream_state os; ogg_page og; ogg_packet op; - + /* structures for handling Vorbis audio data */ vorbis_info vi; vorbis_comment vc; vorbis_dsp_state vd; vorbis_block vb; - + /*! \brief Indicates whether this filestream is set up for reading or writing. */ int writing; @@ -370,7 +370,7 @@ static off_t ogg_vorbis_tell(struct ast_filestream *fs) * \brief Seek to a specific position in an OGG/Vorbis filestream. * \param fs The filestream to take action on. * \param sample_offset New position for the filestream, measured in 8KHz samples. - * \param whence Location to measure + * \param whence Location to measure * \return 0 on success, -1 on failure. */ static int ogg_vorbis_seek(struct ast_filestream *fs, off_t sample_offset, int whence) diff --git a/formats/format_pcm.c b/formats/format_pcm.c index b4fd3b36a..35612c964 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -20,14 +20,14 @@ * * \brief Flat, binary, ulaw PCM file format. * \arg File name extension: alaw, al, alw, pcm, ulaw, ul, mu, ulw, g722, au - * + * * \ingroup formats */ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" @@ -193,7 +193,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f) /* Check if we have written to this position yet. If we have, then increment pos by one frame * for some degree of protection against receiving packets in the same clock tick. */ - + fstat(fileno(fs->f), &stat_buf ); if (stat_buf.st_size > fpos ) fpos += f->datalen; /* Incrementing with the size of this current frame */ @@ -227,7 +227,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f) } } #endif /* REALTIME_WRITE */ - + if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) { ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno)); return -1; diff --git a/formats/format_siren14.c b/formats/format_siren14.c index d39096a21..60a34445c 100644 --- a/formats/format_siren14.c +++ b/formats/format_siren14.c @@ -26,7 +26,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_siren7.c b/formats/format_siren7.c index 839675072..27fec36b1 100644 --- a/formats/format_siren7.c +++ b/formats/format_siren7.c @@ -26,7 +26,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_sln.c b/formats/format_sln.c index 20985ef90..6ad8c386e 100644 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -24,7 +24,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/format_vox.c b/formats/format_vox.c index 82379f641..b63e225be 100644 --- a/formats/format_vox.c +++ b/formats/format_vox.c @@ -20,14 +20,14 @@ * * \brief Flat, binary, ADPCM vox file format. * \arg File name extensions: vox - * + * * \ingroup formats */ /*** MODULEINFO <support_level>extended</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" @@ -122,7 +122,7 @@ static off_t vox_tell(struct ast_filestream *fs) { off_t offset; offset = ftello(fs->f) << 1; - return offset; + return offset; } static struct ast_format_def vox_f = { diff --git a/formats/format_wav.c b/formats/format_wav.c index b4e1f34f2..81a686e36 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -23,7 +23,7 @@ * \arg File name extension: wav (lower case) * \ingroup formats */ - + /*** MODULEINFO <support_level>core</support_level> ***/ @@ -166,9 +166,9 @@ static int check_header(FILE *f, int hz) } /* Skip any facts and get the first data block */ for(;;) - { + { char buf[4]; - + /* Begin data chunk */ if (fread(&buf, 1, 4, f) != 4) { ast_log(LOG_WARNING, "Read failed (block header format)\n"); @@ -187,7 +187,7 @@ static int check_header(FILE *f, int hz) return -1; continue; } - if(memcmp(buf, "data", 4) == 0 ) + if(memcmp(buf, "data", 4) == 0 ) break; ast_log(LOG_DEBUG, "Skipping unknown block '%.4s'\n", buf); if (fseek(f,data,SEEK_CUR) == -1 ) { @@ -200,7 +200,7 @@ static int check_header(FILE *f, int hz) truelength = lseek(fd, 0, SEEK_END); lseek(fd, curpos, SEEK_SET); truelength -= curpos; -#endif +#endif return data; } @@ -208,7 +208,7 @@ static int update_header(FILE *f) { off_t cur,end; int datalen,filelen,bytes; - + cur = ftello(f); fseek(f, 0, SEEK_END); end = ftello(f); @@ -217,7 +217,7 @@ static int update_header(FILE *f) datalen = htoll(bytes); /* chunk size is bytes of data plus 36 bytes of header */ filelen = htoll(36 + bytes); - + if (cur < 0) { ast_log(LOG_WARNING, "Unable to find our position\n"); return -1; @@ -432,7 +432,7 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f) return -1; } tmpi = f->data.ptr; - for (x=0; x < f->datalen/2; x++) + for (x=0; x < f->datalen/2; x++) tmp[x] = (tmpi[x] << 8) | ((tmpi[x] & 0xff00) >> 8); if ((res = fwrite(tmp, 1, f->datalen, fs->f)) != f->datalen ) { @@ -445,7 +445,7 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f) } s->bytes += f->datalen; - + return 0; } diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index cd1cc6a2a..05480dd31 100644 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -19,7 +19,7 @@ /*! \file * * \brief Save GSM in the proprietary Microsoft format. - * + * * Microsoft WAV format (Proprietary GSM) * \arg File name extension: WAV,wav49 (Upper case WAV, lower case is another format) * This format can be played on Windows systems, used for @@ -30,7 +30,7 @@ /*** MODULEINFO <support_level>core</support_level> ***/ - + #include "asterisk.h" #include "asterisk/mod_format.h" diff --git a/formats/msgsm.h b/formats/msgsm.h index ba7738f1d..bb46a3a61 100644 --- a/formats/msgsm.h +++ b/formats/msgsm.h @@ -115,7 +115,7 @@ static inline void conv66(gsm_byte * d, wav_byte * c) { gsm_byte frame_chain; unsigned int sr; unsigned int LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4]; - + readGSM_33(d); sr = 0; sr = (sr >> 6) | (LARc[0] << 10); @@ -459,7 +459,7 @@ static inline void conv65( wav_byte * c, gsm_byte * d){ unsigned int LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4]; /* silence bogus compiler warning */ unsigned int xmc[13*4] = { 0, }; - + sr = *c++; LARc[0] = sr & 0x3f; sr >>= 6; sr |= (uword)*c++ << 2; |