Asterisk - The Open Source Telephony Project
18.5.0
|
Media Stream API Unit Tests. More...
#include "asterisk.h"
#include "asterisk/test.h"
#include "asterisk/module.h"
#include "asterisk/stream.h"
#include "asterisk/format.h"
#include "asterisk/format_cap.h"
#include "asterisk/format_cache.h"
#include "asterisk/channel.h"
#include "asterisk/uuid.h"
Go to the source code of this file.
Data Structures | |
struct | mock_channel_pvt |
Macros | |
#define | topology_append_stream(topology, name, type, res, label) |
Enumerations | |
enum | CHANNEL_READ_TYPE { CHANNEL_READ, CHANNEL_READ_STREAM } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (stream_create) | |
AST_TEST_DEFINE (stream_create_no_name) | |
AST_TEST_DEFINE (stream_set_type) | |
AST_TEST_DEFINE (stream_set_formats) | |
AST_TEST_DEFINE (stream_set_state) | |
AST_TEST_DEFINE (stream_metadata) | |
AST_TEST_DEFINE (stream_topology_create) | |
AST_TEST_DEFINE (stream_topology_clone) | |
AST_TEST_DEFINE (stream_topology_append_stream) | |
AST_TEST_DEFINE (stream_topology_set_stream) | |
AST_TEST_DEFINE (stream_topology_del_stream) | |
AST_TEST_DEFINE (stream_topology_create_from_format_cap) | |
AST_TEST_DEFINE (stream_topology_get_first_stream_by_type) | |
AST_TEST_DEFINE (stream_topology_create_from_channel_nativeformats) | |
AST_TEST_DEFINE (stream_topology_channel_set) | |
AST_TEST_DEFINE (stream_write_non_multistream) | |
AST_TEST_DEFINE (stream_write_multistream) | |
AST_TEST_DEFINE (stream_read_non_multistream) | |
AST_TEST_DEFINE (stream_read_multistream) | |
AST_TEST_DEFINE (stream_topology_change_request_from_application_non_multistream) | |
AST_TEST_DEFINE (stream_topology_change_request_from_channel_non_multistream) | |
AST_TEST_DEFINE (stream_topology_change_request_from_application) | |
AST_TEST_DEFINE (stream_topology_change_request_from_channel) | |
AST_TEST_DEFINE (format_cap_from_stream_topology) | |
AST_TEST_DEFINE (stream_topology_map_create) | |
static int | check_stream_positions (struct ast_test *test, const struct ast_stream_topology *topology) |
static int | load_module (void) |
static int | load_stream_readqueue (struct ast_channel *chan, int frames) |
static struct ast_channel * | make_channel (struct ast_test *test, int streams, struct ast_channel_tech *tech) |
static int | mock_channel_hangup (struct ast_channel *chan) |
static int | mock_channel_indicate (struct ast_channel *chan, int condition, const void *data, size_t datalen) |
static struct ast_frame * | mock_channel_read (struct ast_channel *chan) |
static int | mock_channel_write (struct ast_channel *chan, struct ast_frame *fr) |
static int | mock_channel_write_stream (struct ast_channel *chan, int stream_num, struct ast_frame *fr) |
static struct ast_frame * | read_from_chan (enum CHANNEL_READ_TYPE rt, struct ast_channel *chan) |
static enum ast_test_result_state | read_test (struct ast_test *test, struct ast_channel_tech *tech, enum CHANNEL_READ_TYPE rt, int streams, int frames, int frames_per_read, int expected_nulls) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Media Stream API 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 |
static const struct ast_channel_tech | mock_channel_old_write_tech |
static const struct ast_channel_tech | mock_channel_tech |
static const struct ast_channel_tech | mock_channel_write_stream_tech |
static const struct ast_channel_tech | mock_stream_channel_tech |
Media Stream API Unit Tests.
Definition in file test_stream.c.
Definition at line 2162 of file test_stream.c.
Referenced by AST_TEST_DEFINE().
enum CHANNEL_READ_TYPE |
Enumerator | |
---|---|
CHANNEL_READ | |
CHANNEL_READ_STREAM |
Definition at line 1702 of file test_stream.c.
|
static |
Definition at line 2314 of file test_stream.c.
|
static |
Definition at line 2314 of file test_stream.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 2314 of file test_stream.c.
AST_TEST_DEFINE | ( | stream_create | ) |
Definition at line 43 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_name(), ast_stream_get_state(), ast_stream_get_type(), AST_STREAM_STATE_INACTIVE, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_create_no_name | ) |
Definition at line 83 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, ast_stream_alloc(), ast_stream_free(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_set_type | ) |
Definition at line 108 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_type(), ast_stream_set_type(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_set_formats | ) |
Definition at line 145 of file test_stream.c.
References ao2_cleanup, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, AST_MEDIA_TYPE_AUDIO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_formats(), ast_stream_set_formats(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_set_state | ) |
Definition at line 191 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_state(), ast_stream_set_state(), AST_STREAM_STATE_INACTIVE, AST_STREAM_STATE_SENDRECV, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_metadata | ) |
Definition at line 228 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_metadata(), ast_stream_set_metadata(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_uuid_generate_str(), AST_UUID_STR_LEN, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_create | ) |
Definition at line 292 of file test_stream.c.
References ast_stream_topology_alloc(), ast_stream_topology_free(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_clone | ) |
Definition at line 317 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_metadata(), ast_stream_get_type(), ast_stream_set_metadata(), ast_stream_topology_alloc(), ast_stream_topology_append_stream(), ast_stream_topology_clone(), ast_stream_topology_free(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_uuid_generate_str(), AST_UUID_STR_LEN, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_append_stream | ) |
Definition at line 442 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_position(), ast_stream_topology_alloc(), ast_stream_topology_append_stream(), ast_stream_topology_free(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, ast_stream::position, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_set_stream | ) |
Definition at line 537 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_alloc(), ast_stream_free(), ast_stream_get_position(), ast_stream_topology_alloc(), ast_stream_topology_free(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), ast_stream_topology_set_stream(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_del_stream | ) |
Definition at line 670 of file test_stream.c.
References ast_codec_media_type2str(), AST_MEDIA_TYPE_END, AST_MEDIA_TYPE_UNKNOWN, ast_stream_alloc(), ast_stream_free(), ast_stream_get_type(), ast_stream_topology_alloc(), ast_stream_topology_append_stream(), ast_stream_topology_del_stream(), ast_stream_topology_free(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, check_stream_positions(), sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, and type.
AST_TEST_DEFINE | ( | stream_topology_create_from_format_cap | ) |
Definition at line 790 of file test_stream.c.
References ao2_cleanup, ast_codec_media_type2str(), ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_h264, ast_format_ulaw, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_get_type(), ast_stream_topology_create_from_format_cap(), ast_stream_topology_free(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_get_first_stream_by_type | ) |
Definition at line 873 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_alloc(), ast_stream_free(), ast_stream_set_state(), AST_STREAM_STATE_REMOVED, ast_stream_topology_alloc(), ast_stream_topology_append_stream(), ast_stream_topology_free(), ast_stream_topology_get_first_stream_by_type(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_create_from_channel_nativeformats | ) |
Definition at line 991 of file test_stream.c.
References ao2_cleanup, ast_channel_alloc, ast_channel_get_stream_topology(), ast_channel_nativeformats_set(), ast_channel_tech_set(), ast_channel_unlock, ast_codec_media_type2str(), ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_names(), ast_format_cap_identical(), AST_FORMAT_CAP_NAMES_LEN, ast_format_cap_remove_by_type(), ast_format_h264, ast_format_ulaw, ast_hangup(), AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, AST_STATE_DOWN, ast_str_alloca, ast_stream_get_formats(), ast_stream_get_type(), ast_stream_topology_free(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, end, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_channel_set | ) |
Definition at line 1182 of file test_stream.c.
References ast_channel_alloc, ast_channel_get_stream_topology(), ast_channel_set_stream_topology(), ast_channel_tech_set(), ast_channel_unlock, ast_hangup(), AST_STATE_DOWN, ast_stream_topology_alloc(), ast_stream_topology_free(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_write_non_multistream | ) |
Definition at line 1245 of file test_stream.c.
References ao2_cleanup, ast_channel_alloc, ast_channel_nativeformats_set(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_unlock, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_h264, ast_format_ulaw, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_hangup(), AST_STATE_DOWN, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_write(), ast_write_stream(), end, ast_frame_subclass::format, ast_frame::frametype, sip_to_pjsip::info(), NULL, RAII_VAR, ast_frame::subclass, TEST_EXECUTE, TEST_INIT, and mock_channel_pvt::wrote.
AST_TEST_DEFINE | ( | stream_write_multistream | ) |
Definition at line 1343 of file test_stream.c.
References ao2_cleanup, ast_channel_alloc, ast_channel_nativeformats_set(), ast_channel_set_stream_topology(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_unlock, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_h264, ast_format_ulaw, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_hangup(), AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, AST_STATE_DOWN, ast_stream_alloc(), ast_stream_free(), ast_stream_topology_alloc(), ast_stream_topology_append_stream(), ast_stream_topology_free(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_write(), ast_write_stream(), end, ast_frame_subclass::format, ast_frame::frametype, sip_to_pjsip::info(), NULL, RAII_VAR, mock_channel_pvt::stream_num, ast_frame::subclass, TEST_EXECUTE, TEST_INIT, mock_channel_pvt::wrote, and mock_channel_pvt::wrote_stream.
AST_TEST_DEFINE | ( | stream_read_non_multistream | ) |
Definition at line 1765 of file test_stream.c.
References AST_TEST_NOT_RUN, AST_TEST_PASS, CHANNEL_READ, CHANNEL_READ_STREAM, sip_to_pjsip::info(), mock_channel_hangup(), mock_channel_read(), ast_channel_tech::read, read_test(), TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_read_multistream | ) |
Definition at line 1801 of file test_stream.c.
References AST_TEST_NOT_RUN, AST_TEST_PASS, CHANNEL_READ, CHANNEL_READ_STREAM, sip_to_pjsip::info(), mock_channel_hangup(), mock_channel_read(), mock_channel_write_stream(), ast_channel_tech::read_stream, read_test(), TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_change_request_from_application_non_multistream | ) |
Definition at line 1849 of file test_stream.c.
References ast_channel_lock, ast_channel_request_stream_topology_change(), ast_channel_stream_topology_changed(), ast_channel_tech_pvt(), ast_channel_unlock, ast_hangup(), ast_stream_topology_alloc(), ast_stream_topology_free(), AST_TEST_NOT_RUN, AST_TEST_PASS, done, mock_channel_pvt::indicated_change_request, mock_channel_pvt::indicated_changed, sip_to_pjsip::info(), make_channel(), mock_channel_hangup(), mock_channel_indicate(), mock_channel_read(), NULL, RAII_VAR, ast_channel_tech::read, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_change_request_from_channel_non_multistream | ) |
Definition at line 1902 of file test_stream.c.
References ast_channel_tech_pvt(), AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_FRAME_CONTROL, ast_frfree, ast_hangup(), ast_null_frame, ast_queue_frame(), ast_read(), ast_stream_topology_alloc(), ast_stream_topology_free(), AST_TEST_NOT_RUN, AST_TEST_PASS, ast_frame::data, done, ast_frame::frametype, mock_channel_pvt::indicated_changed, sip_to_pjsip::info(), make_channel(), mock_channel_hangup(), mock_channel_indicate(), mock_channel_read(), mock_channel_write_stream(), NULL, ast_frame::ptr, RAII_VAR, ast_channel_tech::read_stream, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_change_request_from_application | ) |
Definition at line 1958 of file test_stream.c.
References ast_channel_lock, ast_channel_request_stream_topology_change(), ast_channel_stream_topology_changed(), ast_channel_tech_pvt(), ast_channel_unlock, ast_hangup(), ast_stream_topology_alloc(), ast_stream_topology_free(), AST_TEST_NOT_RUN, AST_TEST_PASS, done, mock_channel_pvt::indicated_change_request, mock_channel_pvt::indicated_changed, sip_to_pjsip::info(), make_channel(), mock_channel_hangup(), mock_channel_indicate(), mock_channel_read(), mock_channel_write_stream(), NULL, RAII_VAR, ast_channel_tech::read_stream, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_change_request_from_channel | ) |
Definition at line 2012 of file test_stream.c.
References ast_channel_tech_pvt(), AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_FRAME_CONTROL, ast_frfree, ast_hangup(), ast_queue_frame(), ast_read_stream(), ast_stream_topology_alloc(), ast_stream_topology_free(), AST_TEST_NOT_RUN, AST_TEST_PASS, ast_frame::data, done, ast_frame::frametype, mock_channel_pvt::indicated_changed, sip_to_pjsip::info(), ast_frame_subclass::integer, make_channel(), mock_channel_hangup(), mock_channel_indicate(), mock_channel_read(), mock_channel_write_stream(), NULL, ast_frame::ptr, RAII_VAR, ast_channel_tech::read_stream, ast_frame::subclass, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | format_cap_from_stream_topology | ) |
Definition at line 2069 of file test_stream.c.
References ao2_cleanup, ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_identical(), ast_format_h264, ast_format_ulaw, AST_MEDIA_TYPE_AUDIO, ast_stream_alloc(), ast_stream_free(), ast_stream_set_formats(), ast_stream_set_state(), AST_STREAM_STATE_REMOVED, ast_stream_topology_append_stream(), ast_stream_topology_create_from_format_cap(), ast_stream_topology_free(), ast_stream_topology_get_formats(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | stream_topology_map_create | ) |
Definition at line 2173 of file test_stream.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_stream_topology_alloc(), ast_stream_topology_free(), ast_stream_topology_map(), AST_TEST_NOT_RUN, AST_TEST_PASS, AST_VECTOR_FREE, AST_VECTOR_GET, AST_VECTOR_INIT, AST_VECTOR_SIZE, done, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, and topology_append_stream.
|
static |
Definition at line 650 of file test_stream.c.
References ast_codec_media_type2str(), ast_stream_get_position(), ast_stream_get_type(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), ast_test_status_update, and type.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 2284 of file test_stream.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 1623 of file test_stream.c.
References ast_channel_readq(), ast_channel_tech_pvt(), ast_format_h264, ast_format_ulaw, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frfree, AST_LIST_REMOVE_HEAD, ast_queue_frame(), ast_frame_subclass::format, mock_channel_pvt::frame_count, frames, ast_frame::frametype, NULL, ast_frame::seqno, ast_frame::stream_num, mock_channel_pvt::streams, and ast_frame::subclass.
Referenced by read_test().
|
static |
Definition at line 1650 of file test_stream.c.
References ao2_cleanup, ast_calloc, ast_channel_alloc, ast_channel_nativeformats_set(), ast_channel_set_stream_topology(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_unlock, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_h264, ast_format_ulaw, ast_hangup(), AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, AST_STATE_DOWN, ast_stream_alloc(), ast_stream_topology_alloc(), ast_stream_topology_append_stream(), ast_stream_topology_free(), ast_stream_topology_get_count(), AST_TEST_FAIL, AST_TEST_PASS, done, mock_channel_pvt::mallocd, NULL, RAII_VAR, ast_channel_tech::read_stream, and mock_channel_pvt::streams.
Referenced by AST_TEST_DEFINE(), and read_test().
|
static |
Definition at line 1227 of file test_stream.c.
References ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), ast_free, mock_channel_pvt::mallocd, and NULL.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 1154 of file test_stream.c.
References ast_channel_tech_pvt(), AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, mock_channel_pvt::indicated_change_request, and mock_channel_pvt::indicated_changed.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 1109 of file test_stream.c.
References ast_channel_tech_pvt(), ast_format_h264, ast_format_ulaw, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frdup, ast_frame_subclass::format, mock_channel_pvt::frame_count, mock_channel_pvt::frame_limit, ast_frame::frame_list, mock_channel_pvt::frames_per_read, ast_frame::frametype, ast_frame::next, NULL, ast_frame::seqno, ast_frame::stream_num, mock_channel_pvt::streams, and ast_frame::subclass.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 1145 of file test_stream.c.
References ast_channel_tech_pvt(), and mock_channel_pvt::wrote.
|
static |
Definition at line 1167 of file test_stream.c.
References ast_channel_tech_pvt(), mock_channel_pvt::stream_num, and mock_channel_pvt::wrote_stream.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 1707 of file test_stream.c.
References ast_read(), ast_read_stream(), and CHANNEL_READ_STREAM.
Referenced by read_test().
|
static |
Definition at line 1716 of file test_stream.c.
References ast_channel_fdno_set(), ast_channel_tech_pvt(), AST_FRAME_NULL, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frfree, ast_hangup(), AST_TEST_PASS, ast_test_status_update, CHANNEL_READ_STREAM, done, mock_channel_pvt::frame_count, mock_channel_pvt::frame_limit, frames, mock_channel_pvt::frames_per_read, ast_frame::frametype, load_stream_readqueue(), make_channel(), NULL, read_from_chan(), ast_channel_tech::read_stream, ast_frame::seqno, ast_frame::stream_num, and mock_channel_pvt::streams.
Referenced by AST_TEST_DEFINE().
|
static |
|
static |
Definition at line 2314 of file test_stream.c.
|
static |
Definition at line 2314 of file test_stream.c.
|
static |
Definition at line 1239 of file test_stream.c.
|
static |
Definition at line 988 of file test_stream.c.
|
static |
Definition at line 1335 of file test_stream.c.
|
static |
Definition at line 1177 of file test_stream.c.