aboutsummaryrefslogtreecommitdiffstats
path: root/main/frame.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-07Adds pass-through support for codec CELT.dvossel1-0/+4
This patch adds pass-through support for CELT. CELT formats are defined in codecs.conf and can be configured to any sample rate a CELT endpoint supports. This patch also addresses a crash in channel.c resulting from a frame list being freed incorrectly. This crash was discovered while testing a CELT translator which had to split encoded audio into multiple frames. The codec translator is not a part of this patch, but may be contributed in the future. Review: https://reviewboard.asterisk.org/r/1294/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326855 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-30copy all flags on asterisk frames instead of just the timing flagmnicholson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@325815 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-22Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd ↵dvossel1-259/+26
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-03Modify alignment of 'core show codecs', since the ID is no longer a huge int.qwell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306086 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03Fixes output of "core show codecs" to display image types correctly.dvossel1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306053 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03Asterisk media architecture conversion - no more format bitfieldsdvossel1-338/+86
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
2010-06-17adds speex 16khz audio supportdvossel1-11/+13
(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: http://svn.digium.com/svn/asterisk/trunk@271231 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-16addition of G.719 pass-through supportdvossel1-0/+9
(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: http://svn.digium.com/svn/asterisk/trunk@270940 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-11Merged revisions 269960 via svnmerge from tilghman1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r269960 | tilghman | 2010-06-11 13:23:05 -0500 (Fri, 11 Jun 2010) | 8 lines For SpeeX, 0 bits remaining is valid and does not need an emitted warning. (closes issue #15762) Reported by: nblasgen Patches: issue15672.patch uploaded by pabelanger (license 224) Tested by: nblasgen ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269976 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-21Added MixMonitorMute manager commandjmls1-0/+12
Added a new manager command to mute/unmute MixMonitor audio on a channel. Added a new feature to audiohooks so that you can mute either read / write (or both) types of frames - this allows for MixMonitor to mute either side of the conversation without affecting the conversation itself. (closes issue #16740) Reported by: jmls Review: https://reviewboard.asterisk.org/r/487/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258190 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-26Fix crash resulting from frames with invalid data pointers.jpeeler1-0/+5
In ast_frdup the frame data union does not get set to point to malloced memory if the datalen is zero, so make sure to handle the same case in ast_frisolate appropriately. (closes issue #16058) Reported by: atis Patches: bug16058-fix.patch uploaded by jpeeler (license 325) Tested by: atis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@243244 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-10According to POSIX, the capital L modifier applies only to floating point types.tilghman1-5/+5
Fixes a crash on Solaris. (closes issue #16572) Reported by: crjw Patches: frame_changes.patch uploaded by crjw (license 963) Plus several others found and fixed by me git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239074 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06Fix compiler warning gcc 4.2.4 foundrmudgett1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228621 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-05Rework codecs command to comply with the 64-bit schemetilghman1-28/+37
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228049 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Add a couple more casts so that code compiles correctly.mmichelson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227646 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04Expand codec bitfield from 32 bits to 64 bits.tilghman1-71/+82
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Merged revisions 224931 via svnmerge from russell1-8/+0
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-08Merged revisions 222878 via svnmerge from russell1-3/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222878 | russell | 2009-10-08 14:45:47 -0500 (Thu, 08 Oct 2009) | 44 lines Make filestream frame handling safer by isolating frames before returning them. This patch is related to a number of issues on the bug tracker that show crashes related to freeing frames that came from a filestream. A number of fixes have been made over time while trying to figure out these problems, but there re still people seeing the crash. (Note that some of these bug reports include information about other problems. I am specifically addressing the filestream frame crash here.) I'm still not clear on what the exact problem is. However, what is _very_ clear is that we have seen quite a few problems over time related to unexpected behavior when we try to use embedded frames as an optimization. In some cases, this optimization doesn't really provide much due to improvements made in other areas. In this case, the patch modifies filestream handling such that the embedded frame will not be returned. ast_frisolate() is used to ensure that we end up with a completely mallocd frame. In reality, though, we will not actually have to malloc every time. For filestreams, the frame will almost always be allocated and freed in the same thread. That means that the thread local frame cache will be used. So, going this route doesn't hurt. With this patch in place, some people have reported success in not seeing the crash anymore. (SWP-150) (AST-208) (ABE-1834) (issue #15609) Reported by: aragon Patches: filestream_frisolate-1.4.diff2.txt uploaded by russell (license 2) Tested by: aragon, russell (closes issue #15817) Reported by: zerohalo Tested by: zerohalo (closes issue #15845) Reported by: marhbere Review: https://reviewboard.asterisk.org/r/386/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222880 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-01Ensure that frame dumps of AST_CONTROL_T38_PARAMETERS frames are properlykpfleming1-1/+1
decoded. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215161 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-23Rework of T.38 negotiation and UDPTL API to address interoperability problemskpfleming1-18/+0
Over the past couple of months, a number of issues with Asterisk negotiating (and successfully completing) T.38 sessions with various endpoints have been found. This patch attempts to address many of them, primarily focused around ensuring that the endpoints' MaxDatagram size is honored, and in addition by ensuring that T.38 session parameter negotiation is performed correctly according to the ITU T.38 Recommendation. The major changes here are: 1) T.38 applications in Asterisk (app_fax) only generate/receive IFP packets, they do not ever work with UDPTL packets. As a result of this, they cannot be allowed to generate packets that would overflow the other endpoints' MaxDatagram size after the UDPTL stack adds any error correction information. With this patch, the application is told the maximum *IFP* size it can generate, based on a calculation using the far end MaxDatagram size and the active error correction mode on the T.38 session. The same is true for sending *our* MaxDatagram size to the remote endpoint; it is computed from the value that the application says it can accept (for a single IFP packet) combined with the active error correction mode. 2) All treatment of T.38 session parameters as 'capabilities' in chan_sip has been removed; these parameters are not at all like audio/video stream capabilities. There are strict rules to follow for computing an answer to a T.38 offer, and chan_sip now follows those rules, using the desired parameters from the application (or channel) that wants to accept the T.38 negotiation. 3) chan_sip now stores and forwards ast_control_t38_parameters structures for tracking 'our' and 'their' T.38 session parameters; this greatly simplifies negotiation, especially for pass-through calls. 4) Since T.38 negotiation without specifying parameters or receiving the final negotiated parameters is not very worthwhile, the AST_CONTROL_T38 control frame has been removed. A note has been added to UPGRADE.txt about this removal, since any out-of-tree applications that use it will no longer function properly until they are upgraded to use AST_CONTROL_T38_PARAMETERS. Review: https://reviewboard.asterisk.org/r/310/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@208464 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26Improve T.38 negotiation by exchanging session parameters between ↵file1-0/+19
application and channel. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203699 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-16Merged revisions 200991 via svnmerge from kpfleming1-69/+52
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r200991 | kpfleming | 2009-06-16 12:05:38 -0500 (Tue, 16 Jun 2009) | 11 lines Improve support for media paths that can generate multiple frames at once. There are various media paths in Asterisk (codec translators and UDPTL, primarily) that can generate more than one frame to be generated when the application calling them expects only a single frame. This patch addresses a number of those cases, at least the primary ones to solve the known problems. In addition it removes the broken TRACE_FRAMES support, fixes a number of bugs in various frame-related API functions, and cleans up various code paths affected by these changes. https://reviewboard.asterisk.org/r/175/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@201056 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Const-ify the world (or at least a good part of it)kpfleming1-3/+3
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: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-18Merged revisions 195206 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r195206 | file | 2009-05-18 12:51:22 -0300 (Mon, 18 May 2009) | 7 lines Fix a typo which caused loss of audio when using G729 in some scenarios with a smoother present. (closes issue #15105) Reported by: bamby Patches: process-vad-correctly.diff uploaded by bamby (license 430) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@195207 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05Merged revisions 180372 via svnmerge from kpfleming1-29/+62
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180372 | kpfleming | 2009-03-05 12:22:16 -0600 (Thu, 05 Mar 2009) | 9 lines Fix problems when RTP packet frame size is changed During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good. This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes. Review: http://reviewboard.digium.com/r/184/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180373 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18fix two very minor bugs: if anyone ever uses SLINEAR16 as a format in RTP, ↵kpfleming1-2/+2
ensure that the samples are byte-swapped to network order if needed. also, when a smoother is operating on a format that has a sample rate other than 8000 samples per second, use the proper sample rate for computing delivery timestamps. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177229 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13Add basic (passthrough, playback, record) support for ITU G.722.1 and ↵kpfleming1-6/+27
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: http://svn.digium.com/svn/asterisk/trunk@175508 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15Make sure we handle a uint32_t payload in ast_frdup()russell1-0/+2
(closes issue #14080) Reported by: fnordian Patches: frame.patch uploaded by fnordian (license 110) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164519 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05Janitor, use ARRAY_LEN() when possible.eliel1-1/+1
(closes issue #13990) Reported by: eliel Patches: array_len.diff uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-02Merged revisions 160207 via svnmerge from tilghman1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r160207 | tilghman | 2008-12-01 18:25:16 -0600 (Mon, 01 Dec 2008) | 3 lines Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc and glibc. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-20Merged revisions 158072 via svnmerge from mmichelson1-2/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r158072 | twilson | 2008-11-20 11:48:58 -0600 (Thu, 20 Nov 2008) | 2 lines Begin on a crusade to end trailing whitespace! ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158133 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10Another batch of files from RSW. The remaining apps and a few moreseanbright1-29/+27
files from main/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137089 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08Janitor project to convert sizeof to ARRAY_LEN macro.bbryant1-14/+14
(closes issue #13002) Reported by: caio1982 Patches: janitor_arraylen5.diff uploaded by caio1982 (license 22) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129045 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causemvanbaak1-20/+20
- 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: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Adding spport for T.140 RED - Simple RTP redundancy to prevent packet loss ↵oej1-1/+2
in text stream Work sponsored by Omnitor AB, Stockholm, Sweden (http://www.omnitor.se) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116237 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-17Merged revisions 114207 via svnmerge from mmichelson1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114207 | mmichelson | 2008-04-17 11:28:03 -0500 (Thu, 17 Apr 2008) | 12 lines It was possible for a reference to a frame which was part of a freed DSP to still be referenced, leading to memory corruption and eventual crashes. This code change ensures that the dsp is freed when we are finished with the frame. This change is very similar to a change Russell made with translators back a month or so ago. (closes issue #11999) Reported by: destiny6628 Patches: 11999.patch uploaded by putnopvut (license 60) Tested by: destiny6628, victoryure ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-27But we can change the API here.qwell1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111295 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-27Merged revisions 111280 via svnmerge from qwell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r111280 | qwell | 2008-03-26 19:25:13 -0500 (Wed, 26 Mar 2008) | 1 line Put this flag back so we don't change the API. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111285 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-26Merged revisions 111245 via svnmerge from qwell1-17/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r111245 | qwell | 2008-03-26 18:26:33 -0500 (Wed, 26 Mar 2008) | 9 lines Remove excessive smoother optimization that was causing audio glitches (small "pops") after (about 200ms later) an "incorrectly" sized frame was received. While it would be very nice to keep this as optimized as possible, it makes no sense for the smoother to be dropping random bits of audio like this. Isn't that the whole point of a smoother? Closes issue #12093. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111246 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Merged revisions 106552 via svnmerge from tilghman1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines Safely use the strncat() function. (closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106553 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04Whitespace changes onlytilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105840 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Add a non-invasive API for application level manipulation of T38 on a ↵file1-0/+19
channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it. (closes issue #11873) Reported by: dimas Patches: v4-t38-api.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Add some missing control frames.file1-0/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103798 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Merged revisions 99081 via svnmerge from russell1-3/+3
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-17Merged revisions 99004 via svnmerge from russell1-1/+37
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99004 | russell | 2008-01-17 16:37:22 -0600 (Thu, 17 Jan 2008) | 10 lines Have IAX2 optimize the codec translation path just like chan_sip does it. If the caller's codec is in our codec list, move it to the top to avoid transcoding. (closes issue #10500) Reported by: stevedavies Patches: iax-prefer-current-codec.patch uploaded by stevedavies (license 184) iax-prefer-current-codec.1.4.patch uploaded by stevedavies (license 184) Tested by: stevedavies, pj, sheldonh ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99006 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15Merged revisions 98943 via svnmerge from russell1-4/+10
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-11 - Fix the last set of places where incorrect assumptions were made about therussell1-2/+2
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: http://svn.digium.com/svn/asterisk/trunk@98081 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove a bunch of useless #include "options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move internal function declarations to include/asterisk/_private.hrizzo1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b