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
This commit is contained in:
Matthew Jordan
2012-07-23 21:15:26 +00:00
parent a28e6fc7bd
commit b6a0ae0b35
4 changed files with 533 additions and 13 deletions

View File

@@ -92,7 +92,7 @@ struct ast_jb_conf
/* Hooks for the abstract jb implementation */
/*! \brief Create */
typedef void * (*jb_create_impl)(struct ast_jb_conf *general_config, long resynch_threshold);
typedef void * (*jb_create_impl)(struct ast_jb_conf *general_config);
/*! \brief Destroy */
typedef void (*jb_destroy_impl)(void *jb);
/*! \brief Put first frame */