Asterisk - The Open Source Telephony Project
18.5.0
|
RTP/RTCP Unit Tests. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/test.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/data_buffer.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Enumerations | |
enum | test_type { TEST_TYPE_NONE = 0, TEST_TYPE_NACK, TEST_TYPE_REMB } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static void | ast_sched_context_destroy_wrapper (struct ast_sched_context *sched) |
AST_TEST_DEFINE (nack_no_packet_loss) | |
AST_TEST_DEFINE (nack_nominal) | |
AST_TEST_DEFINE (nack_overflow) | |
AST_TEST_DEFINE (lost_packet_stats_nominal) | |
AST_TEST_DEFINE (remb_nominal) | |
AST_TEST_DEFINE (sr_rr_nominal) | |
AST_TEST_DEFINE (fir_nominal) | |
static int | load_module (void) |
static int | test_init_rtp_instances (struct ast_rtp_instance **instance1, struct ast_rtp_instance **instance2, struct ast_sched_context *test_sched, enum test_type type) |
static void | test_read_frames (struct ast_rtp_instance *instance, int num) |
static void | test_write_and_read_frames (struct ast_rtp_instance *instance1, struct ast_rtp_instance *instance2, int seqno, int num) |
static void | test_write_frames (struct ast_rtp_instance *instance, int seqno, int num) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "RTP/RTCP test module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .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 |
RTP/RTCP Unit Tests.
Definition in file test_res_rtp.c.
enum test_type |
Enumerator | |
---|---|
TEST_TYPE_NONE | |
TEST_TYPE_NACK | |
TEST_TYPE_REMB |
Definition at line 40 of file test_res_rtp.c.
|
static |
Definition at line 550 of file test_res_rtp.c.
|
static |
Definition at line 550 of file test_res_rtp.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 550 of file test_res_rtp.c.
|
static |
Definition at line 46 of file test_res_rtp.c.
References ast_sched_context_destroy().
Referenced by AST_TEST_DEFINE().
AST_TEST_DEFINE | ( | nack_no_packet_loss | ) |
Definition at line 133 of file test_res_rtp.c.
References ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_get_recv_buffer_count(), ast_rtp_instance_get_send_buffer_count(), ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), LOG_ERROR, NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), TEST_TYPE_NACK, and test_write_and_read_frames().
AST_TEST_DEFINE | ( | nack_nominal | ) |
Definition at line 171 of file test_res_rtp.c.
References ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_drop_packets(), ast_rtp_instance_get_recv_buffer_count(), ast_rtp_instance_get_recv_buffer_max(), ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), LOG_ERROR, NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), test_read_frames(), TEST_TYPE_NACK, and test_write_and_read_frames().
AST_TEST_DEFINE | ( | nack_overflow | ) |
Definition at line 220 of file test_res_rtp.c.
References ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_get_recv_buffer_count(), ast_rtp_instance_get_recv_buffer_max(), ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), LOG_ERROR, NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), TEST_TYPE_NACK, and test_write_and_read_frames().
AST_TEST_DEFINE | ( | lost_packet_stats_nominal | ) |
Definition at line 266 of file test_res_rtp.c.
References ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_get_stats(), ast_rtp_instance_queue_report(), AST_RTP_INSTANCE_STAT_ALL, ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), ast_rtp_instance_stats::local_maxrxploss, ast_rtp_instance_stats::local_minrxploss, LOG_ERROR, NULL, RAII_VAR, ast_rtp_instance_stats::rxploss, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), TEST_TYPE_NONE, test_write_and_read_frames(), and test_write_frames().
AST_TEST_DEFINE | ( | remb_nominal | ) |
Definition at line 346 of file test_res_rtp.c.
References AST_FRAME_RTCP, ast_frfree, ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_read(), ast_rtp_instance_set_schedid(), ast_rtp_instance_write(), AST_RTP_RTCP_FMT_REMB, AST_RTP_RTCP_PSFB, ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_rtp_rtcp_feedback_remb::br_exp, ast_rtp_rtcp_feedback_remb::br_mantissa, ast_rtp_rtcp_feedback::fmt, ast_frame::frametype, sip_to_pjsip::info(), LOG_ERROR, NULL, RAII_VAR, ast_rtp_rtcp_feedback::remb, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), and TEST_TYPE_REMB.
AST_TEST_DEFINE | ( | sr_rr_nominal | ) |
Definition at line 410 of file test_res_rtp.c.
References AST_FRAME_RTCP, ast_frfree, ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_get_sdes_received(), ast_rtp_instance_queue_report(), ast_rtp_instance_read(), AST_RTP_RTCP_RR, AST_RTP_RTCP_SR, ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, sip_to_pjsip::info(), LOG_ERROR, NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), TEST_TYPE_NONE, test_write_and_read_frames(), and test_write_frames().
AST_TEST_DEFINE | ( | fir_nominal | ) |
Definition at line 468 of file test_res_rtp.c.
References AST_CONTROL_VIDUPDATE, AST_FRAME_CONTROL, ast_frfree, ast_log, ast_rtp_instance_destroy(), ast_rtp_instance_read(), ast_rtp_instance_set_schedid(), ast_rtp_instance_write(), ast_sched_context_create(), ast_sched_context_destroy_wrapper(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_frame::frametype, sip_to_pjsip::info(), LOG_ERROR, NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, test_init_rtp_instances(), TEST_TYPE_NONE, and test_write_and_read_frames().
|
static |
Definition at line 538 of file test_res_rtp.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 53 of file test_res_rtp.c.
References ast_rtp_instance_activate(), ast_rtp_instance_get_local_address(), ast_rtp_instance_new(), ast_rtp_instance_reset_test_engine(), AST_RTP_INSTANCE_RTCP_MUX, ast_rtp_instance_set_prop(), ast_rtp_instance_set_remote_address, AST_RTP_PROPERTY_REMB, AST_RTP_PROPERTY_RETRANS_RECV, AST_RTP_PROPERTY_RETRANS_SEND, AST_RTP_PROPERTY_RTCP, ast_sockaddr_parse(), NULL, TEST_TYPE_NACK, and TEST_TYPE_REMB.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 113 of file test_res_rtp.c.
References ast_frfree, and ast_rtp_instance_read().
Referenced by AST_TEST_DEFINE(), and test_write_and_read_frames().
|
static |
Definition at line 126 of file test_res_rtp.c.
References test_read_frames(), and test_write_frames().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 94 of file test_res_rtp.c.
References ast_format_ulaw, AST_FRAME_VOICE, AST_FRFLAG_HAS_SEQUENCE_NUMBER, ast_rtp_instance_write(), ast_set_flag, ast_frame::data, ast_frame::frametype, and ast_frame::seqno.
Referenced by AST_TEST_DEFINE(), and test_write_and_read_frames().
|
static |
|
static |
Definition at line 550 of file test_res_rtp.c.
|
static |
Definition at line 550 of file test_res_rtp.c.