RTS API Documentation
1.10.11
|
Macros | |
#define | switch_core_session_get_name(_s) switch_channel_get_name(switch_core_session_get_channel(_s)) |
#define | switch_core_media_bug_remove_all(_s) switch_core_media_bug_remove_all_function(_s, NULL) |
#define switch_core_media_bug_remove_all | ( | _s | ) | switch_core_media_bug_remove_all_function(_s, NULL) |
Definition at line 405 of file switch_core.h.
Referenced by switch_core_session_hangup_state(), switch_core_session_perform_destroy(), and switch_core_session_thread().
#define switch_core_session_get_name | ( | _s | ) | switch_channel_get_name(switch_core_session_get_channel(_s)) |
Definition at line 265 of file switch_core.h.
Referenced by check_channel_status(), check_rtcp_and_ice(), check_timeout(), eavesdrop_callback(), handle_nack(), process_rtcp_report(), switch_core_media_bug_transfer_callback(), switch_core_session_read_frame(), switch_core_session_run(), switch_core_session_start_audio_write_thread(), switch_core_session_start_text_thread(), switch_core_session_start_video_thread(), switch_core_session_write_video_frame(), switch_ivr_parse_all_events(), and switch_rtp_set_media_timeout().
uint32_t switch_core_cpu_count | ( | void | ) |
Definition at line 1055 of file switch_core.c.
References switch_runtime::cpu_count.
Referenced by switch_core_media_init(), switch_event_init(), and switch_parse_cpu_string().
switch_status_t switch_core_media_bug_add | ( | _In_ switch_core_session_t * | session, |
_In_ const char * | function, | ||
_In_ const char * | target, | ||
_In_ switch_media_bug_callback_t | callback, | ||
_In_opt_ void * | user_data, | ||
_In_ time_t | stop_time, | ||
_In_ switch_media_bug_flag_t | flags, | ||
_Out_ switch_media_bug_t ** | new_bug | ||
) |
Add a media bug to the session.
session | the session to add the bug to |
function | user defined module/function/reason identifying this bug |
target | user defined identification of the target of the bug |
callback | a callback for events |
user_data | arbitrary user data |
stop_time | absolute time at which the bug is automatically removed (or 0) |
flags | flags to choose the stream |
new_bug | pointer to assign new bug to |
Referenced by switch_ivr_capture_text(), switch_ivr_detect_speech_init(), switch_ivr_displace_session(), switch_ivr_eavesdrop_session(), switch_ivr_inband_dtmf_generate_session(), switch_ivr_inband_dtmf_session(), switch_ivr_preprocess_session(), switch_ivr_record_session_event(), switch_ivr_session_audio(), switch_ivr_tone_detect_session(), and switch_ivr_video_write_overlay_session().
uint32_t switch_core_media_bug_clear_flag | ( | _In_ switch_media_bug_t * | bug, |
_In_ uint32_t | flag | ||
) |
switch_status_t switch_core_media_bug_close | ( | _Inout_ switch_media_bug_t ** | bug, |
switch_bool_t | destroy | ||
) |
Close and destroy a media bug.
bug | bug to remove |
uint32_t switch_core_media_bug_count | ( | switch_core_session_t * | orig_session, |
const char * | function | ||
) |
Definition at line 1135 of file switch_core_media_bug.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::function, switch_media_bug::next, SMBF_LOCK, SMBF_PRUNE, switch_test_flag, switch_thread_rwlock_rdlock(), and switch_thread_rwlock_unlock().
switch_status_t switch_core_media_bug_enumerate | ( | switch_core_session_t * | session, |
switch_stream_handle_t * | stream | ||
) |
Definition at line 1210 of file switch_core_media_bug.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::function, switch_media_bug::next, SWITCH_STATUS_SUCCESS, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), switch_thread_self(), switch_media_bug::target, switch_media_bug::thread_id, and switch_stream_handle::write_function.
switch_status_t switch_core_media_bug_exec_all | ( | switch_core_session_t * | orig_session, |
const char * | function, | ||
switch_media_bug_exec_cb_t | cb, | ||
void * | user_data | ||
) |
Definition at line 1188 of file switch_core_media_bug.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::function, switch_media_bug::next, SMBF_LOCK, SMBF_PRUNE, switch_assert, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_test_flag, switch_thread_rwlock_unlock(), and switch_thread_rwlock_wrlock().
Referenced by switch_ivr_eavesdrop_exec_all(), and switch_ivr_eavesdrop_update_display().
void switch_core_media_bug_flush | ( | _In_ switch_media_bug_t * | bug | ) |
Flush the read and write buffers for the bug.
bug | the bug to flush the read and write buffers on |
switch_status_t switch_core_media_bug_flush_all | ( | _In_ switch_core_session_t * | session | ) |
Flush the read/write buffers for all media bugs on the session.
session | the session to flush the read/write buffers for all media bugs on the session |
Referenced by switch_core_session_perform_receive_message(), and switch_core_session_write_frame().
void switch_core_media_bug_get_media_params | ( | switch_media_bug_t * | bug, |
switch_mm_t * | mm | ||
) |
Definition at line 125 of file switch_core_media_bug.c.
References switch_media_bug::mm.
Referenced by video_bug_thread().
switch_frame_t* switch_core_media_bug_get_native_read_frame | ( | switch_media_bug_t * | bug | ) |
Definition at line 160 of file switch_core_media_bug.c.
References switch_media_bug::native_read_frame.
Referenced by eavesdrop_callback(), and record_callback().
switch_frame_t* switch_core_media_bug_get_native_write_frame | ( | switch_media_bug_t * | bug | ) |
Definition at line 165 of file switch_core_media_bug.c.
References switch_media_bug::native_write_frame.
Referenced by eavesdrop_callback(), and record_callback().
switch_frame_t* switch_core_media_bug_get_read_replace_frame | ( | _In_ switch_media_bug_t * | bug | ) |
Obtain a replace frame from a media bug.
bug | the bug to get the data from |
Referenced by eavesdrop_callback(), inband_dtmf_callback(), inband_dtmf_generate_callback(), preprocess_callback(), read_displace_callback(), session_audio_callback(), tone_detect_callback(), and write_displace_callback().
switch_core_session_t* switch_core_media_bug_get_session | ( | _In_ switch_media_bug_t * | bug | ) |
Obtain the session from a media bug.
bug | the bug to get the data from |
Referenced by eavesdrop_callback(), inband_dtmf_callback(), inband_dtmf_generate_callback(), preprocess_callback(), read_displace_callback(), record_callback(), recording_thread(), session_audio_callback(), speech_callback(), text_callback(), tone_detect_callback(), video_write_overlay_callback(), and write_displace_callback().
const char* switch_core_media_bug_get_text | ( | switch_media_bug_t * | bug | ) |
Definition at line 135 of file switch_core_media_bug.c.
References switch_media_bug::text_framedata.
Referenced by text_callback().
void* switch_core_media_bug_get_user_data | ( | _In_ switch_media_bug_t * | bug | ) |
Obtain private data from a media bug.
bug | the bug to get the data from |
Referenced by display_exec_cb(), exec_cb(), generate_on_dtmf(), recording_thread(), switch_ivr_eavesdrop_pop_eavesdropper(), and switch_ivr_session_audio().
switch_frame_t* switch_core_media_bug_get_video_ping_frame | ( | switch_media_bug_t * | bug | ) |
Definition at line 140 of file switch_core_media_bug.c.
References switch_media_bug::video_ping_frame.
Referenced by video_write_overlay_callback().
switch_frame_t* switch_core_media_bug_get_write_replace_frame | ( | _In_ switch_media_bug_t * | bug | ) |
Obtain a replace frame from a media bug.
bug | the bug to get the data from |
Referenced by eavesdrop_callback(), inband_dtmf_generate_callback(), preprocess_callback(), read_displace_callback(), session_audio_callback(), tone_detect_callback(), and write_displace_callback().
void switch_core_media_bug_inuse | ( | switch_media_bug_t * | bug, |
switch_size_t * | readp, | ||
switch_size_t * | writep | ||
) |
Definition at line 206 of file switch_core_media_bug.c.
References switch_media_bug::raw_read_buffer, switch_media_bug::raw_write_buffer, switch_media_bug::read_mutex, SMBF_READ_STREAM, SMBF_WRITE_STREAM, switch_buffer_inuse(), switch_mutex_lock(), switch_mutex_unlock(), switch_test_flag, and switch_media_bug::write_mutex.
switch_status_t switch_core_media_bug_patch_spy_frame | ( | switch_media_bug_t * | bug, |
switch_image_t * | img, | ||
switch_rw_t | rw | ||
) |
Definition at line 465 of file switch_core_media_bug.c.
References vpx_image::d_h, vpx_image::d_w, POS_CENTER_MID, switch_media_bug::session, SPY_DUAL_CROP, switch_media_bug::spy_fmt, switch_media_bug::spy_img, SPY_LOWER_RIGHT_LARGE, SPY_LOWER_RIGHT_SMALL, switch_media_bug::spy_video_queue, switch_color_set_rgb(), SWITCH_CORE_QUEUE_LEN, switch_core_session_get_pool(), SWITCH_FIT_SIZE, switch_img_copy(), switch_img_copy_rect(), switch_img_fill(), switch_img_find_position(), switch_img_fit(), switch_img_free(), switch_img_patch(), switch_img_scale(), switch_queue_create(), switch_queue_size(), switch_queue_trypop(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by switch_core_session_read_video_frame(), and switch_core_session_write_video_frame().
uint32_t switch_core_media_bug_patch_video | ( | switch_core_session_t * | orig_session, |
switch_frame_t * | frame | ||
) |
Definition at line 1153 of file switch_core_media_bug.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, switch_media_bug::function, switch_frame::img, switch_media_bug::next, switch_media_bug::ready, SMBF_LOCK, SMBF_PRUNE, SMBF_VIDEO_PATCH, switch_media_bug::stop_time, SWITCH_ABC_TYPE_VIDEO_PATCH, switch_core_media_bug_prune(), switch_epoch_time_now(), SWITCH_FALSE, switch_set_flag, switch_test_flag, switch_thread_rwlock_rdlock(), switch_thread_rwlock_unlock(), SWITCH_TRUE, switch_media_bug::user_data, and switch_media_bug::video_ping_frame.
void switch_core_media_bug_pause | ( | switch_core_session_t * | session | ) |
Pause a media bug on the session.
session | the session to pause the bug on sets CF_PAUSE_BUGS flag |
Definition at line 92 of file switch_core_media_bug.c.
References CF_PAUSE_BUGS, switch_core_session::channel, and switch_channel_set_flag.
switch_status_t switch_core_media_bug_pop | ( | switch_core_session_t * | orig_session, |
const char * | function, | ||
switch_media_bug_t ** | pop | ||
) |
Definition at line 1109 of file switch_core_media_bug.c.
References switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::function, switch_media_bug::next, SMBF_LOCK, switch_set_flag, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_rwlock_unlock(), and switch_thread_rwlock_wrlock().
Referenced by switch_ivr_eavesdrop_pop_eavesdropper().
uint32_t switch_core_media_bug_prune | ( | switch_core_session_t * | session | ) |
Definition at line 1393 of file switch_core_media_bug.c.
References switch_core_session::bug_codec, switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::next, SMBF_LOCK, SMBF_PRUNE, switch_clear_flag, switch_core_codec_destroy(), switch_core_codec_ready(), switch_core_media_bug_close(), switch_core_media_bug_test_flag(), switch_thread_rwlock_unlock(), switch_thread_rwlock_wrlock(), SWITCH_TRUE, and switch_media_bug::thread_id.
Referenced by perform_write(), switch_core_media_bug_patch_video(), switch_core_session_read_frame(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_core_session_write_frame(), and switch_core_session_write_video_frame().
switch_status_t switch_core_media_bug_push_spy_frame | ( | switch_media_bug_t * | bug, |
switch_frame_t * | frame, | ||
switch_rw_t | rw | ||
) |
Definition at line 773 of file switch_core_media_bug.c.
References switch_frame::img, switch_media_bug::spy_video_queue, switch_assert, switch_img_copy(), switch_queue_push(), SWITCH_STATUS_FALSE, and SWITCH_STATUS_SUCCESS.
Referenced by video_eavesdrop_callback().
switch_status_t switch_core_media_bug_read | ( | _In_ switch_media_bug_t * | bug, |
_In_ switch_frame_t * | frame, | ||
switch_bool_t | fill | ||
) |
Read a frame from the bug.
bug | the bug to read from |
frame | the frame to write the data to |
Referenced by eavesdrop_callback(), record_callback(), and speech_callback().
switch_status_t switch_core_media_bug_remove | ( | _In_ switch_core_session_t * | session, |
_Inout_ switch_media_bug_t ** | bug | ||
) |
Remove a media bug from the session.
session | the session to remove the bug from |
bug | bug to remove |
Referenced by switch_ivr_capture_text(), switch_ivr_eavesdrop_session(), switch_ivr_stop_detect_speech(), switch_ivr_stop_displace_session(), switch_ivr_stop_inband_dtmf_generate_session(), switch_ivr_stop_inband_dtmf_session(), switch_ivr_stop_record_session(), switch_ivr_stop_session_audio(), switch_ivr_stop_tone_detect_session(), and switch_ivr_stop_video_write_overlay_session().
switch_status_t switch_core_media_bug_remove_all_function | ( | _In_ switch_core_session_t * | session, |
const char * | function | ||
) |
Remove all media bugs from the session.
session | the session to remove the bugs from |
switch_status_t switch_core_media_bug_remove_callback | ( | switch_core_session_t * | session, |
switch_media_bug_callback_t | callback | ||
) |
Remove media bug callback.
bug | bug to remove |
callback | callback to remove |
Definition at line 1435 of file switch_core_media_bug.c.
References switch_core_session::bug_codec, switch_core_session::bug_rwlock, switch_core_session::bugs, switch_media_bug::callback, cur, switch_media_bug::next, switch_media_bug::ready, switch_core_codec_destroy(), switch_core_codec_ready(), switch_core_media_bug_close(), switch_core_media_bug_destroy(), SWITCH_FALSE, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_rwlock_unlock(), switch_thread_rwlock_wrlock(), switch_thread_self(), and switch_media_bug::thread_id.
Referenced by switch_ivr_stop_record_session().
void switch_core_media_bug_resume | ( | switch_core_session_t * | session | ) |
Resume a media bug on the session.
session | the session to resume the bug on, clears CF_PAUSE_BUGS flag |
Definition at line 97 of file switch_core_media_bug.c.
References CF_PAUSE_BUGS, switch_core_session::channel, and switch_channel_clear_flag().
uint32_t switch_core_media_bug_set_flag | ( | _In_ switch_media_bug_t * | bug, |
_In_ uint32_t | flag | ||
) |
void switch_core_media_bug_set_media_params | ( | switch_media_bug_t * | bug, |
switch_mm_t * | mm | ||
) |
Definition at line 120 of file switch_core_media_bug.c.
References switch_media_bug::mm.
Referenced by record_callback().
switch_status_t switch_core_media_bug_set_pre_buffer_framecount | ( | switch_media_bug_t * | bug, |
uint32_t | framecount | ||
) |
Definition at line 225 of file switch_core_media_bug.c.
References switch_media_bug::record_pre_buffer_max, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_record_session_event().
void switch_core_media_bug_set_read_demux_frame | ( | _In_ switch_media_bug_t * | bug, |
_In_ switch_frame_t * | frame | ||
) |
Referenced by eavesdrop_callback().
void switch_core_media_bug_set_read_replace_frame | ( | _In_ switch_media_bug_t * | bug, |
_In_ switch_frame_t * | frame | ||
) |
Set a return replace frame.
bug | the bug to set the frame on |
frame | the frame to set |
Referenced by eavesdrop_callback(), inband_dtmf_callback(), inband_dtmf_generate_callback(), read_displace_callback(), session_audio_callback(), and write_displace_callback().
void switch_core_media_bug_set_write_replace_frame | ( | _In_ switch_media_bug_t * | bug, |
_In_ switch_frame_t * | frame | ||
) |
Set a return replace frame.
bug | the bug to set the frame on |
frame | the frame to set |
Referenced by eavesdrop_callback(), inband_dtmf_generate_callback(), read_displace_callback(), session_audio_callback(), and write_displace_callback().
uint32_t switch_core_media_bug_test_flag | ( | _In_ switch_media_bug_t * | bug, |
_In_ uint32_t | flag | ||
) |
Test for the existance of a flag on an media bug.
bug | the object to test |
flag | the or'd list of flags to test |
Referenced by eavesdrop_callback(), perform_write(), record_callback(), recording_thread(), switch_core_session_read_frame(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_core_session_write_frame(), switch_core_session_write_video_frame(), switch_ivr_eavesdrop_session(), and video_eavesdrop_callback().
switch_status_t switch_core_media_bug_transfer_callback | ( | switch_core_session_t * | orig_session, |
switch_core_session_t * | new_session, | ||
switch_media_bug_callback_t | callback, | ||
void *(*)(switch_core_session_t *, void *) | user_data_dup_func | ||
) |
Definition at line 1044 of file switch_core_media_bug.c.
References switch_core_session::bug_codec, switch_core_session::bug_rwlock, switch_core_session::bugs, switch_core_session::channel, cur, switch_core_session::flags, switch_media_bug::next, switch_channel_media_ready, SWITCH_CHANNEL_SESSION_LOG, switch_core_codec_destroy(), switch_core_codec_ready(), switch_core_media_bug_add(), switch_core_media_bug_destroy(), switch_core_session_get_name, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_rwlock_unlock(), and switch_thread_rwlock_wrlock().
Referenced by switch_ivr_transfer_recordings().
void switch_core_screen_size | ( | int * | x, |
int * | y | ||
) |
Definition at line 261 of file switch_core.c.
Referenced by switch_core_init_and_modload(), and switch_must_realloc().
void switch_core_session_disable_heartbeat | ( | switch_core_session_t * | session | ) |
Definition at line 1703 of file switch_core_session.c.
References switch_core_session::read_frame_count, switch_assert, switch_core_session_unsched_heartbeat(), and switch_core_session::track_duration.
Referenced by switch_must_realloc().
void switch_core_session_enable_heartbeat | ( | switch_core_session_t * | session, |
uint32_t | seconds | ||
) |
Definition at line 1670 of file switch_core_session.c.
References CF_PROXY_MODE, switch_core_session::channel, switch_core_session::read_frame_count, switch_core_session::read_impl, switch_codec_implementation::samples_per_packet, switch_codec_implementation::samples_per_second, switch_assert, switch_channel_get_name(), switch_channel_get_variable, switch_channel_get_variable_dup(), switch_channel_media_ready, SWITCH_CHANNEL_SESSION_LOG, switch_channel_test_flag(), switch_core_session_sched_heartbeat(), switch_core_session_unsched_heartbeat(), SWITCH_FALSE, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, switch_true(), and switch_core_session::track_duration.
Referenced by switch_channel_perform_mark_answered(), switch_core_media_receive_message(), and switch_must_realloc().
void switch_core_session_sched_heartbeat | ( | switch_core_session_t * | session, |
uint32_t | seconds | ||
) |
Definition at line 1655 of file switch_core_session.c.
References __SWITCH_FUNC__, switch_core_session::channel, SSHF_FREE_ARG, switch_channel_get_variable, switch_core_session_get_uuid(), switch_core_session_unsched_heartbeat(), switch_epoch_time_now(), switch_scheduler_add_task(), switch_true(), switch_core_session::track_duration, and switch_core_session::track_id.
Referenced by switch_core_session_enable_heartbeat(), and switch_must_realloc().
void switch_core_session_unsched_heartbeat | ( | switch_core_session_t * | session | ) |
Definition at line 1647 of file switch_core_session.c.
References switch_scheduler_del_task_id(), and switch_core_session::track_id.
Referenced by switch_core_session_disable_heartbeat(), switch_core_session_enable_heartbeat(), switch_core_session_sched_heartbeat(), and switch_must_realloc().
switch_vid_spy_fmt_t switch_media_bug_parse_spy_fmt | ( | const char * | name | ) |
Definition at line 443 of file switch_core_media_bug.c.
References SPY_DUAL_CROP, SPY_LOWER_RIGHT_LARGE, SPY_LOWER_RIGHT_SMALL, and zstr.
Referenced by switch_ivr_eavesdrop_session().
void switch_media_bug_set_spy_fmt | ( | switch_media_bug_t * | bug, |
switch_vid_spy_fmt_t | spy_fmt | ||
) |
Definition at line 460 of file switch_core_media_bug.c.
References switch_media_bug::spy_fmt.
Referenced by switch_ivr_eavesdrop_session().