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().
const char* switch_core_media_get_codec_string | ( | switch_core_session_t * | session | ) |
Definition at line 842 of file switch_core_media.c.
References switch_core_media_params_s::inbound_codec_string, switch_media_handle_s::mparams, switch_core_media_params_s::outbound_codec_string, switch_assert, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_get_variable, and zstr.
Referenced by switch_core_media_prepare_codecs(), and switch_core_media_set_sdp_codec_string().
switch_jb_t* switch_core_media_get_jb | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9949 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_get_jitter_buffer(), and switch_rtp_ready().
switch_core_media_params_t* switch_core_media_get_mparams | ( | switch_media_handle_t * | smh | ) |
Definition at line 1793 of file switch_core_media.c.
References switch_assert.
switch_rtp_stats_t* switch_core_media_get_stats | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_memory_pool_t * | pool | ||
) |
Definition at line 9895 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, and switch_rtp_get_stats().
Referenced by set_stats(), switch_core_standard_on_hangup(), switch_ivr_set_json_call_stats(), and switch_ivr_set_xml_call_stats().
switch_timer_t* switch_core_media_get_timer | ( | switch_core_session_t * | session, |
switch_media_type_t | mtype | ||
) |
Definition at line 10892 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, and switch_rtp_get_media_timer().
Referenced by switch_core_session_write_video_frame().
switch_status_t switch_core_media_get_vid_params | ( | switch_core_session_t * | session, |
switch_vid_params_t * | vid_params | ||
) |
Definition at line 569 of file switch_core_media.c.
References switch_assert, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_media_handle_s::vid_params.
Referenced by switch_ivr_record_file().
switch_file_handle_t* switch_core_media_get_video_file | ( | switch_core_session_t * | session, |
switch_rw_t | rw | ||
) |
Definition at line 5039 of file switch_core_media.c.
References CF_VIDEO, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_rtp_engine_s::mh, switch_assert, switch_channel_test_flag(), SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RW_READ, switch_media_handle_s::video_read_fh, and switch_media_handle_s::video_write_fh.
uint32_t switch_core_media_get_video_fps | ( | switch_core_session_t * | session | ) |
Definition at line 339 of file switch_core_media.c.
References CF_VIDEO, core_video_globals_s::fps, switch_vid_params_s::fps, switch_assert, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_epoch_time_now(), switch_round_to_step(), SWITCH_STATUS_FALSE, switch_media_handle_s::vid_frames, switch_media_handle_s::vid_params, and switch_media_handle_s::vid_started.
Referenced by check_jb_sync(), and switch_core_media_read_frame().
const char* switch_core_media_get_zrtp_hash | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_bool_t | local | ||
) |
Definition at line 406 of file switch_core_media.c.
References switch_rtp_engine_s::local_sdp_zrtp_hash, and switch_rtp_engine_s::remote_sdp_zrtp_hash.
Referenced by generate_m(), and switch_core_media_gen_local_sdp().
void switch_core_media_hard_mute | ( | switch_core_session_t * | session, |
switch_bool_t | on | ||
) |
Definition at line 9165 of file switch_core_media.c.
References switch_core_session_message::from, switch_core_session_message::message_id, switch_core_session_message::numeric_arg, switch_core_session_receive_message, and SWITCH_MESSAGE_INDICATE_HARD_MUTE.
Referenced by switch_core_media_bug_add().
void switch_core_media_init | ( | void | ) |
Definition at line 10611 of file switch_core_media.c.
References core_video_globals_s::cpu_count, core_video_globals_s::cur_cpu, DTLS_SRTP_FNAME, core_video_globals_s::mutex, core_video_globals_s::pool, switch_core_cpu_count(), switch_core_gen_certs(), switch_core_new_memory_pool, switch_mutex_init(), and SWITCH_MUTEX_NESTED.
Referenced by switch_core_init().
void switch_core_media_kill_socket | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9765 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_kill_socket(), and switch_rtp_ready().
switch_status_t switch_core_media_lock_video_file | ( | switch_core_session_t * | session, |
switch_rw_t | rw | ||
) |
Definition at line 5156 of file switch_core_media.c.
References CF_VIDEO, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_rtp_engine_s::mh, switch_assert, switch_channel_test_flag(), SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), SWITCH_RW_READ, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_record_file().
uint8_t switch_core_media_negotiate_sdp | ( | switch_core_session_t * | session, |
const char * | r_sdp, | ||
uint8_t * | proceed, | ||
switch_sdp_type_t | sdp_type | ||
) |
Definition at line 3647 of file switch_core_media.c.
References switch_codec_fmtp::actual_samples_per_second, switch_codec_implementation::actual_samples_per_second, payload_map_s::adv_channels, payload_map_s::adv_rm_rate, payload_map_s::agreed_pt, payload_map_s::allocated, switch_core_media_params_s::auto_rtp_bugs, payload_map_s::bitrate, switch_codec_fmtp::bits_per_second, switch_codec_implementation::bits_per_second, CF_ANSWERED, CF_APP_T38, CF_APP_T38_NEGOTIATED, CF_AUDIO_PAUSE, CF_AVPF_MOZ, CF_DTLS, CF_DTLS_OK, CF_LIBERAL_DTMF, CF_NOVIDEO, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_RECOVERING, CF_REINVITE, CF_T38_PASSTHRU, CF_VIDEO_READY, CF_VIDEO_SDP_RECVD, switch_core_session::channel, payload_map_s::channels, check_ice(), clear_pmaps(), switch_core_media_params_s::cng_pt, switch_core_media_params_s::cng_rate, switch_core_media_params_s::codec_flags, matches::codec_idx, payload_map_s::codec_ms, switch_rtp_engine_s::codec_negotiated, switch_codec_implementation::codec_type, switch_media_handle_s::codecs, switch_media_handle_s::crypto_mode, CRYPTO_MODE_MANDATORY, switch_rtp_engine_s::cur_payload_map, payload_map_s::current, dtls_ok(), DTMF_2833, DTMF_AUTO, DTMF_INFO, DTMF_NONE, switch_core_media_params_s::dtmf_type, switch_media_handle_s::engines, switch_rtp_engine_s::fir, switch_core_session_message::from, greedy_sort(), switch_core_media_params_s::hold_laps, switch_codec_implementation::ianacode, switch_codec_implementation::iananame, payload_map_s::iananame, if(), matches::imp, switch_codec::implementation, matches::map, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, memset(), switch_core_session_message::message_id, switch_codec_fmtp::microseconds_per_packet, switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::modname, switch_media_handle_s::mparams, switch_rtp_engine_s::nack, switch_core_media_params_s::ndlb, switch_media_handle_s::negotiated_codecs, switch_rtp_engine_s::new_dtls, switch_rtp_engine_s::new_ice, payload_map_s::next, switch_core_media_params_s::num_codecs, switch_media_handle_s::num_negotiated_codecs, switch_codec_implementation::number_of_channels, switch_media_handle_s::origin, switch_rtp_engine_s::pli, payload_map_s::pt, matches::rate, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_impl, payload_map_s::recv_pt, switch_core_media_params_s::recv_te, switch_rtp_engine_s::reject_avp, switch_t38_options_t::remote_ip, switch_t38_options_t::remote_port, switch_rtp_engine_s::remote_rtcp_port, payload_map_s::remote_sdp_ip, payload_map_s::remote_sdp_port, switch_rtp_engine_s::reset_codec, 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_core_media_params_s::rtcp_video_interval_msec, RTP_BUG_CISCO_SKIP_MARK_BIT_2833, RTP_BUG_SONUS_SEND_INVALID_TIMESTAMP_2833, switch_rtp_engine_s::rtp_bugs, switch_rtp_engine_s::rtp_session, switch_codec_implementation::samples_per_second, SCMF_CODEC_GREEDY, SCMF_CODEC_SCROOGE, SCMF_DISABLE_HOLD, SCMF_LIBERAL_DTMF, SCMF_RENEG_ON_HOLD, SCMF_RENEG_ON_REINVITE, SCMF_SUPPRESS_CNG, switch_rtp_engine_s::sdp_bw, sdp_media_flow(), switch_media_handle_s::sdp_mutex, SDP_TYPE_REQUEST, SDP_TYPE_RESPONSE, switch_media_handle_s::session, skip(), SM_NDLB_ALLOW_BAD_IANANAME, SM_NDLB_ALLOW_CRYPTO_IN_AVP, switch_rtp_engine_s::smode, switch_codec_fmtp::stereo, switch_core_session_message::string_arg, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_clear_app_flag_key(), switch_channel_clear_flag(), switch_channel_direction(), 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_app_flag_key(), switch_channel_test_flag(), SWITCH_CODEC_TYPE_AUDIO, SWITCH_CODEC_TYPE_VIDEO, switch_core_codec_parse_fmtp(), switch_core_codec_ready(), switch_core_media_add_payload_map(), switch_core_media_check_autoadj(), switch_core_media_check_video_codecs(), switch_core_media_copy_t38_options(), switch_core_media_find_zrtp_hash(), switch_core_media_get_offered_pt(), switch_core_media_pass_zrtp_hash(), switch_core_media_prepare_codecs(), switch_core_media_process_udptl(), switch_core_media_set_codec(), switch_core_media_set_video_codec(), switch_core_media_toggle_hold(), switch_core_session_alloc, switch_core_session_check_incoming_crypto(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_parse_crypto_prefs(), switch_core_session_queue_message(), switch_core_session_rwunlock(), switch_core_session_set_ice(), switch_core_session_strdup, switch_default_ptime(), SWITCH_FALSE, switch_false(), switch_known_bitrate(), switch_loadable_module_get_codecs_sorted(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_FLOW_DISABLED, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_FLOW_SENDONLY, SWITCH_MEDIA_FLOW_SENDRECV, switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_MESSAGE_INDICATE_REQUEST_IMAGE_MEDIA, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_REMOTE_MEDIA_IP_VARIABLE, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, SWITCH_REMOTE_VIDEO_IP_VARIABLE, SWITCH_REMOTE_VIDEO_PORT_VARIABLE, SWITCH_RTCP_AUDIO_INTERVAL_MSEC, SWITCH_RTCP_VIDEO_INTERVAL_MSEC, switch_rtp_get_remote_host(), switch_rtp_get_remote_port(), switch_rtp_has_dtls(), switch_rtp_ready(), switch_rtp_set_cng_pt(), switch_rtp_set_default_payload(), switch_rtp_set_max_missed_packets(), switch_rtp_set_remote_address(), switch_rtp_set_telephony_event(), switch_rtp_set_telephony_recv_event(), switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, switch_true(), switch_core_media_params_s::te, switch_core_media_params_s::te_rate, switch_rtp_engine_s::tmmbr, and zstr.
void switch_core_media_parse_rtp_bugs | ( | switch_rtp_bug_flag_t * | flag_pole, |
const char * | str | ||
) |
Definition at line 915 of file switch_core_media.c.
References RTP_BUG_ACCEPT_ANY_PACKETS, RTP_BUG_ACCEPT_ANY_PAYLOAD, RTP_BUG_ALWAYS_AUTO_ADJUST, RTP_BUG_CHANGE_SSRC_ON_MARKER, RTP_BUG_CISCO_SKIP_MARK_BIT_2833, RTP_BUG_FLUSH_JB_ON_DTMF, RTP_BUG_GEN_ONE_GEN_ALL, RTP_BUG_IGNORE_DTMF_DURATION, RTP_BUG_IGNORE_MARK_BIT, RTP_BUG_NEVER_SEND_MARKER, RTP_BUG_SEND_LINEAR_TIMESTAMPS, RTP_BUG_SONUS_SEND_INVALID_TIMESTAMP_2833, RTP_BUG_START_SEQ_AT_ZERO, and switch_stristr().
Referenced by switch_core_media_activate_rtp().
void switch_core_media_pass_zrtp_hash | ( | switch_core_session_t * | session | ) |
Definition at line 387 of file switch_core_media.c.
References CF_ZRTP_PASSTHRU_REQ, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_test_flag(), switch_core_media_pass_zrtp_hash2(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_rwunlock(), SWITCH_LOG_DEBUG1, switch_log_printf(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_negotiate_sdp(), and switch_core_media_set_r_sdp_codec_string().
void switch_core_media_pass_zrtp_hash2 | ( | switch_core_session_t * | aleg_session, |
switch_core_session_t * | bleg_session | ||
) |
Definition at line 380 of file switch_core_media.c.
References _switch_core_media_pass_zrtp_hash2(), SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_media_pass_zrtp_hash().
void switch_core_media_patch_sdp | ( | switch_core_session_t * | session | ) |
Definition at line 8792 of file switch_core_media.c.
References switch_rtp_engine_s::adv_sdp_ip, switch_rtp_engine_s::adv_sdp_port, CF_ANSWERED, CF_REINVITE, CF_VIDEO_POSSIBLE, clear_pmaps(), switch_rtp_engine_s::codec_negotiated, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, switch_core_media_params_s::local_sdp_str, switch_media_handle_s::mparams, switch_core_media_params_s::ndlb, switch_media_handle_s::owner_id, switch_rtp_engine_s::rtp_session, SDP_TYPE_RESPONSE, switch_core_media_params_s::sdp_username, switch_media_handle_s::session_id, switch_core_media_params_s::sipip, SM_NDLB_NEVER_PATCH_REINVITE, switch_assert, switch_channel_down, switch_channel_get_name(), switch_channel_media_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_test_flag(), switch_core_media_activate_rtp(), switch_core_media_add_payload_map(), switch_core_media_choose_port(), switch_core_media_set_local_sdp(), switch_core_media_set_video_codec(), switch_core_session_alloc, switch_epoch_time_now(), SWITCH_FALSE, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_ready(), switch_snprintf(), SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, and zstr.
void switch_core_media_pause | ( | switch_core_session_t * | session | ) |
Definition at line 3037 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_RTP_FLAG_PAUSE, and switch_rtp_set_flag().
void switch_core_media_prepare_codecs | ( | switch_core_session_t * | session, |
switch_bool_t | force | ||
) |
Definition at line 1799 of file switch_core_media.c.
References CF_PROXY_MEDIA, CF_PROXY_MODE, switch_media_handle_s::codec_order, switch_media_handle_s::codec_order_last, switch_media_handle_s::codecs, switch_media_handle_s::media_flags, switch_media_handle_s::mparams, switch_core_media_params_s::num_codecs, switch_media_handle_s::payload_space, SCMF_DISABLE_TRANSCODING, switch_media_handle_s::session, switch_assert, switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_set_variable, switch_channel_test_flag(), switch_core_media_get_codec_string(), switch_core_session_sprintf(), switch_core_session_strdup, SWITCH_FALSE, switch_loadable_module_get_codecs_sorted(), SWITCH_MAX_CODECS, SWITCH_ORIGINATOR_CODEC_VARIABLE, switch_separate_string(), and switch_true().
Referenced by switch_core_media_negotiate_sdp(), and switch_core_media_receive_message().
char* switch_core_media_process_sdp_filter | ( | const char * | sdp, |
const char * | cmd_buf, | ||
switch_core_session_t * | session | ||
) |
Definition at line 10841 of file switch_core_media.c.
References SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_get_name(), switch_core_media_filter_sdp(), switch_core_session_get_channel(), switch_core_session_strdup, switch_find_end_paren(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, switch_safe_free, switch_split, and zstr.
Referenced by switch_channel_pass_sdp().
switch_status_t switch_core_media_process_t38_passthru | ( | switch_core_session_t * | session, |
switch_core_session_t * | other_session, | ||
switch_t38_options_t * | t38_options | ||
) |
Definition at line 616 of file switch_core_media.c.
References switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, payload_map_s::remote_sdp_ip, payload_map_s::remote_sdp_port, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_get_name(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_media_copy_t38_options(), switch_core_session_strdup, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_REMOTE_MEDIA_IP_VARIABLE, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, switch_rtp_get_remote_host(), switch_rtp_get_remote_port(), switch_rtp_set_remote_address(), switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and SWITCH_TRUE.
switch_status_t switch_core_media_proxy_remote_addr | ( | switch_core_session_t * | session, |
const char * | sdp_str | ||
) |
Definition at line 5613 of file switch_core_media.c.
References CF_AVPF, CF_PROXY_MODE, CF_VIDEO, CF_VIDEO_POSSIBLE, switch_rtp_engine_s::check_frames, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_media_handle_s::mparams, RA_PTR_LEN, switch_rtp_engine_s::remote_rtcp_port, payload_map_s::remote_sdp_ip, payload_map_s::remote_sdp_port, switch_core_media_params_s::remote_sdp_str, switch_rtp_engine_s::rtp_session, SCMF_AUTOFIX_TIMING, SCMF_DISABLE_RTP_AUTOADJ, switch_assert, switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_test_flag(), switch_core_session_strdup, switch_goto_status, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_RTP_FLAG_AUTOADJ, switch_rtp_get_remote_host(), switch_rtp_get_remote_port(), switch_rtp_ready(), switch_rtp_set_flag(), switch_rtp_set_remote_address(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, switch_true(), and zstr.
Referenced by switch_core_media_activate_rtp().
switch_status_t switch_core_media_queue_rfc2833 | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
const switch_dtmf_t * | dtmf | ||
) |
Definition at line 9781 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_queue_rfc2833(), switch_rtp_ready(), and SWITCH_STATUS_FALSE.
switch_status_t switch_core_media_queue_rfc2833_in | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
const switch_dtmf_t * | dtmf | ||
) |
Definition at line 9799 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_queue_rfc2833_in(), switch_rtp_ready(), and SWITCH_STATUS_FALSE.
switch_status_t switch_core_media_read_frame | ( | switch_core_session_t * | session, |
switch_frame_t ** | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id, | ||
switch_media_type_t | type | ||
) |
Definition at line 2138 of file switch_core_media.c.
References payload_map_s::agreed_pt, CF_LEG_HOLDING, CF_NOT_READY, switch_rtp_engine_s::check_frames, check_jb(), check_jb_sync(), switch_core_media_params_s::cng_pt, switch_core_media_params_s::codec_flags, payload_map_s::codec_ms, switch_rtp_engine_s::codec_negotiated, switch_rtp_engine_s::cur_payload_map, payload_map_s::current, switch_frame::datalen, switch_rtcp_report_block_frame::dlsr, switch_codec_implementation::encoded_bytes_per_packet, switch_media_handle_s::engines, switch_frame::flags, switch_rtcp_report_block_frame::fraction, switch_rtcp_report_block_frame::highest_sequence_number_received, payload_map_s::iananame, switch_frame::img, switch_codec::implementation, switch_rtcp_report_block_frame::jitter, switch_rtp_engine_s::last_codec_ms, switch_rtp_engine_s::last_seq, switch_rtp_engine_s::last_ts, switch_rtcp_report_block_frame::loss_avg, switch_rtcp_report_block_frame::lost, switch_rtcp_report_block_frame::lsr, switch_frame::m, MAX_CODEC_CHECK_FRAMES, MAX_MISMATCH_FRAMES, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, switch_media_handle_s::media_flags, memset(), switch_rtp_engine_s::mismatch_count, switch_media_handle_s::mparams, payload_map_s::negotiated, payload_map_s::next, switch_rtcp_frame::ntp_lsw, switch_rtcp_frame::ntp_msw, switch_rtcp_frame::octect_count, switch_rtcp_frame::packet_count, switch_frame::payload, switch_rtp_engine_s::payload_map, payload_map_s::pt, switch_frame::rate, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_frame, switch_rtp_engine_s::read_impl, switch_media_handle_s::read_mutex, payload_map_s::recv_pt, switch_core_media_params_s::recv_te, switch_rtcp_frame::report_count, switch_rtcp_frame::reports, switch_rtp_engine_s::reset_codec, switch_rtp_engine_s::rtp_session, switch_frame::samples, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, SCMF_AUTOFIX_TIMING, SCMF_RUNNING, switch_media_handle_s::sdp_mutex, switch_frame::seq, SFF_CNG, SFF_NONE, SFF_PROXY_PACKET, skip(), switch_rtcp_report_block_frame::ssrc, switch_rtcp_frame::ssrc, switch_assert, SWITCH_CAUSE_MEDIA_TIMEOUT, switch_channel_execute_on(), switch_channel_get_name(), switch_channel_get_variable, switch_channel_hangup, switch_channel_queue_dtmf(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_channel_up_nosig, switch_core_codec_ready(), switch_core_media_get_video_fps(), switch_core_media_set_codec(), switch_core_media_set_video_codec(), switch_core_session_get_uuid(), switch_epoch_time_now(), switch_event_add_header_string(), switch_event_create, switch_event_fire, SWITCH_EVENT_RECV_RTCP_MESSAGE, SWITCH_FALSE, switch_goto_status, SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG10, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_trylock(), switch_mutex_unlock(), switch_rtcp_zerocopy_read_frame(), switch_rtp_dequeue_dtmf(), switch_rtp_has_dtmf(), switch_rtp_ready(), switch_rtp_set_max_missed_packets(), switch_rtp_zerocopy_read_frame(), switch_set_flag, SWITCH_STACK_BOTTOM, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_INUSE, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, switch_test_flag, switch_time_now(), SWITCH_TIME_T_FMT, switch_core_media_params_s::te, switch_frame::timestamp, switch_rtcp_frame::timestamp, type2str, switch_media_handle_s::vid_frames, and switch_media_handle_s::vid_started.
switch_status_t switch_core_media_read_lock_unlock | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_bool_t | lock | ||
) |
Definition at line 2094 of file switch_core_media.c.
References CF_NOT_READY, switch_media_handle_s::engines, switch_codec::implementation, switch_media_handle_s::media_flags, switch_rtp_engine_s::read_codec, switch_media_handle_s::read_mutex, switch_rtp_engine_s::rtp_session, SCMF_RUNNING, switch_assert, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_channel_up_nosig, switch_core_codec_ready(), SWITCH_LOG_DEBUG1, switch_log_printf(), switch_mutex_trylock(), switch_mutex_unlock(), switch_rtp_ready(), SWITCH_STATUS_FALSE, SWITCH_STATUS_INUSE, SWITCH_STATUS_SUCCESS, and type2str.
uint8_t switch_core_media_ready | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9817 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, and switch_rtp_ready().
Referenced by switch_core_media_recover_session().
switch_status_t switch_core_media_receive_message | ( | switch_core_session_t * | session, |
switch_core_session_message_t * | msg | ||
) |
Definition at line 9278 of file switch_core_media.c.
References CC_FS_RTP, CF_AUTOFLUSH_DURING_BRIDGE, CF_CONFERENCE, CF_CONFERENCE_RESET_MEDIA, CF_FS_RTP, CF_JITTERBUFFER, CF_NOTIMER_DURING_BRIDGE, CF_PASS_RFC2833, CF_PROXY_MODE, CF_RTP_NOTIMER_DURING_BRIDGE, CF_VIDEO, CF_VIDEO_POSSIBLE, check_jb(), clear_pmaps(), switch_rtp_engine_s::codec_negotiated, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, if(), switch_core_media_params_s::local_sdp_str, switch_media_handle_s::media_flags, switch_media_handle_s::mparams, switch_media_handle_s::mutex, switch_media_handle_s::num_negotiated_codecs, switch_rtp_engine_s::read_codec, payload_map_s::rm_encoding, rtp_flush_read_buffer(), switch_rtp_engine_s::rtp_session, SCC_CODEC_SPECIFIC, SCC_DEBUG, SCCT_INT, SCCT_NONE, SCCT_STRING, SCMF_RENEG_ON_REINVITE, SCMF_RTP_AUTOFLUSH_DURING_BRIDGE, SDP_TYPE_REQUEST, SMF_JB_PAUSED, switch_assert, switch_channel_audio_sync, switch_channel_clear_flag(), switch_channel_down, switch_channel_get_name(), switch_channel_get_partner_uuid(), switch_channel_get_private(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_set_variable_printf(), switch_channel_test_cap_partner(), switch_channel_test_flag(), switch_channel_test_flag_partner(), switch_clear_flag, switch_core_codec_control(), switch_core_media_absorb_sdp(), switch_core_media_check_video_codecs(), switch_core_media_gen_local_sdp(), switch_core_media_prepare_codecs(), switch_core_media_set_local_sdp(), switch_core_media_start_udptl(), switch_core_session_enable_heartbeat(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), SWITCH_FALSE, switch_false(), SWITCH_IO_READ, SWITCH_IO_WRITE, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_media_handle_set_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_MESSAGE_INDICATE_3P_MEDIA, SWITCH_MESSAGE_INDICATE_3P_NOMEDIA, SWITCH_MESSAGE_INDICATE_AUDIO_DATA, SWITCH_MESSAGE_INDICATE_AUDIO_SYNC, SWITCH_MESSAGE_INDICATE_BITRATE_ACK, SWITCH_MESSAGE_INDICATE_BITRATE_REQ, SWITCH_MESSAGE_INDICATE_BRIDGE, SWITCH_MESSAGE_INDICATE_CODEC_DEBUG_REQ, SWITCH_MESSAGE_INDICATE_CODEC_SPECIFIC_REQ, SWITCH_MESSAGE_INDICATE_DEBUG_MEDIA, SWITCH_MESSAGE_INDICATE_HARD_MUTE, SWITCH_MESSAGE_INDICATE_JITTER_BUFFER, SWITCH_MESSAGE_INDICATE_MEDIA, SWITCH_MESSAGE_INDICATE_MEDIA_RENEG, SWITCH_MESSAGE_INDICATE_NOMEDIA, SWITCH_MESSAGE_INDICATE_PROXY_MEDIA, SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY, SWITCH_MESSAGE_INDICATE_UDPTL_MODE, SWITCH_MESSAGE_INDICATE_UNBRIDGE, SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ, SWITCH_MESSAGE_INDICATE_VIDEO_SYNC, SWITCH_MESSAGE_RESAMPLE_EVENT, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_REMOTE_MEDIA_IP_VARIABLE, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, switch_rtp_ack_bitrate(), switch_rtp_clear_flag(), switch_rtp_clear_flags(), SWITCH_RTP_FLAG_DEBUG_RTP_READ, SWITCH_RTP_FLAG_DEBUG_RTP_WRITE, SWITCH_RTP_FLAG_FIR, SWITCH_RTP_FLAG_INVALID, SWITCH_RTP_FLAG_MUTE, SWITCH_RTP_FLAG_PASS_RFC2833, SWITCH_RTP_FLAG_PLI, SWITCH_RTP_FLAG_PROXY_MEDIA, SWITCH_RTP_FLAG_UDPTL, SWITCH_RTP_FLAG_USE_TIMER, switch_rtp_flush(), SWITCH_RTP_FLUSH_ONCE, SWITCH_RTP_FLUSH_STICK, SWITCH_RTP_FLUSH_UNSTICK, switch_rtp_pause_jitter_buffer(), switch_rtp_ready(), switch_rtp_req_bitrate(), switch_rtp_reset_jb(), switch_rtp_set_flag(), switch_rtp_set_flags(), switch_rtp_test_flag(), switch_rtp_video_loss(), switch_rtp_video_refresh(), switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_TRUE, switch_true(), switch_rtp_engine_s::write_codec, and zstr.
Referenced by switch_core_session_perform_receive_message().
void switch_core_media_recover_session | ( | switch_core_session_t * | session | ) |
Definition at line 10431 of file switch_core_media.c.
References 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, CF_PROXY_MODE, CF_SECURE, CF_VIDEO, CF_VIDEO_POSSIBLE, switch_core_session::channel, payload_map_s::channels, switch_core_media_params_s::codec_flags, payload_map_s::codec_ms, switch_rtp_engine_s::codec_negotiated, switch_media_handle_s::codec_order, switch_media_handle_s::codec_order_last, switch_media_handle_s::codecs, secure_settings_s::crypto_tag, switch_rtp_engine_s::crypto_type, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_core_media_params_s::extrtpip, payload_map_s::iananame, switch_srtp_crypto_suite_s::keylen, secure_settings_s::local_crypto_key, secure_settings_s::local_raw_key, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, switch_media_handle_s::mparams, switch_core_media_params_s::num_codecs, switch_media_handle_s::payload_space, payload_map_s::pt, payload_map_s::recv_pt, switch_core_media_params_s::recv_te, secure_settings_s::remote_crypto_key, secure_settings_s::remote_raw_key, payload_map_s::remote_sdp_ip, payload_map_s::remote_sdp_port, switch_core_media_params_s::remote_sdp_str, payload_map_s::rm_encoding, payload_map_s::rm_fmtp, payload_map_s::rm_rate, switch_rtp_engine_s::rtp_session, switch_core_media_params_s::rtpip, SDP_TYPE_REQUEST, switch_media_handle_s::session, switch_rtp_engine_s::ssec, SWITCH_ADVERTISED_MEDIA_IP_VARIABLE, switch_assert, switch_channel_get_variable, switch_channel_set_flag, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_core_media_activate_rtp(), switch_core_media_add_crypto(), switch_core_media_gen_local_sdp(), switch_core_media_ready(), switch_core_media_set_codec(), switch_core_media_set_video_codec(), switch_core_session_get_recovery_crypto_key(), switch_core_session_strdup, switch_loadable_module_get_codecs_sorted(), SWITCH_LOCAL_MEDIA_IP_VARIABLE, SWITCH_LOCAL_MEDIA_PORT_VARIABLE, SWITCH_LOCAL_VIDEO_IP_VARIABLE, SWITCH_LOCAL_VIDEO_PORT_VARIABLE, SWITCH_MAX_CODECS, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_R_SDP_VARIABLE, SWITCH_REMOTE_MEDIA_IP_VARIABLE, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, SWITCH_REMOTE_VIDEO_IP_VARIABLE, SWITCH_REMOTE_VIDEO_PORT_VARIABLE, switch_rtp_add_crypto_key(), SWITCH_RTP_CRYPTO_RECV, SWITCH_RTP_CRYPTO_SEND, switch_rtp_set_telephony_event(), switch_rtp_set_telephony_recv_event(), switch_separate_string(), SWITCH_STATUS_SUCCESS, switch_core_media_params_s::te, switch_core_media_params_s::timer_name, and zstr.
Referenced by recover_callback().
void switch_core_media_reset_autofix | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 5892 of file switch_core_media.c.
References switch_rtp_engine_s::check_frames, switch_media_handle_s::engines, switch_rtp_engine_s::last_seq, switch_rtp_engine_s::last_ts, and switch_assert.
switch_status_t switch_core_media_reset_jb | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9256 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), switch_rtp_reset_jb(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
void switch_core_media_resume | ( | switch_core_session_t * | session | ) |
Definition at line 3060 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_clear_flag(), and SWITCH_RTP_FLAG_PAUSE.
switch_status_t switch_core_media_set_codec | ( | switch_core_session_t * | session, |
int | force, | ||
uint32_t | codec_flags | ||
) |
Definition at line 2825 of file switch_core_media.c.
References switch_codec_implementation::actual_samples_per_second, switch_codec::agreed_pt, payload_map_s::agreed_pt, payload_map_s::bitrate, switch_codec_implementation::bits_per_second, switch_frame::channels, payload_map_s::channels, switch_frame::codec, payload_map_s::codec_ms, switch_rtp_engine_s::codec_settings, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_codec::fmtp_out, payload_map_s::fmtp_out, switch_codec_implementation::iananame, payload_map_s::iananame, switch_codec::implementation, switch_codec_implementation::microseconds_per_packet, payload_map_s::modname, switch_codec_implementation::number_of_channels, payload_map_s::pt, switch_frame::rate, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_frame, switch_rtp_engine_s::read_impl, payload_map_s::rm_fmtp, payload_map_s::rm_rate, switch_rtp_engine_s::rtp_session, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, switch_codec::session, switch_assert, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_audio_sync, switch_channel_get_name(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_channel_set_variable_printf(), SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_destroy(), switch_core_codec_init_with_bitrate(), switch_core_codec_ready(), switch_core_session_get_pool(), switch_core_session_lock_codec_read(), switch_core_session_lock_codec_write(), switch_core_session_parse_codec_settings(), switch_core_session_reset(), switch_core_session_set_read_impl(), switch_core_session_set_real_read_codec(), switch_core_session_set_write_codec(), switch_core_session_set_write_impl(), switch_core_session_strdup, switch_core_session_unlock_codec_read(), switch_core_session_unlock_codec_write(), switch_goto_status, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, switch_mutex_lock(), switch_mutex_unlock(), switch_resample_destroy(), switch_rtp_change_interval(), switch_rtp_ready(), switch_rtp_reset_jb(), switch_rtp_set_default_payload(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_yield, switch_rtp_engine_s::write_codec, and switch_rtp_engine_s::write_impl.
Referenced by switch_core_media_activate_rtp(), switch_core_media_negotiate_sdp(), switch_core_media_read_frame(), and switch_core_media_recover_session().
void switch_core_media_set_local_sdp | ( | switch_core_session_t * | session, |
const char * | sdp_str, | ||
switch_bool_t | dup | ||
) |
Definition at line 7485 of file switch_core_media.c.
References switch_core_media_params_s::local_sdp_str, switch_media_handle_s::mparams, switch_media_handle_s::sdp_mutex, switch_assert, switch_channel_set_variable, switch_core_session_strdup, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_media_absorb_sdp(), switch_core_media_gen_local_sdp(), switch_core_media_patch_sdp(), switch_core_media_receive_message(), and switch_core_media_set_udptl_image_sdp().
switch_status_t switch_core_media_set_outgoing_bitrate | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
uint32_t | bitrate | ||
) |
Definition at line 9231 of file switch_core_media.c.
References switch_media_handle_s::engines, SCC_VIDEO_BANDWIDTH, SCCT_INT, SCCT_NONE, switch_channel_down, switch_core_codec_control(), switch_core_codec_ready(), SWITCH_STATUS_FALSE, and switch_rtp_engine_s::write_codec.
void switch_core_media_set_rtp_flag | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_rtp_flag_t | flag | ||
) |
Definition at line 9831 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), and switch_rtp_set_flag().
void switch_core_media_set_rtp_session | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_rtp_t * | rtp_session | ||
) |
Definition at line 1151 of file switch_core_media.c.
References switch_rtp_engine_s::rtp_session, and switch_rtp_engine_s::type.
void switch_core_media_set_sdp_codec_string | ( | switch_core_session_t * | session, |
const char * | r_sdp, | ||
switch_sdp_type_t | sdp_type | ||
) |
Definition at line 9968 of file switch_core_media.c.
References switch_assert, switch_core_media_get_codec_string(), and switch_core_media_set_r_sdp_codec_string().
void switch_core_media_set_stats | ( | switch_core_session_t * | session | ) |
Definition at line 1562 of file switch_core_media.c.
References set_stats(), switch_core_media_sync_stats(), SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_session_hangup_state(), and switch_core_standard_on_hangup().
void switch_core_media_set_telephony_event | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_payload_t | te | ||
) |
Definition at line 9863 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), and switch_rtp_set_telephony_event().
void switch_core_media_set_telephony_recv_event | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_payload_t | te | ||
) |
Definition at line 9879 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), and switch_rtp_set_telephony_recv_event().
void switch_core_media_set_udptl_image_sdp | ( | switch_core_session_t * | session, |
switch_t38_options_t * | t38_options, | ||
int | insist | ||
) |
Definition at line 8643 of file switch_core_media.c.
References switch_rtp_engine_s::adv_sdp_ip, switch_rtp_engine_s::adv_sdp_port, buf, switch_media_handle_s::engines, switch_core_media_params_s::local_sdp_str, switch_media_handle_s::mparams, switch_media_handle_s::owner_id, switch_rtp_engine_s::proxy_sdp_ip, switch_rtp_engine_s::proxy_sdp_port, switch_core_media_params_s::sdp_username, switch_media_handle_s::session_id, switch_assert, switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_core_media_set_local_sdp(), switch_epoch_time_now(), SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, switch_snprintf(), SWITCH_TRUE, and switch_true().
switch_status_t switch_core_media_set_video_codec | ( | switch_core_session_t * | session, |
int | force | ||
) |
Definition at line 2720 of file switch_core_media.c.
References switch_codec::agreed_pt, payload_map_s::agreed_pt, switch_frame::codec, payload_map_s::codec_ms, switch_rtp_engine_s::codec_negotiated, switch_rtp_engine_s::codec_settings, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_codec::fmtp_out, switch_core_session_message::from, switch_codec_implementation::iananame, switch_codec::implementation, switch_core_session_message::message_id, payload_map_s::modname, switch_frame::rate, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_frame, payload_map_s::rm_encoding, payload_map_s::rm_fmtp, payload_map_s::rm_rate, switch_rtp_engine_s::rtp_session, switch_codec_implementation::samples_per_second, switch_assert, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_channel_set_variable_printf(), SWITCH_CODEC_FLAG_DECODE, SWITCH_CODEC_FLAG_ENCODE, switch_core_codec_destroy(), switch_core_codec_init, switch_core_codec_ready(), switch_core_session_get_pool(), switch_core_session_parse_codec_settings(), switch_core_session_receive_message, switch_core_session_set_video_read_codec(), switch_core_session_set_video_write_codec(), switch_core_session_strdup, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ, switch_rtp_ready(), switch_rtp_set_default_payload(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_rtp_engine_s::write_codec.
Referenced by switch_core_media_activate_rtp(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), switch_core_media_read_frame(), and switch_core_media_recover_session().
switch_status_t switch_core_media_set_video_file | ( | switch_core_session_t * | session, |
switch_file_handle_t * | fh, | ||
switch_rw_t | rw | ||
) |
Definition at line 5209 of file switch_core_media.c.
References CF_VIDEO, CF_VIDEO_DECODED_READ, CF_VIDEO_READ_FILE_ATTACHED, CF_VIDEO_WRITE_FILE_ATTACHED, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_rtp_engine_s::mh, switch_assert, switch_channel_clear_flag(), switch_channel_clear_flag_recursive(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_flag_recursive(), switch_channel_test_flag(), switch_channel_video_sync, switch_core_file_has_video(), switch_core_media_gen_key_frame, switch_core_session_get_pool(), switch_core_session_start_video_thread(), switch_core_session_video_reset(), switch_core_session_wake_video_thread(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RW_READ, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_create(), switch_thread_join(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), SWITCH_TRUE, switch_media_handle_s::video_read_fh, switch_media_handle_s::video_write_fh, switch_media_handle_s::video_write_thread, video_write_thread(), and switch_media_handle_s::video_write_thread_running.
Referenced by switch_ivr_play_file(), and switch_ivr_record_file().
void switch_core_media_start_udptl | ( | switch_core_session_t * | session, |
switch_t38_options_t * | t38_options | ||
) |
Definition at line 9112 of file switch_core_media.c.
References CF_AVPF, CF_NOTIMER_DURING_BRIDGE, switch_media_handle_s::engines, switch_rtp::remote_port, switch_rtp_engine_s::rtp_session, SCMF_DISABLE_RTP_AUTOADJ, switch_assert, switch_channel_clear_flag(), switch_channel_down, switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_RTP_FLAG_AUTOADJ, switch_rtp_get_remote_host(), switch_rtp_get_remote_port(), switch_rtp_ready(), switch_rtp_set_flag(), switch_rtp_set_remote_address(), switch_rtp_udptl_mode(), SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and switch_true().
Referenced by switch_core_media_receive_message().
void switch_core_media_start_video_function | ( | switch_core_session_t * | session, |
switch_video_function_t | video_function, | ||
void * | user_data | ||
) |
Definition at line 5540 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_core_session_start_video_thread(), switch_core_session_video_reset(), switch_mutex_lock(), switch_mutex_unlock(), switch_media_handle_s::video_function, switch_media_handle_s::video_function_running, and switch_media_handle_s::video_user_data.
switch_rtp_stats_t* switch_core_media_stats | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_memory_pool_t * | pool | ||
) |
void switch_core_media_sync_stats | ( | switch_core_session_t * | session | ) |
Definition at line 1538 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, and switch_rtp_sync_stats().
Referenced by switch_core_media_set_stats().
int switch_core_media_toggle_hold | ( | switch_core_session_t * | session, |
int | sendonly | ||
) |
Definition at line 4872 of file switch_core_media.c.
References CF_ANSWERED, CF_BROADCAST, CF_BYPASS_MEDIA_AFTER_HOLD, CF_EVENT_LOCK_PRI, CF_HOLD, CF_HOLD_LOCK, CF_PROTO_HOLD, CF_SLA_BARGE, CF_SLA_BARGING, CF_SUSPEND, switch_media_handle_s::engines, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, switch_rtp_engine_s::rtp_session, SMF_ECHO_ALEG, SMF_LOOP, SMF_PRIORITY, SMF_REBRIDGE, switch_assert, switch_channel_clear_flag(), switch_channel_get_hold_music(), switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_mark_hold(), switch_channel_presence, switch_channel_set_flag, switch_channel_stop_broadcast, switch_channel_test_flag(), switch_channel_wait_for_flag(), switch_core_media_check_autoadj(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_get_uuid(), switch_core_session_rwunlock(), SWITCH_FALSE, switch_ivr_bg_media(), switch_ivr_broadcast(), switch_ivr_hold_uuid(), switch_ivr_unhold(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_clear_flag(), SWITCH_RTP_FLAG_PAUSE, switch_rtp_reset_media_timer(), switch_rtp_set_flag(), switch_rtp_set_max_missed_packets(), SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, switch_true(), and switch_yield.
Referenced by switch_core_media_activate_rtp(), and switch_core_media_negotiate_sdp().
switch_status_t switch_core_media_udptl_mode | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 9931 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), switch_rtp_udptl_mode(), and SWITCH_STATUS_FALSE.
switch_status_t switch_core_media_unlock_video_file | ( | switch_core_session_t * | session, |
switch_rw_t | rw | ||
) |
Definition at line 5183 of file switch_core_media.c.
References CF_VIDEO, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_rtp_engine_s::mh, switch_assert, switch_channel_test_flag(), SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_unlock(), SWITCH_RW_READ, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_record_file().
switch_status_t switch_core_media_write_frame | ( | switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id, | ||
switch_media_type_t | type | ||
) |
Definition at line 2552 of file switch_core_media.c.
References CF_VIDEO_ONLY, switch_codec_implementation::encoded_bytes_per_packet, switch_media_handle_s::engines, switch_codec::implementation, switch_media_handle_s::media_flags, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_impl, switch_rtp_engine_s::rtp_session, switch_codec_implementation::samples_per_packet, SCMF_RUNNING, SFF_CNG, SFF_PROXY_PACKET, switch_assert, switch_channel_ready, switch_channel_test_flag(), switch_core_codec_ready(), SWITCH_MEDIA_TYPE_AUDIO, switch_rtp_ready(), switch_rtp_write_frame(), SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_yield, and switch_rtp_engine_s::timestamp_send.
int switch_core_session_check_incoming_crypto | ( | switch_core_session_t * | session, |
const char * | varname, | ||
switch_media_type_t | type, | ||
const char * | crypto, | ||
int | crypto_tag, | ||
switch_sdp_type_t | sdp_type | ||
) |
Definition at line 1325 of file switch_core_media.c.
References CF_AVPF, CF_SECURE, switch_core_session::channel, CRYPTO_INVALID, switch_media_handle_s::crypto_mode, CRYPTO_MODE_FORBIDDEN, switch_media_handle_s::crypto_suite_order, secure_settings_s::crypto_tag, secure_settings_s::crypto_type, switch_rtp_engine_s::crypto_type, switch_srtp_crypto_suite_s::keylen, secure_settings_s::local_crypto_key, secure_settings_s::local_raw_key, switch_srtp_crypto_suite_s::name, secure_settings_s::remote_crypto_key, secure_settings_s::remote_raw_key, switch_rtp_engine_s::rtp_session, SDP_TYPE_REQUEST, switch_media_handle_s::session, switch_rtp_engine_s::ssec, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_core_media_add_crypto(), switch_core_media_build_crypto(), switch_core_media_crypto_type2str(), switch_core_session_strdup, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_add_crypto_key(), SWITCH_RTP_CRYPTO_RECV, SWITCH_RTP_CRYPTO_SEND, switch_rtp_ready(), switch_stristr(), switch_srtp_crypto_suite_s::type, switch_rtp_engine_s::type, and zstr.
Referenced by switch_core_media_negotiate_sdp().
void switch_core_session_check_outgoing_crypto | ( | switch_core_session_t * | session | ) |
Definition at line 1450 of file switch_core_media.c.
References CF_AVPF, CF_SECURE, CRYPTO_INVALID, switch_media_handle_s::crypto_mode, CRYPTO_MODE_MANDATORY, CRYPTO_MODE_OPTIONAL, switch_media_handle_s::crypto_suite_order, switch_channel_set_flag, switch_channel_test_flag(), switch_core_media_build_crypto(), switch_core_session_get_channel(), switch_core_session_media_handle_ready(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_NO_CRYPTO_TAG, SWITCH_RTP_CRYPTO_SEND, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_gen_local_sdp().
void switch_core_session_clear_crypto | ( | switch_core_session_t * | session | ) |
Definition at line 873 of file switch_core_media.c.
References CRYPTO_INVALID, switch_media_handle_s::engines, memset(), switch_rtp_engine_s::ssec, switch_channel_set_variable, SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
switch_status_t switch_core_session_clear_media_handle | ( | switch_core_session_t * | session | ) |
Definition at line 1784 of file switch_core_media.c.
References SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_media_handle_t* switch_core_session_get_media_handle | ( | switch_core_session_t * | session | ) |
Definition at line 1775 of file switch_core_media.c.
References switch_core_session_media_handle_ready(), and SWITCH_STATUS_SUCCESS.
switch_status_t switch_core_session_get_payload_code | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
const char * | iananame, | ||
uint32_t | rate, | ||
switch_payload_t * | ptP, | ||
switch_payload_t * | recv_ptP, | ||
char ** | fmtpP | ||
) |
Definition at line 668 of file switch_core_media.c.
References payload_map_s::allocated, switch_media_handle_s::engines, payload_map_s::iananame, payload_map_s::next, switch_rtp_engine_s::payload_map, payload_map_s::pt, payload_map_s::rate, payload_map_s::recv_pt, payload_map_s::rm_fmtp, switch_media_handle_s::sdp_mutex, switch_assert, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_core_media_gen_local_sdp().
switch_bool_t switch_core_session_in_video_thread | ( | switch_core_session_t * | session | ) |
Definition at line 5594 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_assert, SWITCH_FALSE, SWITCH_MEDIA_TYPE_VIDEO, switch_thread_equal(), switch_thread_self(), SWITCH_TRUE, and switch_rtp_engine_s::thread_id.
const char* switch_core_session_local_crypto_key | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 904 of file switch_core_media.c.
switch_media_flow_t switch_core_session_media_flow | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 1740 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_media_handle_s::media_flags, SCMF_RUNNING, switch_rtp_engine_s::smode, switch_assert, and SWITCH_MEDIA_FLOW_SENDRECV.
Referenced by switch_core_session_write_encoded_video_frame(), and switch_core_session_write_video_frame().
switch_status_t switch_core_session_media_handle_ready | ( | switch_core_session_t * | session | ) |
Definition at line 1764 of file switch_core_media.c.
References SMF_INIT, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by switch_core_session_check_outgoing_crypto(), and switch_core_session_get_media_handle().
void switch_core_session_set_ice | ( | switch_core_session_t * | session | ) |
Definition at line 3592 of file switch_core_media.c.
References CF_AVPF, CF_ICE, CF_VERBOSE_SDP, switch_media_handle_s::mparams, switch_core_media_params_s::rtcp_audio_interval_msec, switch_core_media_params_s::rtcp_video_interval_msec, switch_assert, switch_channel_set_flag, SWITCH_RTCP_AUDIO_INTERVAL_MSEC, and SWITCH_RTCP_VIDEO_INTERVAL_MSEC.
Referenced by switch_core_media_negotiate_sdp().
switch_status_t switch_core_session_start_video_thread | ( | switch_core_session_t * | session | ) |
Definition at line 5494 of file switch_core_media.c.
References payload_map_s::agreed_pt, CF_VIDEO, media_helper::cond, media_helper::cond_mutex, switch_media_handle_s::control_mutex, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_rtp_engine_s::media_thread, switch_rtp_engine_s::mh, pool, switch_media_handle_s::read_mutex, switch_rtp_engine_s::rtp_session, media_helper::session, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_core_session_get_name, switch_core_session_get_pool(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), switch_rtp_set_default_payload(), SWITCH_STATUS_FALSE, SWITCH_STATUS_NOTIMPL, SWITCH_STATUS_SUCCESS, switch_thread_cond_create(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), video_helper_thread(), and switch_media_handle_s::write_mutex.
Referenced by switch_channel_set_flag_value(), switch_core_media_activate_rtp(), switch_core_media_set_video_file(), switch_core_media_start_video_function(), and switch_core_session_set_video_read_callback().
void switch_core_session_stop_media | ( | switch_core_session_t * | session | ) |
Definition at line 10296 of file switch_core_media.c.
References ice_s::cands, CF_VIDEO_READY, switch_core_session::channel, ice_s::chosen, switch_media_handle_s::cname, icand_s::component_id, switch_media_handle_s::engines, icand_s::foundation, gen_ice(), switch_rtp_engine_s::ice_in, switch_rtp_engine_s::ice_out, dtls_fp_s::len, switch_rtp_engine_s::local_dtls_fingerprint, switch_media_handle_s::msid, switch_media_handle_s::owner_id, ice_s::pwd, switch_rtp_engine_s::read_codec, icand_s::ready, switch_rtp_engine_s::remote_ssrc, switch_rtp_engine_s::rtp_session, SCC_VIDEO_RESET, SCCT_INT, SCCT_NONE, switch_media_handle_s::session, switch_media_handle_s::session_id, switch_assert, switch_channel_clear_flag(), switch_core_codec_control(), switch_core_codec_ready(), switch_core_session_request_video_refresh(), switch_core_session_wake_video_thread(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_reset(), ice_s::ufrag, and switch_rtp_engine_s::write_codec.
void switch_core_session_video_reinit | ( | switch_core_session_t * | session | ) |
Definition at line 11037 of file switch_core_media.c.
References SCC_VIDEO_RESET, SCCT_INT, SCCT_NONE, switch_assert, switch_channel_down, switch_core_media_codec_control(), switch_core_session_request_video_refresh(), switch_core_session_send_and_request_video_refresh(), SWITCH_IO_READ, SWITCH_MEDIA_TYPE_VIDEO, switch_media_handle_s::video_init, and switch_media_handle_s::video_last_key_time.
Referenced by handle_ice(), and switch_core_session_write_video_frame().
switch_status_t switch_core_session_wait_for_video_input_params | ( | switch_core_session_t * | session, |
uint32_t | timeout_ms | ||
) |
Definition at line 11267 of file switch_core_media.c.
References CF_VIDEO_DECODED_READ, CF_VIDEO_READY, switch_media_handle_s::engines, switch_vid_params_s::fps, switch_vid_params_s::height, switch_codec_implementation::microseconds_per_packet, switch_rtp_engine_s::smode, switch_assert, switch_channel_ready, switch_channel_test_flag(), switch_core_session_get_read_impl(), switch_core_session_read_frame(), switch_core_session_request_video_refresh(), SWITCH_IO_FLAG_NONE, SWITCH_MEDIA_FLOW_SENDONLY, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_READ_ACCEPTABLE, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_NOTIMPL, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, core_video_globals_s::synced, switch_media_handle_s::vid_params, and switch_vid_params_s::width.
Referenced by switch_ivr_record_file().
void switch_core_session_wake_video_thread | ( | switch_core_session_t * | session | ) |
Definition at line 6162 of file switch_core_media.c.
References media_helper::cond, media_helper::cond_mutex, switch_media_handle_s::engines, switch_core_media_params_s::external_video_source, switch_rtp_engine_s::media_thread, switch_rtp_engine_s::mh, switch_media_handle_s::mparams, switch_rtp_engine_s::rtp_session, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_trylock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, and switch_thread_cond_broadcast().
Referenced by switch_channel_clear_flag(), switch_core_media_set_video_file(), switch_core_session_run(), and switch_core_session_stop_media().
void switch_media_handle_clear_media_flag | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flag | ||
) |
Definition at line 1727 of file switch_core_media.c.
References switch_assert.
switch_status_t switch_media_handle_create | ( | switch_media_handle_t ** | smhp, |
switch_core_session_t * | session, | ||
switch_core_media_params_t * | params | ||
) |
Definition at line 1621 of file switch_core_media.c.
References CF_DTLS_OK, CRYPTO_INVALID, switch_core_session::media_handle, SCMF_RUNNING, switch_media_handle_s::session, SMF_INIT, switch_channel_set_flag, switch_channel_set_variable, switch_core_alloc, switch_core_session_alloc, switch_core_session_get_pool(), SWITCH_MEDIA_FLOW_SENDRECV, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_RTP_MAX_BUF_LEN, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
void switch_media_handle_destroy | ( | switch_core_session_t * | session | ) |
Definition at line 1577 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_rtp_engine_s::read_codec, switch_assert, switch_core_codec_destroy(), switch_core_codec_ready(), switch_core_media_deactivate_rtp(), switch_core_session_unset_read_codec(), switch_core_session_unset_write_codec(), switch_core_timer_destroy(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_timer::timer_interface, switch_media_handle_s::video_timer, and switch_rtp_engine_s::write_codec.
void switch_media_handle_set_media_flag | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flag | ||
) |
Definition at line 1706 of file switch_core_media.c.
References switch_assert.
Referenced by switch_core_media_receive_message().
void switch_media_handle_set_media_flags | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flags[] | ||
) |
int32_t switch_media_handle_test_media_flag | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flag | ||
) |
Definition at line 1734 of file switch_core_media.c.
References switch_assert.
Referenced by generate_m(), switch_core_media_activate_rtp(), switch_core_media_check_autoadj(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_proxy_remote_addr(), and switch_core_media_start_udptl().
|
inlinestatic |
Definition at line 177 of file switch_core_media.h.
References SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_media_choose_port().