Commit Graph

482 Commits

Author SHA1 Message Date
Kinsey Moore 510b3b3594 Allow codec_resample to be unloaded
Ensure that trans_size is correct to prevent uninitialized entries from
preventing reload.

(closes issue ASTERISK-21401)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    codec_resample-unload.patch uploaded by Corey Farrell
........

Merged revisions 385582 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12 22:26:17 +00:00
David M. Lee ed382681e5 Multiple revisions 383341-383342
........
  r383341 | dlee | 2013-03-19 10:57:29 -0500 (Tue, 19 Mar 2013) | 5 lines
  
  Removed codecs/g722/*.i on make clean
  ........
  
  Merged revisions 383340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r383342 | dlee | 2013-03-19 10:58:33 -0500 (Tue, 19 Mar 2013) | 1 line
  
  Remove codecs/speex/*.i on make clean
........

Merged revisions 383341-383342 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-19 16:00:22 +00:00
Kinsey Moore 8e3815a8ee Prevent segfault for interpolated iLBC frames
When iLBC is being used with a jitter buffer and the jb has to
interpolate frames, it generates frames with a null pointer and a
non-zero datalen. This is now handled properly.

(closes issue ASTERISK-20914)
Reported By: John McEleney
Patches:
  ASTERISK-20914-1.8.diff uploaded by Matt Jordan (license 6283)
........

Merged revisions 379718 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 379719 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 18:47:47 +00:00
Kinsey Moore 86b9e31796 codec_dahdi: Fix output of "transcoder show" CLI command.
In r306010 "Asterisk media architecture conversion - no more format
bitfields", the logic for incrementing encoders and decoders when
opening transcoder channels was changed without making the corresponding
change when decrementing encoder / decoder channels.  The result being
that when a channel was destroyed, codec_dahdi couldn't properly tell if
it was an encoder or decoder, and the default case is to assume it was a
decoder.

This could result in negative numbers for decoders in use like in:
  VOIP6*CLI> transcoder show
  2/-2 encoders/decoders of 92 channels are in use.

(closes issue ASTERISK-19921)
Patch-by: Shaun Ruffell
........

Merged revisions 377382 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 377383 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-07 22:08:48 +00:00
Jonathan Rose 31f1881ceb GSM: Fix encoding problems with GSM
(closes issue ASTERISK-20457)
Reported by: Richard Miller
Patches:
	code.patch uploaded by Richard Miller (license 5685)
........

Merged revisions 375272 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375273 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375288 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-22 17:31:20 +00:00
Andrew Latham 6c20cf2d8a Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 14:17:40 +00:00
Andrew Latham b106b77041 Title update
Update title that was left behind many years ago. Used revision 6596 as my guide for what it should be.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14 21:56:13 +00:00
Richard Mudgett 23be67622d Fix valgrind found memcpy issues in codec_ilbc.
Valgrind found codec_ilbc using memcpy instead of memmove for overlapping
memory blocks.

(issue ASTERISK-19890)
(closes issue ASTERISK-20231)
Reported by: Walter Doekes
Patches:
      ASTERISK-20231.patch (license #5674) patch uploaded by Walter Doekes
........

Merged revisions 373640 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373645 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373650 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 17:22:25 +00:00
Richard Mudgett a71a541eda Make rebuild GSM, ilbc, or lpc10 codecs if the respective sources change.
........

Merged revisions 373618 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373633 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373635 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 17:02:21 +00:00
Andrew Latham fd98835f1f Doxygen Updates Janitor Work
* Whitespace, doc-blocks, spelling, case, missing and incorrect tags.
* Add cleanup to Makefile for the Doxygen configuration update
* Start updating Doxygen configuration for cleaner output
* Enable inclusion of configuration files into documentation
* remove mantisworkflow...
* update documentation README
* Add markup to Tilghman's email and talk with him about updating his email, he knows...
* no code changes on this commit other than the mentioned Makefile change

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-22 20:43:30 +00:00
Andrew Latham 6f61cb50c5 Doxygen Updates - janitor work
Doxygen updates including mistakes, misspellings, missing parameters, updates for Doxygen style.  Some missing txt file links are removed but their content or essense will be included in some later updates.  A majority of the txt files were removed in the 1.6 era but never noted. The HR and EXTREF are simple changes that make the documentation more compatable with more versions of Doxygen.

Further updates coming.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21 17:14:59 +00:00
Matthew Jordan 8018b879a2 Clean up doxygen warnings
This patch fixes numerous doxygen warnings across Asterisk.  It also updates
the makefile to regenerate the doxygen configuration on the local system
before running doxygen to help prevent warnings/errors on the local system.

Much thanks to Andrew for tackling one of the Asterisk janitor projects!

(issue ASTERISK-20259)
Reported by: Andrew Latham
Patches:
  doxygen_partial.diff uploaded by Andrew Latham (license 5985)
  make_progdocs.diff uploaded by Andrew Latham (license 5985)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 14:23:28 +00:00
Kevin P. Fleming b5193428a7 Enable usage of system-provided iLBC library.
The WebRTC version of the iLBC codec is now package as a library and is
available on some platforms. This patch allows codec_ilbc to be built against
that library if it is present.

Review: https://reviewboard.asterisk.org/r/1964/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-23 21:27:56 +00:00
Kevin P. Fleming 166b4e2b30 Multiple revisions 369001-369002
........
  r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
  
  Add support-level indications to many more source files.
  
  Since we now have tools that scan through the source tree looking for files
  with specific support levels, we need to ensure that every file that is
  a component of a 'core' or 'extended' module (or the main Asterisk binary)
  is explicitly marked with its support level. This patch adds support-level
  indications to many more source files in tree, but avoids adding them to
  third-party libraries that are included in the tree and to source files
  that don't end up involved in Asterisk itself.
........
  r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
  
  Add a script to enable finding source files without support-levels defined.
........

Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15 16:20:16 +00:00
Jonathan Rose 6f6af21383 Block on frameout if the hardware has enough samples to complete a frame.
Fixes some problems with skipping audio in elaborate scenarios involving
multiple codecs by making codec_dahdi operate in a more synchronous
fashion similar to codec_g729. This change also fixes the use of file
conversion tools from Asterisk's CLI. This change may cause the thread
responsible for transcoding audio to block briefly (Shaun Ruffell describes
this as 'several milliseconds') while waiting for the hardware transcoder.

(closes issue ASTERISK-19643)
reported by: Shaun Ruffell
Patches:
	0001-codec_dahdi-Block-on-frameout-the-hardware-has-enoug.patch
	uploaded by Shaun Ruffell (license 5417)
........

Merged revisions 365989 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 365990 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-09 19:28:47 +00:00
Walter Doekes fc63e07135 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky
Review: https://reviewboard.asterisk.org/r/1743/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 18:57:40 +00:00
Kinsey Moore 8696daadf8 Simplify build system architecture optimization
This change to the build system rips out any usage of PROC along with
architecture-specific optimizations in favor of using -march=native where it is
supported.  This fixes broken builds on 64bit Intel systems and results in
better optimized code on systems running GCC 4.2+.

Review: https://reviewboard.asterisk.org/r/1852/
(closes issue ASTERISK-19462)
........

Merged revisions 361955 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361956 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-12 15:25:47 +00:00
Sean Bright 5aba1ca84a Return g729 and g723.1 frames with the number of samples set properly.
If the wctc4xxp returns more than a single packet, we need to update the number
of samples in the returned frame accordingly.

Acked-by: Shaun Ruffell <sruffell@digium.com>
........

Merged revisions 358484 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358485 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 16:16:03 +00:00
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

Review:  https://reviewboard.asterisk.org/r/1599/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 20:27:16 +00:00
Kinsey Moore 43621b05a9 More corrections for the ilbc code
These changes are in a file that is not compiled by default, and so were
missed on earlier checks.
........

Merged revisions 351860 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351861 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 19:36:04 +00:00
Kinsey Moore d61920b6d9 Restore LSF_check function calls from set/unused variable removal
These functions are not noops and modify the array that is passed in. Thanks
for the catch Richard.
........

Merged revisions 351818 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:52:20 +00:00
Kinsey Moore 75243988d5 Remove more set, but unused variables in the ilbc codec
GCC 4.6.3 caught these in dev mode as well.
........

Merged revisions 351816 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:33:26 +00:00
Matthew Jordan 7a442b017c Remove unused variable 'tmp' from helpfun in ilbc codec
gcc version 4.6.2 caught an unused variable in the ilbc codec
library.  This would prevent compilation with --enable-dev-mode;
variable removed.
........

Merged revisions 351760 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351761 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 16:00:13 +00:00
Matthew Jordan 16adf6de8c Include iLBC source code for distribution with Asterisk
This patch includes the iLBC source code for distribution with Asterisk.
Clarification regarding the iLBC source code was provided by Google, and
the appropriate licenses have been included in the codecs/ilbc folder.

Review: https://reviewboard.asterisk.org/r/1675
Review: https://reviewboard.asterisk.org/r/1649

(closes issue: ASTERISK-18943)
Reporter: Leif Madsen
Tested by: Matt Jordan
........

Merged revisions 351450 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351451 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-18 21:06:29 +00:00
Tilghman Lesher 77b670c4ab Allow each logging destination and console to have its own notion of the verbosity level.
Review: https://reviewboard.asterisk.org/r/1599


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 18:43:16 +00:00
Tilghman Lesher 5e7121b44f Merged revisions 336734 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336734 | tilghman | 2011-09-19 15:29:40 -0500 (Mon, 19 Sep 2011) | 18 lines
  
  Merged revisions 336733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336733 | tilghman | 2011-09-19 15:27:03 -0500 (Mon, 19 Sep 2011) | 11 lines
    
    Various changes to allow 1.8 to compile on Mac OS X Lion (10.7)
    
    * Makefile workaround for 10.6 extended to work on 10.7 and later.
    * Now uses the 'weak' symbol for Lion systems, which no longer support
      'weak_import'
    
    Closes ASTERISK-17612.
    Closes ASTERISK-18213.
    
    Tested by: tilghman, oej.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:31:09 +00:00
David Vossel 80a4611fd7 Merged revisions 330940 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r330940 | dvossel | 2011-08-05 10:53:49 -0500 (Fri, 05 Aug 2011) | 2 lines
  
  The slin resampler is no longer dependent on an external library, but the dependency was not removed correctly.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-05 15:57:06 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Tilghman Lesher 7d179abfd4 Merged revisions 326411 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r326411 | tilghman | 2011-07-05 17:08:29 -0500 (Tue, 05 Jul 2011) | 14 lines
  
  Add the attribute "type" to each "<use>" for menuselect.
  
  This matters only when autoconf fails to detect that weak linking is supported.
  External optional dependencies will become optional in both cases, as they are
  removed at compile time when not detected.  However, runtime-optional modules
  are made mandatory when weak linking is not found.  This change affects only
  the external optional dependencies; previously, they were incorrectly required
  when weak linking support was not detected.
  
  Patches:
  	20110702__issue18062__asterisk_trunk.diff.txt by tilghman (License #5003)
  
  Tested by: iasgoscouk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 22:11:40 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Shaun Ruffell 3b52f36551 codec_dahdi: DAHDI still advertises formats using the old bitfields.
Previously, the DAHDI format bit fields matched up with the Asterisk
bitfields. Since the Asterisk codec bit fields were replaced in r306010,
codec_dahdi needs to contain the formats itself. In the future, the DAHDI
formats should either change to something other than bitfields, or the
bitfields need to move from include/dahdi/kernel.h to
include/dahdi/user.h.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 19:56:07 +00:00
David Vossel e3222d8111 Fixes error with frame datalen being calculated from samples when this is not allwaya accurate.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 16:37:15 +00:00
David Vossel b1f4589536 Remove libresample dependency from codec_resample.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-18 16:27:23 +00:00
Kevin P. Fleming 7cf70df999 Use "-march=native" when possible.
Recent versions of GCC have a tuning option value of 'native', which causes
the compiler to optimize the build for the CPU the compile is performed on.
Since most people are building Asterisk on the machine they plan to run it on,
the configure script and build system will now use this value unless a different
value is specified by the user in CFLAGS when the configure script is executed.
In addition, this value will be used for building the GSM and LPC10 codecs as
well, in preference to the logic that has been in their Makefiles forever to
optimize for certain types of CPUs.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-11 15:09:23 +00:00
David Vossel d760e81f37 Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
   using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
   and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
   for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
   updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.

-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c

Review: https://reviewboard.asterisk.org/r/1104/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22 23:04:49 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

Review: https://reviewboard.asterisk.org/r/1071/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
David Vossel 9f65acf33e Fix compile error in codec ilbc translator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:42:15 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

Review: https://reviewboard.asterisk.org/r/1083/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Shaun Ruffell 178f3f1848 Merged revisions 293970 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r293970 | sruffell | 2010-11-04 19:07:11 -0500 (Thu, 04 Nov 2010) | 32 lines
  
  Merged revisions 293969 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r293969 | sruffell | 2010-11-04 19:06:02 -0500 (Thu, 04 Nov 2010) | 25 lines
    
    Merged revisions 293968 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r293968 | sruffell | 2010-11-04 19:02:53 -0500 (Thu, 04 Nov 2010) | 17 lines
      
      codecs/codec_dahdi: Prevent "choppy" audio when receiving unexpected frame sizes.
      
      dahdi-linux 2.4.0 (specifically commit 9034) added the capability for
      the wctc4xxp to return more than a single packet of data in response to
      a read.  However, when decoding packets, codec_dahdi was still assuming
      that the default number of samples was in each read.
      
      In other words, each packet your provider sent you, regardless of size,
      would result in 20 ms of decoded data (30 ms if decoding G723). If your
      provider was sending 60 ms packets then codec_dahdi would end up
      stripping 40 ms of data from each transcoded frame resulting in "choppy"
      audio.
      
      This would only affect systems where G729 packets are arriving in sizes
      greater than 20ms or G723 packets arriving in sizes greater than 30ms.
      
      DAHDI-744.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-05 00:08:09 +00:00
Paul Belanger 73c22a15b9 Merged revisions 285819 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285819 | pabelanger | 2010-09-09 18:52:31 -0400 (Thu, 09 Sep 2010) | 22 lines
  
  Merged revisions 285818 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r285818 | pabelanger | 2010-09-09 18:49:19 -0400 (Thu, 09 Sep 2010) | 15 lines
    
    Merged revisions 285817 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r285817 | pabelanger | 2010-09-09 18:34:35 -0400 (Thu, 09 Sep 2010) | 8 lines
      
      GCC 4.2.x optimizations result in improper behavior of GSM codec
      
      (closes issue #17688)
      Reported by: pprindeville
      Patches: 
            asterisk-trunk-bugid11243.patch uploaded by pprindeville (license 347)
      Tested by: mkeuter, pprindeville
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-09 22:53:44 +00:00
David Vossel d4bbf88e96 add speex 16khz sample frame so codec cost can be calculated
(closes issue #17534)
Reported by: fabled
Patches:
      speex-wb-sample.diff uploaded by fabled (license 448)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-21 21:58:33 +00:00
David Vossel b00f58da25 adds speex 16khz audio support
(closes issue #17501)
Reported by: fabled
Patches:
      asterisk-trunk-speex-wideband-v2.patch uploaded by fabled (license 448)
Tested by: malcolmd, fabled, dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-17 17:23:43 +00:00
Richard Mudgett 6ab2173c97 Make compile again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-03 18:38:00 +00:00
Mark Michelson a68f5b96bc Remove unnecessary code relating to PLC.
The logic for handling generic PLC is now handled in ast_write in
channel.c instead of in translation code.

Review: https://reviewboard.asterisk.org/r/683/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-03 17:09:11 +00:00
Kevin P. Fleming ae6008ef3a Change per-file debug and verbose levels to be per-module, the way
users expect them to work.

'core set debug' and 'core set verbose' can optionally change the
level for a specific filename; however, this is actually for a
specific source file name, not the module that source file is included
in. With examples like chan_sip, chan_iax2, chan_misdn and others
consisting of multiple source files, this will not lead to the
behavior that users expect. If they want to set the debug level for
chan_sip, they want it set for all of chan_sip, and not to have to
also set it for reqresp_parser and other files that comprise the
chan_sip module.

This patch changes this functionality to be module-name based instead
of file-name based.

To make this work, some Makefile modifications were required to ensure
that the AST_MODULE definition is present in each object file produced
for each module as well.

Review: https://reviewboard.asterisk.org/r/574/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23 14:22:27 +00:00
Tilghman Lesher fcdd407f5c OSARCH is not inherited to this directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-16 18:40:14 +00:00
Tilghman Lesher f053b65f17 Make the Makefile logic more explicit and move the Snow Leopard logic down to where it's not executed on non-Darwin systems.
(closes issue #17028)
 Reported by: pabelanger
 Patches: 
       issue17028_20100315.patch uploaded by seanbright (license 71)
       20100315__issue17028.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman, pabelanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-15 16:27:08 +00:00
Tilghman Lesher c1e33534a5 Build system modifications to ensure that Asterisk properly builds on Mac OS X 10.6.
(closes issue #16997)
 Reported by: jquinn
 Patches: 
       20100309__issue16997__2.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman, russell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-09 20:30:03 +00:00
Joshua Colp 9c807da785 Merged revisions 229281 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r229281 | file | 2009-11-10 16:03:14 -0400 (Tue, 10 Nov 2009) | 8 lines
  
  Remove broken support for direct transcoding between G.726 RFC3551 and G.726 AAL2.
  
  On some systems the translation core would actually consider g726aal2 -> g726 -> signed linear
  to be a quicker path then g726aal2 -> signed linear which exposed this problem.
  
  (closes issue #15504)
  Reported by: globalnetinc
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-10 20:06:13 +00:00
David Vossel 8a80c1bd8c Fixes merging issue from 1.4, frame data is held in data.ptr in trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 17:22:31 +00:00
David Vossel ee5ecf3c3e Merged revisions 228418 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r228418 | dvossel | 2009-11-06 11:07:13 -0600 (Fri, 06 Nov 2009) | 13 lines
  
  fixes segfault in iLBC
  
  For reasons not yet known, it appears possible for an ast_frame
  to have a datalen greater than zero while the actual data is NULL
  during Packet Loss Concealment.  Most codecs don't support PLC so
  this doesn't affect them.  This patch catches the malformed frame
  and prevents the crash from occuring.  Additional efforts to determine
  why it is possible for a frame to look like this are still being
  investigated.
  
  (issue #16979)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 17:09:01 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Russell Bryant cd10bd931a Merged revisions 224931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224931 | russell | 2009-10-20 21:59:54 -0500 (Tue, 20 Oct 2009) | 5 lines
  
  Isolate frames returned from a DSP instance or codec translator.
  
  The reasoning for these changes are the same as what I wrote in the commit
  message for rev 222878.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 03:09:04 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
David Brooks 48363c16e1 Fixes numerous spelling errors. Patch submitted by alecdavis.
(closes issue #15595)
Reported by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-30 16:07:05 +00:00
Kevin P. Fleming 96e4e31eeb Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
  
  Ensure that user-provided CFLAGS and LDFLAGS are honored.
  
  This commit changes the build system so that user-provided flags (in ASTCFLAGS
  and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
  by the build system itself, so that the user can effectively override the
  build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
  be provided *either* in the environment before running 'make', or as variable
  assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
  is no longer necessary, so they are no longer documented, but are still supported
  so as not to break existing build systems that supply them when building Asterisk.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:28:04 +00:00
Sean Bright 6b5dbba90c Merged revisions 206635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r206635 | seanbright | 2009-07-15 11:57:51 -0400 (Wed, 15 Jul 2009) | 1 line
  
  Only print debug info in codec_dahdi if we are asking for it.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-15 16:00:24 +00:00
David Vossel dcfe69ec64 fixes some memory leaks and redundant conditions
(closes issue #15269)
Reported by: contactmayankjain
Patches:
      patch.txt uploaded by contactmayankjain (license 740)
      memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
Tested by: contactmayankjain, dvossel




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:37:42 +00:00
Russell Bryant 19853c437e Shuttle some bits around to address some gain issues with G.722.
(closes AST-209)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 17:59:08 +00:00
Russell Bryant 66c76daba1 Further simplify codec_g722 build.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 17:37:12 +00:00
Russell Bryant 79b5f06f34 Actually force running make for g722.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 17:24:39 +00:00
Shaun Ruffell c65029b74e Several changes to codec_dahdi to play nice with G723.
This commit brings in the changes that were living out on the
svn/asterisk/team/sruffell/asterisk-trunk-transcoder branch.  codec_dahdi.c now
always uses signed linear as the simple codec so that a soft g729 codec will
not end up being preferred to the hardware codec.  There are also changes to
allow codec_dahdi.c to feed packets to the hardware in the native sample size of
the codec.  This solves problems with choppy audio when using G723. 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 22:28:41 +00:00
Kevin P. Fleming 8d5deb312b Merged revisions 157859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
  
  the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
  
  with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
  
  while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:08:12 +00:00
Kevin P. Fleming 10d36d9f34 fix a few small things found by using sparse
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:49:02 +00:00
Jason Parker ae0a736353 Merge codec_consistency branch. This should make sample usage much happier.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 21:35:23 +00:00
Tilghman Lesher a8775172aa When using MALLOC_DEBUG, codec_lpc10 leaks memory, because it matches a library
malloc() with an ast_free (which, of course, doesn't match up with known
allocated memory, so the free fails).
(closes issue #13702)
 Reported by: eliel
 Patches: 
       codec_lpc10_lpcini.c uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-15 16:41:54 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Russell Bryant c0c743a5fa Update instructions for getting libresample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 15:11:53 +00:00
Shaun Ruffell b39e0f3c66 Remove extraneous debugging messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 20:03:28 +00:00
Shaun Ruffell f75d794c69 Fix bug where the samples were not accurate when in G723 mode, which would
cause the timestamp field of the RTP header to be invalid.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 19:57:22 +00:00
Sean Bright db1ed285c4 More RSW merges. This should do it for the channels/ dir.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09 14:12:34 +00:00
Shaun Ruffell f9ba4bf070 Updating codec_dahdi to the new transcoder interface.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 20:54:52 +00:00
Sean Bright 6305009cfc More merges from resolve-shadow warnings:
utils/
  codecs/
  and a change I missed from formats/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 15:16:48 +00:00
Russell Bryant c87f901cfd Remove libresample from the Asterisk source tree. It is now available in its
own repository, and must be installed like any other library for Asterisk to
use.  The two modules that require it are codec_resample and app_jack.

To install libresample:

$ svn co http://svn.digium.com/svn/libresample/trunk libresample
$ cd libresample
$ ./configure
$ make
$ sudo make install

This code is currently in our own repository because the build system did not
include the appropriate targets for building a dynamic library or for installing
the library.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 14:47:41 +00:00
Russell Bryant 5de127e103 Enable higher quality resampling, as it doesn't have a noticeable performance
impact on my machine ..


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 13:51:05 +00:00
Brett Bryant 5b7933fe5e Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
      ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:09:35 +00:00
Tilghman Lesher 7b84cf6fa6 Convert casts to unions, to fix alignment issues on Solaris
(closes issue #12932)
 Reported by: snuffy
 Patches: 
       bug_12932_20080627.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 17:06:17 +00:00
Kevin P. Fleming fd4a60c459 Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 23:05:28 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Donny Kavanagh 2433d6ecb9 Revision 117802 changed frame.data to frame.data.ptr however codec_ilbc.c was not updated. This resolves that oversight.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 19:03:11 +00:00
Jason Parker f7eb823a7a Fix a few places where frame data was used directly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 17:10:53 +00:00
Michiel van Baak f1e9371da8 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Joshua Colp fc120bf827 Merged revisions 115327 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115327 | file | 2008-05-05 19:10:05 -0300 (Mon, 05 May 2008) | 2 lines

Make sure that either the main speex library contains preprocess functions or that speexdsp does. If both fail then speex stuff can not be built.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:13:57 +00:00
Jason Parker 7af650c18b Merged revisions 111856 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111856 | qwell | 2008-03-28 16:45:35 -0500 (Fri, 28 Mar 2008) | 12 lines

Allow gsm to compile correctly on x86 with gcc4 optimizations.

(closes issue #11243)
Reported by: whiskerp
Patches:
      11243-maybe-asm.diff uploaded by qwell (license 4)
Tested by: Seggy (IRC)

Note: While I did write this patch, I would not have found this if fossil
 had not reported and fixed issue #12253.  A huge thanks to him for helping
 to (indirectly) find the problem here.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 21:46:02 +00:00
Kevin P. Fleming 789831ef9a Merged revisions 110880 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r110880 | kpfleming | 2008-03-26 09:42:35 -0700 (Wed, 26 Mar 2008) | 10 lines

Merged revisions 110869 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r110869 | kpfleming | 2008-03-26 08:53:46 -0700 (Wed, 26 Mar 2008) | 2 lines

due to licensing restrictions, we cannot distribute the source code for iLBC encoding and decoding... so remove it, and add instructions on how the user can obtain it themselves

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 17:10:28 +00:00
Jason Parker e3ea6829bb Merged revisions 110474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110474 | qwell | 2008-03-21 09:32:52 -0500 (Fri, 21 Mar 2008) | 7 lines

Don't attempt to do optimizations of gsm on mips platforms either.

(closes issue #12270)
Reported by: zandbelt
Patches:
      026-gsm-mips.patch uploaded by zandbelt (license 33)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-21 14:36:17 +00:00
Russell Bryant f31cc97197 Use the correct buffer for g722tolin16_sample. This shouldn't have caused any
problems, but Qwell noticed the typo here.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 22:02:20 +00:00
Jason Parker 56bddc2a0d Merged revisions 109648 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109648 | qwell | 2008-03-18 14:23:44 -0500 (Tue, 18 Mar 2008) | 7 lines

Allow codecs that use log2comp (g726) to compile correctly on x86 with gcc4 optimizations.

(closes issue #12253)
Reported by: fossil
Patches:
      log2comp.patch uploaded by fossil (license 140)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 19:24:15 +00:00
Kevin P. Fleming 4925e7b835 Merged revisions 107464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines

fix various other problems found by gcc 4.3

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 15:13:38 +00:00
Russell Bryant 5ca5d97673 Merge changes from team/russell/g722-sillyness ...
Fix a number of other places where the number of samples in a G722 frame was
not properly handled because of various reasons.

main/rtp.c:
 - When a G722 frame is read from the smoother, the number of samples in the
   frame must be divided by 2 before being sent out over the network.  Even
   though G722 is 16 kHz, an error in some previous spec has made it so that
   we have to list the number of samples such as if it was 8 kHz.

main/file.c:
 - When scheduling the next time to expect a frame, take into account that the
   format of the file we're reading from may not be 8 kHz.

codecs/codec_g722.c:
 - When converting from G722 to slinear, g722_decode() expects its samples
   parameter to be in the silly (real samples / 2) format.  Make it so.
 - When converting from slinear to G722, properly set the number of samples in
   the frame to be the number of bytes of output * 2.

formats/format_pcm.c:
 - This format module handles G722, among a number of other formats.  However,
   the read() and seek() functions did not account for the fact that G722 has
   2 samples per byte.

(closes issue #12130, reported by rickross, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 00:24:58 +00:00
Joshua Colp c692e1cacb Merged revisions 98951 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98951 | file | 2008-01-15 21:13:27 -0400 (Tue, 15 Jan 2008) | 4 lines

Add autoconf logic for speexdsp. Later versions use a separate library for some things so we need to use it if present in codec_speex.
(closes issue #11693)
Reported by: yzg

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 01:17:25 +00:00
Russell Bryant 4fb04cb58a Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines

Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:31:53 +00:00
Russell Bryant 7bc92eda05 Kevin noted that the thing that I _actually_ changed here was that I converted
a value from a double, to a float, back to a double.  Sure enough, when I changed
my interim variable back to a double, it still blows up.  Switching all of these
to a float fixes the problem.  This seems like a compiler bug where a double passed
as an argument isn't getting properly aligned, so I'll have to see if I can replicate
it with a small test program.

(related to issue #11725)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:05:24 +00:00
Russell Bryant d1256bb8a6 Fix a bus error that happened when asterisk was built with optimizations on
with platforms that explode on unaligned access.  I'm not exactly sure why
this fixes it, but it fixed it on the machine I was testing on.  If it makes
sense to you, feel free to enlighten me.  :)

(closes issue #11725, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:48:07 +00:00
Russell Bryant c67509e429 At one point during working on this module, I had the lin/lin16 versions of the
framein callbacks different.  However, they are now the same again, so remove
the duplicate code and use the same functions for the lin/lin16 versions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 17:17:54 +00:00
Russell Bryant 9387f036d8 - Fix the last set of places where incorrect assumptions were made about the
sample length with g722.  It is _2_ samples per byte, not 1.  This was all
   over the place, and I believed it, and it is what caused me to take so long
   to figure out what was broken.
 - Update copyright information on codec_g722.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 03:37:19 +00:00
Russell Bryant a2c08fe0f0 Fix various issues in codec_g722.
- The most common fix being made here is to fix all of the places where the
   number of output samples and output bytes gets updated in the translator
   state structure.
 - Fix a number of other places where the number of samples provided as an
   initialization value to a struct was incorrect.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:16:09 +00:00
Russell Bryant 0a5bfb9eb8 Fix the buffer_samples value. For signed linear, the number of samples needed
to fill the buffer is half the buffer size.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:10:00 +00:00
Russell Bryant 0da0033675 Fix this so it doesn't force codec_g722 to get relinked every time
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:17:02 +00:00
Russell Bryant cc11e9569d Ensure that libg722.a gets rebuilt if one of the files changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:11:02 +00:00