Commit Graph

237 Commits

Author SHA1 Message Date
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
Matthew Jordan 70c5ac6635 Fix error that caused seek format operations to set max file size to '1' or '0'
A very inappropriate placement of a ')' (introduced in r362151) caused the
maximum size of a file to be set as the result of a comparison operation, as
opposed to the result of the ftello operation.  This resulted in seeking being
restricted to the beginning of the file, or 1 byte into the file.  Thanks to
the Asterisk Test Suite for properly freaking out about this on at least one
test.

(issue ASTERISK-19655)
Reported by: Matt Jordan
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 18:29:51 +00:00
Matthew Jordan ba7032be5f Check for IO stream failures in various format's truncate/seek operations
For the formats that support seek and/or truncate operations, many of
the C library calls used to determine or set the current position indicator
in the file stream were not being checked.  In some situations, if an error 
occurred, a negative value would be returned from the library call.  This
could then be interpreted inappropriately as positional data.

This patch checks the return values from these library calls before
using them in subsequent operations.

(issue ASTERISK-19655)
Reported by: Matt Jordan

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-16 20:17:03 +00:00
Kinsey Moore a485f44022 Add missing newlines to CLI logging
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06 18:19:03 +00:00
Richard Mudgett 7093cf278c Fix compile problem when old version of libvorbisfile v1.1.2 is used.
The principle difference between libvorbisfile v1.1.2 and newer (at least
v1.2.0) is the addition of the predefined callbacks OV_CALLBACKS_xxx in
vorbis/vorbisfile.h used for ov_open_callbacks().

* Updated the configure script to detect if libvorbisfile.h declares
OV_CALLBACKS_NOCLOSE.

* Copied the declaration of OV_CALLBACKS_NOCLOSE from v1.2.0 to allow
v1.1.2 to compile.

(closes issue ASTERISK-19370)
Reported by: Jonn Taylor
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 19:51:15 +00:00
Richard Mudgett 51b32041d5 Fix voicemail problems when using ogg/vorbis.
Ogg/vorbis was fairly useless as a voicemail file format because it did
not implement the seek and tell format callbacks among other problems.

Since we were already using the libvorbis and libvorbisenc libraries we
can use libvorbisfile as it is also part of the vorbis library package.

* Made use the libvorbisfile to handle the ogg/vorbis file stream.  The
format_ogg_vorbis.c is now mostly a wrapper around libvorbisfile.

