FreeSWITCH API Documentation
1.7.0
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
struct | switch_core_media_params_s |
Macros | |
#define | SWITCH_MAX_CAND_ACL 25 |
#define | SWITCH_NO_CRYPTO_TAG -1 |
#define | switch_core_media_gen_key_frame(_session) |
#define | switch_core_media_write_bandwidth(_session, _val) |
#define | switch_core_media_read_lock(_s, _t) switch_core_media_read_lock_unlock(_s, _t, SWITCH_TRUE) |
#define | switch_core_media_read_unlock(_s, _t) switch_core_media_read_lock_unlock(_s, _t, SWITCH_FALSE) |
Typedefs | |
typedef struct switch_core_media_params_s | switch_core_media_params_t |
Enumerations | |
enum | switch_core_media_dtmf_t { DTMF_AUTO, DTMF_2833, DTMF_INFO, DTMF_NONE } |
enum | switch_core_media_NDLB_t { SM_NDLB_ALLOW_BAD_IANANAME = (1 << 0), SM_NDLB_ALLOW_NONDUP_SDP = (1 << 1), SM_NDLB_ALLOW_CRYPTO_IN_AVP = (1 << 2), SM_NDLB_DISABLE_SRTP_AUTH = (1 << 3), SM_NDLB_SENDRECV_IN_SESSION = (1 << 4), SM_NDLB_NEVER_PATCH_REINVITE = (1 << 5) } |
enum | switch_core_media_flag_t { SCMF_RUNNING, SCMF_DISABLE_TRANSCODING, SCMF_AUTOFIX_TIMING, SCMF_CODEC_GREEDY, SCMF_CODEC_SCROOGE, SCMF_DISABLE_HOLD, SCMF_RENEG_ON_HOLD, SCMF_RENEG_ON_REINVITE, SCMF_LIBERAL_DTMF, SCMF_SUPPRESS_CNG, SCMF_DISABLE_RTP_AUTOADJ, SCMF_PASS_RFC2833, SCMF_AUTOFLUSH, SCMF_REWRITE_TIMESTAMPS, SCMF_RTP_AUTOFLUSH_DURING_BRIDGE, SCMF_MULTI_ANSWER_AUDIO, SCMF_MULTI_ANSWER_VIDEO, SCMF_MAX } |
enum | STUNFLAGS { STUN_FLAG_SET = (1 << 0), STUN_FLAG_PING = (1 << 1), STUN_FLAG_FUNNY = (1 << 2) } |
enum | switch_core_media_vflag_t { VAD_IN = (1 << 0), VAD_OUT = (1 << 1) } |
#define switch_core_media_gen_key_frame | ( | _session | ) |
Definition at line 325 of file switch_core_media.h.
Referenced by handle_nack(), process_rtcp_report(), switch_core_media_set_video_file(), switch_core_session_execute_application_get_flags(), switch_core_session_send_and_request_video_refresh(), switch_core_session_write_video_frame(), switch_ivr_record_file(), video_helper_thread(), and video_write_thread().
#define switch_core_media_read_lock | ( | _s, | |
_t | |||
) | switch_core_media_read_lock_unlock(_s, _t, SWITCH_TRUE) |
Definition at line 340 of file switch_core_media.h.
#define switch_core_media_read_unlock | ( | _s, | |
_t | |||
) | switch_core_media_read_lock_unlock(_s, _t, SWITCH_FALSE) |
Definition at line 341 of file switch_core_media.h.
#define switch_core_media_write_bandwidth | ( | _session, | |
_val | |||
) |
Definition at line 328 of file switch_core_media.h.
#define SWITCH_MAX_CAND_ACL 25 |
Definition at line 41 of file switch_core_media.h.
Referenced by switch_core_media_add_ice_acl().
#define SWITCH_NO_CRYPTO_TAG -1 |
Definition at line 42 of file switch_core_media.h.
Referenced by switch_core_media_build_crypto(), and switch_core_session_check_outgoing_crypto().
typedef struct switch_core_media_params_s switch_core_media_params_t |
enum STUNFLAGS |
Enumerator | |
---|---|
STUN_FLAG_SET | |
STUN_FLAG_PING | |
STUN_FLAG_FUNNY |
Definition at line 83 of file switch_core_media.h.
Enumerator | |
---|---|
DTMF_AUTO | |
DTMF_2833 | |
DTMF_INFO | |
DTMF_NONE |
Definition at line 44 of file switch_core_media.h.
Definition at line 60 of file switch_core_media.h.
Enumerator | |
---|---|
SM_NDLB_ALLOW_BAD_IANANAME | |
SM_NDLB_ALLOW_NONDUP_SDP | |
SM_NDLB_ALLOW_CRYPTO_IN_AVP | |
SM_NDLB_DISABLE_SRTP_AUTH | |
SM_NDLB_SENDRECV_IN_SESSION | |
SM_NDLB_NEVER_PATCH_REINVITE |
Definition at line 51 of file switch_core_media.h.
Enumerator | |
---|---|
VAD_IN | |
VAD_OUT |
Definition at line 89 of file switch_core_media.h.
void switch_core_media_absorb_sdp | ( | switch_core_session_t * | session | ) |
Definition at line 8594 of file switch_core_media.c.
References switch_media_handle_s::engines, if(), switch_rtp_engine_s::proxy_sdp_ip, switch_rtp_engine_s::proxy_sdp_port, switch_assert, SWITCH_B_SDP_VARIABLE, switch_channel_get_variable, switch_core_media_set_local_sdp(), switch_core_session_strdup, SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_TRUE.
Referenced by switch_core_media_receive_message().
switch_status_t switch_core_media_activate_rtp | ( | switch_core_session_t * | session | ) |
Definition at line 6218 of file switch_core_media.c.
References switch_rtp_engine_s::adv_sdp_ip, payload_map_s::agreed_pt, switch_core_media_params_s::auto_rtp_bugs, ice_s::cands, CF_AVPF, CF_FS_RTP, CF_NOTIMER_DURING_BRIDGE, CF_PASS_RFC2833, CF_PROTO_HOLD, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_REINVITE, CF_SECURE, CF_VIDEO, CF_VIDEO_POSSIBLE, CF_ZRTP_PASSTHRU, check_dtls_reinvite(), check_jb(), ice_s::chosen, switch_core_media_params_s::cng_pt, switch_core_media_params_s::codec_flags, payload_map_s::codec_ms, icand_s::con_addr, icand_s::con_port, CRYPTO_INVALID, switch_rtp_engine_s::crypto_type, switch_rtp_engine_s::cur_payload_map, switch_rtp_engine_s::dtls_controller, dtls_ok(), DTLS_TYPE_CLIENT, DTLS_TYPE_RTCP, DTLS_TYPE_RTP, DTLS_TYPE_SERVER, switch_core_media_params_s::dtmf_delay, switch_media_handle_s::engines, switch_rtp_engine_s::fir, gen_ice(), switch_codec_implementation::iananame, ICE_CONTROLLED, ICE_GOOGLE_JINGLE, switch_rtp_engine_s::ice_in, switch_rtp_engine_s::ice_out, ICE_VANILLA, IPR_RTCP, IPR_RTP, switch_rtp_engine_s::local_dtls_fingerprint, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, switch_core_media_params_s::manual_rtp_bugs, switch_core_media_params_s::manual_video_rtp_bugs, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, memset(), switch_codec_implementation::microseconds_per_packet, switch_media_handle_s::mparams, switch_rtp_engine_s::nack, payload_map_s::negotiated, switch_rtp_engine_s::payload_map, switch_rtp_engine_s::pli, ice_s::pwd, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_impl, switch_media_handle_s::read_mutex, icand_s::ready, switch_core_media_params_s::recv_te, switch_rtp_engine_s::remote_dtls_fingerprint, switch_rtp_engine_s::remote_rtcp_port, payload_map_s::remote_sdp_ip, payload_map_s::remote_sdp_port, switch_rtp_engine_s::remote_ssrc, payload_map_s::rm_encoding, switch_core_media_params_s::rtcp_audio_interval_msec, switch_rtp_engine_s::rtcp_mux, switch_core_media_params_s::rtcp_video_interval_msec, RTP_BUG_IGNORE_MARK_BIT, RTP_BUG_SEND_LINEAR_TIMESTAMPS, switch_rtp_engine_s::rtp_bugs, switch_core_media_params_s::rtp_hold_timeout_sec, switch_rtp_engine_s::rtp_session, switch_core_media_params_s::rtp_timeout_sec, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, SCMF_AUTOFLUSH, SCMF_DISABLE_RTP_AUTOADJ, SCMF_PASS_RFC2833, SCMF_REWRITE_TIMESTAMPS, SCMF_SUPPRESS_CNG, switch_media_handle_s::session, switch_rtp_engine_s::ssrc, dtls_fp_s::str, SWITCH_ADVERTISED_MEDIA_IP_VARIABLE, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_clear_flag(), switch_channel_direction(), switch_channel_down, switch_channel_get_name(), switch_channel_get_variable, switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_channel_up, switch_core_media_check_video_codecs(), switch_core_media_choose_port(), switch_core_media_parse_rtp_bugs(), switch_core_media_proxy_remote_addr(), switch_core_media_set_codec(), switch_core_media_set_video_codec(), switch_core_media_toggle_hold(), switch_core_recovery_track(), switch_core_session_apply_crypto(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_start_video_thread(), SWITCH_FALSE, switch_ice_direction(), SWITCH_LOCAL_MEDIA_IP_VARIABLE, SWITCH_LOCAL_MEDIA_PORT_VARIABLE, SWITCH_LOCAL_VIDEO_IP_VARIABLE, SWITCH_LOCAL_VIDEO_PORT_VARIABLE, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_REMOTE_MEDIA_IP_VARIABLE, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, switch_rtp_activate_ice(), switch_rtp_activate_rtcp(), switch_rtp_add_dtls(), switch_rtp_enable_vad(), SWITCH_RTP_FLAG_AUTO_CNG, SWITCH_RTP_FLAG_AUTOADJ, SWITCH_RTP_FLAG_AUTOFLUSH, SWITCH_RTP_FLAG_BYTESWAP, SWITCH_RTP_FLAG_DATAWAIT, SWITCH_RTP_FLAG_FIR, SWITCH_RTP_FLAG_GEN_TS_DELTA, SWITCH_RTP_FLAG_INVALID, SWITCH_RTP_FLAG_NACK, SWITCH_RTP_FLAG_NOBLOCK, SWITCH_RTP_FLAG_PLI, SWITCH_RTP_FLAG_PROXY_MEDIA, SWITCH_RTP_FLAG_RAW_WRITE, SWITCH_RTP_FLAG_TMMBR, SWITCH_RTP_FLAG_USE_TIMER, SWITCH_RTP_FLAG_VIDEO, switch_rtp_get_remote_host(), switch_rtp_get_remote_port(), switch_rtp_get_ssrc(), switch_rtp_has_dtls(), switch_rtp_intentional_bugs(), switch_rtp_new(), switch_rtp_ready(), switch_rtp_reset_media_timer(), switch_rtp_set_cng_pt(), switch_rtp_set_default_payload(), switch_rtp_set_flag(), switch_rtp_set_interdigit_delay(), switch_rtp_set_max_missed_packets(), switch_rtp_set_payload_map(), switch_rtp_set_remote_address(), switch_rtp_set_remote_ssrc(), switch_rtp_set_ssrc(), switch_rtp_set_telephony_event(), switch_rtp_set_telephony_recv_event(), switch_rtp_udptl_mode(), switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_str_nil, SWITCH_TRUE, switch_true(), SWITCH_VAD_FLAG_EVENTS_NOTALK, SWITCH_VAD_FLAG_EVENTS_TALK, SWITCH_VAD_FLAG_TALKING, switch_core_media_params_s::te, switch_core_media_params_s::timer_name, switch_rtp_engine_s::tmmbr, ice_s::ufrag, VAD_IN, VAD_OUT, switch_core_media_params_s::vflags, switch_media_handle_s::write_mutex, and zstr.
Referenced by switch_core_media_patch_sdp(), and switch_core_media_recover_session().
switch_status_t switch_core_media_add_ice_acl | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
const char * | acl_name | ||
) |
Definition at line 3085 of file switch_core_media.c.
References switch_rtp_engine_s::cand_acl, switch_rtp_engine_s::cand_acl_count, switch_media_handle_s::engines, switch_assert, switch_core_session_strdup, SWITCH_MAX_CAND_ACL, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
payload_map_t* switch_core_media_add_payload_map | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
const char * | name, | ||
const char * | modname, | ||
const char * | fmtp, | ||
switch_sdp_type_t | sdp_type, | ||
uint32_t | pt, | ||
uint32_t | rate, | ||
uint32_t | ptime, | ||
uint32_t | channels, | ||
uint8_t | negotiated | ||
) |
Definition at line 726 of file switch_core_media.c.
References payload_map_s::allocated, payload_map_s::channels, switch_media_handle_s::engines, payload_map_s::hash, payload_map_s::iananame, payload_map_s::modname, payload_map_s::negotiated, payload_map_s::next, switch_rtp_engine_s::payload_map, switch_rtp_engine_s::pmap_tail, payload_map_s::pt, payload_map_s::ptime, payload_map_s::rate, payload_map_s::recv_pt, payload_map_s::rm_encoding, payload_map_s::rm_fmtp, switch_media_handle_s::sdp_mutex, payload_map_s::sdp_type, SDP_TYPE_REQUEST, switch_assert, switch_ci_hashfunc_default(), switch_core_alloc, switch_core_strdup, switch_mutex_lock(), switch_mutex_unlock(), payload_map_s::type, and zstr.
Referenced by switch_core_media_check_outgoing_proxy(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), and switch_core_media_set_r_sdp_codec_string().
void switch_core_media_break | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9749 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_break(), and switch_rtp_ready().
Referenced by switch_channel_queue_dtmf().
switch_status_t switch_core_media_check_autoadj | ( | switch_core_session_t * | session | ) |
Definition at line 533 of file switch_core_media.c.
References CF_AVPF, switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, SCMF_DISABLE_RTP_AUTOADJ, switch_assert, switch_channel_get_variable, switch_channel_test_flag(), switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_RTP_FLAG_AUTOADJ, switch_rtp_set_flag(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_true().
Referenced by switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), switch_core_media_negotiate_sdp(), and switch_core_media_toggle_hold().
switch_bool_t switch_core_media_check_dtls | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9193 of file switch_core_media.c.
References CF_DTLS, check_engine(), switch_media_handle_s::engines, switch_rtp_engine_s::rmode, switch_rtp_engine_s::rtp_session, switch_assert, switch_channel_media_up, switch_channel_ready, switch_channel_test_flag(), SWITCH_FALSE, SWITCH_MEDIA_FLOW_DISABLED, and SWITCH_TRUE.
Referenced by switch_channel_perform_mark_answered(), switch_channel_perform_mark_pre_answered(), and video_helper_thread().
void switch_core_media_check_dtmf_type | ( | switch_core_session_t * | session | ) |
Definition at line 7403 of file switch_core_media.c.
References DTMF_2833, DTMF_INFO, DTMF_NONE, switch_core_media_params_s::dtmf_type, switch_media_handle_s::mparams, switch_assert, and switch_channel_get_variable.
Referenced by switch_core_media_gen_local_sdp().
int switch_core_media_check_nat | ( | switch_media_handle_t * | smh, |
const char * | network_ip | ||
) |
Definition at line 5801 of file switch_core_media.c.
References switch_assert, and switch_check_network_list_ip.
Referenced by switch_core_media_choose_port(), and switch_core_media_deactivate_rtp().
void switch_core_media_check_outgoing_proxy | ( | switch_core_session_t * | session, |
switch_core_session_t * | o_session | ||
) |
Definition at line 10368 of file switch_core_media.c.
References CF_PROXY_MEDIA, CF_VIDEO, CF_VIDEO_POSSIBLE, clear_pmaps(), switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, SDP_TYPE_RESPONSE, switch_assert, switch_channel_get_variable, switch_channel_set_flag, switch_channel_test_flag(), switch_core_media_add_payload_map(), switch_core_media_choose_port(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_R_SDP_VARIABLE, switch_stristr(), and SWITCH_TRUE.
switch_bool_t switch_core_media_check_udptl_mode | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9913 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_FALSE, SWITCH_RTP_FLAG_UDPTL, switch_rtp_ready(), switch_rtp_test_flag(), and SWITCH_TRUE.
void switch_core_media_check_video_codecs | ( | switch_core_session_t * | session | ) |
Definition at line 3107 of file switch_core_media.c.
References CF_NOVIDEO, CF_VIDEO_POSSIBLE, switch_codec_implementation::codec_type, switch_media_handle_s::codecs, switch_media_handle_s::mparams, switch_core_media_params_s::num_codecs, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, switch_channel_direction(), switch_channel_set_flag, switch_channel_test_flag(), SWITCH_CODEC_TYPE_VIDEO, and switch_media_handle_s::video_count.
Referenced by switch_core_media_activate_rtp(), switch_core_media_choose_ports(), switch_core_media_negotiate_sdp(), and switch_core_media_receive_message().
int switch_core_media_check_video_function | ( | switch_core_session_t * | session | ) |
Definition at line 5559 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_mutex_lock(), switch_mutex_unlock(), and switch_media_handle_s::video_function_running.
Referenced by audio_bridge_thread().
switch_status_t switch_core_media_choose_port | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
int | force | ||
) |
Definition at line 5913 of file switch_core_media.c.
References switch_core_media_params_s::adv_sdp_audio_ip, switch_rtp_engine_s::adv_sdp_ip, switch_rtp_engine_s::adv_sdp_port, CF_PROXY_MEDIA, CF_PROXY_MODE, switch_media_handle_s::engines, switch_core_media_params_s::extrtpip, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, switch_media_handle_s::mparams, switch_core_media_params_s::remote_ip, switch_core_media_params_s::rtpip, SWITCH_ADVERTISED_MEDIA_IP_VARIABLE, switch_assert, switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_core_media_check_nat(), switch_core_media_ext_address_lookup(), switch_core_session_strdup, SWITCH_FALSE, SWITCH_LOCAL_MEDIA_IP_VARIABLE, SWITCH_LOCAL_MEDIA_PORT_VARIABLE, SWITCH_LOCAL_VIDEO_IP_VARIABLE, SWITCH_LOCAL_VIDEO_PORT_VARIABLE, SWITCH_LOG_CRIT, switch_log_printf(), switch_media_type2str(), SWITCH_MEDIA_TYPE_AUDIO, switch_nat_add_mapping(), SWITCH_NAT_UDP, switch_rtp_release_port(), switch_rtp_request_port(), switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_core_media_activate_rtp(), switch_core_media_check_outgoing_proxy(), switch_core_media_choose_ports(), switch_core_media_gen_local_sdp(), and switch_core_media_patch_sdp().
switch_status_t switch_core_media_choose_ports | ( | switch_core_session_t * | session, |
switch_bool_t | audio, | ||
switch_bool_t | video | ||
) |
Definition at line 6003 of file switch_core_media.c.
References CF_VIDEO_POSSIBLE, switch_core_session::channel, switch_media_handle_s::mparams, switch_core_media_params_s::rtpip, switch_media_handle_s::session, SWITCH_CAUSE_BEARERCAPABILITY_NOTAVAIL, switch_channel_get_name(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_core_media_check_video_codecs(), switch_core_media_choose_port(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
void switch_core_media_clear_ice | ( | switch_core_session_t * | session | ) |
Definition at line 3030 of file switch_core_media.c.
References clear_ice(), SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
void switch_core_media_clear_rtp_flag | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_rtp_flag_t | flag | ||
) |
Definition at line 9847 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_clear_flag(), and switch_rtp_ready().
switch_status_t switch_core_media_codec_chosen | ( | switch_core_session_t * | session, |
switch_media_type_t | media | ||
) |
Definition at line 10276 of file switch_core_media.c.
References switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, payload_map_s::iananame, switch_assert, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_core_media_codec_control | ( | switch_core_session_t * | session, |
switch_media_type_t | mtype, | ||
switch_io_type_t | iotype, | ||
switch_codec_control_command_t | cmd, | ||
switch_codec_control_type_t | ctype, | ||
void * | cmd_data, | ||
switch_codec_control_type_t | atype, | ||
void * | cmd_arg, | ||
switch_codec_control_type_t * | rtype, | ||
void ** | ret_data | ||
) |
Definition at line 10953 of file switch_core_media.c.
References CF_VIDEO, CF_VIDEO_REFRESH_REQ, switch_media_handle_s::engines, switch_media_handle_s::last_codec_refresh, switch_rtp_engine_s::read_codec, SCC_VIDEO_GEN_KEYFRAME, switch_assert, switch_channel_set_flag, switch_channel_test_flag(), switch_core_codec_control(), switch_core_codec_ready(), SWITCH_IO_READ, SWITCH_MEDIA_TYPE_VIDEO, switch_micro_time_now(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_NOTIMPL, VIDEO_REFRESH_FREQ, and switch_rtp_engine_s::write_codec.
Referenced by process_rtcp_report(), and switch_core_session_video_reinit().
void switch_core_media_copy_t38_options | ( | switch_t38_options_t * | t38_options, |
switch_core_session_t * | session | ||
) |
Definition at line 2616 of file switch_core_media.c.
References switch_t38_options_t::remote_ip, switch_t38_options_t::remote_port, switch_assert, switch_channel_get_private(), switch_channel_set_private(), switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_strdup, switch_t38_options_t::T38FaxFillBitRemoval, switch_t38_options_t::T38FaxMaxBuffer, switch_t38_options_t::T38FaxMaxDatagram, switch_t38_options_t::T38FaxRateManagement, switch_t38_options_t::T38FaxTranscodingJBIG, switch_t38_options_t::T38FaxTranscodingMMR, switch_t38_options_t::T38FaxUdpEC, switch_t38_options_t::T38MaxBitRate, and switch_t38_options_t::T38VendorInfo.
Referenced by switch_core_media_negotiate_sdp(), and switch_core_media_process_t38_passthru().
int switch_core_media_crypto_keylen | ( | switch_rtp_crypto_key_type_t | type | ) |
Definition at line 274 of file switch_core_media.c.
References CRYPTO_INVALID, switch_srtp_crypto_suite_s::keylen, and switch_assert.
switch_rtp_crypto_key_type_t switch_core_media_crypto_str2type | ( | const char * | str | ) |
Definition at line 253 of file switch_core_media.c.
References CRYPTO_INVALID, and switch_srtp_crypto_suite_s::type.
Referenced by switch_core_media_add_crypto(), and switch_core_session_get_recovery_crypto_key().
const char* switch_core_media_crypto_type2str | ( | switch_rtp_crypto_key_type_t | type | ) |
Definition at line 267 of file switch_core_media.c.
References CRYPTO_INVALID, switch_srtp_crypto_suite_s::name, and switch_assert.
Referenced by switch_core_session_check_incoming_crypto().
void switch_core_media_deactivate_rtp | ( | switch_core_session_t * | session | ) |
Definition at line 6036 of file switch_core_media.c.
References CF_VIDEO_PASSIVE, switch_media_handle_s::engines, switch_rtp_engine_s::local_sdp_port, switch_rtp_engine_s::media_thread, switch_rtp_engine_s::mh, switch_media_handle_s::mparams, switch_core_media_params_s::remote_ip, switch_rtp_engine_s::rtp_session, switch_core_media_params_s::rtpip, switch_assert, switch_channel_clear_flag(), switch_core_media_check_nat(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_nat_del_mapping(), SWITCH_NAT_UDP, switch_rtp_destroy(), switch_rtp_release_port(), switch_thread_join(), media_helper::up, and zstr.
Referenced by switch_media_handle_destroy().
void switch_core_media_deinit | ( | void | ) |
Definition at line 10623 of file switch_core_media.c.
References core_video_globals_s::pool, and switch_core_destroy_memory_pool.
Referenced by switch_core_destroy().
void switch_core_media_end_video_function | ( | switch_core_session_t * | session | ) |
Definition at line 5575 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_mutex_lock(), switch_mutex_unlock(), switch_yield, and switch_media_handle_s::video_function_running.
Referenced by audio_bridge_thread().
switch_status_t switch_core_media_ext_address_lookup | ( | switch_core_session_t * | session, |
char ** | ip, | ||
switch_port_t * | port, | ||
const char * | sourceip | ||
) |
Definition at line 5811 of file switch_core_media.c.
References switch_media_handle_s::mparams, pool, switch_core_media_params_s::rtpip, STUN_FLAG_SET, switch_core_media_params_s::stun_flags, switch_core_media_params_s::stun_ip, switch_core_media_params_s::stun_port, switch_assert, SWITCH_CHANNEL_LOG, switch_core_session_get_pool(), switch_core_session_strdup, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_safe_free, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_STUN_DEFAULT_PORT, switch_stun_host_lookup(), switch_stun_lookup(), switch_yield, and zstr.
Referenced by switch_core_media_choose_port().
switch_t38_options_t* switch_core_media_extract_t38_options | ( | switch_core_session_t * | session, |
const char * | r_sdp | ||
) |
Definition at line 584 of file switch_core_media.c.
References switch_core_media_process_udptl().
char* switch_core_media_filter_sdp | ( | const char * | sdp, |
const char * | cmd, | ||
const char * | arg | ||
) |
Definition at line 10688 of file switch_core_media.c.
References end_of_p, find_pt(), payload_number(), skip(), and switch_is_leading_number().
Referenced by switch_core_media_process_sdp_filter().
void switch_core_media_gen_local_sdp | ( | switch_core_session_t * | session, |
switch_sdp_type_t | sdp_type, | ||
const char * | ip, | ||
switch_port_t | port, | ||
const char * | sr, | ||
int | force | ||
) |
Definition at line 7523 of file switch_core_media.c.
References add_fb(), payload_map_s::adv_channels, payload_map_s::adv_rm_rate, switch_rtp_engine_s::adv_sdp_ip, switch_rtp_engine_s::adv_sdp_port, payload_map_s::agreed_pt, payload_map_s::allocated, buf, ice_s::cands, CF_3PCC, CF_AVPF, CF_DROP_DTMF, CF_DTLS, CF_DTLS_OK, CF_ICE, CF_LIBERAL_DTMF, CF_NOVIDEO, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_PROXY_OFF, CF_RECOVERING, CF_SECURE, CF_VERBOSE_SDP, CF_VIDEO_POSSIBLE, CF_VIDEO_SDP_RECVD, switch_core_session::channel, switch_media_handle_s::cname, switch_media_handle_s::cng_ianacodes, switch_core_media_params_s::cng_pt, switch_core_media_params_s::cng_rate, switch_rtp_engine_s::codec_negotiated, switch_codec_implementation::codec_type, switch_media_handle_s::codecs, icand_s::con_addr, icand_s::con_port, CRYPTO_INVALID, switch_media_handle_s::crypto_mode, CRYPTO_MODE_FORBIDDEN, CRYPTO_MODE_MANDATORY, switch_media_handle_s::crypto_suite_order, switch_rtp_engine_s::crypto_type, switch_rtp_engine_s::cur_payload_map, dtls_ok(), DTMF_2833, switch_media_handle_s::dtmf_ianacodes, switch_core_media_params_s::dtmf_type, end_of, switch_media_handle_s::engines, switch_rtp_engine_s::fir, switch_codec_implementation::fmtp, payload_map_s::fmtp_out, switch_media_handle_s::fmtps, gen_ice(), generate_local_fingerprint(), generate_m(), get_channels(), get_media_profile_name(), get_setup(), switch_codec_implementation::ianacode, switch_media_handle_s::ianacodes, switch_codec_implementation::iananame, payload_map_s::iananame, switch_rtp_engine_s::ice_out, ice_out(), switch_codec::implementation, secure_settings_s::local_crypto_key, switch_rtp_engine_s::local_dtls_fingerprint, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, memset(), switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::modname, switch_media_handle_s::mparams, switch_media_handle_s::msid, switch_rtp_engine_s::nack, switch_core_media_params_s::ndlb, payload_map_s::negotiated, payload_map_s::next, switch_rtp_engine_s::no_crypto, switch_core_media_params_s::num_codecs, switch_media_handle_s::num_rates, switch_codec_implementation::number_of_channels, switch_media_handle_s::owner_id, switch_media_handle_s::payload_space, switch_rtp_engine_s::pli, switch_rtp_engine_s::proxy_sdp_ip, switch_rtp_engine_s::proxy_sdp_port, payload_map_s::pt, ice_s::pwd, payload_map_s::rate, switch_media_handle_s::rates, switch_rtp_engine_s::read_codec, icand_s::ready, switch_rtp_engine_s::reject_avp, payload_map_s::rm_encoding, payload_map_s::rm_fmtp, payload_map_s::rm_rate, switch_rtp_engine_s::rmode, switch_core_media_params_s::rtcp_audio_interval_msec, switch_rtp_engine_s::rtcp_mux, switch_core_media_params_s::rtcp_video_interval_msec, switch_codec_implementation::samples_per_second, SCMF_LIBERAL_DTMF, SCMF_MULTI_ANSWER_AUDIO, SCMF_MULTI_ANSWER_VIDEO, SCMF_SUPPRESS_CNG, switch_media_handle_s::sdp_mutex, SDP_TYPE_REQUEST, switch_core_media_params_s::sdp_username, SDPBUFLEN, switch_media_handle_s::session, switch_media_handle_s::session_id, SM_NDLB_SENDRECV_IN_SESSION, switch_rtp_engine_s::smode, switch_rtp_engine_s::ssec, switch_rtp_engine_s::ssrc, dtls_fp_s::str, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_clear_flag(), switch_channel_direction(), switch_channel_get_name(), switch_channel_get_partner_uuid(), switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_get_variable_partner(), SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), SWITCH_CODEC_TYPE_AUDIO, SWITCH_CODEC_TYPE_VIDEO, switch_core_media_add_payload_map(), switch_core_media_check_dtmf_type(), switch_core_media_choose_port(), switch_core_media_get_zrtp_hash(), switch_core_media_set_local_sdp(), switch_core_media_set_video_codec(), switch_core_session_check_outgoing_crypto(), switch_core_session_get_partner, switch_core_session_get_payload_code(), switch_core_session_parse_crypto_prefs(), switch_core_session_rwunlock(), switch_core_session_strdup, switch_epoch_time_now(), switch_event_destroy(), switch_event_get_header, SWITCH_FALSE, switch_false(), SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MAX_CODECS, SWITCH_MEDIA_FLOW_DISABLED, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_FLOW_SENDONLY, switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_unlock(), switch_parse_bandwidth_string(), SWITCH_RTCP_AUDIO_INTERVAL_MSEC, SWITCH_RTCP_VIDEO_INTERVAL_MSEC, switch_rtp_has_dtls(), switch_safe_free, switch_snprintf(), SWITCH_STATUS_SUCCESS, switch_stun_random_string(), SWITCH_TRUE, switch_true(), switch_zmalloc, switch_core_media_params_s::te, switch_core_media_params_s::te_rate, switch_rtp_engine_s::tmmbr, icand_s::transport, switch_srtp_crypto_suite_s::type, dtls_fp_s::type, ice_s::ufrag, and zstr.
Referenced by switch_core_media_receive_message(), and switch_core_media_recover_session().