dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

40 Commits

Author SHA1 Message Date
dvossel f27e928f05 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: http://svn.digium.com/svn/asterisk/trunk@308582 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-22 23:04:49 +00:00
dvossel 4aca3187a3 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: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03 16:22:10 +00:00
dvossel 73aecd4427 Merged revisions 282047 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r282047 | dvossel | 2010-08-12 15:15:41 -0500 (Thu, 12 Aug 2010) | 35 lines
  
  improved translation paths for wideband codecs
  
  The problem I'm addressing is that Asterisk's current
  method of building the least cost translation paths
  between codecs does not take into account sample rate.
  For instance, it was possible for siren14 (a 32khz codec),
  to contain the a translation path to siren7 (a 16khz
  audio codec) that goes through slin at 8khz.  In this
  case Asterisk takes a 32khz codec, down samples it to
  8khz and then up samples it to 16khz which is terrible
  regardless if it is computationally less expensive.  This
  patch now builds translation paths that give priority to
  maintaining the best possible sample rate before taking
  into consideration computational cost.  This patch also
  adds cli commands to expose what translation paths are
  actually being used.
  
  Changes:
  1. Translation paths will never contain a step that changes
  the sample rate unless absolutely necessary.
  2. When choosing the best codec to make two channels compatible.
  Shared codecs with the highest sample rate are given priority.
  3. A new cli command to show all translation paths available
  for a specific codec 'core show translation paths [codec name]'
  has been added.
  4. 'core show translation' which displays the translation
  matrix now includes the new higher bit audio codecs in the table.
  5. 'core show channel [channel name]'  now displays the
  translation paths if translation is used.
  
  (closes issue #16841)
  Reported by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/842/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@282048 f38db490-d61c-443f-a65b-d21fe96a405b
2010-08-12 20:17:17 +00:00
mmichelson 6890baac63 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: http://svn.digium.com/svn/asterisk/trunk@267492 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-03 17:09:11 +00:00
tilghman 3bacd4082e Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 14:05:12 +00:00
russell 039146041a 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: http://svn.digium.com/svn/asterisk/trunk@224932 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21 03:09:04 +00:00
tilghman a1fa45760e 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: http://svn.digium.com/svn/asterisk/trunk@125386 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-26 17:06:17 +00:00
russell cc1fcc7539 Merged revisions 99081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99081 | russell | 2008-01-18 15:37:21 -0600 (Fri, 18 Jan 2008) | 9 lines

Revert adding the packed attribute, as it really doesn't make sense why that
would do any good.  Fix the real bug, which is to do the check to see if the
frame came from a translator at the beginning of ast_frame_free(), instead of
at the end.  This ensures that it always gets checked, even if none of the
parts of the frame are malloc'd, and also ensures that we aren't looking at
free'd memory in the case that it is a malloc'd frame.

(closes issue #11792, reported by explidous, patched by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99082 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18 21:38:01 +00:00
russell 66d6ff5e48 Merged revisions 99079 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99079 | russell | 2008-01-18 15:22:21 -0600 (Fri, 18 Jan 2008) | 4 lines

Since we're relying on the offset between the frame and the beginning of the translator
pvt struct, set the packed attribute to make sure we get to the right place.
(potential fix for issue #11792)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99080 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18 21:24:05 +00:00
russell f3a4d7c8f4 Clean up something I did for ABI compatability in 1.4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98945 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15 23:35:29 +00:00
russell b61a98675c 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: http://svn.digium.com/svn/asterisk/trunk@98944 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15 23:31:53 +00:00
russell 36f2ec39bc Merged revisions 94828-94829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94828 | russell | 2007-12-27 08:33:21 -0600 (Thu, 27 Dec 2007) | 9 lines

Change ast_translator_best_choice() to only pay attention to audio formats.
This fixes a problem where Asterisk claims that a translation path can not be
found for channels involving video.

(closes issue #11638)
Reported by: cwhuang
Tested by: cwhuang
Patch suggested by cwhuang, with some additional changes by me.

........
r94829 | russell | 2007-12-27 08:44:29 -0600 (Thu, 27 Dec 2007) | 2 lines

Use the constant that I really meant to use here ...

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94830 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27 14:52:07 +00:00
oej c7aed6ea2b Doxygen updates, formatting.
misdn stuff needs a lot of doxygenification

(Hello, Qwell :-) )


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92423 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-11 22:20:22 +00:00
tilghman 4b2fc9d3e7 Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
 - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
   (This doesn't affect anything immediately, until another codec has wb support.)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 22:51:48 +00:00
russell 2bf80313d6 Merge a bunch of doxygen updates to header files. This includes changes to
use the \retval tag for documenting return values, fixing various warnings
when generating the documentation, and various other things.
(closes issue #10203, snuffy)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16 02:51:56 +00:00
qwell 943e4bad3d Merged revisions 65877 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r65877 | qwell | 2007-05-24 11:14:02 -0400 (Thu, 24 May 2007) | 4 lines

Fix handling of zero-length frames when a codec is capable of native PLC.

Issue 9183, patch by Mihai.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65903 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24 15:28:29 +00:00
kpfleming 05411ca878 Merged revisions 46714 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46714 | kpfleming | 2006-10-31 15:47:48 -0600 (Tue, 31 Oct 2006) | 2 lines

add an API so that translators can activate/deactivate themselves when needed

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46719 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31 22:19:08 +00:00
kpfleming 6d73a5efa0 Merged revisions 46082-46083,46152-46153 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46082 | kpfleming | 2006-10-23 22:45:42 -0500 (Mon, 23 Oct 2006) | 2 lines

add an API call to allow channel drivers to determine which media formats are compatible (passthrough or transcode) with the format an existing channel is already using

........
r46083 | kpfleming | 2006-10-23 22:53:32 -0500 (Mon, 23 Oct 2006) | 2 lines

ensure that the translation matrix is properly lock-protected every place it is used

........
r46152 | kpfleming | 2006-10-24 18:45:19 -0500 (Tue, 24 Oct 2006) | 2 lines

if multiple translators are registered for the same source/dest combination, ensure that the lowest-cost one is always inserted earlier in the list

........
r46153 | kpfleming | 2006-10-24 19:10:54 -0500 (Tue, 24 Oct 2006) | 2 lines

code zone experiment: don't offer formats in the outbound INVITE that aren't either passthrough or translatable

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:55:11 +00:00
kpfleming 8b0c007ad9 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00
kpfleming 41af2260b7 The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London <G>)
support the new location for zaptel.h and tonezone.h
use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries
combine the common rules into a top-level Makefile.rules file
remove all (now) unnecessary stuff from subdir Makefiles
change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory)
alphabetize --with-<foo> options in configure script
enhance Net-SNMP support in configure script to provide a --with-netsnmp option
fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated
add 'optional package' usage to modules now that menuselect can output it
allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35832 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-24 19:43:31 +00:00
oej 4506e03f3d Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of tests
and some patches (all disclaimed).

- Don't change RTP properties if we reject a re-INVITE
- Don't add video to an outbound channel if there's no video on the inbound channel
- Don't include video in the "preferred codec" list for codec selection
- Clean up and document code that parses and adds SDP attachments

Since we do not transcode video, we can't handle video the same way as audio. This is a
bug fix patch. In future releases, we need to work on a solution for video negotiation,
not codecs but formats and framerates instead.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32597 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-06 16:09:33 +00:00
oej 275d3b04c4 Doxygen improvements
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31979 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-04 08:57:34 +00:00
kpfleming f1898a71f1 various doxygen fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26170 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-09 16:24:07 +00:00
kpfleming fd7889f0d9 correct array index calculation (thanks mtaht3!)
update header file comments to reflect new usage of structure field


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21207 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-18 21:39:20 +00:00
kpfleming 34fbed8253 add an API so that the number of steps required for a translation path can be acquired
don't transcode via SLINEAR when the option is enabled but there is a direct path from the source to the destination


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20962 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-17 16:42:03 +00:00
rizzo 3664249356 This rather large commit changes the way modules are loaded.
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14 14:08:19 +00:00
kpfleming f1822bc2a6 merge rizzo's codec module rework (very similar to the format module rework)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18541 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08 21:40:57 +00:00
russell d5bf9e4881 fix up some doxygen formatted comments
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10432 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-18 02:45:38 +00:00
russell 6b12442db5 lock list of translators *before* recalculating translation matrix.
Also, store translators using linked list macros.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7967 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-11 05:00:45 +00:00
kpfleming 24c1e3c222 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 f38db490-d61c-443f-a65b-d21fe96a405b 2005-11-29 18:24:39 +00:00
russell 2c3b3edc86 Doxygen documentation update from oej (issue #5505)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24 20:12:06 +00:00
kpfleming 3c4140b8b1 major header file cleanup: license, copyrights, descriptions, markers, etc.
remove deprecated config_old.c/config_old.h
remove unused cvsid.h


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6454 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-30 18:32:10 +00:00
kpfleming 31e8dcf4fe use double-quotes instead of angle-brackets for non-system include files (bug #4058)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5490 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-21 06:02:45 +00:00
markster 235a6486c3 Add PLC and jitter buffer and iax2 meta trunk with timestamps (bug #2532, #3400)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5192 f38db490-d61c-443f-a65b-d21fe96a405b
2005-03-17 21:30:19 +00:00
markster 597c75ce7b Repair // comments to /* */ comments (bug #3347)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4806 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-15 23:48:12 +00:00
markster 1b705fdbac Rename newp to newpvt (bug #2190), change hold music.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3560 f38db490-d61c-443f-a65b-d21fe96a405b
2004-08-01 14:19:04 +00:00
markster 7f06c20a97 Version 0.1.10 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@385 f38db490-d61c-443f-a65b-d21fe96a405b
2001-11-06 17:34:13 +00:00
markster dc884645e6 Version 0.1.7 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@236 f38db490-d61c-443f-a65b-d21fe96a405b
2001-03-10 19:12:11 +00:00
markster 201849f922 Version 0.1.1 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134 f38db490-d61c-443f-a65b-d21fe96a405b
1999-12-11 20:09:45 +00:00
markster 4c63f091a4 Version 0.1.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65 f38db490-d61c-443f-a65b-d21fe96a405b
1999-11-21 02:26:43 +00:00