Commit Graph

21 Commits

Author SHA1 Message Date
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Kevin P. Fleming 4c0265664e Merged revisions 200991 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@201056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16 18:54:30 +00:00
Kevin P. Fleming 23939e54f3 improve slinfactory API to remove implicit sample rate and require explicit sample rate selection by creator of the slinfactory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 19:38:26 +00:00
Mark Michelson fc7455fa44 Merged revisions 171621 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@171622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-27 20:11:30 +00:00
Michiel van Baak f1e9371da8 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- 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: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Joshua Colp c7d51a7fc1 Put my slinfactory changes back in.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 14:54:42 +00:00
Jeff Peeler a5cdd849e5 This adds DNS SRV record support to DNS manager. If there is a SRV record 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: https://origsvn.digium.com/svn/asterisk/trunk@112207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 17:53:08 +00:00
Joshua Colp 7dab892401 Merged revisions 112125 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@112126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 16:50:37 +00:00
Joshua Colp a3c7b08d19 Doxygenify slinfactory a bit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 21:06:50 +00:00
Joshua Colp 00641af7d2 Add support for 16KHz signed linear.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-01 03:59:41 +00:00
Joshua Colp cb8678b5da Merged revisions 101222 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@101223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:42:29 +00:00
Russell Bryant aa7592f21a Merged revisions 99187 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@99188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-19 10:06:02 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Joshua Colp 602198c402 Merge audiohooks branch into trunk. This is a new API for developers to listen and manipulate the audio going through a channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 19:30:52 +00:00
Joshua Colp f65934a517 Minor tweak... drop translation path if one exists when we get an already signed linear frame in. Chances are the stream has then switched to signed linear and we no longer need the path.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-25 13:26:52 +00:00
Joshua Colp 844394c495 Merged revisions 66074 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@66109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-25 01:37:50 +00:00
Joshua Colp 1db9dc0c9a Merged revisions 57798 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@57799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 04:21:28 +00:00
Joshua Colp becd11ddb8 Merged revisions 43695 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@43696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:11:44 +00:00
Russell Bryant f7e7161607 Merge team/russell/frame_caching
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: https://origsvn.digium.com/svn/asterisk/trunk@41278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 20:50:36 +00:00
Kevin P. Fleming 0a27d8bfe5 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00