FreeSWITCH API Documentation
1.7.0
|
Go to the source code of this file.
Enumerations | |
enum | switch_jb_flag_t { SJB_QUEUE_ONLY = (1 << 0) } |
enum | switch_jb_type_t { SJB_VIDEO = 0, SJB_AUDIO } |
enum switch_jb_flag_t |
Enumerator | |
---|---|
SJB_QUEUE_ONLY |
Definition at line 36 of file switch_jitterbuffer.h.
enum switch_jb_type_t |
Enumerator | |
---|---|
SJB_VIDEO | |
SJB_AUDIO |
Definition at line 40 of file switch_jitterbuffer.h.
void switch_jb_clear_flag | ( | switch_jb_t * | jb, |
switch_jb_flag_t | flag | ||
) |
Definition at line 826 of file switch_jitterbuffer.c.
References switch_clear_flag.
SWITCH_BEGIN_EXTERN_C switch_status_t switch_jb_create | ( | switch_jb_t ** | jbp, |
switch_jb_type_t | type, | ||
uint32_t | min_frame_len, | ||
uint32_t | max_frame_len, | ||
switch_memory_pool_t * | pool | ||
) |
Definition at line 970 of file switch_jitterbuffer.c.
References switch_jb_s::frame_len, switch_jb_s::free_pool, switch_jb_s::highest_frame_len, switch_jb_s::list_mutex, switch_jb_s::max_frame_len, switch_jb_s::min_frame_len, switch_jb_s::missing_seq_hash, switch_jb_s::mutex, switch_jb_s::node_hash, pool, switch_jb_s::pool, SJB_VIDEO, switch_core_alloc, switch_core_inthash_init(), switch_core_new_memory_pool, switch_mutex_init(), SWITCH_MUTEX_NESTED, SWITCH_STATUS_SUCCESS, and switch_jb_s::type.
Referenced by rtp_common_write(), switch_ivr_delay_echo(), switch_rtp_activate_jitter_buffer(), and switch_rtp_set_video_buffer_size().
void switch_jb_debug_level | ( | switch_jb_t * | jb, |
uint8_t | level | ||
) |
Definition at line 841 of file switch_jitterbuffer.c.
Referenced by switch_ivr_delay_echo(), and switch_rtp_debug_jitter_buffer().
switch_status_t switch_jb_destroy | ( | switch_jb_t ** | jbp | ) |
Definition at line 1001 of file switch_jitterbuffer.c.
References free_nodes(), switch_jb_s::free_pool, switch_jb_s::missing_seq_hash, switch_jb_s::node_hash, switch_jb_s::node_hash_ts, switch_jb_s::pool, SJB_VIDEO, switch_core_destroy_memory_pool, switch_core_inthash_destroy(), SWITCH_STATUS_SUCCESS, and switch_jb_s::type.
Referenced by read_rtp_packet(), switch_ivr_delay_echo(), and switch_rtp_destroy().
int switch_jb_frame_count | ( | switch_jb_t * | jb | ) |
Definition at line 836 of file switch_jitterbuffer.c.
switch_status_t switch_jb_get_frames | ( | switch_jb_t * | jb, |
uint32_t * | min_frame_len, | ||
uint32_t * | max_frame_len, | ||
uint32_t * | cur_frame_len, | ||
uint32_t * | highest_frame_len | ||
) |
Definition at line 916 of file switch_jitterbuffer.c.
References switch_mutex_lock(), switch_mutex_unlock(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_rtp_get_stats(), and switch_rtp_get_video_buffer_size().
switch_size_t switch_jb_get_last_read_len | ( | switch_jb_t * | jb | ) |
switch_status_t switch_jb_get_packet | ( | switch_jb_t * | jb, |
switch_rtp_packet_t * | packet, | ||
switch_size_t * | len | ||
) |
Definition at line 1195 of file switch_jitterbuffer.c.
References switch_rtp_packet_t::body, CF_VIDEO_BITRATE_UNMANAGABLE, switch_core_session_message::from, switch_rtp_packet_t::header, hide_node(), jb_debug, jb_frame_inc, jb_next_packet(), switch_jb_node_s::len, switch_core_session_message::message_id, switch_core_session_message::numeric_arg, switch_jb_node_s::packet, PERIOD_LEN, switch_rtp_hdr_t::seq, SJB_VIDEO, switch_channel_clear_flag(), switch_channel_set_flag, switch_channel_test_flag(), switch_core_session_receive_message, switch_core_session_request_video_refresh(), switch_goto_status, switch_jb_reset(), SWITCH_MESSAGE_INDICATE_BITRATE_REQ, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_BREAK, SWITCH_STATUS_MORE_DATA, SWITCH_STATUS_NOTFOUND, SWITCH_STATUS_RESTART, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, thin_frames(), and switch_rtp_hdr_t::ts.
Referenced by read_rtp_packet(), and switch_ivr_delay_echo().
switch_status_t switch_jb_get_packet_by_seq | ( | switch_jb_t * | jb, |
uint16_t | seq, | ||
switch_rtp_packet_t * | packet, | ||
switch_size_t * | len | ||
) |
Definition at line 1169 of file switch_jitterbuffer.c.
References switch_rtp_packet_t::body, jb_debug, switch_jb_node_s::len, switch_jb_node_s::packet, switch_core_inthash_find(), switch_mutex_lock(), switch_mutex_unlock(), SWITCH_STATUS_NOTFOUND, and SWITCH_STATUS_SUCCESS.
Referenced by handle_nack().
switch_status_t switch_jb_peek_frame | ( | switch_jb_t * | jb, |
uint32_t | ts, | ||
uint16_t | seq, | ||
int | peek, | ||
switch_frame_t * | frame | ||
) |
Definition at line 890 of file switch_jitterbuffer.c.
References switch_rtp_packet_t::body, switch_rtp_packet_t::header, switch_jb_node_s::len, switch_rtp_hdr_t::m, switch_jb_node_s::packet, switch_rtp_hdr_t::seq, switch_core_inthash_find(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_rtp_hdr_t::ts.
int switch_jb_poll | ( | switch_jb_t * | jb | ) |
uint32_t switch_jb_pop_nack | ( | switch_jb_t * | jb | ) |
Definition at line 1024 of file switch_jitterbuffer.c.
References jb_debug, RENACK_TIME, SJB_VIDEO, switch_core_hash_first, switch_core_hash_next(), switch_core_hash_this(), switch_core_inthash_delete(), switch_core_inthash_insert(), switch_mutex_lock(), switch_mutex_unlock(), and switch_time_now().
Referenced by check_rtcp_and_ice().
switch_status_t switch_jb_put_packet | ( | switch_jb_t * | jb, |
switch_rtp_packet_t * | packet, | ||
switch_size_t | len | ||
) |
Definition at line 1104 of file switch_jitterbuffer.c.
References add_node(), drop_oldest_frame(), jb_debug, jb_frame_inc, SJB_AUDIO, SJB_QUEUE_ONLY, SWITCH_CHANNEL_LOG, switch_core_inthash_delete(), switch_core_inthash_insert(), switch_core_session_request_video_refresh(), switch_jb_reset(), switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), switch_mutex_unlock(), SWITCH_SIZE_T_FMT, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by read_rtp_packet(), rtp_common_write(), and switch_ivr_delay_echo().
void switch_jb_reset | ( | switch_jb_t * | jb | ) |
Definition at line 846 of file switch_jitterbuffer.c.
References hide_nodes(), jb_debug, SJB_VIDEO, switch_core_inthash_destroy(), switch_core_inthash_init(), switch_core_session_request_video_refresh(), switch_mutex_lock(), and switch_mutex_unlock().
Referenced by add_node(), do_flush(), handle_rfc2833(), process_rtcp_report(), read_rtp_packet(), switch_jb_get_packet(), switch_jb_put_packet(), switch_rtp_del_dtls(), switch_rtp_pause_jitter_buffer(), switch_rtp_reset_jb(), switch_rtp_reset_vb(), and switch_rtp_set_flag().
void switch_jb_set_flag | ( | switch_jb_t * | jb, |
switch_jb_flag_t | flag | ||
) |
Definition at line 821 of file switch_jitterbuffer.c.
References switch_set_flag.
Referenced by rtp_common_write().
switch_status_t switch_jb_set_frames | ( | switch_jb_t * | jb, |
uint32_t | min_frame_len, | ||
uint32_t | max_frame_len | ||
) |
Definition at line 938 of file switch_jitterbuffer.c.
References switch_mutex_lock(), switch_mutex_unlock(), and SWITCH_STATUS_SUCCESS.
Referenced by switch_rtp_activate_jitter_buffer(), and switch_rtp_set_video_buffer_size().
void switch_jb_set_session | ( | switch_jb_t * | jb, |
switch_core_session_t * | session | ||
) |
Definition at line 804 of file switch_jitterbuffer.c.
References SJB_VIDEO, switch_channel_get_variable_dup(), switch_core_session_get_channel(), and SWITCH_FALSE.
Referenced by switch_rtp_activate_jitter_buffer(), and switch_rtp_set_video_buffer_size().
void switch_jb_ts_mode | ( | switch_jb_t * | jb, |
uint32_t | samples_per_frame, | ||
uint32_t | samples_per_second | ||
) |
Definition at line 797 of file switch_jitterbuffer.c.
References switch_core_inthash_init().
Referenced by switch_rtp_activate_jitter_buffer().