RTS API Documentation
1.10.11
|
Typedefs | |
typedef struct switch_apr_queue_t | switch_queue_t |
Functions | |
switch_status_t | switch_queue_create (switch_queue_t **queue, unsigned int queue_capacity, switch_memory_pool_t *pool) |
switch_status_t | switch_queue_pop (switch_queue_t *queue, void **data) |
switch_status_t | switch_queue_pop_timeout (switch_queue_t *queue, void **data, switch_interval_time_t timeout) |
switch_status_t | switch_queue_push (switch_queue_t *queue, void *data) |
unsigned int | switch_queue_size (switch_queue_t *queue) |
switch_status_t | switch_queue_trypop (switch_queue_t *queue, void **data) |
switch_status_t | switch_queue_interrupt_all (switch_queue_t *queue) |
switch_status_t | switch_queue_term (switch_queue_t *queue) |
switch_status_t | switch_queue_trypush (switch_queue_t *queue, void *data) |
typedef struct switch_apr_queue_t switch_queue_t |
Opaque structure used for queue API
Definition at line 590 of file switch_apr.h.
switch_status_t switch_queue_create | ( | switch_queue_t ** | queue, |
unsigned int | queue_capacity, | ||
switch_memory_pool_t * | pool | ||
) |
create a FIFO queue
queue | The new queue |
queue_capacity | maximum size of the queue |
pool | a pool to allocate queue from |
Definition at line 1233 of file switch_apr.c.
References switch_apr_queue_create().
Referenced by chat_thread_start(), check_dispatch(), EventConsumer::EventConsumer(), inband_dtmf_generate_callback(), switch_channel_alloc(), switch_core_media_bug_add(), switch_core_media_bug_patch_spy_frame(), switch_core_memory_init(), switch_core_session_init(), switch_core_session_request_uuid(), switch_event_channel_broadcast(), switch_event_init(), switch_frame_buffer_create(), switch_log_init(), switch_msrp_perform_send(), switch_rtp_create(), switch_scheduler_task_thread_start(), and switch_sql_queue_manager_init_name().
switch_status_t switch_queue_interrupt_all | ( | switch_queue_t * | queue | ) |
Definition at line 1269 of file switch_apr.c.
References switch_apr_queue_interrupt_all().
Referenced by EventConsumer::cleanup(), switch_event_shutdown(), and switch_sql_queue_manager_stop().
switch_status_t switch_queue_pop | ( | switch_queue_t * | queue, |
void ** | data | ||
) |
pop/get an object from the queue, blocking if the queue is already empty
queue | the queue |
data | the data |
Definition at line 1243 of file switch_apr.c.
References switch_apr_queue_pop().
Referenced by chat_thread_run(), log_thread(), pool_thread(), EventConsumer::pop(), switch_event_channel_deliver_thread(), switch_event_dispatch_thread(), and switch_frame_buffer_pop().
switch_status_t switch_queue_pop_timeout | ( | switch_queue_t * | queue, |
void ** | data, | ||
switch_interval_time_t | timeout | ||
) |
pop/get an object from the queue, blocking if the queue is already empty
queue | the queue |
data | the data |
timeout | The amount of time in microseconds to wait. This is a maximum, not a minimum. If the condition is signaled, we will wake up before this time, otherwise the error APR_TIMEUP is returned. |
Definition at line 1248 of file switch_apr.c.
References switch_apr_queue_pop_timeout().
Referenced by EventConsumer::pop(), switch_core_session_thread_pool_worker(), and switch_scheduler_task_thread().
switch_status_t switch_queue_push | ( | switch_queue_t * | queue, |
void * | data | ||
) |
push/add a object to the queue, blocking if the queue is already full
queue | the queue |
data | the data |
Definition at line 1253 of file switch_apr.c.
References switch_apr_queue_push().
Referenced by chat_queue_message(), switch_core_media_bug_close(), switch_core_media_bug_push_spy_frame(), switch_core_perform_destroy_memory_pool(), switch_core_session_queue_signal_data(), switch_core_session_read_video_frame(), switch_core_session_thread_pool_launch(), switch_core_session_write_video_frame(), switch_event_queue_dispatch_event(), switch_frame_buffer_push(), switch_loadable_module_shutdown(), switch_log_shutdown(), switch_scheduler_add_task_ex(), switch_scheduler_execute(), switch_sql_queue_manager_push_confirm(), switch_sql_queue_manager_stop(), switch_thread_pool_launch_thread(), and task_thread_loop().
unsigned int switch_queue_size | ( | switch_queue_t * | queue | ) |
returns the size of the queue.
queue | the queue |
Definition at line 1238 of file switch_apr.c.
References switch_apr_queue_size().
Referenced by do_2833(), flush_video_queue(), pool_thread(), qm_ttl(), rtp_common_read(), switch_channel_has_dtmf(), switch_core_media_bug_patch_spy_frame(), switch_core_memory_reclaim(), switch_core_memory_reclaim_events(), switch_core_memory_reclaim_logger(), switch_core_session_dequeue_private_event(), switch_core_session_event_count(), switch_core_session_messages_waiting(), switch_core_session_private_event_count(), switch_event_queue_dispatch_event(), switch_frame_buffer_size(), switch_rtp_has_dtmf(), switch_sql_queue_manager_size(), and switch_user_sql_thread().
switch_status_t switch_queue_term | ( | switch_queue_t * | queue | ) |
Definition at line 1274 of file switch_apr.c.
References switch_apr_queue_term().
Referenced by switch_core_session_uninit(), and switch_msrp_perform_send().
switch_status_t switch_queue_trypop | ( | switch_queue_t * | queue, |
void ** | data | ||
) |
pop/get an object to the queue, returning immediatly if the queue is empty
queue | the queue |
data | the data |
Definition at line 1264 of file switch_apr.c.
References switch_apr_queue_trypop().
Referenced by EventConsumer::cleanup(), do_2833(), do_flush(), do_trans(), flush_video_queue(), inband_dtmf_generate_callback(), new_header(), pool_thread(), EventConsumer::pop(), switch_channel_dequeue_dtmf(), switch_channel_flush_dtmf(), switch_channel_queue_dtmf(), switch_channel_set_timestamps(), switch_channel_uninit(), switch_core_media_bug_destroy(), switch_core_media_bug_patch_spy_frame(), switch_core_memory_reclaim(), switch_core_memory_reclaim_events(), switch_core_memory_reclaim_logger(), switch_core_memory_stop(), switch_core_perform_new_memory_pool(), switch_core_session_dequeue_event(), switch_core_session_dequeue_message(), switch_core_session_dequeue_private_event(), switch_core_session_dequeue_signal_data(), switch_core_session_flush_message(), switch_core_session_flush_private_events(), switch_core_session_perform_destroy(), switch_event_channel_deliver_thread(), switch_event_create_subclass_detailed(), switch_event_shutdown(), switch_frame_buffer_trypop(), switch_log_node_alloc(), switch_msrp_perform_send(), switch_msrp_session_destroy(), switch_rtp_dequeue_dtmf(), switch_rtp_destroy(), switch_scheduler_task_thread(), and video_bug_thread().
switch_status_t switch_queue_trypush | ( | switch_queue_t * | queue, |
void * | data | ||
) |
push/add a object to the queue, returning immediatly if the queue is full
queue | the queue |
data | the data |
Definition at line 1279 of file switch_apr.c.
References switch_apr_queue_trypush().
Referenced by chat_queue_message(), event_handler(), free_header(), generate_on_dtmf(), pool_thread(), switch_channel_dequeue_dtmf(), switch_channel_flush_dtmf(), switch_channel_queue_dtmf(), switch_core_session_queue_event(), switch_core_session_queue_message(), switch_core_session_queue_private_event(), switch_event_channel_broadcast(), switch_event_destroy(), switch_event_shutdown(), switch_frame_buffer_trypush(), switch_log_meta_vprintf(), switch_log_node_free(), switch_msrp_perform_send(), switch_rtp_queue_rfc2833(), switch_rtp_queue_rfc2833_in(), and switch_sql_queue_manager_push().