Expand description
Runtime configuration for internal node buffers.
This module provides a global configuration mechanism for internal buffer settings used by codec and container nodes. These settings are typically set once at server startup and remain constant for the lifetime of the process.
§Usage
Server startup:
ⓘ
use streamkit_core::node_config::{set_node_buffer_config, NodeBufferConfig};
let config = NodeBufferConfig {
codec_channel_capacity: 32,
stream_channel_capacity: 8,
demuxer_buffer_size: 65536,
moq_peer_channel_capacity: 100,
};
set_node_buffer_config(config);Node implementation:
ⓘ
use streamkit_core::node_config::get_codec_channel_capacity;
let (tx, rx) = mpsc::channel(get_codec_channel_capacity());§Default Values
If set_node_buffer_config is never called, the getter functions return sensible
defaults based on production experience:
codec_channel_capacity: 32 packetsstream_channel_capacity: 8 packetsdemuxer_buffer_size: 65536 bytes (64KB)moq_peer_channel_capacity: 100 packets (MoQ transport internal queues)
Structs§
- Node
Buffer Config - Runtime configuration for node internal buffers.
Functions§
- get_
codec_ channel_ capacity - Returns the configured codec channel capacity.
- get_
demuxer_ buffer_ size - Returns the configured demuxer buffer size in bytes.
- get_
moq_ peer_ channel_ capacity - Returns the configured MoQ peer channel capacity.
- get_
stream_ channel_ capacity - Returns the configured stream channel capacity.
- set_
node_ buffer_ config - Sets the global node buffer configuration.