| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Abstract Jitterbuffer Tests. More...
#include "asterisk.h"#include "asterisk/utils.h"#include "asterisk/module.h"#include "asterisk/test.h"#include "asterisk/abstract_jb.h"#include "asterisk/frame.h"#include "asterisk/format_cache.h"
Go to the source code of this file.
| Macros | |
| #define | DEFAULT_CONFIG_FLAGS 0 | 
| #define | DEFAULT_CONFIG_RESYNC_THRESHOLD (DEFAULT_FRAME_MS) * 2 | 
| #define | DEFAULT_CONFIG_SIZE (DEFAULT_FRAME_MS) * 10 | 
| #define | DEFAULT_CONFIG_TARGET_EXTRA -1 | 
| #define | DEFAULT_FRAME_MS 160 | 
| #define | INT_TEST(actual, expected) | 
| #define | LONG_INT_TEST(actual, expected) | 
| #define | MAKE_DEFAULT_CONFIG(conf, impl) | 
| #define | OBTAIN_JITTERBUFFER_IMPL(impl, ast_jb_type, literal_name) | 
| #define | STRING_TEST(actual, expected) | 
| #define | STRINGIFY_TESTNAME(test_name) TEST_NAME2(test_name) | 
| #define | test_create_nominal(type_name, literal_type_name) | 
| #define | TEST_NAME(type_name, specifier) type_name ## _ ## specifier | 
| #define | TEST_NAME2(test_name) #test_name | 
| #define | test_put(type_name, literal_type_name) | 
| #define | test_put_first(type_name, literal_type_name) | 
| #define | test_put_out_of_order(type_name, literal_type_name, synch_limit) | 
| #define | test_put_overflow(type_name, literal_type_name, overflow_limit) | 
| #define | UINT_TEST(actual, expected) | 
| #define | VERIFY_FRAME(actual, expected) | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static struct ast_frame * | create_test_frame (long timestamp, int seqno) | 
| static void | dispose_jitterbuffer (struct ast_jb *jb) | 
| static int | load_module (void) | 
| test_create_nominal (test_put_first(AST_JB_ADAPTIVE, test_put_first("adaptive") | |
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Abstract JitterBuffer API Tests" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static struct ast_jb | default_jb | 
Abstract Jitterbuffer Tests.
Tests the abstract jitter buffer API. This tests both adaptive and fixed jitter buffers. Functions defined in abstract_jb that are not part of the abstract jitter buffer API are not tested by this unit test.
Definition in file test_abstract_jb.c.
| #define DEFAULT_CONFIG_FLAGS 0 | 
Definition at line 47 of file test_abstract_jb.c.
| #define DEFAULT_CONFIG_RESYNC_THRESHOLD (DEFAULT_FRAME_MS) * 2 | 
Definition at line 49 of file test_abstract_jb.c.
| #define DEFAULT_CONFIG_SIZE (DEFAULT_FRAME_MS) * 10 | 
Definition at line 48 of file test_abstract_jb.c.
| #define DEFAULT_CONFIG_TARGET_EXTRA -1 | 
Definition at line 50 of file test_abstract_jb.c.
| #define DEFAULT_FRAME_MS 160 | 
Definition at line 46 of file test_abstract_jb.c.
| #define INT_TEST | ( | actual, | |
| expected | |||
| ) | 
Definition at line 109 of file test_abstract_jb.c.
| #define LONG_INT_TEST | ( | actual, | |
| expected | |||
| ) | 
Definition at line 100 of file test_abstract_jb.c.
| #define MAKE_DEFAULT_CONFIG | ( | conf, | |
| impl | |||
| ) | 
Definition at line 161 of file test_abstract_jb.c.
| #define OBTAIN_JITTERBUFFER_IMPL | ( | impl, | |
| ast_jb_type, | |||
| literal_name | |||
| ) | 
Definition at line 147 of file test_abstract_jb.c.
| #define STRING_TEST | ( | actual, | |
| expected | |||
| ) | 
Definition at line 127 of file test_abstract_jb.c.
| #define STRINGIFY_TESTNAME | ( | test_name | ) | TEST_NAME2(test_name) | 
Definition at line 185 of file test_abstract_jb.c.
| #define test_create_nominal | ( | type_name, | |
| literal_type_name | |||
| ) | 
Definition at line 194 of file test_abstract_jb.c.
| #define TEST_NAME | ( | type_name, | |
| specifier | |||
| ) | type_name ## _ ## specifier | 
Definition at line 182 of file test_abstract_jb.c.
| #define TEST_NAME2 | ( | test_name | ) | #test_name | 
Definition at line 184 of file test_abstract_jb.c.
| #define test_put | ( | type_name, | |
| literal_type_name | |||
| ) | 
Definition at line 292 of file test_abstract_jb.c.
| #define test_put_first | ( | type_name, | |
| literal_type_name | |||
| ) | 
Definition at line 233 of file test_abstract_jb.c.
| #define test_put_out_of_order | ( | type_name, | |
| literal_type_name, | |||
| synch_limit | |||
| ) | 
Definition at line 436 of file test_abstract_jb.c.
| #define test_put_overflow | ( | type_name, | |
| literal_type_name, | |||
| overflow_limit | |||
| ) | 
Definition at line 368 of file test_abstract_jb.c.
| #define UINT_TEST | ( | actual, | |
| expected | |||
| ) | 
Definition at line 118 of file test_abstract_jb.c.
| #define VERIFY_FRAME | ( | actual, | |
| expected | |||
| ) | 
Definition at line 136 of file test_abstract_jb.c.
| 
 | static | 
Definition at line 567 of file test_abstract_jb.c.
| 
 | static | 
Definition at line 567 of file test_abstract_jb.c.
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 567 of file test_abstract_jb.c.
| 
 | static | 
Definition at line 82 of file test_abstract_jb.c.
References ast_format_slin, AST_FRAME_VOICE, ast_frisolate, DEFAULT_FRAME_MS, ast_frame_subclass::format, ast_frame::frametype, ast_frame::len, ast_frame::seqno, ast_frame::src, ast_frame::subclass, and ast_frame::ts.
| 
 | static | 
Definition at line 60 of file test_abstract_jb.c.
References ast_jb_impl::destroy, ast_jb_impl::empty_and_reset, ast_jb::impl, ast_jb::jbobj, and NULL.
| 
 | static | 
Definition at line 550 of file test_abstract_jb.c.
References AST_JB_ADAPTIVE, AST_JB_FIXED, AST_MODULE_LOAD_SUCCESS, AST_TEST_REGISTER, and TEST_NAME.
| test_create_nominal | ( | test_put_first( | AST_JB_ADAPTIVE, | 
| test_put_first( | "adaptive" | ||
| ) | 
Definition at line 513 of file test_abstract_jb.c.
References AST_JB_ADAPTIVE, AST_JB_FIXED, AST_TEST_UNREGISTER, and TEST_NAME.
| 
 | static | 
Definition at line 567 of file test_abstract_jb.c.
| 
 | static | 
Definition at line 567 of file test_abstract_jb.c.