RTS API Documentation
1.10.11
|
Go to the source code of this file.
Data Structures | |
struct | switch_buffer |
Enumerations | |
enum | switch_buffer_flag_t { SWITCH_BUFFER_FLAG_DYNAMIC = (1 << 0), SWITCH_BUFFER_FLAG_PARTITION = (1 << 1) } |
Variables | |
static uint32_t | buffer_id = 0 |
enum switch_buffer_flag_t |
Enumerator | |
---|---|
SWITCH_BUFFER_FLAG_DYNAMIC | |
SWITCH_BUFFER_FLAG_PARTITION |
Definition at line 37 of file switch_buffer.c.
void switch_buffer_add_mutex | ( | switch_buffer_t * | buffer, |
switch_mutex_t * | mutex | ||
) |
switch_status_t switch_buffer_create | ( | switch_memory_pool_t * | pool, |
switch_buffer_t ** | buffer, | ||
switch_size_t | max_len | ||
) |
Definition at line 99 of file switch_buffer.c.
References buffer_id, switch_buffer::data, switch_buffer::datalen, switch_buffer::head, switch_buffer::id, switch_buffer::max_len, switch_core_alloc, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_buffer_create_dynamic | ( | switch_buffer_t ** | buffer, |
switch_size_t | blocksize, | ||
switch_size_t | start_len, | ||
switch_size_t | max_len | ||
) |
Definition at line 113 of file switch_buffer.c.
References switch_buffer::blocksize, buffer_id, switch_buffer::data, switch_buffer::datalen, switch_buffer::head, switch_buffer::id, switch_buffer::max_len, memset(), SWITCH_BUFFER_FLAG_DYNAMIC, switch_set_flag, SWITCH_STATUS_MEMERR, and SWITCH_STATUS_SUCCESS.
switch_size_t switch_buffer_freespace | ( | switch_buffer_t * | buffer | ) |
Definition at line 183 of file switch_buffer.c.
References switch_buffer::datalen, switch_buffer::max_len, SWITCH_BUFFER_FLAG_DYNAMIC, switch_test_flag, and switch_buffer::used.
switch_size_t switch_buffer_inuse | ( | switch_buffer_t * | buffer | ) |
switch_size_t switch_buffer_len | ( | switch_buffer_t * | buffer | ) |
void switch_buffer_lock | ( | switch_buffer_t * | buffer | ) |
Definition at line 156 of file switch_buffer.c.
References switch_buffer::mutex, and switch_mutex_lock().
switch_size_t switch_buffer_peek | ( | switch_buffer_t * | buffer, |
void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 261 of file switch_buffer.c.
References switch_buffer::datalen, switch_buffer::head, and switch_buffer::used.
switch_size_t switch_buffer_peek_zerocopy | ( | switch_buffer_t * | buffer, |
const void ** | ptr | ||
) |
Definition at line 279 of file switch_buffer.c.
References switch_buffer::head, and switch_buffer::used.
switch_size_t switch_buffer_read | ( | switch_buffer_t * | buffer, |
void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 241 of file switch_buffer.c.
References switch_buffer::datalen, switch_buffer::head, and switch_buffer::used.
Referenced by switch_buffer_read_loop().
switch_size_t switch_buffer_read_loop | ( | switch_buffer_t * | buffer, |
void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 224 of file switch_buffer.c.
References switch_buffer::actually_used, switch_buffer::data, switch_buffer::head, switch_buffer::loops, switch_buffer_read(), and switch_buffer::used.
void switch_buffer_set_loops | ( | switch_buffer_t * | buffer, |
int32_t | loops | ||
) |
switch_size_t switch_buffer_toss | ( | switch_buffer_t * | buffer, |
switch_size_t | datalen | ||
) |
Definition at line 200 of file switch_buffer.c.
References switch_buffer::datalen, switch_buffer::head, and switch_buffer::used.
Referenced by switch_buffer_slide_write().
switch_status_t switch_buffer_trylock | ( | switch_buffer_t * | buffer | ) |
Definition at line 163 of file switch_buffer.c.
References switch_buffer::mutex, switch_mutex_lock(), and SWITCH_STATUS_FALSE.
void switch_buffer_unlock | ( | switch_buffer_t * | buffer | ) |
Definition at line 171 of file switch_buffer.c.
References switch_buffer::mutex, and switch_mutex_unlock().
switch_size_t switch_buffer_write | ( | switch_buffer_t * | buffer, |
const void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 296 of file switch_buffer.c.
References switch_buffer::actually_used, switch_buffer::blocksize, switch_buffer::data, switch_buffer::datalen, switch_buffer::head, switch_buffer::max_len, memset(), switch_assert, SWITCH_BUFFER_FLAG_DYNAMIC, SWITCH_BUFFER_FLAG_PARTITION, switch_test_flag, and switch_buffer::used.
Referenced by switch_buffer_slide_write(), and switch_buffer_zwrite().
void switch_buffer_zero | ( | switch_buffer_t * | buffer | ) |
Definition at line 358 of file switch_buffer.c.
References switch_buffer::actually_used, switch_buffer::data, switch_buffer::head, switch_assert, and switch_buffer::used.
Referenced by switch_buffer_zwrite().
switch_size_t switch_buffer_zwrite | ( | switch_buffer_t * | buffer, |
const void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 367 of file switch_buffer.c.
References SWITCH_BUFFER_FLAG_PARTITION, switch_buffer_write(), switch_buffer_zero(), and switch_test_flag.
|
static |
Definition at line 35 of file switch_buffer.c.
Referenced by switch_buffer_create(), switch_buffer_create_dynamic(), and switch_buffer_create_partition().