123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284 |
- /*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2012, Matt Jordan
- *
- * Matt Jordan <mjordan@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
- /*!
- * \file
- * \brief Unit tests for jitterbuf.c
- *
- * \author\verbatim Matt Jordan <mjordan@digium.com> \endverbatim
- *
- * \ingroup tests
- */
- /*** MODULEINFO
- <depend>TEST_FRAMEWORK</depend>
- <support_level>core</support_level>
- ***/
- #include "asterisk.h"
- ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
- #include "asterisk/utils.h"
- #include "asterisk/module.h"
- #include "asterisk/test.h"
- #include "jitterbuf.h"
- #define DEFAULT_MAX_JITTERBUFFER 1000
- #define DEFAULT_RESYNCH_THRESHOLD 1000
- #define DEFAULT_MAX_CONTIG_INTERP 10
- #define DEFAULT_TARGET_EXTRA -1
- #define DEFAULT_CODEC_INTERP_LEN 20
- /*! \internal
- * Test two numeric (long int) values. Failure automatically attempts
- * to jump to a cleanup tag
- */
- #define JB_NUMERIC_TEST(attribute, expected) do { \
- if ((attribute) != (expected)) { \
- ast_test_status_update(test, #attribute ": expected [%ld]; actual [%ld]\n", (long int)(expected), (attribute)); \
- goto cleanup; \
- } \
- } while (0)
- /*! \internal
- * Print out as debug the frame related contents of a jb_info object
- */
- #define JB_INFO_PRINT_FRAME_DEBUG(jbinfo) do { \
- ast_debug(1, "JitterBuffer Frame Info:\n" \
- "\tFrames In: %ld\n\tFrames Out: %ld\n" \
- "\tDropped Frames: %ld\n\tLate Frames: %ld\n" \
- "\tLost Frames: %ld\n\tOut of Order Frames: %ld\n" \
- "\tCurrent Frame: %ld\n", jbinfo.frames_in, jbinfo.frames_out, \
- jbinfo.frames_dropped, jbinfo.frames_late, jbinfo.frames_lost, \
- jbinfo.frames_ooo, jbinfo.frames_cur); \
- } while (0)
- /*! \internal
- * This macro installs the error, warning, and debug functions for a test. It is
- * expected that at the end of a test, the functions are removed.
- * Note that the debug statement is in here merely to aid in tracing in a log where
- * the jitter buffer debug output begins.
- */
- #define JB_TEST_BEGIN(test_name) do { \
- jb_setoutput(test_jb_error_output, test_jb_warn_output, test_jb_debug_output); \
- ast_debug(1, "Starting %s\n", test_name); \
- } while (0)
- /*! \internal
- * Uninstall the error, warning, and debug functions from a test
- */
- #define JB_TEST_END do { \
- jb_setoutput(NULL, NULL, NULL); \
- } while (0)
- static const char *jitter_buffer_return_codes[] = {
- "JB_OK", /* 0 */
- "JB_EMPTY", /* 1 */
- "JB_NOFRAME", /* 2 */
- "JB_INTERP", /* 3 */
- "JB_DROP", /* 4 */
- "JB_SCHED" /* 5 */
- };
- /*!
- * \internal
- * \brief Make a default jitter buffer configuration
- */
- static void test_jb_populate_config(struct jb_conf *jbconf)
- {
- if (!jbconf) {
- return;
- }
- jbconf->max_jitterbuf = DEFAULT_MAX_JITTERBUFFER;
- jbconf->resync_threshold = DEFAULT_RESYNCH_THRESHOLD;
- jbconf->max_contig_interp = DEFAULT_MAX_CONTIG_INTERP;
- jbconf->target_extra = 0;
- }
- /*!
- * \internal
- * \brief Debug callback function for the jitter buffer's jb_dbg function
- */
- static void __attribute__((format(printf, 1, 2))) test_jb_debug_output(const char *fmt, ...)
- {
- va_list args;
- char buf[1024];
- va_start(args, fmt);
- vsnprintf(buf, sizeof(buf), fmt, args);
- va_end(args);
- ast_debug(1, "%s", buf);
- }
- /*!
- * \internal
- * \brief Warning callback function for the jitter buffer's jb_warn function
- */
- static void __attribute__((format(printf, 1, 2))) test_jb_warn_output(const char *fmt, ...)
- {
- va_list args;
- char buf[1024];
- va_start(args, fmt);
- vsnprintf(buf, sizeof(buf), fmt, args);
- va_end(args);
- ast_log(AST_LOG_WARNING, "%s", buf);
- }
- /*!
- * \internal
- * \brief Error callback function for the jitter buffer's jb_err function
- */
- static void __attribute__((format(printf, 1, 2))) test_jb_error_output(const char *fmt, ...)
- {
- va_list args;
- char buf[1024];
- va_start(args, fmt);
- vsnprintf(buf, sizeof(buf), fmt, args);
- va_end(args);
- ast_log(AST_LOG_ERROR, "%s", buf);
- }
- /*!
- * \internal
- * \brief Insert frames into the jitter buffer for the nominal tests
- */
- static int test_jb_nominal_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
- {
- int i = 0, ret = 0;
- for (i = 0; i < 40; i++) {
- if (jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", i);
- ret = 1;
- break;
- }
- }
- return ret;
- }
- AST_TEST_DEFINE(jitterbuffer_nominal_voice_frames)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_conf jbconf;
- struct jb_info jbinfo;
- int i = 0;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_nominal_voice_frames";
- info->category = "/main/jitterbuf/";
- info->summary = "Nominal operation of jitter buffer with audio data";
- info->description =
- "Tests the nominal case of putting audio data into a jitter buffer, "
- "retrieving the frames, and querying for the next frame";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_nominal_voice_frames");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_nominal_frame_insertion(test, jb, JB_TYPE_VOICE)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- /* We should have a frame for each point in time */
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- JB_NUMERIC_TEST(jb_next(jb), (i + 1) * 20 + 5);
- }
- result = AST_TEST_PASS;
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- AST_TEST_DEFINE(jitterbuffer_nominal_control_frames)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_conf jbconf;
- struct jb_info jbinfo;
- int i = 0;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_nominal_control_frames";
- info->category = "/main/jitterbuf/";
- info->summary = "Nominal operation of jitter buffer with control frames";
- info->description =
- "Tests the nominal case of putting control frames into a jitter buffer, "
- "retrieving the frames, and querying for the next frame";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_nominal_control_frames");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_nominal_frame_insertion(test, jb, JB_TYPE_CONTROL)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- /* We should have a frame for each point in time */
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- /*!
- * \internal
- * \brief Insert frames into the jitter buffer for the out of order tests
- */
- static int test_jb_out_of_order_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
- {
- int i = 0, ret = 0;
- for (i = 0; i < 40; i++) {
- if (i % 4 == 0) {
- /* Add the next frame */
- if (jb_put(jb, NULL, frame_type, 20, (i + 1) * 20, (i + 1) * 20 + 5) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", (i+1));
- ret = 1;
- break;
- }
- /* Add the current frame */
- if (jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", i);
- ret = 1;
- break;
- }
- i++;
- } else {
- if (jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", i);
- ret = 1;
- break;
- }
- }
- }
- return ret;
- }
- AST_TEST_DEFINE(jitterbuffer_out_of_order_voice)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_out_of_order_voice";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests sending out of order audio frames to a jitter buffer";
- info->description =
- "Every 5th frame sent to a jitter buffer is reversed with the previous "
- "frame. The expected result is to have a jitter buffer with the frames "
- "in order, while a total of 10 frames should be recorded as having been "
- "received out of order.";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_out_of_order_voice");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_out_of_order_frame_insertion(test, jb, JB_TYPE_VOICE)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- /* We should have a frame for each point in time */
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 10);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- AST_TEST_DEFINE(jitterbuffer_out_of_order_control)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_out_of_order_voice";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests sending out of order audio frames to a jitter buffer";
- info->description =
- "Every 5th frame sent to a jitter buffer is reversed with the previous "
- "frame. The expected result is to have a jitter buffer with the frames "
- "in order, while a total of 10 frames should be recorded as having been "
- "received out of order.";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_out_of_order_control");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_out_of_order_frame_insertion(test, jb, JB_TYPE_CONTROL)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- /* We should have a frame for each point in time */
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 10);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- /*!
- * \internal
- * \brief Insert frames into the jitter buffer for the lost frame tests
- */
- static int test_jb_lost_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
- {
- int i = 0, ret = 0;
- for (i = 0; i < 40; i++) {
- if (i % 5 == 0) {
- i++;
- }
- if (jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", i);
- ret = 1;
- break;
- }
- }
- return ret;
- }
- AST_TEST_DEFINE(jitterbuffer_lost_voice)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_conf jbconf;
- struct jb_info jbinfo;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_lost_voice";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests missing frames in the jitterbuffer";
- info->description =
- "Every 5th frame that would be sent to a jitter buffer is instead"
- "dropped. When reading data from the jitter buffer, the jitter buffer"
- "should interpolate the voice frame.";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_lost_voice");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_lost_frame_insertion(test, jb, JB_TYPE_VOICE)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- /* If we didn't get an OK, make sure that it was an expected lost frame */
- if (!((ret == JB_INTERP && i % 5 == 0) || (ret == JB_NOFRAME && i == 0))) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- } else {
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- /* Note: The first frame (at i = 0) never got added, so nothing existed at that point.
- * Its neither dropped nor lost.
- */
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 7);
- JB_NUMERIC_TEST(jbinfo.frames_in, 32);
- JB_NUMERIC_TEST(jbinfo.frames_out, 32);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- AST_TEST_DEFINE(jitterbuffer_lost_control)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_conf jbconf;
- struct jb_info jbinfo;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_lost_control";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests missing frames in the jitterbuffer";
- info->description =
- "Every 5th frame that would be sent to a jitter buffer is instead"
- "dropped. When reading data from the jitter buffer, the jitter buffer"
- "simply reports that no frame exists for that time slot";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_lost_control");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_lost_frame_insertion(test, jb, JB_TYPE_CONTROL)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- /* If we didn't get an OK, make sure that it was an expected lost frame */
- if (!(ret == JB_NOFRAME && i % 5 == 0)) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- } else {
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- /* Note: The first frame (at i = 0) never got added, so nothing existed at that point.
- * Its neither dropped nor lost.
- */
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 32);
- JB_NUMERIC_TEST(jbinfo.frames_out, 32);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- /*!
- * \internal
- * \brief Insert frames into the jitter buffer for the late frame tests
- */
- static int test_jb_late_frame_insertion(struct ast_test *test, struct jitterbuf *jb, enum jb_frame_type frame_type)
- {
- int i = 0, ret = 0;
- for (i = 0; i < 40; i++) {
- if (i % 5 == 0) {
- /* Add 5th frame */
- if (jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 20) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", (i+1));
- ret = 1;
- break;
- }
- } else {
- if (jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5) == JB_DROP) {
- ast_test_status_update(test, "Jitter buffer dropped packet %d\n", i);
- ret = 1;
- break;
- }
- }
- }
- return ret;
- }
- AST_TEST_DEFINE(jitterbuffer_late_voice)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_late_voice";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests sending frames to a jitter buffer that arrive late";
- info->description =
- "Every 5th frame sent to a jitter buffer arrives late, but still in "
- "order with respect to the previous and next packet";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_late_voice");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_late_frame_insertion(test, jb, JB_TYPE_VOICE)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- /* We should have a frame for each point in time */
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- AST_TEST_DEFINE(jitterbuffer_late_control)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_late_control";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests sending frames to a jitter buffer that arrive late";
- info->description =
- "Every 5th frame sent to a jitter buffer arrives late, but still in "
- "order with respect to the previous and next packet";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_late_voice");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- if (test_jb_late_frame_insertion(test, jb, JB_TYPE_CONTROL)) {
- goto cleanup;
- }
- for (i = 0; i < 40; i++) {
- enum jb_return_code ret;
- /* We should have a frame for each point in time */
- if ((ret = jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN)) != JB_OK) {
- ast_test_status_update(test,
- "Unexpected jitter buffer return code [%s] when retrieving frame %d\n",
- jitter_buffer_return_codes[ret], i);
- goto cleanup;
- }
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- /*!
- * \internal
- * \brief Insert frames into the jitter buffer for the overflow tests
- */
- static void test_jb_overflow_frame_insertion(struct jitterbuf *jb, enum jb_frame_type frame_type)
- {
- int i = 0;
- for (i = 0; i < 100; i++) {
- jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5);
- }
- }
- AST_TEST_DEFINE(jitterbuffer_overflow_voice)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int i = 0;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_overflow_voice";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests overfilling a jitter buffer with voice frames";
- info->description = "Tests overfilling a jitter buffer with voice frames";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_overflow_voice");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- test_jb_overflow_frame_insertion(jb, JB_TYPE_VOICE);
- while (jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN) == JB_OK) {
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- ++i;
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 49);
- JB_NUMERIC_TEST(jbinfo.frames_out, 51);
- JB_NUMERIC_TEST(jbinfo.frames_in, 51);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- /* Note that the last frame will be interpolated */
- JB_NUMERIC_TEST(jbinfo.frames_lost, 1);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- AST_TEST_DEFINE(jitterbuffer_overflow_control)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int i = 0;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_overflow_control";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests overfilling a jitter buffer with control frames";
- info->description = "Tests overfilling a jitter buffer with control frames";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_overflow_control");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- test_jb_overflow_frame_insertion(jb, JB_TYPE_CONTROL);
- while (jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN) == JB_OK) {
- JB_NUMERIC_TEST(frame.ms, 20);
- JB_NUMERIC_TEST(frame.ts, i * 20 - jb->info.resync_offset);
- ++i;
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 49);
- JB_NUMERIC_TEST(jbinfo.frames_out, 51);
- JB_NUMERIC_TEST(jbinfo.frames_in, 51);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_lost, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- /*!
- * \internal
- * \brief Insert frames into the jitter buffer for the resynch tests
- */
- static void test_jb_resynch_frame_insertion(struct jitterbuf *jb, enum jb_frame_type frame_type)
- {
- int i = 0;
- for (i = 0; i < 20; i++) {
- jb_put(jb, NULL, frame_type, 20, i * 20, i * 20 + 5);
- }
- for (i = 20; i < 40; i++) {
- jb_put(jb, NULL, frame_type, 20, i * 20 + 500, i * 20 + 5);
- }
- }
- AST_TEST_DEFINE(jitterbuffer_resynch_control)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int interpolated_frames = 0;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_resynch_control";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests sending control frames that force a resynch";
- info->description = "Control frames are sent to a jitter buffer. After some "
- "number of frames, the source timestamps jump, forcing a resync of "
- "the jitter buffer. Since the frames are control, the resync happens "
- "immediately.";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_resynch_control");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- jbconf.resync_threshold = 200;
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- test_jb_resynch_frame_insertion(jb, JB_TYPE_CONTROL);
- for (i = 0; i <= 40; i++) {
- if (jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN) == JB_INTERP) {
- ++interpolated_frames;
- }
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- /* With control frames, a resync happens automatically */
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 0);
- JB_NUMERIC_TEST(jbinfo.frames_out, 40);
- JB_NUMERIC_TEST(jbinfo.frames_in, 40);
- /* Verify that each of the interpolated frames is counted */
- JB_NUMERIC_TEST(jbinfo.frames_lost, interpolated_frames);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- AST_TEST_DEFINE(jitterbuffer_resynch_voice)
- {
- enum ast_test_result_state result = AST_TEST_FAIL;
- struct jitterbuf *jb = NULL;
- struct jb_frame frame;
- struct jb_info jbinfo;
- struct jb_conf jbconf;
- int interpolated_frames = 0;
- int i;
- switch (cmd) {
- case TEST_INIT:
- info->name = "jitterbuffer_resynch_voice";
- info->category = "/main/jitterbuf/";
- info->summary = "Tests sending voice frames that force a resynch";
- info->description = "Voice frames are sent to a jitter buffer. After some "
- "number of frames, the source timestamps jump, forcing a resync of "
- "the jitter buffer. Since the frames are voice, the resync happens "
- "after observing three packets that break the resync threshold.";
- return AST_TEST_NOT_RUN;
- case TEST_EXECUTE:
- break;
- }
- JB_TEST_BEGIN("jitterbuffer_resynch_voice");
- if (!(jb = jb_new())) {
- ast_test_status_update(test, "Failed to allocate memory for jitterbuffer\n");
- goto cleanup;
- }
- test_jb_populate_config(&jbconf);
- jbconf.resync_threshold = 200;
- if (jb_setconf(jb, &jbconf) != JB_OK) {
- ast_test_status_update(test, "Failed to set jitterbuffer configuration\n");
- goto cleanup;
- }
- test_jb_resynch_frame_insertion(jb, JB_TYPE_VOICE);
- for (i = 0; i <= 40; i++) {
- if (jb_get(jb, &frame, i * 20 + 5, DEFAULT_CODEC_INTERP_LEN) == JB_INTERP) {
- ++interpolated_frames;
- }
- }
- if (jb_getinfo(jb, &jbinfo) != JB_OK) {
- ast_test_status_update(test, "Failed to get jitterbuffer information\n");
- goto cleanup;
- }
- /* The first three packets before the resync should be dropped */
- JB_INFO_PRINT_FRAME_DEBUG(jbinfo);
- JB_NUMERIC_TEST(jbinfo.frames_dropped, 3);
- JB_NUMERIC_TEST(jbinfo.frames_out, 37);
- JB_NUMERIC_TEST(jbinfo.frames_in, 37);
- /* Verify that each of the interpolated frames is counted */
- JB_NUMERIC_TEST(jbinfo.frames_lost, interpolated_frames);
- JB_NUMERIC_TEST(jbinfo.frames_late, 0);
- JB_NUMERIC_TEST(jbinfo.frames_ooo, 0);
- result = AST_TEST_PASS;
- cleanup:
- if (jb) {
- /* No need to do anything - this will put all frames on the 'free' list,
- * so jb_destroy will dispose of them */
- while (jb_getall(jb, &frame) == JB_OK) { }
- jb_destroy(jb);
- }
- JB_TEST_END;
- return result;
- }
- static int unload_module(void)
- {
- AST_TEST_UNREGISTER(jitterbuffer_nominal_voice_frames);
- AST_TEST_UNREGISTER(jitterbuffer_nominal_control_frames);
- AST_TEST_UNREGISTER(jitterbuffer_out_of_order_voice);
- AST_TEST_UNREGISTER(jitterbuffer_out_of_order_control);
- AST_TEST_UNREGISTER(jitterbuffer_lost_voice);
- AST_TEST_UNREGISTER(jitterbuffer_lost_control);
- AST_TEST_UNREGISTER(jitterbuffer_late_voice);
- AST_TEST_UNREGISTER(jitterbuffer_late_control);
- AST_TEST_UNREGISTER(jitterbuffer_overflow_voice);
- AST_TEST_UNREGISTER(jitterbuffer_overflow_control);
- AST_TEST_UNREGISTER(jitterbuffer_resynch_voice);
- AST_TEST_UNREGISTER(jitterbuffer_resynch_control);
- return 0;
- }
- static int load_module(void)
- {
- /* Nominal - put / get frames */
- AST_TEST_REGISTER(jitterbuffer_nominal_voice_frames);
- AST_TEST_REGISTER(jitterbuffer_nominal_control_frames);
- /* Out of order frame arrival */
- AST_TEST_REGISTER(jitterbuffer_out_of_order_voice);
- AST_TEST_REGISTER(jitterbuffer_out_of_order_control);
- /* Lost frame arrival */
- AST_TEST_REGISTER(jitterbuffer_lost_voice);
- AST_TEST_REGISTER(jitterbuffer_lost_control);
- /* Late frame arrival */
- AST_TEST_REGISTER(jitterbuffer_late_voice);
- AST_TEST_REGISTER(jitterbuffer_late_control);
- /* Buffer overflow */
- AST_TEST_REGISTER(jitterbuffer_overflow_voice);
- AST_TEST_REGISTER(jitterbuffer_overflow_control);
- /* Buffer resynch */
- AST_TEST_REGISTER(jitterbuffer_resynch_voice);
- AST_TEST_REGISTER(jitterbuffer_resynch_control);
- return AST_MODULE_LOAD_SUCCESS;
- }
- AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Jitter Buffer Tests");
|