|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
🎯 Lock-free circular buffer for audio streaming with atomic operations More...
Go to the source code of this file.
Functions | |
| ringbuffer_t * | ringbuffer_create (size_t element_size, size_t capacity) |
| void | ringbuffer_destroy (ringbuffer_t *rb) |
| bool | ringbuffer_write (ringbuffer_t *rb, const void *data) |
| bool | ringbuffer_read (ringbuffer_t *rb, void *data) |
| bool | ringbuffer_peek (ringbuffer_t *rb, void *data) |
| size_t | ringbuffer_size (const ringbuffer_t *rb) |
| bool | ringbuffer_is_empty (const ringbuffer_t *rb) |
| bool | ringbuffer_is_full (const ringbuffer_t *rb) |
| void | ringbuffer_clear (ringbuffer_t *rb) |
| framebuffer_t * | framebuffer_create (size_t capacity) |
| framebuffer_t * | framebuffer_create_multi (size_t capacity) |
| void | framebuffer_destroy (framebuffer_t *fb) |
| bool | framebuffer_write_frame (framebuffer_t *fb, const char *frame_data, size_t frame_size) |
| bool | framebuffer_read_frame (framebuffer_t *fb, frame_t *frame) |
| void | framebuffer_clear (framebuffer_t *fb) |
| bool | framebuffer_write_multi_frame (framebuffer_t *fb, const char *frame_data, size_t frame_size, uint32_t source_client_id, uint32_t frame_sequence, uint32_t timestamp) |
| bool | framebuffer_read_multi_frame (framebuffer_t *fb, multi_source_frame_t *frame) |
| bool | framebuffer_peek_latest_multi_frame (framebuffer_t *fb, multi_source_frame_t *frame) |
🎯 Lock-free circular buffer for audio streaming with atomic operations
Definition in file ringbuffer.c.
| void framebuffer_clear | ( | framebuffer_t * | fb | ) |
Definition at line 323 of file ringbuffer.c.
References buffer_pool_free(), buffer_size, ringbuffer_clear(), and ringbuffer_read().
Referenced by framebuffer_destroy().
| framebuffer_t * framebuffer_create | ( | size_t | capacity | ) |
Definition at line 147 of file ringbuffer.c.
References mutex_destroy(), mutex_init(), and ringbuffer_create().
| framebuffer_t * framebuffer_create_multi | ( | size_t | capacity | ) |
Definition at line 175 of file ringbuffer.c.
References mutex_destroy(), mutex_init(), and ringbuffer_create().
| void framebuffer_destroy | ( | framebuffer_t * | fb | ) |
Definition at line 203 of file ringbuffer.c.
References framebuffer_clear(), mutex_destroy(), and ringbuffer_destroy().
| bool framebuffer_peek_latest_multi_frame | ( | framebuffer_t * | fb, |
| multi_source_frame_t * | frame | ||
| ) |
Definition at line 453 of file ringbuffer.c.
References buffer_pool_alloc(), and ringbuffer_peek().
| bool framebuffer_read_frame | ( | framebuffer_t * | fb, |
| frame_t * | frame | ||
| ) |
Definition at line 276 of file ringbuffer.c.
References ringbuffer_read().
| bool framebuffer_read_multi_frame | ( | framebuffer_t * | fb, |
| multi_source_frame_t * | frame | ||
| ) |
Definition at line 418 of file ringbuffer.c.
References ringbuffer_read().
| bool framebuffer_write_frame | ( | framebuffer_t * | fb, |
| const char * | frame_data, | ||
| size_t | frame_size | ||
| ) |
Definition at line 222 of file ringbuffer.c.
References buffer_pool_alloc(), buffer_pool_free(), ringbuffer_read(), ringbuffer_size(), and ringbuffer_write().
| bool framebuffer_write_multi_frame | ( | framebuffer_t * | fb, |
| const char * | frame_data, | ||
| size_t | frame_size, | ||
| uint32_t | source_client_id, | ||
| uint32_t | frame_sequence, | ||
| uint32_t | timestamp | ||
| ) |
Definition at line 379 of file ringbuffer.c.
References buffer_pool_alloc(), buffer_pool_free(), and ringbuffer_write().
| void ringbuffer_clear | ( | ringbuffer_t * | rb | ) |
Definition at line 134 of file ringbuffer.c.
Referenced by framebuffer_clear().
| ringbuffer_t * ringbuffer_create | ( | size_t | element_size, |
| size_t | capacity | ||
| ) |
Definition at line 28 of file ringbuffer.c.
Referenced by acip_webrtc_transport_create(), acip_websocket_client_transport_create(), acip_websocket_server_transport_create(), framebuffer_create(), framebuffer_create_multi(), session_host_add_client(), and session_host_add_memory_participant().
| void ringbuffer_destroy | ( | ringbuffer_t * | rb | ) |
Definition at line 54 of file ringbuffer.c.
Referenced by acip_webrtc_transport_create(), acip_websocket_client_transport_create(), acip_websocket_server_transport_create(), framebuffer_destroy(), session_host_add_client(), session_host_add_memory_participant(), session_host_destroy(), and session_host_remove_client().
| bool ringbuffer_is_empty | ( | const ringbuffer_t * | rb | ) |
Definition at line 126 of file ringbuffer.c.
References ringbuffer_size().
| bool ringbuffer_is_full | ( | const ringbuffer_t * | rb | ) |
Definition at line 130 of file ringbuffer.c.
References ringbuffer_size().
| bool ringbuffer_peek | ( | ringbuffer_t * | rb, |
| void * | data | ||
| ) |
Definition at line 105 of file ringbuffer.c.
Referenced by framebuffer_peek_latest_multi_frame().
| bool ringbuffer_read | ( | ringbuffer_t * | rb, |
| void * | data | ||
| ) |
Definition at line 83 of file ringbuffer.c.
Referenced by framebuffer_clear(), framebuffer_read_frame(), framebuffer_read_multi_frame(), and framebuffer_write_frame().
| size_t ringbuffer_size | ( | const ringbuffer_t * | rb | ) |
Definition at line 122 of file ringbuffer.c.
Referenced by framebuffer_write_frame(), ringbuffer_is_empty(), and ringbuffer_is_full().
| bool ringbuffer_write | ( | ringbuffer_t * | rb, |
| const void * | data | ||
| ) |
Definition at line 61 of file ringbuffer.c.
Referenced by framebuffer_write_frame(), framebuffer_write_multi_frame(), and session_host_inject_audio().