FreeSWITCH API Documentation
1.7.0
|
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 93 of file switch_buffer.c.
References buffer_id, switch_buffer::data, switch_buffer::datalen, switch_buffer::head, switch_buffer::id, 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 107 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 170 of file switch_buffer.c.
References SWITCH_BUFFER_FLAG_DYNAMIC, and switch_test_flag.
switch_size_t switch_buffer_inuse | ( | switch_buffer_t * | buffer | ) |
Definition at line 182 of file switch_buffer.c.
switch_size_t switch_buffer_len | ( | switch_buffer_t * | buffer | ) |
Definition at line 165 of file switch_buffer.c.
void switch_buffer_lock | ( | switch_buffer_t * | buffer | ) |
Definition at line 143 of file switch_buffer.c.
References switch_mutex_lock().
switch_size_t switch_buffer_peek | ( | switch_buffer_t * | buffer, |
void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 248 of file switch_buffer.c.
switch_size_t switch_buffer_peek_zerocopy | ( | switch_buffer_t * | buffer, |
const void ** | ptr | ||
) |
Definition at line 266 of file switch_buffer.c.
switch_size_t switch_buffer_read | ( | switch_buffer_t * | buffer, |
void * | data, | ||
switch_size_t | datalen | ||
) |
switch_size_t switch_buffer_read_loop | ( | switch_buffer_t * | buffer, |
void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 211 of file switch_buffer.c.
References switch_buffer_read().
void switch_buffer_set_loops | ( | switch_buffer_t * | buffer, |
int32_t | loops | ||
) |
Definition at line 206 of file switch_buffer.c.
switch_size_t switch_buffer_toss | ( | switch_buffer_t * | buffer, |
switch_size_t | datalen | ||
) |
switch_status_t switch_buffer_trylock | ( | switch_buffer_t * | buffer | ) |
Definition at line 150 of file switch_buffer.c.
References switch_mutex_lock(), and SWITCH_STATUS_FALSE.
void switch_buffer_unlock | ( | switch_buffer_t * | buffer | ) |
Definition at line 158 of file switch_buffer.c.
References switch_mutex_unlock().
switch_size_t switch_buffer_write | ( | switch_buffer_t * | buffer, |
const void * | data, | ||
switch_size_t | datalen | ||
) |
Definition at line 283 of file switch_buffer.c.
References switch_assert, SWITCH_BUFFER_FLAG_DYNAMIC, SWITCH_BUFFER_FLAG_PARTITION, and switch_test_flag.
Referenced by switch_buffer_slide_write(), and switch_buffer_zwrite().
void switch_buffer_zero | ( | switch_buffer_t * | buffer | ) |
Definition at line 340 of file switch_buffer.c.
References switch_assert.
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 349 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().