FreeSWITCH API Documentation
1.7.0
|
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 404 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 271 of file switch_core.h.
Referenced by check_channel_status(), eavesdrop_callback(), switch_core_media_bug_transfer_callback(), switch_core_media_bug_transfer_recordings(), switch_core_session_read_frame(), switch_core_session_run(), switch_core_session_start_video_thread(), and switch_core_session_write_video_frame().
uint32_t switch_core_cpu_count | ( | void | ) |
Definition at line 1042 of file switch_core.c.
References switch_runtime::cpu_count.
Referenced by switch_core_media_init(), and switch_event_init().
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 |
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_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(), 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 | ||
) |
Referenced by switch_ivr_eavesdrop_session(), and switch_ivr_record_session_mask().
switch_status_t switch_core_media_bug_close | ( | _Inout_ switch_media_bug_t ** | bug | ) |
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 994 of file switch_core_media_bug.c.
References 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 1069 of file switch_core_media_bug.c.
References 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, and switch_media_bug::thread_id.
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 1047 of file switch_core_media_bug.c.
References 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().
switch_frame_t* switch_core_media_bug_get_native_read_frame | ( | switch_media_bug_t * | bug | ) |
Definition at line 111 of file switch_core_media_bug.c.
Referenced by record_callback().
switch_frame_t* switch_core_media_bug_get_native_write_frame | ( | switch_media_bug_t * | bug | ) |
Definition at line 116 of file switch_core_media_bug.c.
Referenced by 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(), tone_detect_callback(), video_write_overlay_callback(), and write_displace_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 91 of file switch_core_media_bug.c.
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 157 of file switch_core_media_bug.c.
References SMBF_READ_STREAM, SMBF_WRITE_STREAM, switch_buffer_inuse(), switch_mutex_lock(), switch_mutex_unlock(), and switch_test_flag.
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 416 of file switch_core_media_bug.c.
References vpx_image::d_h, vpx_image::d_w, POS_CENTER_MID, SPY_DUAL_CROP, SPY_LOWER_RIGHT_LARGE, SPY_LOWER_RIGHT_SMALL, 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 1012 of file switch_core_media_bug.c.
References switch_media_bug::callback, switch_media_bug::function, 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 58 of file switch_core_media_bug.c.
References CF_PAUSE_BUGS, 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 968 of file switch_core_media_bug.c.
References 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 1253 of file switch_core_media_bug.c.
References 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(), 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_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 645 of file switch_core_media_bug.c.
References 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_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 1295 of file switch_core_media_bug.c.
References 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_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 63 of file switch_core_media_bug.c.
References CF_PAUSE_BUGS, and switch_channel_clear_flag().
uint32_t switch_core_media_bug_set_flag | ( | _In_ switch_media_bug_t * | bug, |
_In_ uint32_t | flag | ||
) |
switch_status_t switch_core_media_bug_set_pre_buffer_framecount | ( | switch_media_bug_t * | bug, |
uint32_t | framecount | ||
) |
Definition at line 176 of file switch_core_media_bug.c.
References SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_record_session().
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_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 925 of file switch_core_media_bug.c.
References cur, 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_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_rwlock_unlock(), and switch_thread_rwlock_wrlock().
Referenced by switch_ivr_transfer_recordings().
switch_status_t switch_core_media_bug_transfer_recordings | ( | switch_core_session_t * | orig_session, |
switch_core_session_t * | new_session | ||
) |
Definition at line 877 of file switch_core_media_bug.c.
References switch_media_bug::function, switch_media_bug::next, switch_media_bug::stop_time, switch_channel_get_variable, SWITCH_CHANNEL_SESSION_LOG, switch_channel_set_variable, switch_core_session_get_channel(), switch_core_session_get_name, switch_core_session_strdup, switch_epoch_time_now(), switch_ivr_record_session(), switch_ivr_stop_record_session(), SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_rwlock_unlock(), switch_thread_rwlock_wrlock(), and switch_media_bug::target.
Referenced by switch_channel_mark_hold(), and switch_ivr_originate().
void switch_core_screen_size | ( | int * | x, |
int * | y | ||
) |
void switch_core_session_disable_heartbeat | ( | switch_core_session_t * | session | ) |
Definition at line 1605 of file switch_core_session.c.
References switch_assert, and switch_core_session_unsched_heartbeat().
void switch_core_session_enable_heartbeat | ( | switch_core_session_t * | session, |
uint32_t | seconds | ||
) |
Definition at line 1572 of file switch_core_session.c.
References CF_PROXY_MODE, 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, and switch_true().
Referenced by switch_channel_perform_mark_answered(), and switch_core_media_receive_message().
void switch_core_session_sched_heartbeat | ( | switch_core_session_t * | session, |
uint32_t | seconds | ||
) |
Definition at line 1557 of file switch_core_session.c.
References __SWITCH_FUNC__, 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(), and switch_true().
Referenced by switch_core_session_enable_heartbeat().
void switch_core_session_unsched_heartbeat | ( | switch_core_session_t * | session | ) |
Definition at line 1549 of file switch_core_session.c.
References switch_scheduler_del_task_id().
Referenced by switch_core_session_disable_heartbeat(), switch_core_session_enable_heartbeat(), and switch_core_session_sched_heartbeat().
switch_vid_spy_fmt_t switch_media_bug_parse_spy_fmt | ( | const char * | name | ) |
Definition at line 394 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 411 of file switch_core_media_bug.c.
Referenced by switch_ivr_eavesdrop_session().