RTS API Documentation
1.10.11
|
#include <switch.h>
#include <switch_ssl.h>
#include <switch_stun.h>
#include <switch_nat.h>
#include "private/switch_core_pvt.h"
#include "private/switch_apr_pvt.h"
#include <switch_curl.h>
#include <errno.h>
#include <sofia-sip/sdp.h>
#include <sofia-sip/su.h>
#include <stdbool.h>
#include <wchar.h>
Go to the source code of this file.
Data Structures | |
struct | core_video_globals_s |
struct | media_helper |
struct | switch_rtp_text_factory_s |
struct | switch_rtp_engine_s |
struct | switch_media_handle_s |
struct | matches |
Macros | |
#define | RTCP_MUX |
#define | MAX_CODEC_CHECK_FRAMES 50 |
#define | MAX_MISMATCH_FRAMES 5 |
#define | type2str(type) type == SWITCH_MEDIA_TYPE_VIDEO ? "video" : (type == SWITCH_MEDIA_TYPE_AUDIO ? "audio" : "text") |
#define | VIDEO_REFRESH_FREQ 1000000 |
#define | TEXT_TIMER_MS 100 |
#define | TEXT_TIMER_SAMPLES 10 |
#define | TEXT_PERIOD_TIMEOUT 3000 |
#define | MAX_RED_FRAMES 25 |
#define | RED_PACKET_SIZE 100 |
#define | MAX_REJ_STREAMS 10 |
#define | CRYPTO_KEY_MATERIAL_LIFETIME_MKI_ERR 0x0u |
#define | CRYPTO_KEY_MATERIAL_MKI 0x1u |
#define | CRYPTO_KEY_MATERIAL_LIFETIME 0x2u |
#define | RAW_BITS_PER_64_ENCODED_CHAR 6 |
#define | add_stat(_i, _s) |
#define | add_stat_double(_i, _s) |
#define | MAX_MATCHES 30 |
#define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
#define | RA_PTR_LEN 512 |
#define | SDPBUFLEN 65536 |
Typedefs | |
typedef struct core_video_globals_s | core_video_globals_t |
Enumerations | |
enum | smh_flag_t { SMF_INIT = (1 << 0), SMF_READY = (1 << 1), SMF_JB_PAUSED = (1 << 2), SMF_VB_PAUSED = (1 << 3) } |
enum | switch_rtp_crypto_mode_t { CRYPTO_MODE_OPTIONAL, CRYPTO_MODE_MANDATORY, CRYPTO_MODE_FORBIDDEN } |
Variables | |
static core_video_globals_t | video_globals = { 0 } |
switch_srtp_crypto_suite_t | SUITES [CRYPTO_INVALID] |
static switch_bool_t | ice_resolve_candidate = 0 |
static const char * | CRYPTO_KEY_PARAM_METHOD [CRYPTO_KEY_PARAM_METHOD_INVALID] |
#define add_stat | ( | _i, | |
_s | |||
) |
Definition at line 1847 of file switch_core_media.c.
Referenced by set_stats().
#define add_stat_double | ( | _i, | |
_s | |||
) |
Definition at line 1852 of file switch_core_media.c.
Referenced by set_stats().
#define CRYPTO_KEY_MATERIAL_LIFETIME 0x2u |
Definition at line 1113 of file switch_core_media.c.
Referenced by parse_lifetime_mki(), and switch_core_media_add_crypto().
#define CRYPTO_KEY_MATERIAL_LIFETIME_MKI_ERR 0x0u |
Definition at line 1111 of file switch_core_media.c.
#define CRYPTO_KEY_MATERIAL_MKI 0x1u |
Definition at line 1112 of file switch_core_media.c.
Referenced by parse_lifetime_mki(), and switch_core_media_add_crypto().
#define MAX_CODEC_CHECK_FRAMES 50 |
Definition at line 51 of file switch_core_media.c.
Referenced by switch_core_media_read_frame().
#define MAX_MATCHES 30 |
Definition at line 4517 of file switch_core_media.c.
Referenced by greedy_sort().
#define MAX_MISMATCH_FRAMES 5 |
Definition at line 52 of file switch_core_media.c.
Referenced by switch_core_media_read_frame().
#define MAX_RED_FRAMES 25 |
Definition at line 59 of file switch_core_media.c.
Referenced by get_rtt_red_seq().
#define MAX_REJ_STREAMS 10 |
Definition at line 210 of file switch_core_media.c.
Referenced by switch_core_media_negotiate_sdp().
Definition at line 4526 of file switch_core_media.c.
Referenced by greedy_sort().
#define RA_PTR_LEN 512 |
Definition at line 7776 of file switch_core_media.c.
Referenced by switch_core_media_proxy_remote_addr().
#define RAW_BITS_PER_64_ENCODED_CHAR 6 |
Definition at line 1115 of file switch_core_media.c.
#define RED_PACKET_SIZE 100 |
Definition at line 60 of file switch_core_media.c.
Referenced by switch_core_session_write_text_frame().
#define RTCP_MUX |
Definition at line 50 of file switch_core_media.c.
#define SDPBUFLEN 65536 |
Definition at line 10245 of file switch_core_media.c.
Referenced by switch_core_media_gen_local_sdp().
#define TEXT_PERIOD_TIMEOUT 3000 |
Definition at line 58 of file switch_core_media.c.
Referenced by switch_core_session_read_text_frame(), and switch_core_session_write_text_frame().
#define TEXT_TIMER_MS 100 |
Definition at line 56 of file switch_core_media.c.
Referenced by switch_core_media_activate_rtp(), switch_core_session_write_text_frame(), and switch_rtp_text_factory_create().
#define TEXT_TIMER_SAMPLES 10 |
Definition at line 57 of file switch_core_media.c.
Referenced by switch_core_media_activate_rtp(), and switch_rtp_text_factory_create().
#define type2str | ( | type | ) | type == SWITCH_MEDIA_TYPE_VIDEO ? "video" : (type == SWITCH_MEDIA_TYPE_AUDIO ? "audio" : "text") |
Definition at line 53 of file switch_core_media.c.
Referenced by check_dtls_reinvite(), check_ice(), switch_core_media_build_crypto(), switch_core_media_read_frame(), switch_core_media_read_lock_unlock(), switch_core_session_passthru(), switch_core_session_write_text_frame(), and switch_core_session_write_video_frame().
#define VIDEO_REFRESH_FREQ 1000000 |
Definition at line 54 of file switch_core_media.c.
Referenced by _switch_core_session_request_video_refresh().
typedef struct core_video_globals_s core_video_globals_t |
enum smh_flag_t |
Enumerator | |
---|---|
SMF_INIT | |
SMF_READY | |
SMF_JB_PAUSED | |
SMF_VB_PAUSED |
Definition at line 62 of file switch_core_media.c.
Enumerator | |
---|---|
CRYPTO_MODE_OPTIONAL | |
CRYPTO_MODE_MANDATORY | |
CRYPTO_MODE_FORBIDDEN |
Definition at line 90 of file switch_core_media.c.
switch_status_t _switch_core_session_request_video_refresh | ( | switch_core_session_t * | session, |
int | force, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 14527 of file switch_core_media.c.
References switch_core_session_message::_file, switch_core_session_message::_func, switch_core_session_message::_line, CF_VIDEO, switch_core_session::channel, switch_core_session_message::from, switch_media_handle_s::last_video_refresh_req, switch_core_session::media_handle, switch_core_session_message::message_id, switch_core_session_message::numeric_arg, switch_assert, switch_channel_get_name(), SWITCH_CHANNEL_ID_LOG, switch_channel_media_up, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_uuid(), switch_core_session_receive_message, SWITCH_LOG_DEBUG1, switch_log_printf(), SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ, switch_micro_time_now(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and VIDEO_REFRESH_FREQ.
|
static |
Definition at line 13509 of file switch_core_media.c.
References switch_codec_fmtp::bits_per_second, switch_codec_fmtp::microseconds_per_packet, switch_codec_implementation::modname, switch_core_codec_parse_fmtp(), switch_default_ptime(), switch_known_bitrate(), switch_snprintf(), SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_core_media_set_r_sdp_codec_string().
|
static |
Definition at line 10224 of file switch_core_media.c.
References switch_snprintf().
Referenced by switch_core_media_gen_local_sdp().
|
static |
Definition at line 7184 of file switch_core_media.c.
References switch_core_session::channel, switch_media_handle_s::control_mutex, switch_media_handle_s::engines, switch_core_session::media_handle, switch_codec_implementation::microseconds_per_packet, perform_write(), switch_codec_implementation::samples_per_packet, media_helper::session, switch_channel_up_nosig, switch_core_session_get_pool(), switch_core_session_read_lock(), switch_core_session_rwunlock(), switch_core_timer_destroy(), switch_core_timer_init(), switch_core_timer_next(), switch_frame_buffer_create(), switch_frame_buffer_free(), switch_frame_buffer_trypop(), SWITCH_IO_FLAG_QUEUED, SWITCH_MEDIA_TYPE_AUDIO, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_SUCCESS, switch_thread_self(), switch_rtp_engine_s::thread_id, media_helper::up, switch_rtp_engine_s::write_fb, and switch_core_session::write_impl.
Referenced by switch_core_session_start_audio_write_thread().
|
static |
Definition at line 15582 of file switch_core_media.c.
References buf, switch_frame::data, switch_frame::datalen, if(), switch_frame::payload, switch_rtp_text_factory_s::red_buf, switch_rtp_text_factory_s::red_buflen, switch_rtp_text_factory_s::red_max, switch_rtp_text_factory_s::red_pos, switch_rtp_engine_s::red_pt, switch_rtp_text_factory_s::red_ts, switch_rtp_engine_s::t140_pt, switch_rtp_text_factory_s::text_write_frame, switch_rtp_engine_s::tf, and switch_frame::timestamp.
Referenced by switch_core_session_write_text_frame().
|
static |
Definition at line 8502 of file switch_core_media.c.
References CF_REINVITE, CF_WANT_DTLSv1_2, switch_core_session::channel, switch_rtp_engine_s::dtls_controller, dtls_ok(), DTLS_TYPE_CLIENT, DTLS_TYPE_RTCP, DTLS_TYPE_RTP, DTLS_TYPE_SERVER, switch_rtp_engine_s::local_dtls_fingerprint, switch_rtp_engine_s::new_dtls, switch_rtp_engine_s::remote_dtls_fingerprint, switch_rtp_engine_s::rtcp_mux, switch_rtp_engine_s::rtp_session, dtls_fp_s::str, switch_channel_clear_flag(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_channel_var_true(), SWITCH_LOG_INFO, switch_log_printf(), switch_rtp_add_dtls(), switch_rtp_has_dtls(), switch_rtp_engine_s::type, type2str, and zstr.
Referenced by switch_core_media_activate_rtp().
|
static |
Definition at line 12555 of file switch_core_media.c.
References DS_FAIL, DS_READY, DTLS_TYPE_RTP, switch_rtp_engine_s::read_frame, switch_rtp_engine_s::rtp_session, SWITCH_READ_ACCEPTABLE, switch_rtp_dtls_state(), and switch_rtp_zerocopy_read_frame().
Referenced by switch_core_media_check_dtls().
|
static |
Definition at line 4045 of file switch_core_media.c.
References switch_rtp_engine_s::cand_acl, switch_rtp_engine_s::cand_acl_count, ice_s::cand_idx, icand_s::cand_type, ice_s::cands, CF_AUDIO_VIDEO_BUNDLE, CF_DTLS, CF_ICE, CF_RECOVERING, CF_REINVITE, switch_core_session::channel, ice_s::chosen, icand_s::component_id, icand_s::con_addr, icand_s::con_port, switch_rtp_engine_s::cur_payload_map, switch_rtp_engine_s::dtls_controller, dtls_ok(), switch_media_handle_s::engines, icand_s::foundation, generate_local_fingerprint(), icand_s::generation, ICE_GOOGLE_JINGLE, switch_rtp_engine_s::ice_in, switch_rtp_engine_s::ice_out, if(), ip, ip_choose_family(), ip_possible(), IPR_RTCP, IPR_RTP, ice_s::is_chosen, MAX_CAND, MAX_CAND_IDX_COUNT, switch_media_handle_s::mparams, switch_rtp_engine_s::new_dtls, switch_rtp_engine_s::new_ice, ice_s::options, icand_s::priority, ice_s::pwd, icand_s::raddr, icand_s::ready, switch_rtp_engine_s::remote_dtls_fingerprint, switch_core_media_params_s::remote_ip, switch_rtp_engine_s::remote_rtcp_ice_addr, switch_rtp_engine_s::remote_rtcp_ice_port, switch_rtp_engine_s::remote_rtcp_port, switch_rtp_engine_s::remote_rtp_ice_addr, switch_rtp_engine_s::remote_rtp_ice_port, payload_map_s::remote_sdp_ip, payload_map_s::remote_sdp_port, switch_rtp_engine_s::remote_ssrc, icand_s::rport, 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_rtp_engine_s::rtp_session, switch_media_handle_s::session, dtls_fp_s::str, switch_channel_get_name(), switch_channel_get_variable, switch_channel_get_variable_dup(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_check_network_list_ip, switch_copy_string(), switch_core_media_has_resolveice(), switch_core_session_strdup, switch_determine_ice_type(), SWITCH_FALSE, switch_inet_pton(), switch_is_uint_in_range(), SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG1, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_resolve_host(), SWITCH_RTCP_AUDIO_INTERVAL_MSEC, switch_rtp_activate_ice(), switch_rtp_activate_rtcp(), switch_rtp_has_dtls(), switch_rtp_ready(), switch_rtp_set_remote_ssrc(), switch_set_string, switch_snprintf(), switch_split, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, switch_true(), icand_s::transport, switch_rtp_engine_s::type, dtls_fp_s::type, type2str, ice_s::ufrag, and zstr.
Referenced by switch_core_media_negotiate_sdp().
|
static |
Definition at line 2308 of file switch_core_media.c.
References CF_JITTERBUFFER, CF_JITTERBUFFER_PLC, switch_core_session::channel, switch_media_handle_s::engines, switch_codec::implementation, switch_core_media_params_s::jb_msec, switch_core_session::media_handle, switch_codec_implementation::microseconds_per_packet, switch_media_handle_s::mparams, switch_rtp_engine_s::read_codec, switch_rtp_engine_s::read_impl, switch_rtp_engine_s::rtp_session, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, switch_assert, switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable, SWITCH_FALSE, switch_false(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_activate_jitter_buffer(), switch_rtp_deactivate_jitter_buffer(), switch_rtp_debug_jitter_buffer(), switch_rtp_pause_jitter_buffer(), switch_rtp_set_video_buffer_size(), SWITCH_STATUS_SUCCESS, SWITCH_TRUE, and zstr.
Referenced by check_jb_sync(), switch_core_media_activate_rtp(), switch_core_media_read_frame(), and switch_core_media_receive_message().
|
static |
Definition at line 2478 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, check_jb(), switch_media_handle_s::engines, core_video_globals_s::fps, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_channel_get_name(), switch_channel_get_variable_dup(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_core_session_get_uuid(), SWITCH_FALSE, SWITCH_LOG_DEBUG1, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_get_video_buffer_size(), SWITCH_TRUE, and core_video_globals_s::synced.
Referenced by switch_core_media_read_frame().
|
static |
Definition at line 2734 of file switch_core_media.c.
References switch_core_session::channel, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, switch_rtp_engine_s::media_hold_timeout, switch_rtp_engine_s::media_timeout, switch_rtp_engine_s::read_impl, switch_rtp_engine_s::rtp_session, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, switch_channel_get_variable, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_ready(), switch_rtp_set_max_missed_packets(), switch_rtp_set_media_timeout(), and switch_rtp_engine_s::type.
Referenced by switch_core_media_activate_rtp(), and switch_core_media_read_frame().
|
static |
Definition at line 4641 of file switch_core_media.c.
References CF_AWAITING_STREAM_CHANGE, CF_PROCESSING_STREAM_CHANGE, CF_SECURE, CF_STREAM_CHANGED, switch_core_session::channel, switch_media_handle_s::crypto_mode, switch_core_session_message::from, switch_core_session::media_handle, switch_core_session_message::message_id, SDP_ANSWER, SDP_OFFER, switch_core_session_message::string_arg, switch_channel_clear_flag(), switch_channel_get_variable, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_core_media_activate_rtp(), switch_core_media_merge_sdp_codec_string(), switch_core_media_negotiate_sdp(), switch_core_session_alloc, switch_core_session_check_outgoing_crypto(), switch_core_session_get_partner, switch_core_session_queue_message(), switch_core_session_rwunlock(), switch_core_session_sprintf(), SWITCH_MESSAGE_INDICATE_MEDIA_RENEG, SWITCH_MESSAGE_INDICATE_RESPOND, SWITCH_R_SDP_VARIABLE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_gen_local_sdp(), and switch_core_media_negotiate_sdp().
|
static |
Definition at line 3781 of file switch_core_media.c.
References ice_s::cand_idx, ice_s::chosen, switch_media_handle_s::engines, switch_rtp_engine_s::ice_in, ice_s::is_chosen, switch_core_session::media_handle, memset(), switch_rtp_engine_s::remote_rtcp_port, switch_rtp_engine_s::rtp_session, switch_assert, and switch_rtp_reset().
Referenced by switch_core_media_clear_ice().
|
static |
Definition at line 4552 of file switch_core_media.c.
References payload_map_s::allocated, payload_map_s::current, payload_map_s::negotiated, payload_map_s::next, and switch_rtp_engine_s::payload_map.
Referenced by switch_core_media_check_outgoing_proxy(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), and switch_core_media_receive_message().
|
static |
Definition at line 3942 of file switch_core_media.c.
References CF_DTLS_OK, switch_core_session::channel, and switch_channel_test_flag().
Referenced by check_dtls_reinvite(), check_ice(), switch_core_media_activate_rtp(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), and switch_ice_direction().
|
static |
Definition at line 14282 of file switch_core_media.c.
References end_of_p, and switch_stristr().
Referenced by switch_core_media_filter_sdp().
|
static |
Definition at line 8386 of file switch_core_media.c.
References ice_s::cands, switch_media_handle_s::cname, icand_s::component_id, icand_s::con_addr, icand_s::con_port, switch_media_handle_s::engines, icand_s::foundation, icand_s::generation, switch_rtp_engine_s::ice_out, switch_core_session::media_handle, switch_media_handle_s::msid, icand_s::priority, ice_s::pwd, icand_s::ready, switch_assert, switch_channel_var_true(), switch_core_session_get_channel(), switch_core_session_strdup, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_stun_random_string(), icand_s::transport, ice_s::ufrag, and zstr.
Referenced by generate_m(), switch_core_media_activate_rtp(), switch_core_media_gen_local_sdp(), and switch_core_session_stop_media().
|
static |
Definition at line 3927 of file switch_core_media.c.
References DTLS_SRTP_FNAME, switch_media_handle_s::engines, dtls_fp_s::len, switch_rtp_engine_s::local_dtls_fingerprint, switch_rtp_engine_s::remote_dtls_fingerprint, switch_core_cert_gen_fingerprint(), and dtls_fp_s::type.
Referenced by check_ice(), and switch_core_media_gen_local_sdp().
|
static |
Definition at line 9756 of file switch_core_media.c.
References payload_map_s::allocated, AVP_NO_SECURE, AVP_SECURE, switch_codec_implementation::bits_per_second, ice_s::cands, CF_AVPF, CF_DTLS, CF_LIBERAL_DTMF, CF_RECOVERING, CF_VERBOSE_SDP, switch_core_session::channel, switch_media_handle_s::cname, switch_media_handle_s::cng_ianacodes, 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_suite_order, switch_rtp_engine_s::crypto_type, switch_rtp_engine_s::cur_payload_map, DTMF_2833, switch_media_handle_s::dtmf_ianacodes, switch_core_media_params_s::dtmf_type, end_of, switch_media_handle_s::engines, switch_core_media_params_s::extsipip, switch_codec_implementation::fmtp, switch_media_handle_s::fmtps, gen_ice(), get_channels(), get_media_profile_name(), get_setup(), switch_media_handle_s::ianacodes, switch_codec_implementation::iananame, payload_map_s::iananame, switch_rtp_engine_s::ice_out, ice_out(), key, 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, switch_core_session::media_handle, memset(), switch_codec_implementation::microseconds_per_packet, switch_media_handle_s::mparams, switch_media_handle_s::msid, payload_map_s::negotiated, payload_map_s::next, switch_core_media_params_s::num_codecs, switch_media_handle_s::num_rates, switch_codec_implementation::number_of_channels, switch_rtp_engine_s::payload_map, payload_map_s::pt, ice_s::pwd, payload_map_s::rate, switch_media_handle_s::rates, icand_s::ready, switch_core_media_params_s::rtcp_audio_interval_msec, switch_rtp_engine_s::rtcp_mux, switch_codec_implementation::samples_per_second, SCMF_SUPPRESS_CNG, SDP_ANSWER, switch_media_handle_s::sdp_mutex, switch_rtp_engine_s::ssec, switch_rtp_engine_s::ssrc, dtls_fp_s::str, switch_assert, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_test_flag(), switch_channel_var_true(), SWITCH_CODEC_TYPE_AUDIO, switch_event_get_header, switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, switch_mutex_lock(), switch_mutex_unlock(), switch_snprintf(), switch_stun_random_string(), switch_core_media_params_s::te, icand_s::transport, switch_srtp_crypto_suite_s::type, dtls_fp_s::type, ice_s::ufrag, and zstr.
Referenced by switch_core_media_gen_local_sdp().
|
static |
Definition at line 358 of file switch_core_media.c.
References switch_core_get_variable(), switch_true(), and zstr.
Referenced by generate_m(), and switch_core_media_gen_local_sdp().
|
static |
Definition at line 9705 of file switch_core_media.c.
References AVP_NO_SECURE, AVP_SECURE, AVP_UNDEFINED, CF_AVPF, CF_AVPF_MOZ, CF_DTLS, switch_core_session::channel, switch_assert, and switch_channel_test_flag().
Referenced by generate_m(), and switch_core_media_gen_local_sdp().
|
static |
|
static |
Definition at line 2643 of file switch_core_media.c.
References buf, count, and MAX_RED_FRAMES.
Referenced by switch_core_media_read_frame().
|
static |
Definition at line 9741 of file switch_core_media.c.
References switch_rtp_engine_s::dtls_controller, switch_rtp_engine_s::new_dtls, switch_rtp_engine_s::new_ice, and SDP_OFFER.
Referenced by generate_m(), and switch_core_media_gen_local_sdp().
|
static |
Definition at line 4529 of file switch_core_media.c.
References matches::imp, MAX_MATCHES, MIN, switch_media_handle_s::mparams, and switch_core_media_params_s::num_codecs.
Referenced by switch_core_media_negotiate_sdp().
|
static |
Definition at line 3999 of file switch_core_media.c.
References switch_core_session::channel, switch_media_handle_s::mparams, switch_core_media_params_s::rtpip, switch_core_media_params_s::rtpip4, switch_core_media_params_s::rtpip6, switch_media_handle_s::session, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by check_ice().
|
static |
Definition at line 4027 of file switch_core_media.c.
References switch_media_handle_s::mparams, switch_core_media_params_s::rtpip4, switch_core_media_params_s::rtpip6, SWITCH_FALSE, and zstr.
Referenced by check_ice().
|
static |
Definition at line 4611 of file switch_core_media.c.
References SWITCH_MEDIA_FLOW_DISABLED, SWITCH_MEDIA_FLOW_INACTIVE, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_FLOW_SENDONLY, and SWITCH_MEDIA_FLOW_SENDRECV.
Referenced by switch_core_media_set_rmode(), and switch_core_media_set_smode().
|
static |
Definition at line 4573 of file switch_core_media.c.
References SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_media_set_smode().
int next_cpu | ( | void | ) |
Definition at line 7081 of file switch_core_media.c.
References core_video_globals_s::cpu_count, core_video_globals_s::cur_cpu, core_video_globals_s::mutex, SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, switch_log_printf(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by switch_core_autobind_cpu().
|
static |
Definition at line 1125 of file switch_core_media.c.
References CRYPTO_KEY_MATERIAL_LIFETIME, CRYPTO_KEY_MATERIAL_MKI, and switch_assert.
Referenced by switch_core_media_add_crypto().
|
static |
Definition at line 12437 of file switch_core_media.c.
References switch_core_media_gen_json_constraint(), and switch_separate_string().
Referenced by switch_core_media_media_params().
|
static |
|
static |
Definition at line 7103 of file switch_core_media.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, CF_ANSWERED, CF_PAUSE_BUGS, switch_core_session::channel, switch_core_session::endpoint_interface, switch_media_handle_s::engines, switch_core_session::event_hooks, switch_frame::flags, switch_endpoint_interface::io_routines, switch_core_session::media_handle, switch_media_bug::native_write_frame, switch_io_event_hook_write_frame::next, switch_media_bug::next, switch_media_bug::ready, SFF_NOT_AUDIO, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PAUSE, SMBF_PRUNE, SMBF_TAP_NATIVE_WRITE, switch_media_bug::stop_time, SWITCH_ABC_TYPE_TAP_NATIVE_WRITE, switch_assert, switch_channel_test_flag(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_epoch_time_now(), SWITCH_FALSE, switch_frame_buffer_dup(), switch_frame_buffer_push(), SWITCH_IO_FLAG_QUEUED, SWITCH_MEDIA_TYPE_AUDIO, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_media_bug::user_data, switch_rtp_engine_s::write_fb, switch_io_event_hook_write_frame::write_frame, and switch_io_routines::write_frame.
Referenced by audio_write_thread(), and switch_core_session_write_frame().
|
static |
Definition at line 4592 of file switch_core_media.c.
References SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_media_set_rmode().
|
static |
Definition at line 4562 of file switch_core_media.c.
References payload_map_s::allocated, payload_map_s::current, payload_map_s::negotiated, payload_map_s::next, and switch_rtp_engine_s::payload_map.
Referenced by switch_core_media_negotiate_sdp(), and switch_core_media_reset_t38().
|
inlinestatic |
Definition at line 342 of file switch_core_media.c.
References SWITCH_MEDIA_FLOW_INACTIVE, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_FLOW_SENDONLY, and SWITCH_MEDIA_FLOW_SENDRECV.
Referenced by switch_core_media_negotiate_sdp().
|
static |
Definition at line 1857 of file switch_core_media.c.
References add_stat, add_stat_double, switch_rtp_numbers_t::burstrate, switch_rtp_numbers_t::cng_packet_count, switch_rtp_numbers_t::dtmf_packet_count, switch_rtp_numbers_t::flaws, switch_rtp_numbers_t::flush_packet_count, switch_rtp_stats_t::inbound, switch_rtp_numbers_t::jb_packet_count, switch_rtp_numbers_t::largest_jb_size, switch_rtp_numbers_t::lossrate, switch_rtp_numbers_t::max_variance, switch_rtp_numbers_t::mean_interval, switch_rtp_numbers_t::media_bytes, switch_rtp_numbers_t::media_packet_count, switch_rtp_numbers_t::min_variance, switch_rtp_numbers_t::mos, switch_rtcp_numbers_t::octet_count, switch_rtp_stats_t::outbound, switch_rtp_numbers_t::packet_count, switch_rtcp_numbers_t::packet_count, switch_rtp_numbers_t::R, switch_rtp_numbers_t::raw_bytes, switch_rtp_stats_t::rtcp, switch_rtp_numbers_t::skip_packet_count, switch_rtp_numbers_t::std_deviation, switch_core_media_get_stats(), switch_core_session_get_channel(), and switch_rtp_numbers_t::variance.
Referenced by switch_core_media_set_stats().
|
static |
Definition at line 11792 of file switch_core_media.c.
References switch_media_handle_s::rej_idx, switch_media_handle_s::rejected_streams, SWITCH_FALSE, and SWITCH_TRUE.
Referenced by switch_core_media_set_udptl_image_sdp().
void switch_core_autobind_cpu | ( | void | ) |
Definition at line 7096 of file switch_core_media.c.
References core_video_globals_s::cpu_count, next_cpu(), and switch_core_thread_set_cpu_affinity().
Referenced by video_helper_thread().
void switch_core_media_absorb_sdp | ( | switch_core_session_t * | session | ) |
Definition at line 11745 of file switch_core_media.c.
References switch_core_session::channel, switch_media_handle_s::engines, if(), switch_core_session::media_handle, 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(), and switch_media_type2str().
switch_status_t switch_core_media_activate_rtp | ( | switch_core_session_t * | session | ) |
Definition at line 8539 of file switch_core_media.c.
References switch_rtp_engine_s::adv_sdp_ip, switch_core_media_params_s::auto_rtp_bugs, ice_s::cands, CF_AVPF, CF_FS_RTP, CF_HAS_TEXT, CF_PASS_RFC2833, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_REINVITE, CF_SECURE, CF_TEXT_POSSIBLE, CF_VIDEO, CF_VIDEO_POSSIBLE, CF_WANT_DTLSv1_2, switch_core_session::channel, check_dtls_reinvite(), check_jb(), check_media_timeout_params(), 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_GOOGLE_JINGLE, switch_rtp_engine_s::ice_in, switch_rtp_engine_s::ice_out, 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_text_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, switch_core_session::media_handle, 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, payload_map_s::pt, 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_text_interval_msec, 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_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_clear_flag(), switch_channel_direction(), switch_channel_down, switch_channel_execute_on(), 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_channel_var_true(), switch_core_media_check_video_codecs(), switch_core_media_choose_port(), switch_core_media_parse_media_flags(), 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_recovery_track(), switch_core_session_apply_crypto(), switch_core_session_get_channel(), switch_core_session_get_pool(), switch_core_session_start_text_thread(), switch_core_session_start_video_thread(), switch_determine_ice_type(), SWITCH_FALSE, SWITCH_LOCAL_MEDIA_IP_VARIABLE, SWITCH_LOCAL_MEDIA_PORT_VARIABLE, SWITCH_LOCAL_TEXT_IP_VARIABLE, SWITCH_LOCAL_TEXT_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_LOG_WARNING, switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, 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_AUDIO_FIRE_SEND_RTCP_EVENT, 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_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_TEXT, SWITCH_RTP_FLAG_TMMBR, SWITCH_RTP_FLAG_USE_TIMER, SWITCH_RTP_FLAG_VIDEO, SWITCH_RTP_FLAG_VIDEO_FIRE_SEND_RTCP_EVENT, 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_set_video_buffer_size(), switch_rtp_text_factory_create(), 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, TEXT_TIMER_MS, TEXT_TIMER_SAMPLES, switch_rtp_engine_s::tf, 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 check_stream_changes(), switch_core_media_patch_sdp(), switch_core_media_recover_session(), and switch_media_type2str().
switch_status_t switch_core_media_add_crypto | ( | switch_core_session_t * | session, |
switch_secure_settings_t * | ssec, | ||
switch_rtp_crypto_direction_t | direction | ||
) |
Definition at line 1241 of file switch_core_media.c.
References CRYPTO_INVALID, CRYPTO_KEY_MATERIAL_LIFETIME, CRYPTO_KEY_MATERIAL_MKI, CRYPTO_KEY_PARAM_METHOD_INLINE, key, switch_srtp_crypto_suite_s::keysalt_len, switch_crypto_key_material_s::lifetime, secure_settings_s::local_crypto_key, secure_settings_s::local_key_material_n, secure_settings_s::local_key_material_next, secure_settings_s::local_raw_key, switch_crypto_key_material_s::method, switch_crypto_key_material_s::mki_id, switch_crypto_key_material_s::mki_size, parse_lifetime_mki(), secure_settings_s::remote_crypto_key, secure_settings_s::remote_key_material_n, secure_settings_s::remote_key_material_next, secure_settings_s::remote_raw_key, switch_b64_decode(), SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_core_media_crypto_append_key_material(), switch_core_media_crypto_find_key_material_candidate_end(), switch_core_media_crypto_str2type(), SWITCH_CRYPTO_MKI_MAX, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_RTP_CRYPTO_SEND, SWITCH_RTP_CRYPTO_SEND_RTCP, SWITCH_RTP_MAX_CRYPTO_LEN, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_strip_spaces(), and zstr.
Referenced by switch_core_media_recover_session(), switch_core_session_apply_crypto(), switch_core_session_check_incoming_crypto(), and switch_media_type2str().
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 3875 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_core_session::media_handle, switch_assert, switch_core_session_strdup, SWITCH_MAX_CAND_ACL, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_media_type2str().
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 687 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, switch_core_session::media_handle, payload_map_s::modname, payload_map_s::negotiated, payload_map_s::next, switch_rtp_engine_s::payload_map, switch_rtp_engine_s::pmap_tail, switch_core_session::pool, 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, SDP_ANSWER, switch_media_handle_s::sdp_mutex, SDP_OFFER, payload_map_s::sdp_type, switch_assert, SWITCH_CHANNEL_LOG, switch_ci_hashfunc_default(), switch_core_alloc, switch_core_strdup, SWITCH_LOG_DEBUG1, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, 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(), switch_core_media_set_r_sdp_codec_string(), and switch_media_type2str().
void switch_core_media_break | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 13253 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_break(), and switch_rtp_ready().
Referenced by switch_channel_queue_dtmf(), and switch_media_type2str().
|
static |
If != 0 then send crypto with alias name instead of name.
Definition at line 1034 of file switch_core_media.c.
References AES_CM_128_NULL_AUTH, switch_srtp_crypto_suite_s::alias, CF_AVPF, CF_SECURE, switch_core_session::channel, secure_settings_s::crypto_type, switch_media_handle_s::engines, key, switch_srtp_crypto_suite_s::keysalt_len, secure_settings_s::local_crypto_key, secure_settings_s::local_raw_key, switch_media_handle_s::mparams, switch_srtp_crypto_suite_s::name, switch_core_media_params_s::ndlb, secure_settings_s::remote_raw_key, switch_media_handle_s::session, SM_NDLB_DISABLE_SRTP_AUTH, switch_rtp_engine_s::ssec, switch_assert, switch_b64_encode(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_channel_set_variable_name_printf(), switch_channel_test_flag(), switch_channel_var_false(), switch_channel_var_true(), switch_core_session_get_channel(), switch_core_session_sprintf(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_NO_CRYPTO_TAG, SWITCH_RTP_CRYPTO_SEND, switch_rtp_get_random(), SWITCH_STATUS_SUCCESS, switch_true(), and type2str.
Referenced by switch_core_session_check_incoming_crypto(), and switch_core_session_check_outgoing_crypto().
switch_status_t switch_core_media_check_autoadj | ( | switch_core_session_t * | session | ) |
Definition at line 478 of file switch_core_media.c.
References CF_AVPF, switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, 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_TEXT, 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(), switch_core_media_toggle_hold(), and switch_media_type2str().
switch_bool_t switch_core_media_check_dtls | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 12572 of file switch_core_media.c.
References CF_DTLS, switch_core_session::channel, check_engine(), switch_media_handle_s::engines, switch_core_session::media_handle, 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(), text_helper_thread(), and video_helper_thread().
void switch_core_media_check_dtmf_type | ( | switch_core_session_t * | session | ) |
Definition at line 10126 of file switch_core_media.c.
References switch_core_session::channel, DTMF_2833, DTMF_INFO, DTMF_NONE, switch_core_media_params_s::dtmf_type, switch_core_session::media_handle, switch_media_handle_s::mparams, switch_assert, and switch_channel_get_variable.
Referenced by switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), and switch_media_type2str().
int switch_core_media_check_engine_function | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 7699 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_rtp_engine_s::engine_function_running, switch_media_handle_s::engines, switch_core_session::media_handle, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by audio_bridge_thread().
int switch_core_media_check_nat | ( | switch_media_handle_t * | smh, |
const char * | network_ip | ||
) |
Definition at line 8034 of file switch_core_media.c.
References switch_core_media_params_s::extsipip, switch_core_media_params_s::local_network, switch_media_handle_s::mparams, switch_assert, and switch_check_network_list_ip.
Referenced by switch_core_media_choose_port(), switch_core_media_deactivate_rtp(), and switch_media_type2str().
void switch_core_media_check_outgoing_proxy | ( | switch_core_session_t * | session, |
switch_core_session_t * | o_session | ||
) |
Definition at line 13967 of file switch_core_media.c.
References CF_HAS_TEXT, CF_PROXY_MEDIA, CF_TEXT_POSSIBLE, CF_VIDEO, CF_VIDEO_POSSIBLE, switch_core_session::channel, clear_pmaps(), switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_core_session::media_handle, SDP_ANSWER, 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_TEXT, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_R_SDP_VARIABLE, switch_stristr(), and SWITCH_TRUE.
Referenced by switch_media_type2str().
switch_bool_t switch_core_media_check_udptl_mode | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 13417 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_FALSE, SWITCH_RTP_FLAG_UDPTL, switch_rtp_ready(), switch_rtp_test_flag(), and SWITCH_TRUE.
Referenced by switch_media_type2str().
void switch_core_media_check_video_codecs | ( | switch_core_session_t * | session | ) |
Definition at line 3897 of file switch_core_media.c.
References CF_NOVIDEO, CF_VIDEO_POSSIBLE, switch_core_session::channel, switch_codec_implementation::codec_type, switch_media_handle_s::codecs, switch_core_session::media_handle, 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(), switch_core_media_receive_message(), and switch_media_type2str().
switch_status_t switch_core_media_choose_port | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
int | force | ||
) |
Definition at line 8146 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_core_session::channel, 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_core_session::media_handle, 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_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_TEXT_IP_VARIABLE, SWITCH_LOCAL_TEXT_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_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, 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(), switch_core_media_negotiate_sdp(), switch_core_media_patch_sdp(), and switch_media_type2str().
switch_status_t switch_core_media_choose_ports | ( | switch_core_session_t * | session, |
switch_bool_t | audio, | ||
switch_bool_t | video | ||
) |
Definition at line 8258 of file switch_core_media.c.
References CF_VIDEO_POSSIBLE, switch_core_session::channel, switch_core_session::media_handle, 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.
Referenced by switch_media_type2str().
void switch_core_media_clear_ice | ( | switch_core_session_t * | session | ) |
Definition at line 3810 of file switch_core_media.c.
References clear_ice(), SWITCH_MEDIA_TYPE_AUDIO, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_media_type2str().
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 13351 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_clear_flag(), and switch_rtp_ready().
Referenced by switch_media_type2str().
switch_status_t switch_core_media_codec_chosen | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 13859 of file switch_core_media.c.
References switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, payload_map_s::iananame, switch_core_session::media_handle, switch_assert, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_media_type2str().
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 14578 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::read_codec, switch_assert, switch_channel_test_flag(), switch_core_codec_control(), switch_core_codec_ready(), SWITCH_IO_READ, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_STATUS_FALSE, SWITCH_STATUS_NOTIMPL, and switch_rtp_engine_s::write_codec.
Referenced by packet_vad(), process_rtcp_report(), switch_core_session_video_reinit(), and switch_media_type2str().
switch_bool_t switch_core_media_codec_get_cap | ( | switch_core_session_t * | session, |
switch_media_type_t | mtype, | ||
switch_codec_flag_t | flag | ||
) |
Definition at line 14626 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_assert, switch_core_codec_ready(), SWITCH_FALSE, switch_test_flag, SWITCH_TRUE, and switch_rtp_engine_s::write_codec.
Referenced by rtcp_stats_init(), and switch_media_type2str().
void switch_core_media_copy_t38_options | ( | switch_t38_options_t * | t38_options, |
switch_core_session_t * | session | ||
) |
Definition at line 3399 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(), switch_core_media_process_t38_passthru(), and switch_media_type2str().
|
static |
Definition at line 1191 of file switch_core_media.c.
References switch_crypto_key_material_s::crypto_key, switch_crypto_key_material_s::lifetime, switch_crypto_key_material_s::method, switch_crypto_key_material_s::mki_id, switch_crypto_key_material_s::mki_size, switch_crypto_key_material_s::next, switch_crypto_key_material_s::raw_key, switch_core_session_alloc, and switch_core_session_strdup.
Referenced by switch_core_media_add_crypto().
|
static |
Definition at line 1226 of file switch_core_media.c.
References switch_assert.
Referenced by switch_core_media_add_crypto().
int switch_core_media_crypto_keysalt_len | ( | switch_rtp_crypto_key_type_t | type | ) |
Definition at line 326 of file switch_core_media.c.
References CRYPTO_INVALID, switch_srtp_crypto_suite_s::keysalt_len, and switch_assert.
Referenced by switch_media_type2str(), and switch_rtp_add_crypto_key().
int switch_core_media_crypto_salt_len | ( | switch_rtp_crypto_key_type_t | type | ) |
Definition at line 332 of file switch_core_media.c.
References CRYPTO_INVALID, switch_srtp_crypto_suite_s::salt_len, and switch_assert.
Referenced by switch_media_type2str().
switch_rtp_crypto_key_type_t switch_core_media_crypto_str2type | ( | const char * | str | ) |
Definition at line 305 of file switch_core_media.c.
References CRYPTO_INVALID, name, and switch_srtp_crypto_suite_s::type.
Referenced by switch_core_media_add_crypto(), switch_core_session_get_recovery_crypto_key(), and switch_media_type2str().
const char* switch_core_media_crypto_type2str | ( | switch_rtp_crypto_key_type_t | type | ) |
Definition at line 319 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(), and switch_media_type2str().
void switch_core_media_deactivate_rtp | ( | switch_core_session_t * | session | ) |
Definition at line 8291 of file switch_core_media.c.
References CF_VIDEO_PASSIVE, switch_core_session::channel, switch_media_handle_s::control_mutex, switch_media_handle_s::engines, switch_rtp_engine_s::local_sdp_port, switch_core_session::media_handle, 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_frame_buffer_push(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_unlock(), switch_nat_del_mapping(), SWITCH_NAT_UDP, switch_rtp_destroy(), switch_rtp_release_port(), switch_rtp_text_factory_destroy(), switch_thread_join(), switch_rtp_engine_s::tf, media_helper::up, switch_rtp_engine_s::write_fb, and zstr.
Referenced by switch_media_handle_destroy(), and switch_media_type2str().
void switch_core_media_deinit | ( | void | ) |
Definition at line 14238 of file switch_core_media.c.
References core_video_globals_s::pool, and switch_core_destroy_memory_pool.
Referenced by switch_core_destroy(), and switch_media_type2str().
void switch_core_media_end_engine_function | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 7718 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_rtp_engine_s::engine_function_running, switch_media_handle_s::engines, switch_core_session::media_handle, switch_mutex_lock(), switch_mutex_unlock(), and switch_yield.
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 8044 of file switch_core_media.c.
References switch_core_session::media_handle, switch_media_handle_s::mparams, core_video_globals_s::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(), and switch_media_type2str().
switch_t38_options_t* switch_core_media_extract_t38_options | ( | switch_core_session_t * | session, |
const char * | r_sdp | ||
) |
Definition at line 538 of file switch_core_media.c.
References switch_core_media_process_udptl().
Referenced by switch_media_type2str().
char* switch_core_media_filter_sdp | ( | const char * | sdp_str, |
const char * | cmd, | ||
const char * | arg | ||
) |
Definition at line 14305 of file switch_core_media.c.
References end_of_p, find_pt(), number, payload_number(), and switch_is_leading_number().
Referenced by switch_core_media_process_sdp_filter(), and switch_media_type2str().
cJSON* switch_core_media_gen_json_constraint | ( | float | min, |
float | ideal, | ||
float | max | ||
) |
Definition at line 12412 of file switch_core_media.c.
Referenced by parse_val(), and switch_media_type2str().
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 10246 of file switch_core_media.c.
References switch_msrp_session_s::active, 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::allocated, AVP_UNDEFINED, buf, switch_msrp_session_s::call_id, ice_s::cands, CC_MSRP, CC_RTP_RTT, CF_3PCC, CF_ANSWERED, CF_AVPF, CF_DROP_DTMF, CF_DTLS, CF_DTLS_OK, CF_HAS_TEXT, CF_ICE, CF_IMAGE_SDP, CF_LIBERAL_DTMF, CF_MSRP, CF_MSRPS, CF_NOSDP_REINVITE, CF_NOVIDEO, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_PROXY_OFF, CF_RECOVERING, CF_RTT, CF_SECURE, CF_TEXT_LINE_BASED, CF_TEXT_POSSIBLE, CF_TEXT_SDP_RECVD, CF_VERBOSE_SDP, CF_VIDEO_POSSIBLE, CF_VIDEO_SDP_RECVD, CF_WANT_MSRP, CF_WANT_MSRPS, CF_WANT_RTT, switch_core_session::channel, check_stream_changes(), 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_core_media_params_s::extsipip, switch_rtp_engine_s::fir, switch_media_handle_s::fmtp, 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, switch_msrp_session_s::local_accept_types, switch_msrp_session_s::local_accept_wrapped_types, secure_settings_s::local_crypto_key, switch_rtp_engine_s::local_dtls_fingerprint, switch_msrp_session_s::local_path, switch_msrp_session_s::local_port, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, switch_core_session::media_handle, memset(), switch_codec_implementation::microseconds_per_packet, switch_codec_implementation::modname, switch_media_handle_s::mparams, switch_media_handle_s::msid, switch_media_handle_s::msrp_session, 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_rtp_engine_s::payload_map, 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::red_pt, switch_rtp_engine_s::reject_avp, switch_msrp_session_s::remote_path, 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_text_interval_msec, switch_core_media_params_s::rtcp_video_interval_msec, switch_codec_implementation::samples_per_second, SCMF_MULTI_ANSWER_AUDIO, SCMF_MULTI_ANSWER_VIDEO, SCMF_RECV_SDP, SCMF_SUPPRESS_CNG, SDP_ANSWER, switch_media_handle_s::sdp_mutex, SDP_OFFER, switch_core_media_params_s::sdp_username, SDPBUFLEN, switch_msrp_session_s::secure, 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_variable, switch_channel_get_variable_dup(), SWITCH_CHANNEL_LOG, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_cap(), switch_channel_test_flag(), switch_channel_var_true(), 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_set_local_sdp(), switch_core_media_set_smode(), 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_get_pool(), switch_core_session_get_uuid(), switch_core_session_parse_crypto_prefs(), switch_core_session_remote_media_flow(), switch_core_session_rwunlock(), switch_core_session_sprintf(), switch_core_session_start_text_thread(), switch_core_session_strdup, switch_epoch_time_now(), switch_event_destroy(), switch_event_get_header, SWITCH_FALSE, switch_false(), SWITCH_LOG_CRIT, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MAX_CODECS, SWITCH_MEDIA_FLOW_DISABLED, SWITCH_MEDIA_FLOW_INACTIVE, 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_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_msrp_session_new(), 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_VA_NONE, switch_zmalloc, switch_rtp_engine_s::t140_pt, 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, payload_map_s::type, ice_s::ufrag, and zstr.
Referenced by switch_core_media_receive_message(), switch_core_media_recover_session(), and switch_media_type2str().
switch_codec_t* switch_core_media_get_codec | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 16487 of file switch_core_media.c.
References switch_rtp_engine_s::read_codec, and switch_core_media_get_engine().
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_session::channel, switch_core_media_params_s::inbound_codec_string, switch_core_session::media_handle, 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_merge_sdp_codec_string(), switch_core_media_prepare_codecs(), switch_core_media_set_sdp_codec_string(), and switch_media_type2str().
switch_rtp_engine_t* switch_core_media_get_engine | ( | switch_core_session_t * | session, |
int | media_type | ||
) |
Definition at line 16480 of file switch_core_media.c.
References switch_media_handle_s::engines, and switch_core_session::media_handle.
Referenced by switch_core_media_get_codec().
switch_jb_t* switch_core_media_get_jb | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 13453 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_get_jitter_buffer(), and switch_rtp_ready().
Referenced by switch_media_type2str().
float switch_core_media_get_media_bw_mult | ( | switch_core_session_t * | session | ) |
Definition at line 12658 of file switch_core_media.c.
References switch_rtp_engine_s::bw_mult, switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_channel_down, and SWITCH_MEDIA_TYPE_VIDEO.
switch_core_media_params_t* switch_core_media_get_mparams | ( | switch_media_handle_t * | smh | ) |
Definition at line 2233 of file switch_core_media.c.
References switch_media_handle_s::mparams, and switch_assert.
Referenced by switch_media_type2str().
switch_msrp_session_t* switch_core_media_get_msrp_session | ( | switch_core_session_t * | session | ) |
Definition at line 15831 of file switch_core_media.c.
References switch_core_session::media_handle, and switch_media_handle_s::msrp_session.
Referenced by msrp_worker(), SWITCH_STANDARD_API(), and SWITCH_STANDARD_APP().
switch_status_t switch_core_media_get_offered_pt | ( | switch_core_session_t * | session, |
const switch_codec_implementation_t * | mimp, | ||
switch_payload_t * | pt | ||
) |
Definition at line 3428 of file switch_core_media.c.
References switch_codec_implementation::actual_samples_per_second, switch_media_handle_s::codecs, switch_media_handle_s::ianacodes, switch_codec_implementation::iananame, switch_core_session::media_handle, switch_media_handle_s::mparams, switch_core_media_params_s::num_codecs, switch_assert, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_negotiate_sdp().
uint32_t switch_core_media_get_orig_bitrate | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 12609 of file switch_core_media.c.
References switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::orig_bitrate, and switch_channel_down.
switch_rtp_t* switch_core_media_get_rtp_session | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 1495 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, and switch_assert.
Referenced by read_bundle_rtp_packet(), rtp_common_write(), and switch_media_type2str().
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 13399 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, 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(), switch_ivr_set_xml_call_stats(), and switch_media_type2str().
switch_timer_t* switch_core_media_get_timer | ( | switch_core_session_t * | session, |
switch_media_type_t | mtype | ||
) |
Definition at line 14508 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, 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 521 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_core_session::media_handle, switch_assert, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_media_handle_s::vid_params.
Referenced by switch_core_session_write_video_frame(), and switch_ivr_record_file_event().
switch_file_handle_t* switch_core_media_get_video_file | ( | switch_core_session_t * | session, |
switch_rw_t | rw | ||
) |
Definition at line 6654 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_core_session::media_handle, 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 368 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, core_video_globals_s::fps, switch_vid_params_s::fps, switch_core_session::media_handle, 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 switch_core_media_read_frame(), and switch_media_type2str().
void switch_core_media_hard_mute | ( | switch_core_session_t * | session, |
switch_bool_t | on | ||
) |
Definition at line 12401 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(), and switch_media_type2str().
switch_bool_t switch_core_media_has_resolveice | ( | void | ) |
Definition at line 299 of file switch_core_media.c.
References ice_resolve_candidate.
Referenced by check_ice().
void switch_core_media_init | ( | void | ) |
Definition at line 14224 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_check_dtls_pem(), switch_core_cpu_count(), switch_core_gen_certs(), switch_core_new_memory_pool, switch_mutex_init(), SWITCH_MUTEX_NESTED, and SWITCH_TRUE.
Referenced by switch_core_init(), and switch_media_type2str().
void switch_core_media_kill_socket | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 13269 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_kill_socket(), and switch_rtp_ready().
Referenced by switch_media_type2str().
switch_status_t switch_core_media_lock_video_file | ( | switch_core_session_t * | session, |
switch_rw_t | rw | ||
) |
Definition at line 6913 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_core_session::media_handle, 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_event().
switch_status_t switch_core_media_media_params | ( | switch_core_session_t * | session, |
const char * | json | ||
) |
Definition at line 12460 of file switch_core_media.c.
References CF_MANUAL_MEDIA_PARAMS, switch_core_session::channel, core_video_globals_s::fps, switch_core_session_message::from, switch_core_session_message::message_id, name, parse_val(), switch_core_session_message::string_arg, switch_channel_test_flag(), switch_core_session_receive_message, SWITCH_MESSAGE_INDICATE_MEDIA_PARAMS, switch_safe_free, switch_separate_string(), SWITCH_STATUS_INUSE, SWITCH_STATUS_SUCCESS, and switch_stristr().
Referenced by switch_media_type2str().
void switch_core_media_merge_sdp_codec_string | ( | switch_core_session_t * | session, |
const char * | r_sdp, | ||
switch_sdp_type_t | sdp_type, | ||
const char * | codec_string | ||
) |
Definition at line 13477 of file switch_core_media.c.
References switch_core_session::media_handle, switch_assert, SWITCH_CHANNEL_SESSION_LOG, switch_core_media_get_codec_string(), switch_core_media_set_r_sdp_codec_string(), switch_log_printf(), SWITCH_LOG_WARNING, and zstr.
Referenced by check_stream_changes(), switch_core_media_set_sdp_codec_string(), and switch_media_type2str().
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 4787 of file switch_core_media.c.
References switch_msrp_session_s::active, 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::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, switch_msrp_session_s::call_id, CF_ANSWERED, CF_APP_T38, CF_APP_T38_NEGOTIATED, CF_APP_T38_POSSIBLE, CF_AUDIO, CF_AUDIO_PAUSE_READ, CF_AUDIO_PAUSE_WRITE, CF_AVPF_MOZ, CF_DTLS, CF_DTLS_OK, CF_HAS_TEXT, CF_IMAGE_SDP, CF_LIBERAL_DTMF, CF_MSRP, CF_MSRPS, CF_NOVIDEO, CF_PROXY_MEDIA, CF_PROXY_MODE, CF_REINVITE, CF_RTT, CF_T38_PASSTHRU, CF_TEXT_LINE_BASED, CF_TEXT_POSSIBLE, CF_TEXT_SDP_RECVD, CF_VIDEO, CF_VIDEO_POSSIBLE, CF_VIDEO_READY, CF_VIDEO_SDP_RECVD, switch_core_session::channel, payload_map_s::channels, check_ice(), check_stream_changes(), 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_media_handle_s::fmtps, 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, ip, switch_msrp_session_s::local_accept_types, switch_msrp_session_s::local_accept_wrapped_types, switch_msrp_session_s::local_path, switch_msrp_session_s::local_port, switch_rtp_engine_s::local_sdp_port, switch_msrp_session_s::local_setup, matches::map, MAX_FMTP_LEN, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, switch_codec_fmtp::max_ptime, MAX_REJ_STREAMS, switch_core_session::media_handle, switch_rtp_engine_s::media_hold_timeout, switch_rtp_engine_s::media_timeout, 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_media_handle_s::msrp_session, 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::payload_map, 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_media_handle_s::rej_idx, switch_rtp_engine_s::reject_avp, switch_media_handle_s::rejected_streams, switch_msrp_session_s::remote_accept_types, switch_msrp_session_s::remote_accept_wrapped_types, switch_msrp_session_s::remote_file_selector, switch_t38_options_t::remote_ip, switch_msrp_session_s::remote_path, 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_msrp_session_s::remote_setup, switch_rtp_engine_s::reset_codec, restore_pmaps(), 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, 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_RECV_SDP, SCMF_SUPPRESS_CNG, SDP_ANSWER, switch_rtp_engine_s::sdp_bw, sdp_media_flow(), switch_media_handle_s::sdp_mutex, SDP_OFFER, switch_msrp_session_s::secure, switch_media_handle_s::session, 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_execute_on(), switch_channel_get_name(), switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_get_variable_partner(), switch_channel_hangup, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_app_flag_key(), switch_channel_set_flag, switch_channel_set_variable, switch_channel_set_variable_printf(), switch_channel_test_app_flag_key(), switch_channel_test_flag(), switch_channel_var_true(), switch_channel_wait_for_app_flag(), SWITCH_CODEC_TYPE_AUDIO, SWITCH_CODEC_TYPE_VIDEO, switch_core_codec_parse_fmtp(), switch_core_codec_ready(), switch_core_max_audio_channels(), switch_core_media_add_payload_map(), switch_core_media_check_autoadj(), switch_core_media_check_dtmf_type(), switch_core_media_check_video_codecs(), switch_core_media_choose_port(), switch_core_media_copy_t38_options(), switch_core_media_get_offered_pt(), switch_core_media_prepare_codecs(), switch_core_media_process_udptl(), switch_core_media_set_codec(), switch_core_media_set_rmode(), switch_core_media_set_smode(), 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_get_pool(), switch_core_session_get_uuid(), switch_core_session_parse_crypto_prefs(), switch_core_session_queue_message(), switch_core_session_rwunlock(), switch_core_session_set_ice(), switch_core_session_sprintf(), switch_core_session_start_text_thread(), 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_NOTICE, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MAX_CODECS, SWITCH_MEDIA_FLOW_DISABLED, SWITCH_MEDIA_FLOW_INACTIVE, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_FLOW_SENDONLY, SWITCH_MEDIA_FLOW_SENDRECV, switch_media_handle_set_media_flag(), switch_media_handle_test_media_flag(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_MESSAGE_INDICATE_REQUEST_IMAGE_MEDIA, switch_mprintf(), switch_msrp_listen_ip(), switch_msrp_session_new(), switch_msrp_start_client(), 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_clear_flag(), SWITCH_RTP_FLAG_FIR, SWITCH_RTP_FLAG_NACK, SWITCH_RTP_FLAG_PLI, SWITCH_RTP_FLAG_TMMBR, 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_flag(), switch_rtp_set_max_missed_packets(), switch_rtp_set_media_timeout(), switch_rtp_set_remote_address(), switch_rtp_set_telephony_event(), switch_rtp_set_telephony_recv_event(), switch_safe_free, switch_separate_string(), switch_snprintf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_str_nil, 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.
Referenced by check_stream_changes(), and switch_media_type2str().
void switch_core_media_parse_media_flags | ( | switch_core_session_t * | session | ) |
Definition at line 7757 of file switch_core_media.c.
References switch_core_session::channel, switch_core_session::media_handle, SCMF_AUTOFIX_TIMING, switch_channel_get_variable, switch_media_handle_clear_media_flag(), switch_media_handle_set_media_flag(), and switch_true().
Referenced by switch_core_media_activate_rtp(), and switch_media_type2str().
void switch_core_media_parse_rtp_bugs | ( | switch_rtp_bug_flag_t * | flag_pole, |
const char * | str | ||
) |
Definition at line 919 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(), and switch_media_type2str().
void switch_core_media_patch_sdp | ( | switch_core_session_t * | session | ) |
Definition at line 11960 of file switch_core_media.c.
References switch_rtp_engine_s::adv_sdp_ip, switch_rtp_engine_s::adv_sdp_port, CF_ANSWERED, CF_AUDIO, CF_REINVITE, CF_TEXT_POSSIBLE, CF_VIDEO_POSSIBLE, switch_core_session::channel, 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_core_session::media_handle, switch_media_handle_s::mparams, switch_core_media_params_s::ndlb, switch_media_handle_s::owner_id, switch_rtp_engine_s::rtp_session, SDP_ANSWER, 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_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_ready(), switch_snprintf(), SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, and zstr.
Referenced by switch_media_type2str().
void switch_core_media_pause | ( | switch_core_session_t * | session | ) |
Definition at line 3817 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_RTP_FLAG_PAUSE, and switch_rtp_set_flag().
Referenced by switch_media_type2str().
switch_status_t switch_core_media_prepare_codecs | ( | switch_core_session_t * | session, |
switch_bool_t | force | ||
) |
Definition at line 2239 of file switch_core_media.c.
References CF_ANSWERED, CF_PROXY_MEDIA, CF_PROXY_MODE, switch_core_session::channel, switch_media_handle_s::codec_order, switch_media_handle_s::codec_order_last, switch_media_handle_s::codecs, switch_media_handle_s::fmtp, switch_media_handle_s::media_flags, switch_core_session::media_handle, 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(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_true().
Referenced by switch_core_media_negotiate_sdp(), switch_core_media_receive_message(), and switch_media_type2str().
char* switch_core_media_process_sdp_filter | ( | const char * | sdp, |
const char * | cmd_buf, | ||
switch_core_session_t * | session | ||
) |
Definition at line 14457 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(), and switch_media_type2str().
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 570 of file switch_core_media.c.
References switch_core_session::channel, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_core_session::media_handle, switch_t38_options_t::remote_ip, switch_t38_options_t::remote_port, 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_execute_on(), 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.
Referenced by switch_media_type2str().
|
static |
Definition at line 411 of file switch_core_media.c.
References CF_APP_T38, switch_core_session::channel, if(), switch_t38_options_t::remote_ip, switch_t38_options_t::remote_port, switch_t38_options_t::sdp_o_line, switch_assert, switch_channel_api_on(), switch_channel_execute_on(), switch_channel_get_private(), switch_channel_set_app_flag_key(), switch_channel_set_private(), switch_channel_set_variable, switch_core_session_alloc, switch_core_session_strdup, switch_safe_atoi(), 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::T38FaxVersion, switch_t38_options_t::T38MaxBitRate, and switch_t38_options_t::T38VendorInfo.
Referenced by switch_core_media_extract_t38_options(), and switch_core_media_negotiate_sdp().
switch_status_t switch_core_media_proxy_remote_addr | ( | switch_core_session_t * | session, |
const char * | sdp_str | ||
) |
Definition at line 7777 of file switch_core_media.c.
References CF_AVPF, CF_HAS_TEXT, CF_PROXY_MODE, CF_TEXT_POSSIBLE, CF_VIDEO, CF_VIDEO_POSSIBLE, switch_core_session::channel, switch_rtp_engine_s::check_frames, switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_core_session::media_handle, 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_TEXT, 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(), and switch_media_type2str().
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 13285 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_queue_rfc2833(), switch_rtp_ready(), and SWITCH_STATUS_FALSE.
Referenced by switch_media_type2str().
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 13303 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_queue_rfc2833_in(), switch_rtp_ready(), and SWITCH_STATUS_FALSE.
Referenced by switch_media_type2str().
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 2782 of file switch_core_media.c.
References buf, switch_frame::buflen, CF_AUDIO, CF_CONFERENCE, CF_CONFERENCE_RESET_MEDIA, CF_LEG_HOLDING, CF_NOT_READY, switch_core_session::channel, switch_rtp_engine_s::check_frames, check_jb(), check_jb_sync(), check_media_timeout_params(), 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::data, switch_frame::datalen, switch_rtcp_report_block_frame::dlsr, switch_codec_implementation::encoded_bytes_per_packet, switch_media_handle_s::engines, switch_frame::flags, core_video_globals_s::fps, switch_rtcp_report_block_frame::fraction, get_rtt_payload(), get_rtt_red_seq(), 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, switch_core_session::media_handle, 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_rtp_text_factory_s::red_level, switch_rtp_engine_s::red_pt, switch_rtcp_frame::report_count, switch_rtcp_frame::reports, switch_rtp_engine_s::reset_codec, switch_rtp_engine_s::rtp_session, switch_rtcp_report_block_frame::rtt_avg, 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_PLC, SFF_PROXY_PACKET, 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_flag, 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_jb(), 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_jb_peek_frame(), SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG10, SWITCH_LOG_DEBUG3, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_trylock(), switch_mutex_unlock(), switch_rtcp_zerocopy_read_frame(), switch_rtp_dequeue_dtmf(), switch_rtp_get_jitter_buffer(), switch_rtp_has_dtmf(), SWITCH_RTP_MAX_BUF_LEN, 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_yield, core_video_globals_s::synced, switch_core_media_params_s::te, switch_rtp_text_factory_s::text_frame, switch_rtp_engine_s::tf, switch_rtcp_frame::timestamp, switch_frame::timestamp, type2str, value, switch_media_handle_s::vid_frames, and switch_media_handle_s::vid_started.
Referenced by switch_media_type2str().
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 2562 of file switch_core_media.c.
References CF_NOT_READY, switch_core_session::channel, switch_media_handle_s::engines, switch_codec::implementation, switch_media_handle_s::media_flags, switch_core_session::media_handle, 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 13321 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, and switch_rtp_ready().
Referenced by switch_core_media_recover_session(), and switch_media_type2str().
switch_status_t switch_core_media_receive_message | ( | switch_core_session_t * | session, |
switch_core_session_message_t * | msg | ||
) |
Definition at line 12722 of file switch_core_media.c.
References switch_core_session::bugs, CC_FS_RTP, CF_AUTOFLUSH_DURING_BRIDGE, CF_CONFERENCE, CF_CONFERENCE_RESET_MEDIA, CF_FS_RTP, CF_JITTERBUFFER, CF_MANUAL_VID_REFRESH, CF_NOTIMER_DURING_BRIDGE, CF_PASS_RFC2833, CF_PROXY_MODE, CF_RTP_NOTIMER_DURING_BRIDGE, CF_VIDEO_POSSIBLE, CF_VIDEO_READY, switch_core_session::channel, check_jb(), clear_pmaps(), switch_rtp_engine_s::codec_negotiated, switch_media_handle_s::engines, if(), ip, switch_rtp_engine_s::last_seq, switch_core_media_params_s::local_sdp_str, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, switch_media_handle_s::media_flags, switch_core_session::media_handle, switch_rtp_engine_s::media_hold_timeout, switch_rtp_engine_s::media_timeout, switch_core_session_message::message_id, switch_media_handle_s::mparams, switch_media_handle_s::mutex, switch_media_handle_s::num_negotiated_codecs, switch_core_session_message::numeric_arg, switch_core_session_message::numeric_reply, switch_rtp_engine_s::read_codec, rtp_flush_read_buffer(), switch_rtp_engine_s::rtp_session, SCC_CODEC_SPECIFIC, SCC_DEBUG, SCCT_INT, SCCT_NONE, SCCT_STRING, SCMF_RTP_AUTOFLUSH_DURING_BRIDGE, SDP_OFFER, SMF_JB_PAUSED, SMF_VB_PAUSED, switch_core_session_message::string_arg, switch_core_session_message::string_array_arg, 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_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, 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_HOLD, 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_UNHOLD, 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_get_jitter_buffer(), 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_set_max_missed_packets(), switch_rtp_set_media_timeout(), 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_core_session::track_duration, switch_rtp_engine_s::write_codec, and zstr.
Referenced by switch_core_session_perform_receive_message(), and switch_media_type2str().
void switch_core_media_recover_session | ( | switch_core_session_t * | session | ) |
Definition at line 14052 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, 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, switch_media_handle_s::fmtp, payload_map_s::iananame, ip, secure_settings_s::local_crypto_key, switch_rtp_engine_s::local_sdp_ip, switch_rtp_engine_s::local_sdp_port, switch_core_session::media_handle, 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, 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_OFFER, 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_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(), and switch_media_type2str().
void switch_core_media_reset_autofix | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 8125 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, switch_core_session::media_handle, and switch_assert.
Referenced by switch_media_type2str().
switch_status_t switch_core_media_reset_jb | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 12700 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, 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_reset_t38 | ( | switch_core_session_t * | session | ) |
Definition at line 6436 of file switch_core_media.c.
References CF_APP_T38, CF_APP_T38_FAIL, CF_APP_T38_REQ, CF_T38_PASSTHRU, switch_media_handle_s::engines, switch_core_session::media_handle, restore_pmaps(), switch_assert, switch_channel_clear_app_flag_key(), switch_channel_clear_flag(), switch_channel_set_app_flag_key(), switch_channel_set_private(), switch_core_session_get_channel(), and SWITCH_MEDIA_TYPE_AUDIO.
Referenced by switch_media_type2str().
void switch_core_media_resume | ( | switch_core_session_t * | session | ) |
Definition at line 3845 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_clear_flag(), and SWITCH_RTP_FLAG_PAUSE.
Referenced by switch_media_type2str().
switch_status_t switch_core_media_sdp_map | ( | const char * | r_sdp, |
switch_event_t ** | fmtp, | ||
switch_event_t ** | pt | ||
) |
Definition at line 10149 of file switch_core_media.c.
References buf, key, switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_REQUEST_PARAMS, switch_snprintf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_core_media_set_codec | ( | switch_core_session_t * | session, |
int | force, | ||
uint32_t | codec_flags | ||
) |
Definition at line 3614 of file switch_core_media.c.
References switch_codec_implementation::actual_samples_per_second, switch_codec::agreed_pt, payload_map_s::bitrate, switch_codec_implementation::bits_per_second, switch_core_session::channel, switch_frame::channels, payload_map_s::channels, switch_frame::codec, switch_core_session::codec_init_mutex, 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_core_session::media_handle, 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_execute_on(), 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_lock_full(), switch_core_codec_ready(), switch_core_codec_unlock_full(), switch_core_session_get_pool(), 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_goto_status, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_AUDIO, switch_mutex_lock(), switch_mutex_unlock(), 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(), switch_core_media_recover_session(), and switch_media_type2str().
void switch_core_media_set_local_sdp | ( | switch_core_session_t * | session, |
const char * | sdp_str, | ||
switch_bool_t | dup | ||
) |
Definition at line 10208 of file switch_core_media.c.
References switch_core_session::channel, switch_core_media_params_s::local_sdp_str, switch_core_session::media_handle, 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(), switch_core_media_set_udptl_image_sdp(), and switch_media_type2str().
void switch_core_media_set_media_bw_mult | ( | switch_core_session_t * | session, |
float | mult | ||
) |
Definition at line 12679 of file switch_core_media.c.
References switch_rtp_engine_s::bw_mult, switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_channel_down, and SWITCH_MEDIA_TYPE_VIDEO.
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 12631 of file switch_core_media.c.
References switch_rtp_engine_s::bw_mult, switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::orig_bitrate, 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.
Referenced by video_write_thread().
|
static |
Definition at line 13569 of file switch_core_media.c.
References add_audio_codec(), buf, CF_NOVIDEO, CF_WANT_MSRP, CF_WANT_MSRPS, CF_WANT_RTT, switch_core_session::channel, switch_codec_implementation::codec_type, switch_codec_implementation::ianacode, switch_codec_implementation::iananame, MAX_FMTP_LEN, switch_core_session::media_handle, switch_codec_implementation::modname, switch_media_handle_s::mparams, switch_core_media_params_s::ndlb, SM_NDLB_ALLOW_BAD_IANANAME, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CHANNEL_CHANNEL_LOG, switch_channel_direction(), switch_channel_get_variable, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_var_true(), SWITCH_CODEC_TYPE_AUDIO, SWITCH_CODEC_TYPE_VIDEO, switch_core_media_add_payload_map(), switch_core_session_get_channel(), SWITCH_FALSE, switch_loadable_module_get_codecs(), switch_loadable_module_get_codecs_sorted(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MAX_CODECS, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_safe_free, switch_separate_string(), switch_snprintf(), switch_true(), and zstr.
Referenced by switch_core_media_merge_sdp_codec_string().
void switch_core_media_set_resolveice | ( | switch_bool_t | resolve_ice | ) |
Definition at line 294 of file switch_core_media.c.
Referenced by switch_core_session_ctl(), and switch_load_core_config().
|
static |
Definition at line 4751 of file switch_core_media.c.
References CF_REINVITE, switch_core_session::channel, switch_media_handle_s::engines, media_flow_get_mode(), switch_core_session::media_handle, switch_rtp_engine_s::pass_codecs, remote_media_flow_varname(), switch_rtp_engine_s::rmode, SDP_ANSWER, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_set_variable, switch_channel_test_flag(), switch_core_media_set_smode(), switch_core_session_get_partner, switch_core_session_rwunlock(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_negotiate_sdp().
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 13335 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), and switch_rtp_set_flag().
Referenced by switch_media_type2str().
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 1486 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, and switch_rtp_engine_s::type.
Referenced by switch_media_type2str().
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 13472 of file switch_core_media.c.
References switch_core_media_get_codec_string(), and switch_core_media_merge_sdp_codec_string().
Referenced by switch_media_type2str().
void switch_core_media_set_smode | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_media_flow_t | smode, | ||
switch_sdp_type_t | sdp_type | ||
) |
Definition at line 4707 of file switch_core_media.c.
References CF_REINVITE, CF_STREAM_CHANGED, switch_core_session::channel, switch_media_handle_s::engines, media_flow_get_mode(), media_flow_varname(), switch_core_session::media_handle, switch_rtp_engine_s::pass_codecs, SDP_OFFER, switch_rtp_engine_s::smode, switch_channel_media_up, switch_channel_set_flag, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_var_true(), switch_core_session_get_partner, switch_core_session_rwunlock(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_set_rmode(), and switch_ivr_check_hold().
void switch_core_media_set_stats | ( | switch_core_session_t * | session | ) |
Definition at line 1930 of file switch_core_media.c.
References switch_core_session::media_handle, set_stats(), switch_core_media_sync_stats(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_session_hangup_state(), switch_core_standard_on_hangup(), and switch_media_type2str().
void switch_core_media_set_telephony_event | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_payload_t | te | ||
) |
Definition at line 13367 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), and switch_rtp_set_telephony_event().
Referenced by switch_media_type2str().
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 13383 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), and switch_rtp_set_telephony_recv_event().
Referenced by switch_media_type2str().
void switch_core_media_set_udptl_image_sdp | ( | switch_core_session_t * | session, |
switch_t38_options_t * | t38_options, | ||
int | insist | ||
) |
Definition at line 11806 of file switch_core_media.c.
References switch_rtp_engine_s::adv_sdp_ip, switch_rtp_engine_s::adv_sdp_port, buf, CF_IMAGE_SDP, switch_core_session::channel, switch_media_handle_s::engines, ip, switch_t38_options_t::local_ip, switch_t38_options_t::local_port, switch_core_media_params_s::local_sdp_str, switch_core_session::media_handle, 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, stream_rejected(), switch_assert, switch_channel_clear_flag(), 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, switch_true(), 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::T38FaxVersion, and switch_t38_options_t::T38MaxBitRate.
Referenced by switch_media_type2str().
switch_status_t switch_core_media_set_video_codec | ( | switch_core_session_t * | session, |
int | force | ||
) |
Definition at line 3502 of file switch_core_media.c.
References switch_codec::agreed_pt, switch_core_session::channel, switch_frame::codec, switch_core_session::codec_init_mutex, 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::media_handle, switch_core_session_message::message_id, payload_map_s::modname, payload_map_s::pt, 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_goto_status, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ, switch_mutex_lock(), switch_mutex_unlock(), 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(), switch_core_media_recover_session(), and switch_media_type2str().
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 6966 of file switch_core_media.c.
References CF_VIDEO, CF_VIDEO_DECODED_READ, CF_VIDEO_READ_FILE_ATTACHED, CF_VIDEO_WRITE_FILE_ATTACHED, switch_core_session::channel, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_core_session::media_handle, 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_request_video_refresh, 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_event().
void switch_core_media_start_engine_function | ( | switch_core_session_t * | session, |
switch_media_type_t | type, | ||
switch_engine_function_t | engine_function, | ||
void * | user_data | ||
) |
Definition at line 7671 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_rtp_engine_s::engine_function, switch_rtp_engine_s::engine_function_running, switch_rtp_engine_s::engine_user_data, switch_media_handle_s::engines, switch_core_session::media_handle, switch_core_session_start_text_thread(), switch_core_session_start_video_thread(), switch_core_session_video_reset(), SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by audio_bridge_thread(), and text_bridge_thread().
void switch_core_media_start_udptl | ( | switch_core_session_t * | session, |
switch_t38_options_t * | t38_options | ||
) |
Definition at line 12348 of file switch_core_media.c.
References CF_AVPF, CF_NOTIMER_DURING_BRIDGE, switch_core_session::channel, switch_media_handle_s::engines, switch_core_session::media_handle, switch_t38_options_t::remote_ip, switch_t38_options_t::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(), and switch_media_type2str().
void switch_core_media_sync_stats | ( | switch_core_session_t * | session | ) |
Definition at line 1901 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, and switch_rtp_sync_stats().
Referenced by switch_core_media_set_stats(), and switch_media_type2str().
int switch_core_media_toggle_hold | ( | switch_core_session_t * | session, |
int | sendonly | ||
) |
Definition at line 6461 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_core_session::channel, switch_media_handle_s::engines, switch_rtp_engine_s::max_missed_hold_packets, switch_rtp_engine_s::max_missed_packets, switch_core_session::media_handle, switch_rtp_engine_s::media_hold_timeout, switch_rtp_engine_s::media_timeout, 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_request_video_refresh, 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_rtp_set_media_timeout(), SWITCH_STATUS_SUCCESS, switch_stristr(), SWITCH_TRUE, switch_true(), and switch_yield.
Referenced by switch_core_media_negotiate_sdp(), and switch_media_type2str().
switch_status_t switch_core_media_udptl_mode | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 13435 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::rtp_session, switch_assert, switch_rtp_ready(), switch_rtp_udptl_mode(), and SWITCH_STATUS_FALSE.
Referenced by switch_media_type2str().
switch_status_t switch_core_media_unlock_video_file | ( | switch_core_session_t * | session, |
switch_rw_t | rw | ||
) |
Definition at line 6940 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, switch_media_handle_s::engines, media_helper::file_read_mutex, media_helper::file_write_mutex, switch_core_session::media_handle, 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_event().
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 3328 of file switch_core_media.c.
References switch_core_session::channel, switch_frame::datalen, switch_codec_implementation::encoded_bytes_per_packet, switch_media_handle_s::engines, switch_codec::implementation, switch_media_handle_s::media_flags, switch_core_session::media_handle, 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_core_codec_ready(), switch_core_session_media_flow(), SWITCH_MEDIA_FLOW_SENDONLY, SWITCH_MEDIA_FLOW_SENDRECV, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_ready(), switch_rtp_write_frame(), SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_self(), switch_yield, switch_rtp_engine_s::thread_write_lock, and switch_rtp_engine_s::timestamp_send.
Referenced by switch_media_type2str().
|
static |
Definition at line 1545 of file switch_core_media.c.
References CF_RECOVERING, CF_SECURE, switch_core_session::channel, secure_settings_s::crypto_tag, switch_rtp_engine_s::crypto_type, switch_media_handle_s::engines, switch_core_session::media_handle, switch_srtp_crypto_suite_s::name, secure_settings_s::remote_crypto_key, switch_rtp_engine_s::rtp_session, switch_rtp_engine_s::ssec, switch_channel_set_variable, switch_channel_test_flag(), switch_channel_var_true(), switch_core_media_add_crypto(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_add_crypto_key(), SWITCH_RTP_CRYPTO_RECV, and SWITCH_RTP_CRYPTO_SEND.
Referenced by switch_core_media_activate_rtp().
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 1670 of file switch_core_media.c.
References switch_srtp_crypto_suite_s::alias, b, 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, switch_rtp_engine_s::crypto_type, switch_media_handle_s::engines, secure_settings_s::local_crypto_key, switch_core_session::media_handle, switch_srtp_crypto_suite_s::name, name, secure_settings_s::remote_crypto_key, switch_rtp_engine_s::rtp_session, SDP_OFFER, 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_TEXT, 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(), and switch_media_type2str().
void switch_core_session_check_outgoing_crypto | ( | switch_core_session_t * | session | ) |
Definition at line 1810 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_MANDATORY, CRYPTO_MODE_OPTIONAL, switch_media_handle_s::crypto_suite_order, switch_core_session::media_handle, 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_TEXT, SWITCH_MEDIA_TYPE_VIDEO, SWITCH_NO_CRYPTO_TAG, SWITCH_RTP_CRYPTO_SEND, and SWITCH_STATUS_SUCCESS.
Referenced by check_stream_changes(), switch_core_media_gen_local_sdp(), and switch_media_type2str().
void switch_core_session_clear_crypto | ( | switch_core_session_t * | session | ) |
Definition at line 873 of file switch_core_media.c.
References switch_core_session::channel, CRYPTO_INVALID, switch_media_handle_s::engines, switch_core_session::media_handle, memset(), switch_rtp_engine_s::ssec, switch_channel_set_variable, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_media_type2str().
switch_status_t switch_core_session_clear_media_handle | ( | switch_core_session_t * | session | ) |
Definition at line 2224 of file switch_core_media.c.
References switch_core_session::media_handle, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_media_type2str().
switch_media_handle_t* switch_core_session_get_media_handle | ( | switch_core_session_t * | session | ) |
Definition at line 2215 of file switch_core_media.c.
References switch_core_session::media_handle, switch_core_session_media_handle_ready(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_media_type2str().
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, | ||
const char * | fmtp_in, | ||
switch_payload_t * | ptP, | ||
switch_payload_t * | recv_ptP, | ||
char ** | fmtpP | ||
) |
Definition at line 623 of file switch_core_media.c.
References payload_map_s::allocated, switch_media_handle_s::engines, payload_map_s::iananame, switch_core_session::media_handle, 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(), and switch_media_type2str().
|
static |
Definition at line 1502 of file switch_core_media.c.
References CF_SECURE, switch_core_session::channel, secure_settings_s::crypto_tag, switch_rtp_engine_s::crypto_type, switch_media_handle_s::engines, switch_core_session::media_handle, secure_settings_s::remote_crypto_key, switch_rtp_engine_s::ssec, switch_channel_get_variable, switch_channel_set_flag, switch_core_media_crypto_str2type(), switch_core_session_strdup, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, and SWITCH_MEDIA_TYPE_VIDEO.
Referenced by switch_core_media_recover_session().
uint8_t switch_core_session_get_rtp_pt | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 2197 of file switch_core_media.c.
References switch_rtp_engine_s::cur_payload_map, switch_media_handle_s::engines, switch_core_session::media_handle, and payload_map_s::pt.
Referenced by read_rtp_packet(), and switch_media_type2str().
switch_rtp_t* switch_core_session_get_rtp_session | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 2206 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, and switch_rtp_engine_s::rtp_session.
Referenced by switch_media_type2str().
switch_bool_t switch_core_session_in_video_thread | ( | switch_core_session_t * | session | ) |
Definition at line 7740 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, 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 908 of file switch_core_media.c.
References switch_rtp_engine_s::crypto_type, switch_media_handle_s::engines, secure_settings_s::local_crypto_key, switch_core_session::media_handle, and switch_rtp_engine_s::ssec.
Referenced by switch_media_type2str().
switch_media_flow_t switch_core_session_media_flow | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 2137 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_media_handle_s::media_flags, switch_core_session::media_handle, SCMF_RUNNING, switch_rtp_engine_s::smode, switch_assert, and SWITCH_MEDIA_FLOW_SENDRECV.
Referenced by check_rtcp_and_ice(), process_rtcp_report(), switch_core_media_write_frame(), switch_core_session_write_encoded_video_frame(), switch_core_session_write_text_frame(), switch_core_session_write_video_frame(), and switch_ivr_check_hold().
switch_status_t switch_core_session_media_handle_ready | ( | switch_core_session_t * | session | ) |
Definition at line 2186 of file switch_core_media.c.
References switch_core_session::media_handle, SMF_INIT, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by switch_core_session_check_outgoing_crypto(), switch_core_session_get_media_handle(), and switch_media_type2str().
|
static |
Definition at line 3455 of file switch_core_media.c.
References switch_video_codec_settings::bandwidth, switch_core_session::channel, switch_rtp_engine_s::codec_settings, switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::sdp_bw, switch_assert, switch_channel_get_variable, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_parse_bandwidth_string(), switch_true(), switch_video_codec_settings::try_hardware_encoder, and switch_codec_settings::video.
Referenced by switch_core_media_set_codec(), and switch_core_media_set_video_codec().
|
static |
Definition at line 1589 of file switch_core_media.c.
References CF_AVPF, CF_RECOVERING, switch_core_session::channel, CRYPTO_INVALID, switch_media_handle_s::crypto_mode, CRYPTO_MODE_FORBIDDEN, CRYPTO_MODE_MANDATORY, CRYPTO_MODE_OPTIONAL, switch_media_handle_s::crypto_suite_order, switch_core_session::media_handle, name, SWITCH_CALL_DIRECTION_INBOUND, switch_channel_direction(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_false(), switch_log_printf(), SWITCH_LOG_WARNING, switch_split, switch_true(), switch_srtp_crypto_suite_s::type, and zstr.
Referenced by switch_core_media_gen_local_sdp(), and switch_core_media_negotiate_sdp().
switch_status_t switch_core_session_print | ( | switch_core_session_t * | session, |
const char * | data | ||
) |
Definition at line 15815 of file switch_core_media.c.
References CF_HAS_TEXT, switch_core_session::channel, switch_frame::data, switch_frame::datalen, switch_channel_test_flag(), switch_core_session_write_text_frame(), SWITCH_STATUS_NOTIMPL, and SWITCH_STATUS_SUCCESS.
Referenced by CoreSession::print().
switch_status_t switch_core_session_printf | ( | switch_core_session_t * | session, |
const char * | fmt, | ||
... | |||
) |
Definition at line 15783 of file switch_core_media.c.
References switch_frame::data, switch_frame::datalen, switch_core_session_write_text_frame(), switch_safe_free, SWITCH_STATUS_SUCCESS, switch_vasprintf(), and TEXT_UNICODE_LINEFEED.
switch_status_t switch_core_session_read_text_frame | ( | switch_core_session_t * | session, |
switch_frame_t ** | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 15358 of file switch_core_media.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, CF_ANSWERED, CF_FIRE_TEXT_EVENTS, CF_PAUSE_BUGS, CF_QUEUE_TEXT_EVENTS, CF_TEXT_ACTIVE, CF_TEXT_IDLE, CF_TEXT_LINE_BASED, switch_core_session::channel, switch_buffer::data, switch_runtime::dummy_cng_frame, switch_core_session::endpoint_interface, switch_core_session::event_hooks, switch_core_session::io_override, switch_endpoint_interface::io_routines, switch_media_handle_s::last_text_frame, switch_core_session::media_handle, switch_io_event_hook_text_read_frame::next, switch_media_bug::next, switch_io_routines::read_text_frame, switch_media_bug::ready, runtime, SFF_CNG, SFF_TEXT_LINE_BREAK, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PAUSE, SMBF_PRUNE, SMBF_READ_TEXT_STREAM, SWITCH_ABC_TYPE_READ_TEXT, switch_assert, switch_buffer_create_dynamic(), switch_buffer_get_head_pointer(), switch_buffer_inuse(), switch_buffer_read(), switch_buffer_write(), switch_buffer_zero(), switch_channel_clear_flag(), switch_channel_down_nosig, switch_channel_event_set_data(), switch_channel_set_flag, switch_channel_test_flag(), switch_cond_next(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_core_session_get_pool(), switch_core_session_queue_event(), switch_core_session_text_read_callback(), switch_event_add_body(), switch_event_create, switch_event_dup(), switch_event_fire, SWITCH_EVENT_TEXT, SWITCH_FALSE, switch_micro_time_now(), switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), switch_set_flag, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_INUSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_core_session::text_buffer, switch_media_bug::text_buffer, switch_media_bug::text_framedata, switch_media_bug::text_framesize, switch_core_session::text_line_buffer, switch_core_session::text_mutex, TEXT_PERIOD_TIMEOUT, switch_io_event_hook_text_read_frame::text_read_frame, switch_media_bug::user_data, and zstr.
Referenced by text_bridge_thread(), and text_helper_thread().
switch_status_t switch_core_session_read_video_frame | ( | switch_core_session_t * | session, |
switch_frame_t ** | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 15044 of file switch_core_media.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, CF_ANSWERED, CF_PAUSE_BUGS, CF_VIDEO_DEBUG_READ, CF_VIDEO_DECODED_READ, CF_VIDEO_PAUSE_READ, CF_VIDEO_READY, switch_core_session::channel, switch_media_handle_s::control_mutex, switch_runtime::dummy_cng_frame, switch_core_session::endpoint_interface, switch_core_session::event_hooks, switch_vid_params_s::height, switch_endpoint_interface::io_routines, switch_core_session::media_handle, switch_io_event_hook_video_read_frame::next, switch_media_bug::next, switch_io_routines::read_video_frame, switch_media_bug::read_video_queue, switch_media_bug::ready, switch_media_handle_s::ready_loops, runtime, SFF_CNG, SFF_IS_KEYFRAME, SFF_WAIT_KEY_FRAME, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PAUSE, SMBF_PRUNE, SMBF_READ_VIDEO_PING, SMBF_READ_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM, switch_media_bug::stop_time, SWITCH_ABC_TYPE_READ_VIDEO_PING, switch_assert, switch_channel_down_nosig, SWITCH_CHANNEL_LOG, switch_channel_set_flag, switch_channel_set_variable_printf(), switch_channel_test_flag(), switch_clear_flag, switch_cond_next(), switch_core_codec_decode_video(), switch_core_media_bug_patch_spy_frame(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_core_session_request_video_refresh, switch_core_session_video_read_callback(), switch_epoch_time_now(), SWITCH_FALSE, switch_img_copy(), SWITCH_LOG_INFO, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_push(), SWITCH_RW_READ, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_INUSE, SWITCH_STATUS_MORE_DATA, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_media_bug::user_data, switch_media_handle_s::vid_params, switch_media_bug::video_ping_frame, switch_io_event_hook_video_read_frame::video_read_frame, and switch_vid_params_s::width.
Referenced by video_helper_thread().
switch_media_flow_t switch_core_session_remote_media_flow | ( | switch_core_session_t * | session, |
switch_media_type_t | type | ||
) |
Definition at line 2162 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_media_handle_s::media_flags, switch_core_session::media_handle, switch_rtp_engine_s::rmode, SCMF_RUNNING, switch_assert, and SWITCH_MEDIA_FLOW_SENDRECV.
Referenced by switch_core_media_gen_local_sdp().
switch_status_t switch_core_session_send_and_request_video_refresh | ( | switch_core_session_t * | session | ) |
Definition at line 14566 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, switch_channel_test_flag(), switch_core_media_gen_key_frame, switch_core_session_request_video_refresh, SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_session_video_reinit().
void switch_core_session_set_ice | ( | switch_core_session_t * | session | ) |
Definition at line 4499 of file switch_core_media.c.
References CF_AVPF, CF_ICE, CF_VERBOSE_SDP, switch_core_session::channel, switch_core_session::media_handle, 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(), and switch_media_type2str().
switch_status_t switch_core_session_set_text_read_callback | ( | switch_core_session_t * | session, |
switch_core_text_thread_callback_func_t | func, | ||
void * | user_data | ||
) |
Definition at line 15307 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_core_session::media_handle, switch_core_session_start_text_thread(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_core_session::text_read_callback, and switch_core_session::text_read_user_data.
switch_status_t switch_core_session_start_audio_write_thread | ( | switch_core_session_t * | session | ) |
Definition at line 7253 of file switch_core_media.c.
References audio_write_thread(), CF_AUDIO, switch_core_session::channel, media_helper::cond, media_helper::cond_mutex, switch_media_handle_s::control_mutex, switch_media_handle_s::engines, switch_core_session::media_handle, switch_rtp_engine_s::media_thread, switch_rtp_engine_s::mh, core_video_globals_s::pool, 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_AUDIO, switch_mutex_init(), switch_mutex_lock(), SWITCH_MUTEX_NESTED, switch_mutex_unlock(), SWITCH_STATUS_FALSE, SWITCH_STATUS_INUSE, SWITCH_STATUS_NOTIMPL, SWITCH_STATUS_SUCCESS, switch_thread_cond_create(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), and switch_threadattr_stacksize_set().
Referenced by switch_core_session_write_frame().
switch_status_t switch_core_session_start_text_thread | ( | switch_core_session_t * | session | ) |
Definition at line 7394 of file switch_core_media.c.
References CF_HAS_TEXT, switch_core_session::channel, 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, switch_core_session::media_handle, switch_rtp_engine_s::media_thread, switch_rtp_engine_s::mh, core_video_globals_s::pool, payload_map_s::pt, media_helper::ready, switch_rtp_engine_s::rtp_session, media_helper::session, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_cond_next(), switch_core_session_get_name, switch_core_session_get_pool(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MEDIA_TYPE_TEXT, 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(), and text_helper_thread().
Referenced by switch_core_media_activate_rtp(), switch_core_media_gen_local_sdp(), switch_core_media_negotiate_sdp(), switch_core_media_start_engine_function(), and switch_core_session_set_text_read_callback().
switch_status_t switch_core_session_start_video_thread | ( | switch_core_session_t * | session | ) |
Definition at line 7618 of file switch_core_media.c.
References CF_VIDEO, switch_core_session::channel, 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_core_session::media_handle, switch_rtp_engine_s::media_thread, switch_rtp_engine_s::mh, core_video_globals_s::pool, payload_map_s::pt, switch_media_handle_s::read_mutex, media_helper::ready, switch_rtp_engine_s::rtp_session, media_helper::session, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_cond_next(), 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_engine_function(), and switch_core_session_set_video_read_callback().
void switch_core_session_stop_media | ( | switch_core_session_t * | session | ) |
Definition at line 13879 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_core_session::media_handle, 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_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_rtp_reset(), ice_s::ufrag, and switch_rtp_engine_s::write_codec.
switch_status_t switch_core_session_text_read_callback | ( | switch_core_session_t * | session, |
switch_frame_t * | frame | ||
) |
Definition at line 15336 of file switch_core_media.c.
References switch_media_handle_s::control_mutex, switch_core_session::media_handle, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_CONTINUE, SWITCH_STATUS_FALSE, switch_core_session::text_read_callback, and switch_core_session::text_read_user_data.
Referenced by switch_core_session_read_text_frame().
void switch_core_session_video_reinit | ( | switch_core_session_t * | session | ) |
Definition at line 14680 of file switch_core_media.c.
References switch_core_session::channel, switch_core_session::media_handle, 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 14936 of file switch_core_media.c.
References CF_VIDEO_DECODED_READ, CF_VIDEO_READY, switch_core_session::channel, switch_media_handle_s::engines, switch_vid_params_s::fps, switch_vid_params_s::height, switch_core_session::media_handle, 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_event().
void switch_core_session_wake_video_thread | ( | switch_core_session_t * | session | ) |
Definition at line 8471 of file switch_core_media.c.
References switch_core_session::channel, media_helper::cond, media_helper::cond_mutex, switch_media_handle_s::engines, switch_core_media_params_s::external_video_source, switch_core_session::media_handle, 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(), switch_core_session_stop_media(), and switch_media_type2str().
void switch_core_session_write_blank_video | ( | switch_core_session_t * | session, |
uint32_t | ms | ||
) |
Definition at line 6689 of file switch_core_media.c.
References buf, switch_frame::buflen, buflen, vpx_image::d_h, vpx_image::d_w, switch_frame::data, core_video_globals_s::fps, switch_vid_params_s::fps, switch_vid_params_s::height, switch_frame::img, switch_core_session::media_handle, switch_frame::packet, switch_frame::packetlen, switch_assert, switch_color_set_rgb(), switch_core_media_gen_key_frame, switch_core_session_write_video_frame(), switch_img_alloc(), switch_img_fill(), SWITCH_IMG_FMT_I420, switch_img_free(), SWITCH_IO_FLAG_NONE, SWITCH_RTP_MAX_BUF_LEN, switch_yield, switch_media_handle_s::vid_params, and switch_vid_params_s::width.
switch_status_t switch_core_session_write_frame | ( | switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 15839 of file switch_core_media.c.
References switch_codec_implementation::actual_samples_per_second, switch_frame::buflen, switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, CF_ACCEPT_CNG, CF_ANSWERED, CF_AUDIO_PAUSE_WRITE, CF_HOLD, CF_PASSTHRU_PTIME_MISMATCH, CF_PAUSE_BUGS, switch_core_session::channel, switch_audio_resampler_t::channels, switch_frame::channels, switch_frame::codec, switch_codec_implementation::codec_id, switch_codec::codec_interface, switch_core_session::codec_write_mutex, switch_codec::cur_frame, switch_buffer::data, switch_frame::data, switch_frame::datalen, switch_codec_implementation::decoded_bytes_per_packet, switch_core_session::enc_write_frame, switch_frame::flags, switch_audio_resampler_t::from_rate, switch_codec_implementation::ianacode, if(), switch_codec::implementation, switch_codec_interface::interface_name, switch_frame::m, memset(), switch_core_session_message::message_id, switch_codec_implementation::microseconds_per_packet, switch_codec::mutex, switch_media_bug::next, switch_codec_implementation::number_of_channels, switch_core_session_message::numeric_arg, switch_frame::payload, perform_write(), switch_frame::rate, switch_core_session::raw_write_buffer, switch_media_bug::raw_write_buffer, switch_core_session::raw_write_frame, switch_core_session::read_codec, switch_core_session::read_impl, switch_core_session::read_resampler, switch_media_bug::ready, switch_core_session::resample_mutex, switch_frame::samples, switch_codec_implementation::samples_per_packet, switch_frame::seq, SFF_CNG, SFF_NOT_AUDIO, SFF_PLC, SFF_PROXY_PACKET, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PAUSE, SMBF_PRUNE, SMBF_WRITE_REPLACE, SMBF_WRITE_STREAM, SSF_MEDIA_BUG_TAP_ONLY, SSF_READ_CODEC_RESET, SSF_WARN_TRANSCODE, SSF_WRITE_CODEC_RESET, SSF_WRITE_TRANSCODE, switch_frame::ssrc, switch_media_bug::stop_time, SWITCH_ABC_TYPE_WRITE, SWITCH_ABC_TYPE_WRITE_REPLACE, switch_assert, SWITCH_BUFFER_BLOCK_FRAMES, switch_buffer_create_dynamic(), switch_buffer_inuse(), switch_buffer_read(), SWITCH_BUFFER_START_FRAMES, switch_buffer_write(), SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION, switch_channel_down, switch_channel_get_name(), switch_channel_get_partner_uuid(), switch_channel_hangup, switch_channel_media_ready, switch_channel_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_channel_up_nosig, switch_clear_flag, SWITCH_CODEC_FLAG_PASSTHROUGH, switch_core_codec_decode(), switch_core_codec_encode(), switch_core_codec_ready(), switch_core_codec_reset(), switch_core_media_bug_flush_all(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_receive_message, switch_core_session_rwunlock(), switch_core_session_start_audio_write_thread(), switch_epoch_time_now(), SWITCH_FALSE, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY, SWITCH_MESSAGE_RESAMPLE_EVENT, switch_mutex_lock(), switch_mutex_trylock(), switch_mutex_unlock(), switch_mux_channels(), SWITCH_RECOMMENDED_BUFFER_SIZE, switch_resample_calc_buffer_size, switch_resample_create, switch_resample_destroy(), switch_resample_process(), SWITCH_RESAMPLE_QUALITY, switch_set_flag, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_MEMERR, SWITCH_STATUS_NOOP, SWITCH_STATUS_NOT_INITALIZED, SWITCH_STATUS_RESAMPLE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_frame::timestamp, switch_audio_resampler_t::to, switch_audio_resampler_t::to_len, switch_audio_resampler_t::to_rate, TRUE, switch_media_bug::user_data, switch_core_session::write_codec, switch_core_session::write_impl, switch_media_bug::write_mutex, switch_media_bug::write_replace_frame_in, switch_media_bug::write_replace_frame_out, and switch_core_session::write_resampler.
switch_status_t switch_core_session_write_text_frame | ( | switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 15653 of file switch_core_media.c.
References build_red_packet(), CC_RTP_RTT, CF_MSRP, switch_core_session::channel, switch_frame::data, switch_frame::datalen, switch_core_session::endpoint_interface, switch_media_handle_s::engines, switch_core_session::event_hooks, switch_core_session::io_override, switch_endpoint_interface::io_routines, switch_frame::m, switch_core_session::media_handle, switch_io_event_hook_text_write_frame::next, switch_frame::payload, switch_rtp_text_factory_s::red_buf, switch_rtp_text_factory_s::red_buflen, switch_rtp_text_factory_s::red_max, RED_PACKET_SIZE, switch_rtp_text_factory_s::red_pos, switch_rtp_engine_s::red_pt, switch_rtp_text_factory_s::red_ts, switch_timer::samplecount, switch_assert, switch_buffer_inuse(), switch_buffer_read(), switch_buffer_write(), switch_channel_down, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_cap(), switch_channel_test_flag(), switch_core_session_media_flow(), switch_core_timer_sync(), switch_goto_status, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG3, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_FLOW_INACTIVE, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_TYPE_TEXT, switch_mutex_trylock(), switch_mutex_unlock(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_rtp_engine_s::t140_pt, TEXT_PERIOD_TIMEOUT, TEXT_TIMER_MS, switch_rtp_text_factory_s::text_write_frame, switch_io_event_hook_text_write_frame::text_write_frame, switch_rtp_engine_s::tf, switch_rtp_text_factory_s::timer, switch_frame::timestamp, type2str, switch_rtp_text_factory_s::write_buffer, switch_rtp_text_factory_s::write_empty, switch_media_handle_s::write_mutex, and switch_io_routines::write_text_frame.
Referenced by switch_core_session_print(), switch_core_session_printf(), text_bridge_thread(), and text_helper_thread().
switch_status_t switch_core_session_write_video_frame | ( | switch_core_session_t * | session, |
switch_frame_t * | frame, | ||
switch_io_flag_t | flags, | ||
int | stream_id | ||
) |
Definition at line 14705 of file switch_core_media.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, CF_ANSWERED, CF_PAUSE_BUGS, CF_VIDEO_MIRROR_INPUT, CF_VIDEO_PAUSE_WRITE, CF_VIDEO_READY, CF_VIDEO_WRITING, switch_core_session::channel, switch_vid_params_s::d_height, switch_vid_params_s::d_width, switch_frame::datalen, switch_media_handle_s::engines, switch_frame::flags, switch_vid_params_s::height, switch_frame::img, switch_frame::m, switch_core_session::media_handle, switch_media_handle_s::mparams, switch_media_bug::next, switch_media_bug::ready, switch_timer::samplecount, switch_media_handle_s::session, SFF_PICTURE_RESET, SFF_RAW_RTP_PARSE_FRAME, SFF_SAME_IMAGE, SFF_USE_VIDEO_TIMESTAMP, SMBF_ANSWER_REQ, SMBF_NO_PAUSE, SMBF_PAUSE, SMBF_PRUNE, SMBF_SPY_VIDEO_STREAM, SMBF_SPY_VIDEO_STREAM_BLEG, SMBF_WRITE_VIDEO_PING, SMBF_WRITE_VIDEO_STREAM, switch_media_bug::stop_time, SWITCH_ABC_TYPE_WRITE_VIDEO_PING, switch_assert, switch_channel_down, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_clear_flag, switch_core_codec_encode_video(), switch_core_media_bug_patch_spy_frame(), switch_core_media_bug_prune(), switch_core_media_bug_test_flag(), switch_core_media_gen_key_frame, switch_core_media_get_timer(), switch_core_media_get_vid_params(), switch_core_session_get_name, switch_core_session_get_pool(), switch_core_session_get_video_write_codec(), switch_core_session_media_flow(), switch_core_session_video_reinit(), switch_core_session_write_encoded_video_frame(), switch_core_timer_init(), switch_core_timer_sync(), SWITCH_DEFAULT_VIDEO_SIZE, switch_epoch_time_now(), SWITCH_FALSE, switch_goto_status, switch_img_copy(), switch_img_free(), switch_img_letterbox(), SWITCH_IO_FLAG_FORCE, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG3, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_FLOW_INACTIVE, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_TYPE_VIDEO, switch_micro_time_now(), switch_mutex_trylock(), switch_mutex_unlock(), switch_queue_push(), SWITCH_RW_WRITE, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_INUSE, SWITCH_STATUS_MORE_DATA, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), switch_thread_self(), SWITCH_TRUE, switch_rtp_engine_s::thread_write_lock, switch_timer::timer_interface, switch_frame::timestamp, type2str, switch_media_bug::user_data, switch_media_handle_s::vid_params, switch_media_handle_s::video_init, switch_core_media_params_s::video_key_first, switch_core_media_params_s::video_key_freq, switch_media_handle_s::video_last_key_time, switch_media_bug::video_ping_frame, switch_media_handle_s::video_timer, switch_vid_params_s::width, switch_media_handle_s::write_mutex, and switch_media_bug::write_video_queue.
Referenced by switch_core_session_write_blank_video(), video_helper_thread(), and video_write_thread().
|
static |
Definition at line 3982 of file switch_core_media.c.
References switch_core_session::channel, ICE_CONTROLLED, ICE_LITE, ICE_VANILLA, SWITCH_CALL_DIRECTION_INBOUND, switch_channel_var_true(), and switch_ice_direction().
Referenced by check_ice(), and switch_core_media_activate_rtp().
|
static |
Definition at line 3955 of file switch_core_media.c.
References CF_3PCC, CF_AVPF, CF_RECOVERING, CF_REINVITE, switch_core_session::channel, switch_rtp_engine_s::dtls_controller, dtls_ok(), switch_core_session::media_handle, switch_media_handle_s::session, switch_assert, SWITCH_CALL_DIRECTION_INBOUND, SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_test_flag(), and switch_rtp_has_dtls().
Referenced by switch_determine_ice_type().
void switch_media_handle_clear_media_flag | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flag | ||
) |
Definition at line 2124 of file switch_core_media.c.
References switch_media_handle_s::media_flags, and switch_assert.
Referenced by switch_core_media_parse_media_flags(), and switch_media_type2str().
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 1992 of file switch_core_media.c.
References switch_frame::buflen, CF_DTLS_OK, switch_core_session::channel, switch_rtp_engine_s::codec_settings, switch_media_handle_s::control_mutex, CRYPTO_INVALID, switch_media_handle_s::crypto_suite_order, switch_rtp_engine_s::crypto_type, secure_settings_s::crypto_type, switch_rtp_engine_s::cur_payload_map, payload_map_s::current, switch_media_handle_s::engines, switch_media_handle_s::media_flags, switch_core_session::media_handle, switch_media_handle_s::mparams, switch_media_handle_s::mutex, switch_rtp_engine_s::payload_map, switch_core_session::pool, switch_rtp_engine_s::read_frame, SCMF_RUNNING, switch_media_handle_s::sdp_mutex, switch_core_media_params_s::sdp_username, switch_media_handle_s::session, SMF_INIT, switch_rtp_engine_s::smode, switch_rtp_engine_s::ssec, switch_rtp_engine_s::ssrc, switch_channel_set_flag, switch_channel_set_variable, switch_core_alloc, switch_core_session_alloc, switch_core_session_get_pool(), SWITCH_MEDIA_FLOW_DISABLED, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_TEXT, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_RTP_MAX_BUF_LEN, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_video_codec_settings::try_hardware_encoder, switch_rtp_engine_s::type, switch_codec_settings::video, switch_core_media_params_s::video_key_first, and zstr.
Referenced by switch_media_type2str().
void switch_media_handle_destroy | ( | switch_core_session_t * | session | ) |
Definition at line 1946 of file switch_core_media.c.
References switch_media_handle_s::engines, switch_core_session::media_handle, switch_media_handle_s::msrp_session, 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_frame_buffer_destroy(), SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_msrp_session_destroy(), switch_timer::timer_interface, switch_media_handle_s::video_timer, switch_rtp_engine_s::write_codec, and switch_rtp_engine_s::write_fb.
Referenced by switch_media_type2str().
void switch_media_handle_set_media_flag | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flag | ||
) |
Definition at line 2103 of file switch_core_media.c.
References switch_media_handle_s::media_flags, and switch_assert.
Referenced by switch_core_media_negotiate_sdp(), switch_core_media_parse_media_flags(), and switch_media_type2str().
void switch_media_handle_set_media_flags | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flags[SCMF_MAX] | ||
) |
Definition at line 2111 of file switch_core_media.c.
References switch_media_handle_s::media_flags, SCMF_MAX, and switch_assert.
Referenced by switch_media_type2str().
int32_t switch_media_handle_test_media_flag | ( | switch_media_handle_t * | smh, |
switch_core_media_flag_t | flag | ||
) |
Definition at line 2131 of file switch_core_media.c.
References switch_media_handle_s::media_flags, and 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(), switch_core_media_start_udptl(), and switch_media_type2str().
switch_status_t switch_rtp_text_factory_create | ( | switch_rtp_text_factory_t ** | tfP, |
switch_memory_pool_t * | pool | ||
) |
Definition at line 2608 of file switch_core_media.c.
References core_video_globals_s::pool, switch_buffer_create_dynamic(), switch_core_alloc, switch_core_timer_init(), SWITCH_RTP_MAX_BUF_LEN, SWITCH_STATUS_SUCCESS, TEXT_TIMER_MS, and TEXT_TIMER_SAMPLES.
Referenced by switch_core_media_activate_rtp().
switch_status_t switch_rtp_text_factory_destroy | ( | switch_rtp_text_factory_t ** | tfP | ) |
Definition at line 2633 of file switch_core_media.c.
References switch_buffer_destroy(), switch_core_timer_destroy(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_media_deactivate_rtp().
|
static |
Definition at line 7292 of file switch_core_media.c.
References CF_FIRE_TEXT_EVENTS, CF_MSRP, CF_TEXT_ECHO, CF_TEXT_PASSIVE, switch_core_session::channel, switch_media_handle_s::control_mutex, switch_frame::data, switch_frame::datalen, switch_rtp_engine_s::engine_function, switch_rtp_engine_s::engine_function_running, switch_rtp_engine_s::engine_user_data, switch_media_handle_s::engines, switch_core_session::media_handle, media_helper::ready, media_helper::session, SFF_CNG, switch_channel_get_name(), SWITCH_CHANNEL_LOG, switch_channel_set_flag, switch_channel_test_flag(), switch_channel_up_nosig, switch_channel_var_true(), switch_cond_next(), switch_core_media_check_dtls(), switch_core_session_get_channel(), switch_core_session_read_lock(), switch_core_session_read_text_frame(), switch_core_session_rwunlock(), switch_core_session_write_text_frame(), SWITCH_IO_FLAG_NONE, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_MEDIA_TYPE_TEXT, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_READ_ACCEPTABLE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_self(), TEXT_UNICODE_LINEFEED, switch_rtp_engine_s::thread_id, and media_helper::up.
Referenced by switch_core_session_start_text_thread().
|
static |
Definition at line 7448 of file switch_core_media.c.
References buf, switch_frame::buflen, buflen, CF_VIDEO, CF_VIDEO_BLANK, CF_VIDEO_DECODED_READ, CF_VIDEO_ECHO, CF_VIDEO_PASSIVE, CF_VIDEO_READY, CF_VIDEO_WRITING, switch_core_session::channel, media_helper::cond, media_helper::cond_mutex, switch_media_handle_s::control_mutex, vpx_image::d_h, vpx_image::d_w, switch_frame::data, switch_rtp_engine_s::engine_function, switch_rtp_engine_s::engine_function_running, switch_rtp_engine_s::engine_user_data, switch_media_handle_s::engines, media_helper::file_read_mutex, switch_vid_params_s::fps, switch_mm_s::fps, switch_frame::img, switch_core_session::media_handle, switch_file_handle::mm, switch_frame::packet, switch_frame::packetlen, media_helper::ready, media_helper::session, SFF_CNG, switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_LOG, switch_channel_media_up, switch_channel_set_flag, switch_channel_test_flag(), switch_channel_up_nosig, switch_color_set_rgb(), switch_cond_next(), switch_core_autobind_cpu(), switch_core_file_write_video(), switch_core_media_check_dtls(), switch_core_media_gen_key_frame, switch_core_session_alloc, switch_core_session_get_channel(), switch_core_session_read_lock(), switch_core_session_read_video_frame(), switch_core_session_request_video_refresh, switch_core_session_rwunlock(), switch_core_session_write_video_frame(), switch_false(), SWITCH_FILE_OPEN, switch_img_alloc(), switch_img_fill(), SWITCH_IMG_FMT_I420, switch_img_free(), switch_img_read_png(), SWITCH_IO_FLAG_FORCE, SWITCH_IO_FLAG_NONE, SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG1, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_READ_ACCEPTABLE, SWITCH_RTP_MAX_BUF_LEN, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_cond_wait(), switch_thread_self(), switch_yield, switch_rtp_engine_s::thread_id, media_helper::up, switch_media_handle_s::vid_params, switch_core_session::video_read_callback, and switch_media_handle_s::video_read_fh.
Referenced by switch_core_session_start_video_thread().
|
static |
Definition at line 6741 of file switch_core_media.c.
References buf, switch_frame::buflen, buflen, CF_VIDEO_BLANK, CF_VIDEO_WRITING, switch_core_session::channel, vpx_image::d_h, switch_vid_params_s::d_height, vpx_image::d_w, switch_vid_params_s::d_width, switch_frame::data, switch_media_handle_s::engines, media_helper::file_write_mutex, switch_frame::flags, core_video_globals_s::fps, switch_fps_s::fps, switch_mm_s::fps, switch_frame::img, switch_core_session::media_handle, switch_rtp_engine_s::mh, switch_file_handle::mm, switch_fps_s::ms, switch_frame::packet, switch_frame::packetlen, switch_timer::samplecount, switch_fps_s::samples, SFF_RAW_RTP, SFF_RAW_RTP_PARSE_FRAME, SFF_USE_VIDEO_TIMESTAMP, switch_mm_s::source_fps, switch_mm_s::source_kps, SVR_FLUSH, switch_calc_bitrate(), switch_calc_video_fps, switch_channel_clear_flag(), switch_channel_get_variable, switch_channel_set_flag, switch_channel_up_nosig, switch_color_set_rgb(), switch_core_file_read_video(), switch_core_media_gen_key_frame, switch_core_media_set_outgoing_bitrate(), switch_core_session_alloc, switch_core_session_get_partner, switch_core_session_get_pool(), switch_core_session_read_lock(), switch_core_session_request_video_refresh, switch_core_session_rwunlock(), switch_core_session_write_video_frame(), switch_core_timer_destroy(), switch_core_timer_init(), switch_core_timer_next(), switch_core_timer_sync(), SWITCH_FILE_FLAG_VIDEO_EOF, SWITCH_FILE_OPEN, SWITCH_FIT_SIZE, switch_img_fill(), switch_img_fit(), switch_img_free(), SWITCH_IO_FLAG_FORCE, SWITCH_MEDIA_TYPE_VIDEO, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RTP_MAX_BUF_LEN, switch_set_flag_locked, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_IGNORE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_self(), switch_rtp_engine_s::thread_write_lock, switch_frame::timestamp, switch_media_handle_s::vid_params, switch_media_handle_s::video_write_fh, switch_media_handle_s::video_write_thread_running, and switch_media_handle_s::write_mutex.
Referenced by switch_core_media_set_video_file().
|
static |
Definition at line 338 of file switch_core_media.c.
|
static |
Definition at line 292 of file switch_core_media.c.
Referenced by switch_core_media_has_resolveice().
Definition at line 278 of file switch_core_media.c.
|
static |
Definition at line 78 of file switch_core_media.c.