|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
Go to the source code of this file.
Data Structures | |
| struct | webrtc_recv_msg_t |
| Receive queue element (variable-length message) More... | |
| struct | webrtc_transport_data_t |
| WebRTC transport implementation data. More... | |
Macros | |
| #define | WEBRTC_RECV_QUEUE_SIZE 64 |
| Maximum receive queue size (messages buffered before recv()) | |
Functions | |
| acip_transport_t * | acip_webrtc_transport_create (webrtc_peer_connection_t *peer_conn, webrtc_data_channel_t *data_channel, crypto_context_t *crypto_ctx) |
| #define WEBRTC_RECV_QUEUE_SIZE 64 |
Maximum receive queue size (messages buffered before recv())
Power of 2 for ringbuffer optimization. 64 messages = ~2-3 seconds of video frames at 30 FPS, enough for network jitter and processing delays.
Definition at line 45 of file webrtc/transport.c.
| acip_transport_t * acip_webrtc_transport_create | ( | webrtc_peer_connection_t * | peer_conn, |
| webrtc_data_channel_t * | data_channel, | ||
| crypto_context_t * | crypto_ctx | ||
| ) |
Definition at line 374 of file webrtc/transport.c.
References ASCIICHAT_OK, cond_destroy(), cond_init(), acip_transport::crypto_ctx, webrtc_transport_data_t::data_channel, ERROR_INTERNAL, ERROR_INVALID_PARAM, ERROR_MEMORY, acip_transport::impl_data, webrtc_transport_data_t::is_connected, log_info, acip_transport::methods, mutex_destroy(), mutex_init(), webrtc_datachannel_callbacks_t::on_open, webrtc_transport_data_t::peer_conn, webrtc_transport_data_t::queue_cond, webrtc_transport_data_t::queue_mutex, webrtc_transport_data_t::recv_queue, ringbuffer_create(), ringbuffer_destroy(), SAFE_FREE, SAFE_MALLOC, SET_ERRNO, webrtc_transport_data_t::state_mutex, webrtc_datachannel_set_callbacks(), and WEBRTC_RECV_QUEUE_SIZE.