aboutsummaryrefslogtreecommitdiffstats
path: root/main/slinfactory.c
AgeCommit message (Collapse)AuthorFilesLines
2009-06-16Improve support for media paths that can generate multiple frames at once.kpfleming1-12/+18
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/branches/1.4@200991 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18revert commit that included extranous changeskpfleming1-18/+12
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182807 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Improve the build system to *properly* remove unnecessary symbols from the ↵kpfleming1-12/+18
runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix. With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182802 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-27Prevent a crash from occurring when a jitter buffer interpolated frame ismmichelson1-0/+10
removed from a slinfactory slinfactory used the "samples" field of an ast_frame in order to determine the amount of data contained within the frame. In certain cases, such as jitter buffer interpolated frames, the frame would have a non-zero value for "samples" but have NULL "data" This caused a problem when a memcpy call in ast_slinfactory_read would attempt to access invalid memory. The solution in use here is to never feed frames into the slinfactory if they have NULL "data" (closes issue #13116) Reported by: aragon Patches: 13116.diff uploaded by putnopvut (license 60) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@171621 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-08If audio suddenly gets fed into one side of a channel after a lapse of ↵file1-0/+18
frames flush the other factory so that old audio does not remain in the factory causing the sync code to not execute. (closes issue #12296) Reported by: jvandal git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@113296 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-01Ensure that we do not exceed the hold's maximum size with a single frame.file1-0/+3
(closes issue #12047) Reported by: fabianoheringer Tested by: fabianoheringer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@112125 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-30Fix an issue where if a frame of higher sample size preceeded a frame of ↵file1-2/+2
lower sample size and ast_slinfactory_read was called with a sample size of the combined values or higher a crash would happen. (closes issue #11878) Reported by: stuarth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101222 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-19Fix a couple of memory leaks with frame handling. Specifically,russell1-1/+10
ast_frame_free() needed to be called on the frame that came from the translator to signed linear. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99187 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Fix slinfactory logic when dealing with frames coming in that may already be ↵file1-3/+5
in the signed linear format. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66074 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-05Don't allow a NULL pointer to reach ast_frdup. (issue #9155 reported by cmaj)file1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@57798 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-26Slight overhaul of the whisper support. 1. We need to duplicate the frame ↵file1-6/+1
from ast_translate 2. We need to ensure we always have signed linear coming in for signed linear combining. 3. We need to ensure we are always feeding signed linear out. 4. Properly store and restore write format when beeping on the channel we are whispering on. 5. Properly discontinue the stream on the channel for the beep. (issue #8019 reported by timkelly1980) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43695 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29Merge team/russell/frame_cachingrussell1-12/+5
There are some situations in Asterisk where ast_frame and/or iax_frame structures are rapidly allocatted and freed (at least 50 times per second for one call). This code significantly improves the performance of ast_frame_header_new(), ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping a thread-local cache of these structures and using frames from the cache whenever possible instead of calling malloc/free every time. This commit also converts the ast_frame and iax_frame structures to use the linked list macros. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41278 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-0/+157
- 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