RTS API Documentation
1.10.11
|
#include <switch.h>
#include <switch_private.h>
#include <switch_stun.h>
#include <fspr_network_io.h>
#include <srtp.h>
#include <srtp_priv.h>
#include <switch_ssl.h>
#include <switch_jitterbuffer.h>
Go to the source code of this file.
Data Structures | |
struct | rtp_msg_t |
struct | rtcp_fir_t |
struct | switch_rtcp_sdes_unit_s |
struct | rtcp_tmmbx_t |
struct | switch_rtcp_ext_hdr_t |
struct | rtcp_ext_msg_t |
struct | rtcp_msg_t |
struct | switch_rtp_vad_data |
struct | switch_rtp_rfc2833_data |
struct | switch_rtp_ice_t |
struct | switch_dtls_s |
struct | ts_normalize_s |
struct | switch_rtp |
struct | switch_rtcp_report_block |
struct | switch_rtcp_sr_head |
struct | switch_rtcp_sender_info |
struct | switch_rtcp_sender_report |
struct | switch_rtcp_receiver_report |
struct | packet_list_s |
struct | dtls_bio_filter |
Macros | |
#define | DEBUG_ESTIMATORS_ |
#define | JITTER_LEAD_FRAMES 10 |
#define | READ_INC(rtp_session) switch_mutex_lock(rtp_session->read_mutex); rtp_session->reading++ |
#define | READ_DEC(rtp_session) rtp_session->reading--; switch_mutex_unlock(rtp_session->read_mutex) |
#define | WRITE_INC(rtp_session) switch_mutex_lock(rtp_session->write_mutex); rtp_session->writing++ |
#define | WRITE_DEC(rtp_session) rtp_session->writing--; switch_mutex_unlock(rtp_session->write_mutex) |
#define | RTP_STUN_FREQ 1000000 |
#define | rtp_header_len 12 |
#define | RTP_START_PORT 16384 |
#define | RTP_END_PORT 32768 |
#define | MASTER_KEY_LEN 30 |
#define | RTP_MAGIC_NUMBER 42 |
#define | WARN_SRTP_ERRS 10 |
#define | MAX_SRTP_ERRS 100 |
#define | NTP_TIME_OFFSET 2208988800UL |
#define | DTMF_SANITY (rtp_session->one_second * 30) |
#define | rtp_session_name(_rtp_session) _rtp_session->session ? switch_core_session_get_name(_rtp_session->session) : "-" |
#define | STUN_USERNAME_MAX_SIZE 513 /* From RFC5389: "It MUST contain a UTF-8 [RFC3629] encoded sequence of less than 513 bytes" */ |
#define | SDP_UFRAG_MAX_SIZE |
#define | RTP_BODY(_s) (char *) (_s->recv_msg.ebody ? _s->recv_msg.ebody : _s->recv_msg.body) |
#define | KALMAN_SYSTEM_MODELS 3 /*loss, jitter, rtt*/ |
#define | EST_LOSS 0 |
#define | EST_JITTER 1 |
#define | EST_RTT 2 |
#define | MAX_DTLS_MTU 4096 |
#define | rtp_type(rtp_session) rtp_session->flags[SWITCH_RTP_FLAG_TEXT] ? "text" : (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] ? "video" : "audio") |
#define | MEDIA_TOO_LONG 2000 |
#define | STUN_TOO_LONG 20000 |
#define | ADJ_TOO_LONG 1000 |
#define | MAX_NACK 10 |
#define | dtls_set_state(_dtls, _state) switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_INFO, "Changing %s DTLS state from %s to %s\n", rtp_type(rtp_session), dtls_state_names(_dtls->state), dtls_state_names(_state)); _dtls->new_state = 1; _dtls->last_state = _dtls->state; _dtls->state = _state |
#define | cr_keylen 16 |
#define | cr_saltlen 14 |
#define | cr_kslen 30 |
#define | return_cng_frame() do_cng = 1; goto timer_check |
Typedefs | |
typedef srtp_hdr_t | rtp_hdr_t |
typedef struct switch_rtcp_sdes_unit_s | switch_rtcp_sdes_unit_t |
typedef struct switch_dtls_s | switch_dtls_t |
typedef int(* | dtls_state_handler_t) (switch_rtp_t *, switch_dtls_t *) |
typedef struct ts_normalize_s | ts_normalize_t |
typedef struct packet_list_s | packet_list_t |
typedef struct dtls_bio_filter | dtls_bio_filter |
Enumerations | |
enum | vad_talk_mask_t { VAD_FIRE_TALK = (1 << 0), VAD_FIRE_NOT_TALK = (1 << 1) } |
enum | handle_rfc2833_result_t { RESULT_CONTINUE, RESULT_GOTO_END, RESULT_GOTO_RECVFROM, RESULT_GOTO_TIMERCHECK } |
Functions | |
static switch_size_t | do_flush (switch_rtp_t *rtp_session, int force, switch_size_t bytes_in) |
static void | switch_rtp_dtls_init (void) |
static void | switch_rtp_dtls_destroy (void) |
static int | dtls_state_handshake (switch_rtp_t *rtp_session, switch_dtls_t *dtls) |
static int | dtls_state_ready (switch_rtp_t *rtp_session, switch_dtls_t *dtls) |
static int | dtls_state_setup (switch_rtp_t *rtp_session, switch_dtls_t *dtls) |
static int | dtls_state_fail (switch_rtp_t *rtp_session, switch_dtls_t *dtls) |
static void | do_2833 (switch_rtp_t *rtp_session) |
static void | switch_rtp_change_ice_dest (switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, const char *host, switch_port_t port) |
static handle_rfc2833_result_t | handle_rfc2833 (switch_rtp_t *rtp_session, switch_size_t bytes, int *do_cng) |
static int | rtp_write_ready (switch_rtp_t *rtp_session, uint32_t bytes, int line) |
static int | rtp_common_write (switch_rtp_t *rtp_session, rtp_msg_t *send_msg, void *data, uint32_t datalen, switch_payload_t payload, uint32_t timestamp, switch_frame_flag_t *flags) |
static void | calc_elapsed (switch_rtp_t *rtp_session, switch_rtp_ice_t *ice) |
static switch_status_t | ice_out (switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, switch_bool_t force) |
int | icecmp (const char *them, switch_rtp_ice_t *ice) |
static void | handle_ice (switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *data, switch_size_t len) |
void | switch_rtp_init (switch_memory_pool_t *pool) |
Initilize the RTP System. More... | |
static uint8_t | get_next_write_ts (switch_rtp_t *rtp_session, uint32_t timestamp) |
static void | do_mos (switch_rtp_t *rtp_session) |
void | burstr_calculate (int loss[], int received, double *burstr, double *lossr) |
static void | reset_jitter_seq (switch_rtp_t *rtp_session) |
static void | check_jitter (switch_rtp_t *rtp_session) |
static void | rtcp_generate_sender_info (switch_rtp_t *rtp_session, struct switch_rtcp_sender_info *sr) |
static uint32_t | calc_local_lsr_now (void) |
static void | rtcp_generate_report_block (switch_rtp_t *rtp_session, struct switch_rtcp_report_block *rtcp_report_block, int16_t extra_expected) |
static void | rtcp_stats_init (switch_rtp_t *rtp_session) |
static int | rtcp_stats (switch_rtp_t *rtp_session) |
static void | calc_bw_exp (uint32_t bps, uint8_t bits, rtcp_tmmbx_t *tmmbx) |
static int | using_ice (switch_rtp_t *rtp_session) |
static void | switch_send_rtcp_event (switch_rtp_t *rtp_session, struct switch_rtcp_sender_report *sr, struct switch_rtcp_report_block *rtcp_report_block) |
static int | check_rtcp_and_ice (switch_rtp_t *rtp_session) |
void | switch_rtp_ping (switch_rtp_t *rtp_session) |
void | switch_rtp_get_random (void *buf, uint32_t len) |
void | switch_rtp_shutdown (void) |
switch_port_t | switch_rtp_set_start_port (switch_port_t port) |
Set/Get RTP start port. More... | |
switch_port_t | switch_rtp_set_end_port (switch_port_t port) |
Set/Get RTP end port. More... | |
void | switch_rtp_release_port (const char *ip, switch_port_t port) |
switch_port_t | switch_rtp_request_port (const char *ip) |
Request a new port to be used for media. More... | |
switch_status_t | switch_rtp_set_payload_map (switch_rtp_t *rtp_session, payload_map_t **pmap) |
void | switch_rtp_intentional_bugs (switch_rtp_t *rtp_session, switch_rtp_bug_flag_t bugs) |
static switch_status_t | enable_remote_rtcp_socket (switch_rtp_t *rtp_session, const char **err) |
static switch_status_t | enable_local_rtcp_socket (switch_rtp_t *rtp_session, const char **err) |
switch_status_t | switch_rtp_set_local_address (switch_rtp_t *rtp_session, const char *host, switch_port_t port, const char **err) |
Assign a local address to the RTP session. More... | |
void | switch_rtp_set_media_timeout (switch_rtp_t *rtp_session, uint32_t ms) |
void | switch_rtp_set_max_missed_packets (switch_rtp_t *rtp_session, uint32_t max) |
void | switch_rtp_reset_jb (switch_rtp_t *rtp_session) |
void | switch_rtp_reset_vb (switch_rtp_t *rtp_session) |
void | switch_rtp_reset (switch_rtp_t *rtp_session) |
void | switch_rtp_reset_media_timer (switch_rtp_t *rtp_session) |
char * | switch_rtp_get_remote_host (switch_rtp_t *rtp_session) |
switch_port_t | switch_rtp_get_remote_port (switch_rtp_t *rtp_session) |
static void | ping_socket (switch_rtp_t *rtp_session) |
switch_status_t | switch_rtp_udptl_mode (switch_rtp_t *rtp_session) |
switch_status_t | switch_rtp_set_remote_address (switch_rtp_t *rtp_session, const char *host, switch_port_t port, switch_port_t remote_rtcp_port, switch_bool_t change_adv_addr, const char **err) |
Assign a remote address to the RTP session. More... | |
static const char * | dtls_state_names (dtls_state_t s) |
static void | free_dtls (switch_dtls_t **dtlsp) |
static int | do_dtls (switch_rtp_t *rtp_session, switch_dtls_t *dtls) |
BIO_METHOD * | BIO_dtls_filter (void) |
static int | dtls_bio_filter_new (BIO *bio) |
static int | dtls_bio_filter_free (BIO *bio) |
static int | dtls_bio_filter_write (BIO *bio, const char *in, int inl) |
static long | dtls_bio_filter_ctrl (BIO *bio, int cmd, long num, void *ptr) |
int | switch_rtp_has_dtls (void) |
dtls_state_t | switch_rtp_dtls_state (switch_rtp_t *rtp_session, dtls_type_t type) |
switch_status_t | switch_rtp_del_dtls (switch_rtp_t *rtp_session, dtls_type_t type) |
switch_status_t | switch_rtp_add_dtls (switch_rtp_t *rtp_session, dtls_fingerprint_t *local_fp, dtls_fingerprint_t *remote_fp, dtls_type_t type, uint8_t want_DTLSv1_2) |
switch_status_t | switch_rtp_add_crypto_key (switch_rtp_t *rtp_session, switch_rtp_crypto_direction_t direction, uint32_t index, switch_secure_settings_t *ssec) |
switch_status_t | switch_rtp_set_interval (switch_rtp_t *rtp_session, uint32_t ms_per_packet, uint32_t samples_per_interval) |
switch_status_t | switch_rtp_change_interval (switch_rtp_t *rtp_session, uint32_t ms_per_packet, uint32_t samples_per_interval) |
switch_status_t | switch_rtp_set_ssrc (switch_rtp_t *rtp_session, uint32_t ssrc) |
switch_status_t | switch_rtp_set_remote_ssrc (switch_rtp_t *rtp_session, uint32_t ssrc) |
switch_status_t | switch_rtp_create (switch_rtp_t **new_rtp_session, switch_payload_t payload, uint32_t samples_per_interval, uint32_t ms_per_packet, switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID], char *timer_name, const char **err, switch_memory_pool_t *pool) |
create a new RTP session handle More... | |
switch_rtp_t * | switch_rtp_new (const char *rx_host, switch_port_t rx_port, const char *tx_host, switch_port_t tx_port, switch_payload_t payload, uint32_t samples_per_interval, uint32_t ms_per_packet, switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID], char *timer_name, const char **err, switch_memory_pool_t *pool, switch_port_t bundle_internal_port, switch_port_t bundle_external_port) |
prepare a new RTP session handle and fully initilize it More... | |
void | switch_rtp_set_telephony_event (switch_rtp_t *rtp_session, switch_payload_t te) |
Set the payload type to consider RFC2833 DTMF. More... | |
void | switch_rtp_set_telephony_recv_event (switch_rtp_t *rtp_session, switch_payload_t te) |
void | switch_rtp_set_cng_pt (switch_rtp_t *rtp_session, switch_payload_t pt) |
Set the payload type for comfort noise. More... | |
switch_timer_t * | switch_rtp_get_media_timer (switch_rtp_t *rtp_session) |
switch_jb_t * | switch_rtp_get_jitter_buffer (switch_rtp_t *rtp_session) |
switch_status_t | switch_rtp_pause_jitter_buffer (switch_rtp_t *rtp_session, switch_bool_t pause) |
switch_status_t | switch_rtp_deactivate_jitter_buffer (switch_rtp_t *rtp_session) |
switch_status_t | switch_rtp_get_video_buffer_size (switch_rtp_t *rtp_session, uint32_t *min_frame_len, uint32_t *max_frame_len, uint32_t *cur_frame_len, uint32_t *highest_frame_len) |
switch_status_t | switch_rtp_set_video_buffer_size (switch_rtp_t *rtp_session, uint32_t frames, uint32_t max_frames) |
switch_status_t | switch_rtp_debug_jitter_buffer (switch_rtp_t *rtp_session, const char *name) |
switch_status_t | switch_rtp_activate_jitter_buffer (switch_rtp_t *rtp_session, uint32_t queue_frames, uint32_t max_queue_frames, uint32_t samples_per_packet, uint32_t samples_per_second) |
Acvite a jitter buffer on an RTP session. More... | |
switch_status_t | switch_rtp_activate_rtcp (switch_rtp_t *rtp_session, int send_rate, switch_port_t remote_port, switch_bool_t mux) |
Activate sending RTCP Sender Reports (SR's) More... | |
switch_status_t | switch_rtp_activate_ice (switch_rtp_t *rtp_session, char *login, char *rlogin, const char *password, const char *rpassword, ice_proto_t proto, switch_core_media_ice_type_t type, ice_t *ice_params) |
Acvite ICE on an RTP session. More... | |
void | switch_rtp_flush (switch_rtp_t *rtp_session) |
switch_status_t | switch_rtp_req_bitrate (switch_rtp_t *rtp_session, uint32_t bps) |
switch_status_t | switch_rtp_ack_bitrate (switch_rtp_t *rtp_session, uint32_t bps) |
void | switch_rtp_video_refresh (switch_rtp_t *rtp_session) |
void | switch_rtp_video_loss (switch_rtp_t *rtp_session) |
void | switch_rtp_break (switch_rtp_t *rtp_session) |
void | switch_rtp_kill_socket (switch_rtp_t *rtp_session) |
Kill the socket on an existing RTP session. More... | |
uint8_t | switch_rtp_ready (switch_rtp_t *rtp_session) |
Test if an RTP session is ready. More... | |
switch_status_t | switch_rtp_sync_stats (switch_rtp_t *rtp_session) |
void | switch_rtp_destroy (switch_rtp_t **rtp_session) |
Destroy an RTP session. More... | |
void | switch_rtp_set_interdigit_delay (switch_rtp_t *rtp_session, uint32_t delay) |
switch_socket_t * | switch_rtp_get_rtp_socket (switch_rtp_t *rtp_session) |
Retrieve the socket from an existing RTP session. More... | |
uint32_t | switch_rtp_get_default_samples_per_interval (switch_rtp_t *rtp_session) |
Get the default samples per interval for a given RTP session. More... | |
void | switch_rtp_set_default_payload (switch_rtp_t *rtp_session, switch_payload_t payload) |
Set the default payload number for a given RTP session. More... | |
uint32_t | switch_rtp_get_default_payload (switch_rtp_t *rtp_session) |
Get the default payload number for a given RTP session. More... | |
void | switch_rtp_set_invalid_handler (switch_rtp_t *rtp_session, switch_rtp_invalid_handler_t on_invalid) |
Set a callback function to execute when an invalid RTP packet is encountered. More... | |
void | switch_rtp_set_flags (switch_rtp_t *rtp_session, switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID]) |
void | switch_rtp_clear_flags (switch_rtp_t *rtp_session, switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID]) |
void | switch_rtp_set_flag (switch_rtp_t *rtp_session, switch_rtp_flag_t flag) |
Set an RTP Flag. More... | |
uint32_t | switch_rtp_test_flag (switch_rtp_t *rtp_session, switch_rtp_flag_t flags) |
Test an RTP Flag. More... | |
void | switch_rtp_clear_flag (switch_rtp_t *rtp_session, switch_rtp_flag_t flag) |
Clear an RTP Flag. More... | |
static void | set_dtmf_delay (switch_rtp_t *rtp_session, uint32_t ms, uint32_t max_ms) |
void | rtp_flush_read_buffer (switch_rtp_t *rtp_session, switch_rtp_flush_t flush) |
static int | jb_valid (switch_rtp_t *rtp_session) |
static int | check_recv_payload (switch_rtp_t *rtp_session) |
static int | get_recv_payload (switch_rtp_t *rtp_session) |
static switch_status_t | read_bundle_rtp_packet (switch_rtp_t *rtp_session, switch_size_t *bytes, switch_frame_flag_t *flags) |
static switch_status_t | read_rtp_packet (switch_rtp_t *rtp_session, switch_size_t *bytes, switch_frame_flag_t *flags, payload_map_t **pmapP, switch_status_t poll_status, switch_bool_t return_jb_packet) |
static void | handle_nack (switch_rtp_t *rtp_session, uint32_t nack) |
static switch_status_t | process_rtcp_report (switch_rtp_t *rtp_session, rtcp_msg_t *msg, switch_size_t bytes) |
static switch_status_t | process_rtcp_packet (switch_rtp_t *rtp_session, switch_size_t *bytes) |
static switch_status_t | read_rtcp_packet (switch_rtp_t *rtp_session, switch_size_t *bytes, switch_frame_flag_t *flags) |
static void | check_timeout (switch_rtp_t *rtp_session) |
static int | rtp_common_read (switch_rtp_t *rtp_session, switch_payload_t *payload_type, payload_map_t **pmapP, switch_frame_flag_t *flags, switch_io_flag_t io_flags) |
switch_byte_t | switch_rtp_check_auto_adj (switch_rtp_t *rtp_session) |
switch_size_t | switch_rtp_has_dtmf (switch_rtp_t *rtp_session) |
Test for presence of DTMF on a given RTP session. More... | |
switch_size_t | switch_rtp_dequeue_dtmf (switch_rtp_t *rtp_session, switch_dtmf_t *dtmf) |
Retrieve DTMF digits from a given RTP session. More... | |
switch_status_t | switch_rtp_queue_rfc2833 (switch_rtp_t *rtp_session, const switch_dtmf_t *dtmf) |
Queue RFC2833 DTMF data into an RTP Session. More... | |
switch_status_t | switch_rtp_queue_rfc2833_in (switch_rtp_t *rtp_session, const switch_dtmf_t *dtmf) |
Queue RFC2833 DTMF data into an RTP Session. More... | |
switch_status_t | switch_rtp_read (switch_rtp_t *rtp_session, void *data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags, switch_io_flag_t io_flags) |
Read data from a given RTP session. More... | |
switch_status_t | switch_rtcp_zerocopy_read_frame (switch_rtp_t *rtp_session, switch_rtcp_frame_t *frame) |
Read RTCP data from a given RTP session without copying. More... | |
switch_status_t | switch_rtp_zerocopy_read_frame (switch_rtp_t *rtp_session, switch_frame_t *frame, switch_io_flag_t io_flags) |
Read data from a given RTP session without copying. More... | |
switch_status_t | switch_rtp_zerocopy_read (switch_rtp_t *rtp_session, void **data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags, switch_io_flag_t io_flags) |
Read data from a given RTP session without copying. More... | |
switch_status_t | switch_rtp_disable_vad (switch_rtp_t *rtp_session) |
Disable VAD on an RTP Session. More... | |
switch_status_t | switch_rtp_enable_vad (switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags) |
Enable VAD on an RTP Session. More... | |
int | switch_rtp_write_frame (switch_rtp_t *rtp_session, switch_frame_t *frame) |
Write data to a given RTP session. More... | |
switch_rtp_stats_t * | switch_rtp_get_stats (switch_rtp_t *rtp_session, switch_memory_pool_t *pool) |
int | switch_rtp_write_manual (switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint8_t m, switch_payload_t payload, uint32_t ts, switch_frame_flag_t *flags) |
Write data with a specified payload and sequence number to a given RTP session. More... | |
switch_status_t | switch_rtp_write_raw (switch_rtp_t *rtp_session, void *data, switch_size_t *bytes, switch_bool_t process_encryption) |
uint32_t | switch_rtp_get_ssrc (switch_rtp_t *rtp_session) |
Retrieve the SSRC from a given RTP session. More... | |
void | switch_rtp_set_private (switch_rtp_t *rtp_session, void *private_data) |
Associate an arbitrary data pointer with and RTP session. More... | |
void * | switch_rtp_get_private (switch_rtp_t *rtp_session) |
Retrieve the private data from a given RTP session. More... | |
switch_core_session_t * | switch_rtp_get_core_session (switch_rtp_t *rtp_session) |
Variables | |
static const switch_payload_t | INVALID_PT = 255 |
static switch_port_t | START_PORT = RTP_START_PORT |
static switch_port_t | END_PORT = RTP_END_PORT |
static switch_mutex_t * | port_lock = NULL |
static switch_hash_t * | alloc_hash = NULL |
dtls_state_handler_t | dtls_states [DS_INVALID] = {NULL, dtls_state_handshake, dtls_state_setup, dtls_state_ready, dtls_state_fail} |
static int | global_init = 0 |
static const char * | dtls_state_names_t [] = {"OFF", "HANDSHAKE", "SETUP", "READY", "FAIL", "INVALID"} |
static BIO_METHOD | dtls_bio_filter_methods |
#define ADJ_TOO_LONG 1000 |
Definition at line 821 of file switch_rtp.c.
Referenced by calc_elapsed().
#define cr_keylen 16 |
Definition at line 3211 of file switch_rtp.c.
Referenced by dtls_state_setup().
#define cr_kslen 30 |
Definition at line 3213 of file switch_rtp.c.
Referenced by dtls_state_setup().
#define cr_saltlen 14 |
Definition at line 3212 of file switch_rtp.c.
Referenced by dtls_state_setup().
#define DEBUG_ESTIMATORS_ |
Definition at line 63 of file switch_rtp.c.
#define dtls_set_state | ( | _dtls, | |
_state | |||
) | switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_INFO, "Changing %s DTLS state from %s to %s\n", rtp_type(rtp_session), dtls_state_names(_dtls->state), dtls_state_names(_state)); _dtls->new_state = 1; _dtls->last_state = _dtls->state; _dtls->state = _state |
Definition at line 3209 of file switch_rtp.c.
Referenced by dtls_state_handshake(), dtls_state_setup(), read_bundle_rtp_packet(), and switch_rtp_add_dtls().
#define DTMF_SANITY (rtp_session->one_second * 30) |
Definition at line 83 of file switch_rtp.c.
Referenced by handle_rfc2833().
#define EST_JITTER 1 |
Definition at line 175 of file switch_rtp.c.
#define EST_LOSS 0 |
Definition at line 174 of file switch_rtp.c.
Referenced by process_rtcp_report(), and rtcp_stats_init().
#define EST_RTT 2 |
Definition at line 176 of file switch_rtp.c.
Referenced by process_rtcp_report(), and rtcp_stats_init().
#define JITTER_LEAD_FRAMES 10 |
Definition at line 66 of file switch_rtp.c.
Referenced by check_jitter(), and rtp_common_read().
#define KALMAN_SYSTEM_MODELS 3 /*loss, jitter, rtt*/ |
Definition at line 173 of file switch_rtp.c.
Referenced by rtcp_stats_init().
#define MASTER_KEY_LEN 30 |
Definition at line 76 of file switch_rtp.c.
#define MAX_DTLS_MTU 4096 |
Definition at line 269 of file switch_rtp.c.
Referenced by do_dtls(), and switch_rtp_add_dtls().
#define MAX_NACK 10 |
Definition at line 2132 of file switch_rtp.c.
Referenced by check_rtcp_and_ice().
#define MAX_SRTP_ERRS 100 |
Definition at line 79 of file switch_rtp.c.
Referenced by read_bundle_rtp_packet(), and read_rtp_packet().
#define MEDIA_TOO_LONG 2000 |
Definition at line 819 of file switch_rtp.c.
Referenced by calc_elapsed(), and handle_ice().
#define NTP_TIME_OFFSET 2208988800UL |
Definition at line 80 of file switch_rtp.c.
Referenced by calc_local_lsr_now(), and rtcp_generate_sender_info().
#define READ_DEC | ( | rtp_session | ) | rtp_session->reading--; switch_mutex_unlock(rtp_session->read_mutex) |
Definition at line 68 of file switch_rtp.c.
Referenced by do_flush(), handle_ice(), ice_out(), rtp_common_read(), switch_rtp_activate_jitter_buffer(), switch_rtp_change_interval(), switch_rtp_destroy(), switch_rtp_set_local_address(), and switch_rtp_udptl_mode().
#define READ_INC | ( | rtp_session | ) | switch_mutex_lock(rtp_session->read_mutex); rtp_session->reading++ |
Definition at line 67 of file switch_rtp.c.
Referenced by do_flush(), handle_ice(), ice_out(), rtp_common_read(), switch_rtp_activate_jitter_buffer(), switch_rtp_change_interval(), switch_rtp_destroy(), switch_rtp_set_local_address(), and switch_rtp_udptl_mode().
#define return_cng_frame | ( | ) | do_cng = 1; goto timer_check |
Definition at line 5845 of file switch_rtp.c.
Referenced by rtp_common_read().
#define RTP_BODY | ( | _s | ) | (char *) (_s->recv_msg.ebody ? _s->recv_msg.ebody : _s->recv_msg.body) |
Definition at line 118 of file switch_rtp.c.
Referenced by handle_rfc2833(), read_rtp_packet(), rtp_common_read(), switch_rtp_read(), switch_rtp_zerocopy_read(), and switch_rtp_zerocopy_read_frame().
#define RTP_END_PORT 32768 |
Definition at line 75 of file switch_rtp.c.
#define rtp_header_len 12 |
Definition at line 73 of file switch_rtp.c.
Referenced by do_flush(), handle_rfc2833(), read_rtp_packet(), rtp_common_read(), rtp_common_write(), switch_rtp_read(), switch_rtp_write_manual(), switch_rtp_zerocopy_read(), and switch_rtp_zerocopy_read_frame().
#define RTP_MAGIC_NUMBER 42 |
Definition at line 77 of file switch_rtp.c.
#define rtp_session_name | ( | _rtp_session | ) | _rtp_session->session ? switch_core_session_get_name(_rtp_session->session) : "-" |
Definition at line 85 of file switch_rtp.c.
Referenced by check_jitter(), check_rtcp_and_ice(), do_mos(), handle_ice(), ice_out(), and rtp_common_read().
#define RTP_START_PORT 16384 |
Definition at line 74 of file switch_rtp.c.
#define RTP_STUN_FREQ 1000000 |
Definition at line 72 of file switch_rtp.c.
Referenced by ice_out().
#define rtp_type | ( | rtp_session | ) | rtp_session->flags[SWITCH_RTP_FLAG_TEXT] ? "text" : (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] ? "video" : "audio") |
Definition at line 540 of file switch_rtp.c.
Referenced by check_jitter(), check_rtcp_and_ice(), check_timeout(), do_dtls(), do_mos(), dtls_state_handshake(), dtls_state_setup(), handle_ice(), ice_out(), process_rtcp_report(), read_bundle_rtp_packet(), read_rtcp_packet(), read_rtp_packet(), rtcp_stats_init(), rtp_common_read(), rtp_common_write(), rtp_write_ready(), switch_rtp_activate_ice(), switch_rtp_add_crypto_key(), switch_rtp_add_dtls(), switch_rtp_pause_jitter_buffer(), and switch_rtp_set_media_timeout().
#define SDP_UFRAG_MAX_SIZE |
Definition at line 88 of file switch_rtp.c.
Referenced by switch_rtp_activate_ice().
#define STUN_TOO_LONG 20000 |
Definition at line 820 of file switch_rtp.c.
Referenced by handle_ice().
#define STUN_USERNAME_MAX_SIZE 513 /* From RFC5389: "It MUST contain a UTF-8 [RFC3629] encoded sequence of less than 513 bytes" */ |
Definition at line 87 of file switch_rtp.c.
Referenced by handle_ice(), and switch_rtp_activate_ice().
#define WARN_SRTP_ERRS 10 |
Definition at line 78 of file switch_rtp.c.
Referenced by read_bundle_rtp_packet(), and read_rtp_packet().
#define WRITE_DEC | ( | rtp_session | ) | rtp_session->writing--; switch_mutex_unlock(rtp_session->write_mutex) |
Definition at line 70 of file switch_rtp.c.
Referenced by handle_ice(), rtp_common_write(), switch_rtp_change_interval(), switch_rtp_destroy(), switch_rtp_set_local_address(), switch_rtp_udptl_mode(), switch_rtp_write_manual(), and switch_rtp_write_raw().
#define WRITE_INC | ( | rtp_session | ) | switch_mutex_lock(rtp_session->write_mutex); rtp_session->writing++ |
Definition at line 69 of file switch_rtp.c.
Referenced by handle_ice(), rtp_common_write(), switch_rtp_change_interval(), switch_rtp_destroy(), switch_rtp_set_local_address(), switch_rtp_udptl_mode(), switch_rtp_write_manual(), and switch_rtp_write_raw().
typedef struct dtls_bio_filter dtls_bio_filter |
typedef int(* dtls_state_handler_t) (switch_rtp_t *, switch_dtls_t *) |
Definition at line 296 of file switch_rtp.c.
typedef struct packet_list_s packet_list_t |
typedef srtp_hdr_t rtp_hdr_t |
Definition at line 97 of file switch_rtp.c.
typedef struct switch_dtls_s switch_dtls_t |
typedef struct switch_rtcp_sdes_unit_s switch_rtcp_sdes_unit_t |
typedef struct ts_normalize_s ts_normalize_t |
Enumerator | |
---|---|
RESULT_CONTINUE | |
RESULT_GOTO_END | |
RESULT_GOTO_RECVFROM | |
RESULT_GOTO_TIMERCHECK |
Definition at line 530 of file switch_rtp.c.
enum vad_talk_mask_t |
Enumerator | |
---|---|
VAD_FIRE_TALK | |
VAD_FIRE_NOT_TALK |
Definition at line 189 of file switch_rtp.c.
BIO_METHOD* BIO_dtls_filter | ( | void | ) |
void burstr_calculate | ( | int | loss[], |
int | received, | ||
double * | burstr, | ||
double * | lossr | ||
) |
Definition at line 1621 of file switch_rtp.c.
References switch_rtcp_report_block_frame::lost, and LOST_BURST_ANALYZE.
Referenced by check_jitter().
|
static |
Definition at line 2024 of file switch_rtp.c.
References rtcp_tmmbx_t::parts, and switch_assert.
Referenced by check_rtcp_and_ice().
|
static |
Definition at line 823 of file switch_rtp.c.
References ADJ_TOO_LONG, DS_READY, switch_rtp::dtls, switch_rtp::elapsed_adj, switch_rtp::elapsed_media, switch_rtp::elapsed_stun, switch_rtp::first_stun, switch_rtp::last_adj, switch_rtp::last_media, switch_rtp_ice_t::last_ok, MEDIA_TOO_LONG, switch_dtls_s::state, and switch_micro_time_now().
Referenced by handle_ice().
|
inlinestatic |
Definition at line 1819 of file switch_rtp.c.
References NTP_TIME_OFFSET, and switch_micro_time_now().
Referenced by process_rtcp_report(), and rtcp_generate_report_block().
|
static |
Definition at line 1655 of file switch_rtp.c.
References switch_rtp::bad_stream, burstr_calculate(), switch_rtp_numbers_t::burstrate, switch_rtp::clean_stream, do_mos(), switch_rtp::dtmf_data, switch_rtp_numbers_t::error_log, switch_rtp::flags, error_period::flaws, switch_rtp_numbers_t::flaws, switch_rtp_rfc2833_data::in_digit_ts, switch_rtp_stats_t::inbound, IPDV_THRESHOLD, switch_rtp_numbers_t::jitter_add, switch_rtp_numbers_t::jitter_addsq, switch_rtp::jitter_lead, JITTER_LEAD_FRAMES, switch_rtp_numbers_t::jitter_n, switch_rtp_numbers_t::last_loss, switch_rtp_numbers_t::last_proc_time, switch_rtp_numbers_t::last_processed_seq, switch_rtp::last_rtp_hdr, switch_rtp_numbers_t::loss, switch_rtp_numbers_t::lossrate, switch_rtcp_report_block_frame::lost, LOST_BURST_CAPTURE, switch_rtp_numbers_t::max_variance, switch_rtp_numbers_t::mean_interval, switch_rtp_numbers_t::min_variance, error_period::next, switch_rtp::next_stat_check_time, switch_rtp::old_mean, switch_rtp::one_second, switch_rtp::recovering_stream, switch_rtp_numbers_t::recved, reset_jitter_seq(), rtp_session_name, rtp_type, switch_rtp::session, error_period::start, switch_rtp::stats, error_period::stop, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_alloc, switch_core_session_request_video_refresh, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG3, switch_log_printf(), switch_micro_time_now(), SWITCH_RTP_FLAG_DTMF_ON, SWITCH_RTP_FLAG_PAUSE, SWITCH_RTP_FLAG_VIDEO, and switch_rtp_numbers_t::variance.
Referenced by read_rtp_packet().
|
static |
Definition at line 5799 of file switch_rtp.c.
References payload_map_s::allocated, switch_rtp::flag_mutex, switch_rtp::last_rtp_hdr, payload_map_s::negotiated, payload_map_s::next, switch_rtp::pmaps, payload_map_s::pt, RTP_BUG_ACCEPT_ANY_PAYLOAD, switch_rtp::rtp_bugs, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by read_rtp_packet(), and rtp_common_read().
|
static |
Definition at line 2133 of file switch_rtp.c.
References _RTCP_PSFB_FIR, _RTCP_PSFB_PLI, _RTCP_PT_FIR, _RTCP_PT_PSFB, _RTCP_PT_RR, _RTCP_PT_RTPFB, _RTCP_PT_SDES, _RTCP_PT_SR, _RTCP_RTPFB_NACK, _RTCP_RTPFB_TMMBN, _RTCP_RTPFB_TMMBR, _RTCP_SDES_CNAME, _RTCP_SDES_NOTE, rtcp_msg_t::body, calc_bw_exp(), switch_rtp::cn, switch_rtp::cng_pt, switch_rtcp_hdr_s::count, switch_rtcp_numbers_t::cycle, FALSE, switch_rtp::fir_count, switch_rtcp_video_counters_t::fir_count, switch_rtp::fir_seq, switch_rtp::flags, switch_rtcp_ext_hdr_t::fmt, get_next_write_ts(), rtp_msg_t::header, rtcp_msg_t::header, switch_rtcp_numbers_t::high_ext_seq_recv, switch_rtp::ice, switch_rtp::ice_mutex, ice_out(), switch_rtp_ice_t::ice_user, switch_rtp_stats_t::inbound, INVALID_PT, switch_rtcp_numbers_t::last_rpt_cycle, switch_rtcp_numbers_t::last_rpt_ext_seq, switch_rtcp_numbers_t::last_rpt_ts, switch_rtp::last_write_samplecount, switch_rtcp_sdes_unit_s::length, switch_rtcp_ext_hdr_t::length, switch_rtcp_hdr_s::length, MAX_NACK, switch_rtcp_video_counters_t::nack_count, switch_rtcp_ext_hdr_t::p, switch_rtcp_hdr_s::p, switch_rtp_numbers_t::period_packet_count, switch_rtcp_numbers_t::period_pkt_count, switch_rtp::pli_count, switch_rtcp_video_counters_t::pli_count, switch_rtp::prev_nacks_inflight, switch_rtcp_ext_hdr_t::pt, rtcp_fir_t::r1, rtcp_fir_t::r2, rtcp_fir_t::r3, switch_rtcp_ext_hdr_t::recv_ssrc, switch_rtp::remote_ssrc, switch_rtcp_sender_report::report_block, switch_rtcp_receiver_report::report_block, switch_rtp_ice_t::rready, switch_rtp_stats_t::rtcp, rtcp_generate_report_block(), rtcp_generate_sender_info(), switch_rtp::rtcp_ice, switch_rtp::rtcp_interval, switch_rtp::rtcp_last_sent, switch_rtp::rtcp_remote_addr, switch_rtp::rtcp_send_msg, switch_rtp::rtcp_sent_packets, switch_rtp::rtcp_sock_output, switch_rtp::rtcp_vstats, rtp_session_name, rtp_type, switch_timer::samplecount, switch_rtp::samples_per_interval, switch_rtp::send_ctx, switch_rtp::send_msg, switch_rtp::send_rr, switch_rtcp_ext_hdr_t::send_ssrc, switch_rtcp_sender_report::sender_info, switch_rtcp_numbers_t::sent_pkt_count, rtcp_fir_t::seq, switch_rtp::session, SFF_NONE, switch_rtp::srtp_idx_rtcp, switch_rtcp_report_block_frame::ssrc, rtcp_fir_t::ssrc, rtcp_tmmbx_t::ssrc, switch_rtp::ssrc, switch_rtcp_sender_report::ssrc, switch_rtcp_receiver_report::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_name, switch_core_session_media_flow(), SWITCH_CRYPTO_MKI_INDEX, SWITCH_FALSE, switch_get_addr(), switch_jb_pop_nack(), SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG2, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RTP_FLAG_AUDIO_FIRE_SEND_RTCP_EVENT, SWITCH_RTP_FLAG_AUTO_CNG, SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_NACK, SWITCH_RTP_FLAG_OLD_FIR, SWITCH_RTP_FLAG_RTCP_MUX, SWITCH_RTP_FLAG_RTCP_PASSTHRU, SWITCH_RTP_FLAG_SECURE_SEND, SWITCH_RTP_FLAG_SECURE_SEND_MKI, SWITCH_RTP_FLAG_UDPTL, SWITCH_RTP_FLAG_USE_TIMER, SWITCH_RTP_FLAG_VIDEO, SWITCH_RTP_FLAG_VIDEO_FIRE_SEND_RTCP_EVENT, switch_rtp_test_flag(), switch_rtp_write_manual(), switch_send_rtcp_event(), switch_sockaddr_get_port(), switch_socket_sendto(), SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_rtp::tmmbn, switch_rtp::tmmbr, TRUE, switch_rtp::ts, switch_rtcp_sdes_unit_s::type, switch_rtcp_hdr_s::type, using_ice(), switch_rtcp_sdes_unit_s::value, switch_rtp::vb, switch_rtcp_ext_hdr_t::version, switch_rtcp_hdr_s::version, switch_rtcp_video_stats_t::video_in, and switch_rtp::write_timer.
Referenced by read_rtp_packet(), rtp_common_read(), and switch_rtp_ping().
|
static |
Definition at line 7279 of file switch_rtp.c.
References switch_rtp::last_media, switch_rtp::media_timeout, rtp_type, switch_rtp::session, SWITCH_CAUSE_MEDIA_TIMEOUT, switch_channel_execute_on(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_channel(), switch_core_session_get_name, SWITCH_LOG_DEBUG10, switch_log_printf(), and switch_micro_time_now().
Referenced by rtp_common_read().
|
static |
Definition at line 5474 of file switch_rtp.c.
References switch_rtp::delay_samples, switch_dtmf_t::digit, switch_rtp::dtmf_data, switch_rtp_numbers_t::dtmf_packet_count, switch_rtp_rfc2833_data::dtmf_queue, switch_dtmf_t::duration, switch_rtp::flags, switch_rtp::interdigit_delay, switch_rtp::last_write_samplecount, switch_rtp::last_write_ts, switch_rtp::max_next_write_samplecount, memset(), switch_rtp::need_mark, switch_rtp::next_write_samplecount, switch_rtp_rfc2833_data::out_digit, switch_rtp_rfc2833_data::out_digit_dur, switch_rtp_rfc2833_data::out_digit_packet, switch_rtp_rfc2833_data::out_digit_sofar, switch_rtp_rfc2833_data::out_digit_sub_sofar, switch_rtp_stats_t::outbound, switch_rtp::queue_delay, switch_rtp_numbers_t::raw_bytes, RTP_BUG_CISCO_SKIP_MARK_BIT_2833, RTP_BUG_SONUS_SEND_INVALID_TIMESTAMP_2833, switch_rtp::rtp_bugs, switch_timer::samplecount, switch_rtp::samples_per_interval, switch_rtp::sending_dtmf, switch_rtp::seq, switch_rtp::session, set_dtmf_delay(), switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_char_to_rfc2833(), SWITCH_LOG_DEBUG, switch_log_printf(), switch_queue_size(), switch_queue_trypop(), SWITCH_RTP_FLAG_RESET, SWITCH_RTP_FLAG_USE_TIMER, switch_rtp_write_manual(), SWITCH_STATUS_SUCCESS, switch_rtp::te, switch_rtp::timer, switch_timer::timer_interface, switch_rtp_rfc2833_data::timestamp_dtmf, and switch_rtp::write_timer.
Referenced by rtp_common_read().
|
static |
Definition at line 3364 of file switch_rtp.c.
References switch_rtp_ice_t::addr, buf, switch_dtls_s::bytes, switch_rtp_ice_t::cand_responsive, cert, CF_AUDIO_VIDEO_BUNDLE, switch_dtls_s::data, switch_dtls_s::filter_bio, switch_rtp::from_addr, switch_rtp::ice, ICE_LITE, switch_rtp_ice_t::ice_user, MAX_DTLS_MTU, switch_dtls_s::read_bio, switch_rtp_ice_t::ready, switch_dtls_s::remote_addr, switch_dtls_s::remote_fp, switch_rtp_ice_t::rready, switch_dtls_s::rtp_session, rtp_type, switch_rtp::session, switch_dtls_s::sock_output, switch_dtls_s::ssl, switch_dtls_s::state, switch_assert, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_cmp_addr(), switch_core_cert_extract_fingerprint(), switch_core_cert_verify(), switch_core_session_get_channel(), switch_get_addr(), SWITCH_LOG_DEBUG5, SWITCH_LOG_DEBUG6, SWITCH_LOG_ERROR, switch_log_printf(), switch_socket_sendto(), SWITCH_STATUS_SUCCESS, SWITCH_TRUE, switch_rtp_ice_t::type, and switch_dtls_s::write_bio.
Referenced by read_rtcp_packet(), and read_rtp_packet().
|
static |
Definition at line 5678 of file switch_rtp.c.
References FALSE, switch_rtp::flags, switch_rtp_numbers_t::flush_packet_count, switch_rtp::from_addr, handle_rfc2833(), rtp_msg_t::header, switch_rtp_stats_t::inbound, switch_rtp::jb, jb_valid(), switch_rtp::last_media, switch_rtp::last_rtp_hdr, switch_rtp::media_timeout, switch_rtp_numbers_t::packet_count, switch_rtp::pause_jb, switch_rtp_numbers_t::raw_bytes, READ_DEC, READ_INC, switch_rtp::recv_msg, switch_rtp::recv_te, reset_jitter_seq(), rtp_header_len, switch_rtp::session, switch_rtp::sock_input, switch_rtp::stats, switch_channel_get_name(), SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_channel(), switch_core_session_request_video_refresh, switch_jb_reset(), SWITCH_LOG_CONSOLE, SWITCH_LOG_ERROR, switch_log_printf(), switch_micro_time_now(), switch_rtp_clear_flag(), SWITCH_RTP_FLAG_DEBUG_RTP_READ, SWITCH_RTP_FLAG_DTMF_ON, SWITCH_RTP_FLAG_NOBLOCK, SWITCH_RTP_FLAG_PROXY_MEDIA, SWITCH_RTP_FLAG_UDPTL, SWITCH_RTP_FLAG_VIDEO, switch_rtp_ready(), switch_rtp_set_flag(), SWITCH_SO_NONBLOCK, switch_socket_opt_set(), switch_socket_recvfrom(), TRUE, switch_rtp::vb, and switch_rtp::vbw.
Referenced by rtp_common_read().
|
static |
Definition at line 1571 of file switch_rtp.c.
References switch_rtp::bad_stream, switch_rtp::consecutive_flaws, error_period::consecutive_flaws, switch_rtp_numbers_t::error_log, error_period::flaws, switch_rtp_numbers_t::flaws, switch_rtp_stats_t::inbound, switch_rtp_numbers_t::last_flaw, switch_rtp_numbers_t::max_variance, switch_rtp_numbers_t::min_variance, switch_rtp_numbers_t::mos, switch_rtp_numbers_t::R, switch_rtp_numbers_t::recved, rtp_session_name, rtp_type, switch_rtp::session, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG3, switch_log_printf(), and switch_rtp_numbers_t::variance.
Referenced by check_jitter(), rtp_common_read(), switch_rtp_get_stats(), and switch_rtp_sync_stats().
|
static |
Definition at line 3605 of file switch_rtp.c.
References dtls_bio_filter_free(), dtls_bio_filter_new(), dtls_bio_filter_write(), dtls_bio_filter::mtu, dtls_bio_filter::mutex, packet_list_s::next, dtls_bio_filter::packets, packet_list_s::size, SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), dtls_bio_filter::tail, and dtls_bio_filter::unused.
Referenced by switch_rtp_dtls_init().
|
static |
Definition at line 3523 of file switch_rtp.c.
References pool, dtls_bio_filter::pool, and switch_core_destroy_memory_pool.
Referenced by dtls_bio_filter_ctrl(), and switch_rtp_dtls_init().
|
static |
Definition at line 3497 of file switch_rtp.c.
References dtls_bio_filter::mutex, dtls_bio_filter::packets, pool, dtls_bio_filter::pool, switch_core_alloc, switch_core_new_memory_pool, switch_mutex_init(), and SWITCH_MUTEX_NESTED.
Referenced by dtls_bio_filter_ctrl(), and switch_rtp_dtls_init().
|
static |
Definition at line 3556 of file switch_rtp.c.
References dtls_bio_filter::mutex, packet_list_s::next, dtls_bio_filter::packets, dtls_bio_filter::pool, packet_list_s::size, SWITCH_CHANNEL_LOG, switch_core_alloc, SWITCH_LOG_DEBUG1, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), dtls_bio_filter::tail, and dtls_bio_filter::unused.
Referenced by dtls_bio_filter_ctrl(), and switch_rtp_dtls_init().
|
static |
Definition at line 3309 of file switch_rtp.c.
References switch_rtp::session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, switch_channel_hangup, and switch_core_session_get_channel().
|
static |
Definition at line 3320 of file switch_rtp.c.
References DS_FAIL, DS_SETUP, dtls_set_state, rtp_type, switch_rtp::session, switch_dtls_s::ssl, SWITCH_CHANNEL_SESSION_LOG, switch_log_printf(), and SWITCH_LOG_WARNING.
|
static |
|
static |
Definition at line 3292 of file switch_rtp.c.
References switch_rtp::flags, switch_dtls_s::new_state, switch_rtp::session, switch_core_session_get_partner, switch_core_session_request_video_refresh, switch_core_session_rwunlock(), SWITCH_RTP_FLAG_VIDEO, and SWITCH_STATUS_SUCCESS.
|
static |
Definition at line 3215 of file switch_rtp.c.
References AES_CM_128_HMAC_SHA1_80, cert, cr_keylen, cr_kslen, cr_saltlen, secure_settings_s::crypto_type, DS_FAIL, DS_READY, switch_rtp::dtls, dtls_set_state, DTLS_TYPE_CLIENT, DTLS_TYPE_SERVER, secure_settings_s::local_raw_key, memset(), switch_dtls_s::remote_fp, secure_settings_s::remote_raw_key, switch_rtp::rtcp_dtls, rtp_type, switch_rtp::session, switch_dtls_s::ssl, SWITCH_CHANNEL_SESSION_LOG, switch_core_cert_extract_fingerprint(), switch_core_cert_verify(), SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), switch_rtp_add_crypto_key(), SWITCH_RTP_CRYPTO_RECV, SWITCH_RTP_CRYPTO_RECV_RTCP, SWITCH_RTP_CRYPTO_SEND, SWITCH_RTP_CRYPTO_SEND_RTCP, and switch_dtls_s::type.
|
static |
Definition at line 2717 of file switch_rtp.c.
References switch_rtp::flags, switch_rtp::from_addr, switch_rtp::local_host_str, switch_rtp::local_port, switch_rtp::pool, switch_rtp::rtcp_from_addr, switch_rtp::rtcp_local_addr, switch_rtp::rtcp_read_pollfd, switch_rtp::rtcp_sock_input, switch_rtp::session, SWITCH_CHANNEL_SESSION_LOG, switch_get_addr(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_POLLERR, SWITCH_POLLIN, SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_SO_REUSEADDR, switch_sockaddr_get_family(), switch_sockaddr_get_port(), switch_sockaddr_info_get(), switch_socket_bind(), switch_socket_close(), switch_socket_create(), switch_socket_create_pollset(), switch_socket_opt_set(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and SWITCH_UNSPEC.
Referenced by switch_rtp_activate_rtcp(), and switch_rtp_set_local_address().
|
static |
Definition at line 2673 of file switch_rtp.c.
References switch_rtp::eff_remote_host_str, switch_rtp::flags, switch_rtp::pool, switch_rtp::remote_rtcp_port, switch_rtp::rtcp_local_addr, switch_rtp::rtcp_remote_addr, switch_rtp::rtcp_sock_input, switch_rtp::rtcp_sock_output, switch_rtp::session, SWITCH_CHANNEL_SESSION_LOG, switch_get_addr(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_RTP_FLAG_ENABLE_RTCP, switch_sockaddr_get_family(), switch_sockaddr_info_get(), switch_socket_close(), switch_socket_create(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and SWITCH_UNSPEC.
Referenced by read_rtcp_packet(), and switch_rtp_activate_rtcp().
|
static |
Definition at line 3344 of file switch_rtp.c.
References switch_dtls_s::ssl, and switch_dtls_s::ssl_ctx.
Referenced by switch_rtp_del_dtls(), and switch_rtp_destroy().
|
static |
Definition at line 1543 of file switch_rtp.c.
References switch_rtp::last_write_ts, RTP_BUG_NEVER_SEND_MARKER, RTP_BUG_SEND_LINEAR_TIMESTAMPS, switch_rtp::rtp_bugs, switch_timer::samplecount, switch_rtp::samples_per_interval, switch_core_timer_next(), SWITCH_RTP_FLAG_USE_TIMER, switch_rtp_test_flag(), switch_rtp::ts, and switch_rtp::write_timer.
Referenced by check_rtcp_and_ice(), and rtp_common_write().
|
static |
Definition at line 5824 of file switch_rtp.c.
References payload_map_s::allocated, switch_rtp::flag_mutex, payload_map_s::negotiated, payload_map_s::next, switch_rtp::pmaps, payload_map_s::pt, switch_mutex_lock(), and switch_mutex_unlock().
Referenced by read_rtp_packet().
|
static |
Definition at line 952 of file switch_rtp.c.
References switch_rtp_ice_t::addr, switch_rtp::adj_window, switch_rtp::auto_adj_used, buf, calc_elapsed(), ice_s::cand_idx, switch_rtp_ice_t::cand_responsive, icand_s::cand_type, ice_s::cands, ice_s::chosen, switch_stun_error_code_t::code, icand_s::con_addr, icand_s::con_port, DS_READY, switch_rtp::dtls, switch_rtp::elapsed_adj, switch_rtp::elapsed_media, switch_rtp::elapsed_stun, switch_rtp::first_stun, switch_rtp::flags, switch_core_session_message::from, switch_rtp::from_addr, switch_stun_packet_t::header, switch_rtp::ice, ICE_CONTROLLED, ICE_GOOGLE_JINGLE, switch_rtp::ice_mutex, ice_out(), switch_rtp_ice_t::ice_params, switch_rtp_ice_t::ice_user, ICE_VANILLA, icecmp(), switch_stun_packet_header_t::id, switch_rtp_ice_t::initializing, ip, IPR_RTP, switch_rtp::last_adj, switch_rtp_ice_t::last_ok, switch_rtp_ice_t::last_sent_id, switch_rtp::last_stun, switch_stun_packet_header_t::length, MEDIA_TOO_LONG, memset(), switch_core_session_message::message_id, switch_rtp_ice_t::missed_count, switch_stun_error_code_t::number, switch_core_session_message::numeric_arg, switch_rtp_ice_t::pass, switch_core_session_message::pointer_arg, switch_rtp::pool, icand_s::priority, switch_rtp_ice_t::proto, READ_DEC, READ_INC, switch_rtp_ice_t::ready, switch_rtp::remote_addr, switch_rtp::remote_port, icand_s::responsive, switch_rtp_ice_t::rready, switch_rtp::rtcp_from_addr, switch_rtp::rtcp_ice, switch_rtp::rtcp_sock_output, RTP_BUG_ALWAYS_AUTO_ADJUST, switch_rtp::rtp_bugs, rtp_session_name, rtp_type, switch_rtp::session, switch_rtp::sock_output, switch_dtls_s::state, STUN_TOO_LONG, STUN_USERNAME_MAX_SIZE, switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_cmp_addr(), switch_core_session_get_channel(), switch_core_session_receive_message, switch_core_session_video_reinit(), SWITCH_DECLARE, SWITCH_FALSE, switch_get_addr(), SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG5, SWITCH_LOG_DEBUG6, SWITCH_LOG_DEBUG8, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MESSAGE_INDICATE_STUN_ERROR, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), switch_rtp_change_ice_dest(), switch_rtp_clear_flag(), SWITCH_RTP_FLAG_AUTOADJ, SWITCH_RTP_FLAG_RTCP_MUX, SWITCH_RTP_FLAG_VIDEO, switch_rtp_ready(), switch_rtp_set_flag(), switch_rtp_set_remote_address(), switch_snprintf(), switch_sockaddr_get_port(), switch_sockaddr_info_get(), switch_socket_sendto(), SWITCH_STATUS_SUCCESS, SWITCH_STUN_ATTR_ERROR_CODE, SWITCH_STUN_ATTR_MAPPED_ADDRESS, SWITCH_STUN_ATTR_PRIORITY, SWITCH_STUN_ATTR_USE_CAND, SWITCH_STUN_ATTR_USERNAME, SWITCH_STUN_ATTR_XOR_MAPPED_ADDRESS, switch_stun_attribute_padded_length, SWITCH_STUN_BINDING_ERROR_RESPONSE, SWITCH_STUN_BINDING_REQUEST, SWITCH_STUN_BINDING_RESPONSE, switch_stun_packet_attribute_add_fingerprint(), switch_stun_packet_attribute_add_integrity(), switch_stun_packet_attribute_add_username(), switch_stun_packet_attribute_add_xor_binded_address(), switch_stun_packet_attribute_get_mapped_address(), switch_stun_packet_attribute_get_username(), switch_stun_packet_attribute_get_xor_mapped_address(), switch_stun_packet_build_header(), switch_stun_packet_first_attribute, switch_stun_packet_length, switch_stun_packet_next_attribute, switch_stun_packet_parse(), SWITCH_STUN_TYPE_ATTRIBUTE, SWITCH_STUN_TYPE_PACKET_TYPE, switch_stun_value_to_name(), SWITCH_TRUE, SWITCH_UNSPEC, switch_stun_packet_header_t::type, switch_stun_packet_attribute_t::type, switch_rtp_ice_t::type, icand_s::use_candidate, switch_rtp_ice_t::user_ice, switch_stun_packet_attribute_t::value, WRITE_DEC, WRITE_INC, and zstr.
Referenced by process_rtcp_packet(), read_rtcp_packet(), and read_rtp_packet().
|
static |
Definition at line 6689 of file switch_rtp.c.
References switch_rtp::flags, switch_rtp_packet_t::header, switch_rtp::local_addr, switch_rtp_hdr_t::m, switch_rtp_hdr_t::pt, switch_rtp::remote_addr, switch_rtp::remote_port, switch_rtp::rtcp_from_addr, switch_rtp_hdr_t::seq, switch_rtp::session, switch_channel_get_name(), SWITCH_CHANNEL_SESSION_LOG, SWITCH_CHANNEL_SESSION_LOG_CLEAN, switch_core_session_get_channel(), switch_core_session_get_name, SWITCH_FALSE, switch_get_addr(), switch_jb_get_packet_by_seq(), SWITCH_LOG_CONSOLE, SWITCH_LOG_DEBUG2, switch_log_printf(), SWITCH_RTP_FLAG_DEBUG_RTP_WRITE, SWITCH_RTP_FLAG_NACK, switch_rtp_write_raw(), switch_sockaddr_get_port(), SWITCH_STATUS_SUCCESS, switch_rtp_hdr_t::ts, and switch_rtp::vbw.
Referenced by process_rtcp_report().
|
static |
Definition at line 582 of file switch_rtp.c.
References switch_dtmf_t::digit, switch_rtp::dtmf_data, DTMF_SANITY, switch_dtmf_t::duration, switch_rtp_rfc2833_data::first_digit, switch_rtp::flags, switch_rtp_rfc2833_data::flip, switch_rtp_rfc2833_data::in_digit_queued, switch_rtp_rfc2833_data::in_digit_sanity, switch_rtp_rfc2833_data::in_digit_seq, switch_rtp_rfc2833_data::in_digit_ts, switch_rtp_rfc2833_data::in_interleaved, switch_rtp_stats_t::inbound, switch_rtp::jb, key, switch_rtp_rfc2833_data::last_digit, switch_rtp_rfc2833_data::last_duration, switch_rtp_rfc2833_data::last_in_digit_ts, switch_rtp_numbers_t::last_processed_seq, switch_rtp::last_rtp_hdr, switch_rtp::pool, switch_rtp::recv_te, RESULT_CONTINUE, RESULT_GOTO_END, RESULT_GOTO_RECVFROM, RESULT_GOTO_TIMERCHECK, RTP_BODY, RTP_BUG_FLUSH_JB_ON_DTMF, RTP_BUG_IGNORE_DTMF_DURATION, switch_rtp::rtp_bugs, rtp_header_len, rtp_write_ready(), switch_rtp::session, switch_rtp::stats, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, switch_cond_next(), switch_core_memory_pool_get_data(), switch_core_min_dtmf_duration(), SWITCH_DTMF_RTP, switch_jb_reset(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_rfc2833_to_char(), SWITCH_RTP_FLAG_DTMF_ON, SWITCH_RTP_FLAG_PASS_RFC2833, SWITCH_RTP_FLAG_PROXY_MEDIA, switch_rtp_queue_rfc2833_in(), and switch_rtp_ready().
Referenced by do_flush(), and rtp_common_read().
|
static |
Definition at line 853 of file switch_rtp.c.
References switch_rtp_ice_t::addr, buf, ice_s::cands, ice_s::chosen, switch_stun_packet_t::header, ICE_CONTROLLED, ICE_LITE, switch_rtp_ice_t::ice_params, switch_rtp_ice_t::ice_user, ICE_VANILLA, switch_stun_packet_header_t::id, switch_rtp_ice_t::last_sent_id, switch_rtp::last_stun, switch_rtp_ice_t::next_run, icand_s::priority, switch_rtp_ice_t::proto, READ_DEC, READ_INC, switch_rtp_ice_t::rpass, switch_rtp::rtcp_ice, switch_rtp::rtcp_sock_output, rtp_session_name, RTP_STUN_FREQ, rtp_type, switch_rtp_ice_t::sending, switch_rtp::session, switch_rtp::sock_output, switch_assert, SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_CRIT, switch_log_printf(), SWITCH_LOG_WARNING, switch_micro_time_now(), switch_snprintf(), switch_socket_sendto(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, SWITCH_STUN_BINDING_REQUEST, switch_stun_packet_attribute_add_controlled(), switch_stun_packet_attribute_add_controlling(), switch_stun_packet_attribute_add_fingerprint(), switch_stun_packet_attribute_add_integrity(), switch_stun_packet_attribute_add_priority(), switch_stun_packet_attribute_add_software(), switch_stun_packet_attribute_add_use_candidate(), switch_stun_packet_attribute_add_username(), switch_stun_packet_build_header(), switch_stun_packet_length, switch_version_revision_human(), and switch_rtp_ice_t::type.
Referenced by check_rtcp_and_ice(), generate_m(), handle_ice(), and switch_core_media_gen_local_sdp().
int icecmp | ( | const char * | them, |
switch_rtp_ice_t * | ice | ||
) |
Definition at line 943 of file switch_rtp.c.
References switch_rtp_ice_t::luser_ice, and switch_rtp_ice_t::user_ice.
Referenced by handle_ice().
|
static |
Definition at line 5662 of file switch_rtp.c.
References DS_READY, switch_rtp::dtls, switch_rtp::ice, switch_rtp_ice_t::ice_user, switch_rtp_ice_t::ready, switch_rtp_ice_t::rready, and switch_dtls_s::state.
Referenced by do_flush(), read_bundle_rtp_packet(), read_rtp_packet(), and rtp_common_read().
|
static |
Definition at line 3044 of file switch_rtp.c.
References switch_rtp::flags, switch_rtp::local_addr, switch_rtp::rtcp_local_addr, switch_rtp::rtcp_sock_input, switch_rtp::sock_input, SWITCH_RTP_FLAG_ENABLE_RTCP, and switch_socket_sendto().
Referenced by switch_rtp_break(), switch_rtp_kill_socket(), and switch_rtp_udptl_mode().
|
static |
Definition at line 7099 of file switch_rtp.c.
References handle_ice(), rtcp_msg_t::header, switch_rtp::ice, switch_rtp_ice_t::ice_user, switch_rtcp_hdr_s::length, process_rtcp_report(), switch_rtp::rtcp_ice, switch_rtp::rtcp_recv_msg_p, switch_rtp::session, SWITCH_CHANNEL_SESSION_LOG, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_SIZE_T_FMT, SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_rtcp_hdr_s::type, and switch_rtcp_hdr_s::version.
Referenced by read_rtcp_packet(), and rtp_common_read().
|
static |
Definition at line 6762 of file switch_rtp.c.
References __BIG_ENDIAN, _RTCP_PSFB_FIR, _RTCP_PSFB_PLI, _RTCP_PT_FIR, _RTCP_PT_PSFB, _RTCP_PT_RR, _RTCP_PT_RTPFB, _RTCP_PT_SR, _RTCP_RTPFB_NACK, rtcp_ext_msg_t::body, rtcp_msg_t::body, calc_local_lsr_now(), CF_VIDEO_REFRESH_REQ, switch_rtcp_hdr_s::count, switch_rtp::detectors, switch_rtcp_report_block_frame::dlsr, switch_rtcp_report_block::dlsr, EST_LOSS, EST_RTT, switch_rtp::estimators, switch_rtp::flags, switch_rtcp_ext_hdr_t::fmt, switch_rtcp_report_block_frame::fraction, switch_rtcp_report_block::fraction, handle_nack(), rtcp_ext_msg_t::header, rtcp_msg_t::header, switch_rtcp_report_block_frame::highest_sequence_number_received, switch_rtcp_report_block::highest_sequence_number_received, switch_rtcp_report_block_frame::jitter, switch_rtcp_report_block::jitter, switch_rtcp_numbers_t::last_recv_lsr_local, switch_rtcp_numbers_t::last_recv_lsr_peer, switch_rtcp_ext_hdr_t::length, switch_rtcp_hdr_s::length, switch_rtcp_report_block_frame::loss_avg, switch_rtcp_report_block_frame::lost, switch_rtcp_report_block::lost, switch_rtcp_report_block_frame::lsr, switch_rtcp_report_block::lsr, MAX_REPORT_BLOCKS, switch_rtcp_frame::ntp_lsw, switch_rtcp_sender_info::ntp_lsw, switch_rtcp_frame::ntp_msw, switch_rtcp_sender_info::ntp_msw, switch_rtcp_sender_info::oc, switch_rtcp_frame::octect_count, switch_rtcp_numbers_t::octet_count, switch_rtcp_hdr_s::p, switch_rtcp_frame::packet_count, switch_rtcp_numbers_t::packet_count, switch_rtcp_frame::packet_type, switch_rtcp_sender_info::pc, switch_rtcp_numbers_t::peer_ssrc, switch_rtcp_sender_report::report_block, switch_rtcp_receiver_report::report_block, switch_rtcp_frame::report_count, switch_rtcp_frame::reports, switch_rtp_stats_t::rtcp, switch_rtp::rtcp_frame, switch_rtp::rtcp_fresh_frame, switch_rtp::rtcp_recv_msg_p, rtp_type, switch_rtcp_report_block_frame::rtt_avg, SCC_AUDIO_ADJUST_BITRATE, SCC_AUDIO_PACKET_LOSS, SCCT_INT, SCCT_NONE, SCCT_STRING, switch_rtcp_sender_report::sender_info, switch_rtp::session, switch_rtcp_report_block_frame::ssrc, switch_rtcp_frame::ssrc, switch_rtcp_report_block::ssrc, switch_rtcp_sender_report::ssrc, switch_rtcp_receiver_report::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_flag, switch_core_media_codec_control(), switch_core_media_gen_key_frame, switch_core_session_get_channel(), switch_core_session_get_name, switch_core_session_media_flow(), switch_core_session_request_video_refresh, SWITCH_IO_WRITE, switch_kalman_cusum_detect_change(), switch_kalman_estimate(), switch_kalman_is_slow_link(), SWITCH_LOG_DEBUG2, SWITCH_LOG_DEBUG3, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_FLOW_RECVONLY, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_MEDIA_TYPE_VIDEO, switch_micro_time_now(), SWITCH_RTP_FLAG_ADJ_BITRATE_CAP, SWITCH_RTP_FLAG_ESTIMATORS, SWITCH_RTP_FLAG_OLD_FIR, SWITCH_RTP_FLAG_RTCP_PASSTHRU, SWITCH_RTP_FLAG_VIDEO, switch_rtp_set_flag(), switch_rtp_test_flag(), SWITCH_SIZE_T_FMT, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_time_exp_gmt(), switch_rtcp_frame::timestamp, switch_time_exp_t::tm_hour, switch_time_exp_t::tm_mday, switch_time_exp_t::tm_min, switch_time_exp_t::tm_mon, switch_time_exp_t::tm_sec, switch_time_exp_t::tm_usec, switch_time_exp_t::tm_year, switch_rtcp_sender_info::ts, switch_rtcp_hdr_s::type, and kalman_estimator_s::val_estimate_last.
Referenced by process_rtcp_packet().
|
static |
Definition at line 5847 of file switch_rtp.c.
References switch_rtp::cng_pt, DS_READY, switch_rtp::dtls, dtls_set_state, switch_rtp::flags, switch_rtp::has_rtp, rtp_msg_t::header, switch_rtp::ice_mutex, switch_rtp::jb, jb_valid(), switch_rtp::last_rtp_hdr, switch_rtp::local_addr, MAX_SRTP_ERRS, switch_rtp::pause_jb, switch_rtp::recv_ctx, switch_rtp::recv_msg, switch_rtp::recv_policy, switch_rtp::recv_te, switch_rtp::remote_addr, switch_rtp::remote_port, switch_rtp::rtp_from_addr, rtp_type, switch_rtp::session, SFF_PLC, switch_rtp::srtp_errs, switch_rtp::srtp_idx_rtp, SWITCH_CAUSE_SRTP_READ_ERROR, switch_channel_get_name(), switch_channel_hangup, SWITCH_CHANNEL_SESSION_LOG, SWITCH_CHANNEL_SESSION_LOG_CLEAN, switch_core_media_get_rtp_session(), switch_core_session_get_channel(), switch_get_addr(), switch_jb_put_packet(), SWITCH_LOG_CONSOLE, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, switch_mutex_lock(), switch_mutex_unlock(), switch_rtp_clear_flag(), SWITCH_RTP_FLAG_DEBUG_RTP_READ, SWITCH_RTP_FLAG_PROXY_MEDIA, SWITCH_RTP_FLAG_SECURE_RECV, SWITCH_RTP_FLAG_SECURE_RECV_MKI, SWITCH_RTP_FLAG_SECURE_RECV_RESET, SWITCH_RTP_FLAG_SRTP_HANGUP_ON_ERROR, SWITCH_RTP_FLAG_UDPTL, switch_sockaddr_get_port(), SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, and WARN_SRTP_ERRS.
Referenced by read_rtp_packet().
|
static |
Definition at line 7157 of file switch_rtp.c.
References b, switch_dtls_s::bytes, switch_dtls_s::data, do_dtls(), switch_rtp::eff_remote_host_str, enable_remote_rtcp_socket(), switch_rtp::flags, handle_ice(), rtcp_msg_t::header, switch_rtp::ice_mutex, switch_rtp_ice_t::ice_user, if(), switch_rtp::pool, process_rtcp_packet(), switch_rtp::recv_ctx, switch_rtp::remote_rtcp_port, switch_rtp::rtcp_auto_adj_used, switch_rtp::rtcp_autoadj_tally, switch_rtp::rtcp_autoadj_threshold, switch_rtp::rtcp_dtls, switch_rtp::rtcp_from_addr, switch_rtp::rtcp_ice, switch_rtp::rtcp_recv_msg_p, switch_rtp::rtcp_remote_addr, switch_rtp::rtcp_sock_input, RTP_BUG_ALWAYS_AUTO_ADJUST, switch_rtp::rtp_bugs, rtp_type, switch_rtp::session, switch_rtp::srtp_idx_rtcp, switch_assert, SWITCH_CHANNEL_SESSION_LOG, switch_cmp_addr(), switch_core_strdup, SWITCH_FALSE, switch_get_addr(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), switch_mutex_lock(), switch_mutex_unlock(), switch_rtp_clear_flag(), SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_RTCP_AUTOADJ, SWITCH_RTP_FLAG_SECURE_RECV, SWITCH_RTP_FLAG_SECURE_RECV_MKI, switch_rtp_set_flag(), switch_sockaddr_get_port(), switch_socket_recvfrom(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_rtcp_hdr_s::version.
Referenced by rtp_common_read().
|
static |
Definition at line 5970 of file switch_rtp.c.
References payload_map_s::allocated, b, switch_dtls_s::bytes, CF_AUDIO_VIDEO_BUNDLE, check_jitter(), check_recv_payload(), check_rtcp_and_ice(), switch_rtp::clean, switch_rtp_numbers_t::cng_packet_count, switch_rtp::cng_pt, switch_dtls_s::data, do_dtls(), switch_rtp::dtls, switch_rtp_numbers_t::dtmf_packet_count, rtp_msg_t::ebody, rtp_msg_t::ext, switch_rtp::flag_mutex, switch_rtp::flags, switch_rtp_numbers_t::flush_packet_count, switch_rtp::from_addr, get_recv_payload(), handle_ice(), switch_rtp::has_ice, switch_rtp::has_rtcp, switch_rtp::has_rtp, rtp_msg_t::header, rtcp_msg_t::header, switch_rtp::hot_hits, switch_rtp::ice, switch_rtp::ice_mutex, switch_rtp_ice_t::ice_user, switch_rtp_stats_t::inbound, switch_timer::interval, switch_rtp::jb, switch_rtp_numbers_t::jb_packet_count, jb_valid(), switch_rtp::last_cng_ts, switch_rtp::last_flush_packet_count, switch_rtp::last_jb_read_ssrc, switch_rtp::last_media, switch_rtp::last_read_time, switch_rtp::last_read_ts, switch_rtp::last_rtp_hdr, switch_rtp::last_seq, length, switch_rtp_hdr_ext_t::length, switch_rtp::local_addr, MAX_SRTP_ERRS, switch_rtp_numbers_t::media_bytes, switch_rtp_numbers_t::media_packet_count, switch_rtp::media_timeout, memset(), switch_rtp::missed_count, payload_map_s::negotiated, payload_map_s::next, switch_rtp_numbers_t::packet_count, switch_rtp::pause_jb, switch_rtcp_numbers_t::period_pkt_count, switch_rtcp_numbers_t::pkt_count, switch_rtp::pmaps, switch_rtp::prev_read_ts, payload_map_s::pt, switch_rtp::punts, switch_rtp_numbers_t::raw_bytes, read_bundle_rtp_packet(), switch_rtp::read_pollfd, switch_rtp::recv_ctx, switch_rtp::recv_msg, switch_rtp::recv_policy, switch_rtp::recv_te, switch_rtp::remote_addr, switch_rtp::remote_port, switch_rtp::remote_ssrc, switch_rtp_stats_t::rtcp, switch_rtp::rtcp_dtls, switch_rtp::rtcp_recv_msg_p, rtcp_stats(), RTP_BODY, RTP_BUG_ACCEPT_ANY_PACKETS, RTP_BUG_ACCEPT_ANY_PAYLOAD, RTP_BUG_IGNORE_MARK_BIT, switch_rtp::rtp_bugs, switch_rtp::rtp_from_addr, rtp_header_len, rtp_type, rtp_write_ready(), switch_rtp::samples_per_interval, switch_rtp::session, SFF_PLC, SFF_PROXY_PACKET, SFF_RTCP, switch_rtp::skip_timer, switch_rtp::sock_input, switch_rtp::srtp_errs, switch_rtp::srtp_idx_rtcp, switch_rtp::srtp_idx_rtp, switch_rtp::stats, switch_assert, SWITCH_CAUSE_SRTP_READ_ERROR, switch_channel_get_name(), switch_channel_hangup, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, SWITCH_CHANNEL_SESSION_LOG_CLEAN, switch_channel_test_flag(), switch_core_session_get_channel(), switch_core_session_get_rtp_pt(), switch_core_session_request_video_refresh, switch_core_timer_sync(), switch_cp_addr(), switch_get_addr(), switch_ivr_parse_all_messages(), switch_jb_destroy(), switch_jb_get_last_read_len(), switch_jb_get_packet(), switch_jb_put_packet(), switch_jb_reset(), SWITCH_LOG_ALERT, SWITCH_LOG_CONSOLE, SWITCH_LOG_DEBUG1, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), switch_poll(), switch_rtp_clear_flag(), SWITCH_RTP_FLAG_BYTESWAP, SWITCH_RTP_FLAG_DEBUG_RTP_READ, SWITCH_RTP_FLAG_DETECT_SSRC, SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_FLUSH, SWITCH_RTP_FLAG_KILL_JB, SWITCH_RTP_FLAG_NACK, SWITCH_RTP_FLAG_PROXY_MEDIA, SWITCH_RTP_FLAG_RTCP_MUX, SWITCH_RTP_FLAG_SECURE_RECV, SWITCH_RTP_FLAG_SECURE_RECV_MKI, SWITCH_RTP_FLAG_SECURE_RECV_RESET, SWITCH_RTP_FLAG_SRTP_HANGUP_ON_ERROR, SWITCH_RTP_FLAG_TEXT, SWITCH_RTP_FLAG_UDPTL, SWITCH_RTP_FLAG_USE_TIMER, SWITCH_RTP_FLAG_VIDEO, SWITCH_RTP_MAX_BUF_LEN_WORDS, switch_rtp_set_flag(), switch_rtp_video_refresh(), switch_sockaddr_get_port(), switch_socket_recvfrom(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_MORE_DATA, SWITCH_STATUS_NOTFOUND, SWITCH_STATUS_RESTART, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, SWITCH_STATUS_TOO_LATE, switch_swap_linear(), switch_rtp::timer, to, switch_rtcp_hdr_s::type, switch_rtp::vb, switch_rtp::vbw, switch_rtcp_hdr_s::version, and WARN_SRTP_ERRS.
Referenced by rtp_common_read().
|
static |
Definition at line 1646 of file switch_rtp.c.
References switch_rtp::consecutive_flaws, switch_rtp_stats_t::inbound, switch_rtp::jitter_lead, switch_rtp_numbers_t::last_flaw, switch_rtp_numbers_t::last_proc_time, switch_rtp_numbers_t::last_processed_seq, and switch_rtp::stats.
Referenced by check_jitter(), do_flush(), rtp_common_read(), rtp_flush_read_buffer(), switch_rtp_clear_flag(), and switch_rtp_set_flag().
|
static |
Definition at line 1835 of file switch_rtp.c.
References switch_rtcp_numbers_t::base_seq, calc_local_lsr_now(), switch_rtcp_numbers_t::cum_lost, switch_rtcp_numbers_t::cycle, switch_rtcp_report_block_frame::dlsr, switch_rtcp_report_block::dlsr, switch_rtp::flags, switch_rtcp_report_block::fraction, switch_rtcp_numbers_t::high_ext_seq_recv, switch_rtcp_report_block::highest_sequence_number_received, switch_rtcp_numbers_t::inter_jitter, switch_rtcp_report_block::jitter, switch_rtcp_numbers_t::last_recv_lsr_local, switch_rtcp_numbers_t::last_recv_lsr_peer, switch_rtcp_numbers_t::last_rpt_cycle, switch_rtcp_numbers_t::last_rpt_ext_seq, switch_rtcp_report_block::lost, switch_rtcp_report_block::lsr, switch_rtcp_numbers_t::peer_ssrc, switch_rtcp_numbers_t::period_pkt_count, switch_rtp::pool, switch_rtp::remote_ssrc, switch_rtp_stats_t::rtcp, switch_rtcp_numbers_t::rtcp_rtp_count, switch_rtcp_report_block::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_core_memory_pool_get_data(), SWITCH_LOG_CRIT, switch_log_printf(), and SWITCH_RTP_FLAG_VIDEO.
Referenced by check_rtcp_and_ice().
|
static |
Definition at line 1795 of file switch_rtp.c.
References switch_rtp::last_write_ts, switch_rtcp_sender_info::ntp_lsw, switch_rtcp_sender_info::ntp_msw, NTP_TIME_OFFSET, switch_rtcp_sender_info::oc, switch_rtp_stats_t::outbound, switch_rtp_numbers_t::packet_count, switch_rtcp_sender_info::pc, switch_rtp::pool, switch_rtp_numbers_t::raw_bytes, switch_rtp_stats_t::rtcp, switch_rtcp_numbers_t::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_core_memory_pool_get_data(), SWITCH_LOG_DEBUG10, switch_log_printf(), switch_micro_time_now(), switch_time_exp_gmt(), switch_time_exp_t::tm_hour, switch_time_exp_t::tm_mday, switch_time_exp_t::tm_min, switch_time_exp_t::tm_mon, switch_time_exp_t::tm_sec, switch_time_exp_t::tm_usec, switch_time_exp_t::tm_year, and switch_rtcp_sender_info::ts.
Referenced by check_rtcp_and_ice().
|
static |
Definition at line 1952 of file switch_rtp.c.
References switch_rtcp_numbers_t::bad_seq, switch_rtcp_numbers_t::cycle, switch_rtp::flags, switch_rtcp_numbers_t::high_ext_seq_recv, switch_rtcp_numbers_t::init, switch_rtcp_numbers_t::inter_jitter, switch_rtcp_numbers_t::last_pkt_tsdiff, switch_rtp::last_rtp_hdr, switch_rtcp_numbers_t::period_pkt_count, switch_rtcp_numbers_t::pkt_count, switch_rtp::pool, switch_rtp_stats_t::rtcp, switch_rtp::rtcp_interval, switch_rtp::rtcp_sock_output, rtcp_stats_init(), switch_timer::samplecount, switch_rtcp_numbers_t::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_core_memory_pool_get_data(), SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG10, switch_log_printf(), SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_RTCP_PASSTHRU, switch_rtp::timer, and switch_rtp::write_timer.
Referenced by read_rtp_packet().
|
static |
Definition at line 1901 of file switch_rtp.c.
References switch_rtcp_numbers_t::bad_seq, switch_rtcp_numbers_t::base_seq, switch_rtcp_numbers_t::cum_lost, switch_rtcp_numbers_t::cycle, switch_rtp::detectors, EST_LOSS, EST_RTT, switch_rtp::estimators, switch_rtp::flags, switch_rtcp_numbers_t::high_ext_seq_recv, switch_rtcp_numbers_t::init, switch_rtcp_numbers_t::inter_jitter, KALMAN_SYSTEM_MODELS, switch_rtcp_numbers_t::last_pkt_tsdiff, switch_rtcp_numbers_t::last_rpt_cycle, switch_rtcp_numbers_t::last_rpt_ext_seq, switch_rtcp_numbers_t::last_rpt_ts, switch_rtp::last_rtp_hdr, switch_rtcp_numbers_t::period_pkt_count, switch_rtcp_numbers_t::pkt_count, switch_rtp::pool, switch_rtp_stats_t::rtcp, switch_rtcp_numbers_t::rtcp_rtp_count, switch_rtp::rtcp_sock_output, rtp_type, switch_timer::samplecount, switch_rtcp_numbers_t::sent_pkt_count, switch_rtp::session, switch_rtcp_numbers_t::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, SWITCH_CODEC_FLAG_HAS_ADJ_BITRATE, switch_core_alloc, switch_core_media_codec_get_cap(), switch_core_memory_pool_get_data(), switch_kalman_cusum_init(), switch_kalman_init(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_RTP_FLAG_ADJ_BITRATE_CAP, SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_ESTIMATORS, SWITCH_RTP_FLAG_RTCP_PASSTHRU, and switch_rtp::write_timer.
Referenced by rtcp_stats(), and switch_rtp_reset().
|
static |
NOOP
Definition at line 7301 of file switch_rtp.c.
References switch_rtp_ice_t::addr, switch_rtp::auto_adj_used, switch_rtp::autoadj_tally, switch_rtp::autoadj_threshold, switch_rtp::autoadj_window, switch_rtp::bad_stream, CF_AUDIO_VIDEO_BUNDLE, check_recv_payload(), check_rtcp_and_ice(), check_timeout(), switch_rtp::cng_count, switch_rtp::cng_pt, do_2833(), do_flush(), do_mos(), switch_rtp::dtmf_data, switch_rtp_rfc2833_data::dtmf_inqueue, switch_rtp_rfc2833_data::dtmf_queue, switch_rtp_numbers_t::error_log, switch_rtp::flags, error_period::flaws, switch_rtp_numbers_t::flaws, switch_rtp::from_addr, handle_rfc2833(), switch_rtp::has_rtp, rtp_msg_t::header, rtcp_msg_t::header, switch_rtp::hot_hits, switch_rtp::ice, switch_rtp::ice_mutex, switch_rtp_ice_t::ice_user, if(), switch_rtp_rfc2833_data::in_digit_sanity, switch_rtp_rfc2833_data::in_digit_ts, switch_rtp_stats_t::inbound, switch_timer::interval, switch_rtp::invalid_handler, INVALID_PT, switch_rtp::jb, jb_valid(), switch_rtp::jitter_lead, JITTER_LEAD_FRAMES, switch_rtp::last_cng_ts, switch_rtp::last_media, switch_rtp::last_read_ts, switch_rtp::last_rtp_hdr, switch_rtp::max_missed_packets, switch_rtp::media_timeout, memset(), switch_rtp::missed_count, switch_rtp::ms_per_packet, switch_rtp::one_second, switch_rtp_rfc2833_data::out_digit_dur, switch_rtp::pause_jb, switch_rtp_numbers_t::period_packet_count, process_rtcp_packet(), switch_rtp_stats_t::read_count, READ_DEC, READ_INC, switch_rtp::read_pollfd, read_rtcp_packet(), read_rtp_packet(), switch_rtp::recv_msg, switch_rtp::recv_te, switch_rtp::remote_addr, switch_rtp::remote_port, reset_jitter_seq(), RESULT_CONTINUE, RESULT_GOTO_END, RESULT_GOTO_RECVFROM, RESULT_GOTO_TIMERCHECK, return_cng_frame, switch_rtp::rtcp_from_addr, switch_rtp::rtcp_read_pollfd, switch_rtp::rtcp_recv_msg, switch_rtp::rtcp_recv_msg_p, switch_rtp::rtcp_remote_addr, switch_rtp::rtcp_send_msg, switch_rtp::rtcp_sock_output, RTP_BODY, RTP_BUG_ACCEPT_ANY_PACKETS, RTP_BUG_ALWAYS_AUTO_ADJUST, RTP_BUG_IGNORE_MARK_BIT, switch_rtp::rtp_bugs, rtp_flush_read_buffer(), switch_rtp::rtp_from_addr, rtp_header_len, rtp_session_name, rtp_type, switch_rtp::samples_per_interval, switch_rtp::send_ctx, switch_rtp::sending_dtmf, switch_rtp::session, SFF_CNG, SFF_NOT_AUDIO, SFF_PROXY_PACKET, SFF_RTCP, SFF_UDPTL_PACKET, switch_rtp_numbers_t::skip_packet_count, switch_rtp::skip_timer, switch_rtp::sock_input, switch_rtp::srtp_idx_rtcp, switch_rtp::stats, switch_channel_get_partner_uuid(), switch_channel_get_private(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_channel_test_flag(), switch_cmp_addr(), switch_cond_next(), switch_core_session_get_channel(), switch_core_session_locate, switch_core_session_rwunlock(), switch_core_timer_next(), switch_core_timer_sync(), SWITCH_CRYPTO_MKI_INDEX, SWITCH_FALSE, switch_get_addr(), SWITCH_IO_FLAG_NOBLOCK, SWITCH_IO_FLAG_SINGLE_READ, switch_jb_poll(), SWITCH_LOG_DEBUG, SWITCH_LOG_DEBUG1, SWITCH_LOG_DEBUG10, SWITCH_LOG_DEBUG3, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), switch_mutex_unlock(), switch_poll(), switch_queue_size(), switch_rtp_clear_flag(), SWITCH_RTP_CNG_PAYLOAD, SWITCH_RTP_FLAG_AUTOADJ, SWITCH_RTP_FLAG_AUTOFLUSH, SWITCH_RTP_FLAG_BREAK, SWITCH_RTP_FLAG_DATAWAIT, SWITCH_RTP_FLAG_DTMF_ON, SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_FLUSH, SWITCH_RTP_FLAG_GOOGLEHACK, SWITCH_RTP_FLAG_MUTE, SWITCH_RTP_FLAG_NOBLOCK, SWITCH_RTP_FLAG_PAUSE, SWITCH_RTP_FLAG_PROXY_MEDIA, SWITCH_RTP_FLAG_RTCP_AUTOADJ, SWITCH_RTP_FLAG_RTCP_MUX, SWITCH_RTP_FLAG_RTCP_PASSTHRU, SWITCH_RTP_FLAG_SECURE_SEND, SWITCH_RTP_FLAG_SECURE_SEND_MKI, SWITCH_RTP_FLAG_STICKY_FLUSH, SWITCH_RTP_FLAG_TEXT, SWITCH_RTP_FLAG_UDPTL, SWITCH_RTP_FLAG_USE_TIMER, SWITCH_RTP_FLAG_VIDEO, SWITCH_RTP_FLUSH_ONCE, switch_rtp_ready(), switch_rtp_reset_media_timer(), switch_rtp_set_flag(), switch_rtp_set_remote_address(), switch_rtp_test_flag(), switch_snprintf(), switch_sockaddr_get_port(), switch_socket_sendto(), SWITCH_STATUS_BREAK, SWITCH_STATUS_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_IS_BREAK, SWITCH_STATUS_SUCCESS, SWITCH_STATUS_TIMEOUT, switch_strerror_r(), SWITCH_TRUE, switch_yield, switch_rtp::sync_packets, switch_rtp::timer, timer_check(), using_ice(), switch_rtp::vb, and switch_rtcp_hdr_s::version.
Referenced by switch_rtp_read(), switch_rtp_zerocopy_read(), and switch_rtp_zerocopy_read_frame().
|
static |
Definition at line 8290 of file switch_rtp.c.
References switch_codec_implementation::actual_samples_per_second, switch_rtp_vad_data::bg_count, switch_rtp_vad_data::bg_len, switch_rtp_vad_data::bg_level, rtp_msg_t::body, CF_AUDIO_VIDEO_BUNDLE, switch_rtp::cn, switch_rtp_vad_data::cng_count, switch_rtp_numbers_t::cng_packet_count, switch_rtp::cng_pt, switch_rtp::delay_samples, ts_normalize_s::delta, ts_normalize_s::delta_ttl, switch_rtp_vad_data::diff_level, switch_rtp_vad_data::fire_events, switch_rtp::flags, get_next_write_ts(), switch_rtp_vad_data::hangover, switch_rtp_vad_data::hangover_hits, switch_rtp_vad_data::hangunder, switch_rtp_vad_data::hangunder_hits, rtp_msg_t::header, switch_codec_implementation::ianacode, switch_rtp::ice_mutex, switch_codec::implementation, INVALID_PT, ts_normalize_s::last_external, ts_normalize_s::last_frame, switch_rtp::last_rtp_hdr, ts_normalize_s::last_ssrc, switch_rtp::last_write_samplecount, switch_rtp::last_write_seq, switch_rtp::last_write_timestamp, switch_rtp::last_write_ts, switch_rtp::local_addr, switch_rtp_numbers_t::media_bytes, switch_rtp_numbers_t::media_packet_count, switch_rtp::ms_per_packet, switch_rtp::need_mark, switch_rtp_vad_data::next_scan, switch_codec_implementation::number_of_channels, switch_rtp_stats_t::outbound, switch_rtp_numbers_t::packet_count, switch_rtp::payload, switch_rtp::pool, switch_rtp::queue_delay, switch_rtp_numbers_t::raw_bytes, switch_rtp_vad_data::read_codec, switch_rtp::remote_addr, switch_rtp::remote_port, switch_rtp_stats_t::rtcp, RTP_BUG_CHANGE_SSRC_ON_MARKER, RTP_BUG_NEVER_SEND_MARKER, switch_rtp::rtp_bugs, switch_rtp::rtp_from_addr, rtp_header_len, rtp_type, rtp_write_ready(), switch_timer::samplecount, switch_rtp::samples_per_interval, switch_rtp::samples_per_second, switch_rtp_vad_data::scan_freq, switch_rtp::send_ctx, switch_rtp::send_msg, switch_rtp::send_policy, switch_rtp::send_time, switch_rtp::sending_dtmf, switch_rtcp_numbers_t::sent_pkt_count, switch_rtp::seq, switch_rtp_vad_data::session, switch_rtp::session, SFF_EXTERNAL, SFF_RFC2833, SJB_QUEUE_ONLY, SJB_VIDEO, switch_rtp::sock_output, switch_rtp::srtp_idx_rtp, switch_rtp::ssrc, switch_rtp_vad_data::start, switch_rtp_vad_data::start_count, switch_rtp_vad_data::start_talking, switch_rtp::stats, switch_rtp_vad_data::stop_talking, switch_channel_event_set_data(), switch_channel_get_name(), switch_channel_get_variable, SWITCH_CHANNEL_LOG, SWITCH_CHANNEL_SESSION_LOG, SWITCH_CHANNEL_SESSION_LOG_CLEAN, switch_channel_test_flag(), switch_clear_flag, switch_core_codec_decode(), switch_core_media_gen_key_frame, switch_core_media_get_rtp_session(), switch_core_session_get_channel(), switch_core_session_get_partner, switch_core_session_request_video_refresh, switch_core_session_rwunlock(), SWITCH_CRYPTO_MKI_INDEX, switch_epoch_time_now(), switch_event_create, switch_event_fire, SWITCH_EVENT_NOTALK, SWITCH_EVENT_TALK, switch_get_addr(), switch_jb_create(), switch_jb_put_packet(), switch_jb_set_flag(), SWITCH_LOG_ALERT, SWITCH_LOG_CONSOLE, SWITCH_LOG_DEBUG1, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_MEDIA_TYPE_VIDEO, switch_micro_time_now(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_RECOMMENDED_BUFFER_SIZE, switch_rtp_clear_flag(), SWITCH_RTP_FLAG_BYTESWAP, SWITCH_RTP_FLAG_DEBUG_RTP_WRITE, SWITCH_RTP_FLAG_ENABLE_RTCP, SWITCH_RTP_FLAG_GOOGLEHACK, SWITCH_RTP_FLAG_NACK, SWITCH_RTP_FLAG_PASSTHRU, SWITCH_RTP_FLAG_PAUSE, SWITCH_RTP_FLAG_RESET, SWITCH_RTP_FLAG_SECURE_SEND, SWITCH_RTP_FLAG_SECURE_SEND_MKI, SWITCH_RTP_FLAG_SECURE_SEND_RESET, SWITCH_RTP_FLAG_UDPTL, SWITCH_RTP_FLAG_USE_TIMER, SWITCH_RTP_FLAG_VAD, SWITCH_RTP_FLAG_VIDEO, switch_rtp_ready(), switch_rtp_set_ssrc(), switch_rtp_test_flag(), switch_set_flag, switch_sockaddr_get_port(), switch_socket_sendto(), SWITCH_STATUS_SUCCESS, switch_swap_linear(), switch_test_flag, SWITCH_VAD_FLAG_EVENTS_NOTALK, SWITCH_VAD_FLAG_EVENTS_TALK, SWITCH_VAD_FLAG_TALKING, switch_rtp::te, switch_rtp_vad_data::total_talk_time, ts_normalize_s::ts, switch_rtp::ts, switch_rtp::ts_norm, switch_rtp_vad_data::vad_codec, switch_rtp::vad_data, VAD_FIRE_NOT_TALK, VAD_FIRE_TALK, switch_rtp::vbw, switch_rtp::video_delta_mode, WRITE_DEC, WRITE_INC, and switch_rtp::write_timer.
Referenced by switch_rtp_write_frame().
|
static |
Definition at line 8270 of file switch_rtp.c.
References DS_READY, switch_rtp::dtls, switch_rtp::ice, switch_rtp_ice_t::ice_user, switch_rtp_ice_t::ready, switch_rtp_ice_t::rready, rtp_type, switch_rtp::session, switch_dtls_s::state, SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_DEBUG3, and switch_log_printf().
Referenced by handle_rfc2833(), read_rtp_packet(), rtp_common_write(), switch_rtp_ack_bitrate(), switch_rtp_req_bitrate(), switch_rtp_video_loss(), switch_rtp_video_refresh(), switch_rtp_write_frame(), switch_rtp_write_manual(), and switch_rtp_write_raw().
|
static |
Definition at line 5452 of file switch_rtp.c.
References switch_rtp::flags, switch_rtp::last_write_ts, switch_rtp::max_next_write_samplecount, switch_rtp::next_write_samplecount, switch_rtp::queue_delay, switch_timer::samplecount, switch_rtp::samples_per_second, switch_rtp::sending_dtmf, switch_rtp::session, SWITCH_CHANNEL_SESSION_LOG, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_RTP_FLAG_USE_TIMER, and switch_rtp::timer.
Referenced by do_2833().
switch_status_t switch_rtp_add_crypto_key | ( | switch_rtp_t * | rtp_session, |
switch_rtp_crypto_direction_t | direction, | ||
uint32_t | index, | ||
switch_secure_settings_t * | ssec | ||
) |
Definition at line 4059 of file switch_rtp.c.
References AEAD_AES_128_GCM, AEAD_AES_128_GCM_8, AEAD_AES_256_GCM, AEAD_AES_256_GCM_8, AES_CM_128_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_80, AES_CM_128_NULL_AUTH, AES_CM_192_HMAC_SHA1_32, AES_CM_192_HMAC_SHA1_80, AES_CM_256_HMAC_SHA1_32, AES_CM_256_HMAC_SHA1_80, switch_rtp::crypto_keys, secure_settings_s::crypto_type, switch_rtp::dtls, switch_rtp::flags, switch_rtp_crypto_key::index, index, switch_rtp_crypto_key::keysalt, secure_settings_s::local_key_material_n, secure_settings_s::local_key_material_next, secure_settings_s::local_raw_key, memset(), switch_crypto_key_material_s::mki_id, switch_crypto_key_material_s::mki_size, switch_rtp_crypto_key::next, switch_crypto_key_material_s::next, switch_rtp::pool, switch_crypto_key_material_s::raw_key, switch_rtp::recv_ctx, switch_rtp::recv_policy, secure_settings_s::remote_key_material_n, secure_settings_s::remote_key_material_next, secure_settings_s::remote_raw_key, rtp_type, switch_rtp::send_ctx, switch_rtp::send_policy, switch_rtp::session, switch_rtp::srtp_idx_rtcp, switch_b64_encode(), SWITCH_CALL_DIRECTION_OUTBOUND, switch_channel_direction(), switch_channel_get_uuid(), switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_alloc, switch_core_get_variable(), switch_core_media_crypto_keysalt_len(), switch_core_session_get_channel(), switch_event_add_header(), switch_event_add_header_string(), SWITCH_EVENT_CALL_SECURE, switch_event_create, switch_event_fire, SWITCH_LOG_CRIT, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_RTP_CRYPTO_MAX, SWITCH_RTP_CRYPTO_RECV, SWITCH_RTP_CRYPTO_RECV_RTCP, SWITCH_RTP_CRYPTO_SEND, SWITCH_RTP_CRYPTO_SEND_RTCP, SWITCH_RTP_FLAG_SECURE_RECV, SWITCH_RTP_FLAG_SECURE_RECV_MKI, SWITCH_RTP_FLAG_SECURE_RECV_RESET, SWITCH_RTP_FLAG_SECURE_SEND, SWITCH_RTP_FLAG_SECURE_SEND_MKI, SWITCH_RTP_FLAG_SECURE_SEND_RESET, SWITCH_RTP_FLAG_VIDEO, SWITCH_RTP_MAX_CRYPTO_LEN, SWITCH_STACK_BOTTOM, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_true(), and switch_rtp_crypto_key::type.
Referenced by dtls_state_setup(), switch_core_media_recover_session(), switch_core_session_apply_crypto(), and switch_core_session_check_incoming_crypto().
|
static |
Definition at line 543 of file switch_rtp.c.
References switch_rtp_ice_t::addr, ice_s::cand_idx, ice_s::cands, ice_s::chosen, icand_s::con_addr, icand_s::con_port, switch_rtp::flags, switch_rtp_ice_t::ice_params, switch_rtp_ice_t::missed_count, switch_rtp::pool, switch_rtp_ice_t::proto, switch_rtp::remote_addr, switch_rtp::rtcp_ice, switch_rtp::rtcp_remote_addr, switch_rtp::session, SWITCH_CHANNEL_SESSION_LOG, switch_core_strdup, SWITCH_FALSE, SWITCH_LOG_DEBUG5, switch_log_printf(), SWITCH_RTP_FLAG_RTCP_MUX, and switch_rtp_set_remote_address().
Referenced by handle_ice().
|
static |
|
static |
Definition at line 3674 of file switch_rtp.c.
References dtls_bio_filter_ctrl(), dtls_bio_filter_free(), dtls_bio_filter_new(), and dtls_bio_filter_write().
Referenced by switch_rtp_init().
void switch_rtp_reset_vb | ( | switch_rtp_t * | rtp_session | ) |
Definition at line 2988 of file switch_rtp.c.
References switch_jb_reset(), switch_rtp::vb, and switch_rtp::vbw.
Referenced by switch_rtp_reset().
|
static |
Definition at line 2059 of file switch_rtp.c.
References switch_rtcp_report_block::dlsr, switch_rtcp_report_block::fraction, switch_rtcp_report_block::highest_sequence_number_received, switch_rtcp_report_block::jitter, switch_rtcp_report_block::lost, switch_rtcp_report_block::lsr, switch_rtcp_sender_info::ntp_lsw, switch_rtcp_sender_info::ntp_msw, switch_rtcp_sender_info::oc, switch_rtcp_sender_info::pc, switch_rtcp_numbers_t::peer_ssrc, switch_rtp_stats_t::rtcp, switch_rtcp_sender_report::sender_info, switch_rtp::session, switch_rtcp_numbers_t::ssrc, switch_rtp::stats, SWITCH_CHANNEL_SESSION_LOG, switch_core_session_get_uuid(), switch_event_add_header_string(), switch_event_create, switch_event_fire, SWITCH_EVENT_SEND_RTCP_MESSAGE, SWITCH_LOG_DEBUG10, switch_log_printf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_time_now(), SWITCH_TIME_T_FMT, switch_rtcp_sender_info::ts, and value.
Referenced by check_rtcp_and_ice().
|
static |
Definition at line 2050 of file switch_rtp.c.
References switch_rtp::ice, switch_rtp_ice_t::ice_user, and switch_rtp::rtcp_ice.
Referenced by check_rtcp_and_ice(), and rtp_common_read().
|
static |
Definition at line 109 of file switch_rtp.c.
|
static |
Definition at line 3467 of file switch_rtp.c.
|
static |
Definition at line 3199 of file switch_rtp.c.
dtls_state_handler_t dtls_states[DS_INVALID] = {NULL, dtls_state_handshake, dtls_state_setup, dtls_state_ready, dtls_state_fail} |
Definition at line 304 of file switch_rtp.c.
|
static |
Definition at line 93 of file switch_rtp.c.
Referenced by switch_rtp_request_port(), and switch_rtp_set_end_port().
|
static |
Definition at line 814 of file switch_rtp.c.
|
static |
Definition at line 81 of file switch_rtp.c.
Referenced by check_rtcp_and_ice(), rtp_common_read(), rtp_common_write(), switch_rtp_create(), switch_rtp_write_frame(), and switch_rtp_write_manual().
|
static |
Definition at line 94 of file switch_rtp.c.
Referenced by switch_rtp_init(), switch_rtp_release_port(), switch_rtp_request_port(), switch_rtp_set_end_port(), switch_rtp_set_start_port(), and switch_rtp_shutdown().
|
static |
Definition at line 92 of file switch_rtp.c.
Referenced by switch_rtp_request_port(), and switch_rtp_set_start_port().