Commit Graph

14 Commits

Author SHA1 Message Date
Joshua Colp 7298a785ad func_jitterbuffer: Add audio/video sync support.
This change adds support to the JITTERBUFFER dialplan function
for audio and video synchronization. When enabled the RTCP SR
report is used to produce an NTP timestamp for both the audio and
video streams. Using this information the video frames are queued
until their NTP timestamp is equal to or behind the NTP timestamp
of the audio. The audio jitterbuffer acts as the leader deciding
when to shrink/grow the jitterbuffer when adaptive is in use. For
both adaptive and fixed the video buffer follows the size of the
audio jitterbuffer.

ASTERISK-28533

Change-Id: I3fd75160426465e6d46bb2e198c07b9d314a4492
2019-09-18 20:22:50 +00:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Matthew Jordan 6650704414 funcs/func_jitterbuffer: Tweak documentation
This patch merely reformats and cleans up a bit of the jitterbuffer
documentation for the wiki.
........

Merged revisions 420639 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 01:31:56 +00:00
Matthew Jordan 922e3203a9 xmldocs: Add support for an <example> tag in the Asterisk XML Documentation
This patch adds support for an <example /> tag in the XML documentation schema.

For CLI help, this doesn't change the formatting too much:
 - Preceeding white space is removed
 - Unlike with para elements, new lines are preserved

However, having an <example /> tag in the XML schema allows for the wiki
documentation generation script to surround the documentation with {code} or
{noformat} tags, generating much better content for the wiki - and allowing us
to put dialplan examples (and other code snippets, if desired) into the
documentation for an application/function/AMI command/etc.

Review: https://reviewboard.asterisk.org/r/3807/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31 11:49:40 +00:00
Corey Farrell fbe0dfaf44 Fix dialplan function NULL channel safety issues
(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/
........

Merged revisions 411313 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 411314 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 411315 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 19:21:44 +00:00
Richard Mudgett 3d63833bd6 Merge in the bridge_construction branch to make the system use the Bridging API.
Breaks many things until they can be reworked.  A partial list:
chan_agent
chan_dahdi, chan_misdn, chan_iax2 native bridging
app_queue
COLP updates
DTMF attended transfers
Protocol attended transfers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21 18:00:22 +00:00
Matthew Jordan a0c363e227 Refactor ast_timer_ack to return an error and handle the error in timer users
Currently, if an acknowledgement of a timer fails Asterisk will not realize
that a serious error occurred and will continue attempting to use the timer's
file descriptor.  This can lead to situations where errors stream to the
CLI/log file.  This consumes significant resources, masks the actual problem
that occurred (whatever caused the timer to fail in the first place), and
can leave channels in odd states.

This patch propagates the errors in the timing resource modules up through
the timer core, and makes users of these timers handle acknowledgement
failures.  It also adds some defensive coding around the use of timers
to prevent using bad file descriptors in off nominal code paths.

Note that the patch created by the issue reporter was modified slightly for
this commit and backported to 1.8, as it was originally written for
Asterisk 10.

Review: https://reviewboard.asterisk.org/r/2178/

(issue ASTERISK-20032)
Reported by: Jeremiah Gowdy
patches:
  jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358)
........

Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 23:10:14 +00:00
Matthew Jordan b6a0ae0b35 Unit tests for the Jitter Buffer API; remove unnecessary resync
This patch includes the following:
* Unit tests for the abstract Jitter Buffer API.  This includes both fixed
  and adaptive flavors, testing nominal creation, frame input, frame retrieval,
  resyncing; off nominal frame input overflow, out of order, and others.
* Tweaks to the abstract_jb API to remove the unnecessary resync_threshold
  parameter from the create function (resync_threshold is already in the
  struct passed into the create function)
* Ensure the fixed jitter buffer is empty before destroying it, to avoid an
  ASSERT
* Don't "resync" the adaptive jitter buffer.  The mechanism that was being
  used actually causes the jitter buffer to think its being overflowed by going
  around the jitterbuf API and attempting to 'resynch' it improperly.  If a
  resync is needed, the jitter buffer will do it properly by itself.  Note that
  this is only an optimization needed for trunk, as the worst that happens is 
  the loss of three voice packets before the adaptive jitter buffer will resync
  anyway.
  
Review: https://reviewboard.asterisk.org/r/2035


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-23 21:15:26 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Jonathan Rose e77f1a6ae1 Some additional module documentation changes for 10 for the menuselect change.
(issue ASTERISK-18268)
........

Merged revisions 340931 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14 18:38:08 +00:00
David Vossel 00dc1556ab Fixes reliability issues with func_jitterbuffer's usage in the new ConfBridge application.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 18:08:42 +00:00
David Vossel 18d591cb48 Introduction of the JITTERBUFFER dialplan function.
Review: https://reviewboard.asterisk.org/r/1157/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 20:52:15 +00:00