aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/translate.h
AgeCommit message (Collapse)AuthorFilesLines
2008-01-18Revert adding the packed attribute, as it really doesn't make sense why thatrussell1-1/+1
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/branches/1.4@99081 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Since we're relying on the offset between the frame and the beginning of the ↵russell1-1/+1
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/branches/1.4@99079 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15Commit a fix for some memory access errors pointed out by the valgrind2.txtrussell1-1/+22
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/branches/1.4@98943 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27Use the constant that I really meant to use here ...russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94829 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Fix handling of zero-length frames when a codec is capable of native PLC.qwell1-0/+1
Issue 9183, patch by Mihai. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65877 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31add an API so that translators can activate/deactivate themselves when neededkpfleming1-0/+19
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46714 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31revert changes that were the wrong way to address this... proper fix comingkpfleming1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46713 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31don't re-do setup operations for translators that can dynamically register ↵kpfleming1-0/+1
themselves git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46711 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24add an API call to allow channel drivers to determine which media formats ↵kpfleming1-2/+16
are compatible (passthrough or transcode) with the format an existing channel is already using git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46082 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-6/+7
- 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-06-24The Eurostar Commit! (it's amazing how much work you can get done on a 150 ↵kpfleming1-1/+1
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-06Merge of the "sdpcleanup" branch. Thanks to John Martin for a lot of testsoej1-1/+2
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-04Doxygen improvementsoej1-37/+42
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31979 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-09various doxygen fixeskpfleming1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26170 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-18correct array index calculation (thanks mtaht3!)kpfleming1-2/+4
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-17add an API so that the number of steps required for a translation path can ↵kpfleming1-5/+13
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-14This rather large commit changes the way modules are loaded. rizzo1-3/+3
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-08merge rizzo's codec module rework (very similar to the format module rework)kpfleming1-31/+109
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18541 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-18fix up some doxygen formatted commentsrussell1-12/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10432 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-11lock list of translators *before* recalculating translation matrix.russell1-1/+2
Also, store translators using linked list macros. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7967 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.kpfleming1-7/+16
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-04-21use double-quotes instead of angle-brackets for non-system include files ↵kpfleming1-2/+2
(bug #4058) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5490 f38db490-d61c-443f-a65b-d21fe96a405b
2005-03-17Add PLC and jitter buffer and iax2 meta trunk with timestamps (bug #2532, #3400)markster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5192 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-15Repair // comments to /* */ comments (bug #3347)markster1-7/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4806 f38db490-d61c-443f-a65b-d21fe96a405b
2004-08-01Rename newp to newpvt (bug #2190), change hold music.markster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3560 f38db490-d61c-443f-a65b-d21fe96a405b
2001-11-06Version 0.1.10 from FTPmarkster1-10/+52
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@385 f38db490-d61c-443f-a65b-d21fe96a405b
2001-03-10Version 0.1.7 from FTPmarkster1-18/+11
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@236 f38db490-d61c-443f-a65b-d21fe96a405b
1999-12-11Version 0.1.1 from FTPmarkster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134 f38db490-d61c-443f-a65b-d21fe96a405b
1999-11-21Version 0.1.0 from FTPmarkster1-0/+76
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65 f38db490-d61c-443f-a65b-d21fe96a405b