aboutsummaryrefslogtreecommitdiffstats
path: root/main/slinfactory.c
AgeCommit message (Collapse)AuthorFilesLines
2011-02-22Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd ↵dvossel1-11/+8
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-03Asterisk media architecture conversion - no more format bitfieldsdvossel1-9/+9
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
2009-11-04Expand codec bitfield from 32 bits to 64 bits.tilghman1-5/+5
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-16Merged revisions 200991 via svnmerge from kpfleming1-11/+16
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-02-10improve slinfactory API to remove implicit sample rate and require explicit ↵kpfleming1-53/+25
sample rate selection by creator of the slinfactory git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174705 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-27Merged revisions 171621 via svnmerge from mmichelson1-0/+10
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r171621 | mmichelson | 2009-01-27 14:06:01 -0600 (Tue, 27 Jan 2009) | 18 lines Prevent a crash from occurring when a jitter buffer interpolated frame is 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/trunk@171622 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causemvanbaak1-1/+1
- 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-04-07Put my slinfactory changes back in.file1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113009 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-01This adds DNS SRV record support to DNS manager. If there is a SRV record ↵jpeeler1-3/+0
for a given domain, the hostname and port listed in the SRV record will be used. If no SRV record exists or a SRV lookup is not attempted, the DNS lookup on the specified domain will be performed as normal. Chan_sip has been modified to take advantage of the new SRV support. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112207 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-01Merged revisions 112125 via svnmerge from file1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112125 | file | 2008-04-01 13:45:14 -0300 (Tue, 01 Apr 2008) | 5 lines Ensure that we do not exceed the hold's maximum size with a single frame. (closes issue #12047) Reported by: fabianoheringer Tested by: fabianoheringer ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112126 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Doxygenify slinfactory a bit.file1-0/+49
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108226 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-01Add support for 16KHz signed linear.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105509 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-30Merged revisions 101222 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r101222 | file | 2008-01-30 11:41:04 -0400 (Wed, 30 Jan 2008) | 4 lines Fix an issue where if a frame of higher sample size preceeded a frame of 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/trunk@101223 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-19Merged revisions 99187 via svnmerge from russell1-1/+10
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99187 | russell | 2008-01-19 04:05:27 -0600 (Sat, 19 Jan 2008) | 4 lines Fix a couple of memory leaks with frame handling. Specifically, 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/trunk@99188 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-2/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-08Merge audiohooks branch into trunk. This is a new API for developers to ↵file1-0/+18
listen and manipulate the audio going through a channel. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78649 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-25Minor tweak... drop translation path if one exists when we get an already ↵file1-3/+6
signed linear frame in. Chances are the stream has then switched to signed linear and we no longer need the path. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66126 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-25Merged revisions 66074 via svnmerge from file1-3/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r66074 | file | 2007-05-24 18:16:58 -0400 (Thu, 24 May 2007) | 2 lines Fix slinfactory logic when dealing with frames coming in that may already be in the signed linear format. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66109 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-05Merged revisions 57798 via svnmerge from file1-4/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r57798 | file | 2007-03-04 23:19:53 -0500 (Sun, 04 Mar 2007) | 2 lines Don't allow a NULL pointer to reach ast_frdup. (issue #9155 reported by cmaj) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57799 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-26Merged revisions 43695 via svnmerge from file1-6/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43695 | file | 2006-09-26 16:09:41 -0400 (Tue, 26 Sep 2006) | 2 lines Slight overhaul of the whisper support. 1. We need to duplicate the frame 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/trunk@43696 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