(closes issue ASTERISK-16926)
Reported by: sque
Patches:
      ogg_vorbis_use_libvorbisfile.patch (license #6108) patch uploaded by sque
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 19:29:24 +00:00
Walter Doekes db24fc2523 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: Clod Patry
Review: https://reviewboard.asterisk.org/r/1651


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08 20:49:48 +00:00
Matthew Nicholson 5203e0f552 don't call ltohl() twice on the same value
ASTERISK-18739
Patch by: pawel (modified)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 15:28:33 +00:00
Sean Bright d2ed4ed5f7 Merged revisions 330217 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330217 | seanbright | 2011-07-29 13:19:42 -0400 (Fri, 29 Jul 2011) | 9 lines
  
  Merged revisions 330213 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330213 | seanbright | 2011-07-29 13:18:56 -0400 (Fri, 29 Jul 2011) | 2 lines
    
    Correct the check for O_RDONLY.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29 17:20:20 +00:00
Sean Bright 4e1fe6ccb7 Merged revisions 330204 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330204 | seanbright | 2011-07-29 12:58:40 -0400 (Fri, 29 Jul 2011) | 9 lines
  
  Merged revisions 330203 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330203 | seanbright | 2011-07-29 12:58:08 -0400 (Fri, 29 Jul 2011) | 2 lines
    
    Only write to wav files that were opened to be written to.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29 17:02:11 +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
David Vossel 331759b64c Support for writing and reading raw slin files 8khz-192khz.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08 20:23:37 +00:00
David Vossel a86c1d68e9 Moves celt and silk format attribute files into res folder.
It was inconsistent to have the silk and celt format attribute
modules in the format file interpreter folder.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08 20:18:39 +00:00
David Vossel 7fc2a184cd Adds the format_attr_celt file which was also missing from the CELT pass through patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 22:17:47 +00:00
David Vossel 9c73ece406 Merged revisions 319083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319083 | dvossel | 2011-05-16 09:26:33 -0500 (Mon, 16 May 2011) | 5 lines
  
  Fixes Big Endian build issue.
  
  (closes issue #19298)
  Reported by: tzafrir
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 14:29:06 +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
Russell Bryant afc8368dea Merged revisions 315259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r315259 | russell | 2011-04-25 14:37:32 -0500 (Mon, 25 Apr 2011) | 24 lines
  
  Merged revisions 315258 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r315258 | russell | 2011-04-25 14:31:44 -0500 (Mon, 25 Apr 2011) | 17 lines
    
    Merged revisions 315257 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r315257 | russell | 2011-04-25 14:28:41 -0500 (Mon, 25 Apr 2011) | 10 lines
      
      Be more flexible with unknown chunks in wav files.
      
      This patch makes format_wav ignore unknown chunks instead of erroring
      out on them.
      
      (closes issue #18306)
      Reported by: jhirsch
      Patches:
            wav_skip_unknown_blocks.diff uploaded by jhirsch (license 1156)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-25 19:40:17 +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
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
Jason Parker b5f2e2acef Merged revisions 284701 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r284701 | qwell | 2010-09-02 11:43:09 -0500 (Thu, 02 Sep 2010) | 8 lines
  
  Add slin16 support for format_wav (new wav16 file extension)
  
  (closes issue #15029)
  Reported by: andrew
  Patches: 
        wav16.patch uploaded by andrew (license 240)
  Tested by: qwell, andrew
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 16:44:06 +00:00
Tilghman Lesher 317429294c Merged revisions 279472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279472 | tilghman | 2010-07-25 22:27:06 -0500 (Sun, 25 Jul 2010) | 2 lines
  
  Formats need to load before apps, because some apps call ast_format_str_reduce() at load time.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 03:28:02 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
David Vossel fcb055fb4e addition of G.719 pass-through support
(closes issue #16293)
Reported by: malcolmd
Patches:
      g719.passthrough.patch.7 uploaded by malcolmd (license 924)
      format_g719.c uploaded by malcolmd (license 924)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 19:03:24 +00:00
Leif Madsen 910144937d Update supported file extensions in doxygen.
Updated the doxygen \arg line after looking at the file for some other Asterisk documentation
and noticing they weren't up to date. Thanks to seanbright for looking at the code for me :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-20 12:38:47 +00:00
Russell Bryant 8ab22f5dd0 Set a module load priority for format modules.
A recent change to app_voicemail made it such that the module now assumes that
all format modules are available while processing voicemail configuration.
However, when autoloading modules, it was possible that app_voicemail was
loaded before the format modules.  Since format modules don't depend on
anything, set a module load priority on them to ensure that they get loaded
first when autoloading.

This fix applies to trunk, 1.6.1, and 1.6.2.  The fix for 1.4 and 1.6.0 will
require a different approach since the module load priority functionality is
not present in the module API.

(issue #16412)
Reported by: jiddings


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@233692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-08 18:00:16 +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
Kevin P. Fleming 39e730b4e2 Remove useless debugging message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 19:40:26 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Mark Michelson 89050de146 Merged revisions 186841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186841 | mmichelson | 2009-04-07 19:09:04 -0500 (Tue, 07 Apr 2009) | 8 lines
  
  Fix a few typos of the word "frequency."
  
  (closes issue #14842)
  Reported by: jvandal
  Patches:
        frequency-typo.diff uploaded by jvandal (license 413)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-08 00:09:28 +00:00
Olle Johansson cbe45a6e06 Merged revisions 175825 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r175825 | oej | 2009-02-15 21:33:17 +0100 (Sön, 15 Feb 2009) | 2 lines

format_ilbc does not depend on codec libraries and can therefore always be made. My mistake. Ursäkta!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15 20:39:55 +00:00
Olle Johansson 798e83aecb Merged revisions 175792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r175792 | oej | 2009-02-15 21:20:21 +0100 (Sön, 15 Feb 2009) | 2 lines

Disable format_ilbc.so by default, like codec_ilbc.so

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-15 20:22:12 +00:00
Kevin P. Fleming 2a53f2ec98 Add basic (passthrough, playback, record) support for ITU G.722.1 and G.722.1C (also known as Siren7 and Siren14)
This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported.

Along the way, some related work was done:

1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way.

2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec.

3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result).

Review: http://reviewboard.digium.com/r/158/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 13:35:24 +00:00
Joshua Colp ca38e81892 Add alw as a valid file extension for alaw and ulw as a valid file extension for ulaw.
(closes issue #14001)
Reported by: henrikw
Patches:
      alw.diff uploaded by henrikw (license 627)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-08 21:41:50 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Tilghman Lesher 8b14e5f493 Reverting format addition for now
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 21:47:02 +00:00
Tilghman Lesher 9a56bae67a Add native 16kHz format for wav file format.
(Closes issue #13657)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 21:36:01 +00:00
Sean Bright 2b06ef2040 Merged revisions 143903 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r143903 | seanbright | 2008-09-22 18:49:00 -0400 (Mon, 22 Sep 2008) | 8 lines

Use the advertised header size in .au files instead of just assuming they
are 24 bytes (the minimum).

(closes issue #13450)
Reported by: jamessan
Patches:
      pcm-header.diff uploaded by jamessan (license 246)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-22 22:50:07 +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
Sean Bright b7a4db0ced Start moving in changes from my resolve-shadow-warnings branch. Going to do
this in pieces so the diffs are a little bit smaller and more reviewable.

pbx/ and formats/ first.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 00:44:55 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +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
Tilghman Lesher 0e6140c564 Use a 32k file buffer on recordings, which increases the efficiency of file recording.
(closes issue #11962)
 Reported by: garlew
 Patches: 
       recording.patch uploaded by garlew (license 376)
       bug-11962.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-03 07:49:05 +00:00
Jason Parker 8b31f34e78 Merged revisions 111658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111658 | qwell | 2008-03-28 11:19:56 -0500 (Fri, 28 Mar 2008) | 8 lines

The file size of WAV49 does not need to be an even number.

(closes issue #12128)
Reported by: mdu113
Patches:
      12128-noevenlength.diff uploaded by qwell (license 4)
Tested by: qwell, mdu113

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 16:20:59 +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
Russell Bryant a82ab5369e minor formatting changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 17:30:24 +00:00
Kevin P. Fleming a20b146df5 add a file-format driver for 16KHz signed linear... which may or may not work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 16:17:31 +00:00
Kevin P. Fleming 100ef27af9 Merged revisions 93180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines

In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:25:35 +00:00
Luigi Rizzo 5490889153 Put into Makefile.moddir_rules the common instructions used to
generate loadable and embedded module lists.

Individual Makefiles now are a lot simpler, possibly as simple as this:

    -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
    MODULE_PREFIX=cdr_
    all: _all
    include $(ASTTOPDIR)/Makefile.moddir_rules

and also more flexible because in a single directory we can combine
various types of modules (app_, cdr_, func_, ... ) by simply
listing them in the MODULE_PREFIX variable.

The individual Makefiles can also create list of modules to be
excluded by listing them in the variablel MODULE_EXCLUDE (see an
example in channels/Makefile).

With this change it becomes trivial to integrate a directory with
locally created/modified sources into the main build.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 03:50:38 +00:00