gstreamer
Loading...
Searching...
No Matches
GSROCrateLimits Struct Reference

Per-crate bounds preventing asynchronous delivery from consuming unlimited memory. More...

#include <gSROCrate.h>

Data Fields

std::size_t queue_messages = 1024
 Maximum queued payload/progress messages; producers wait when the queue is full.
std::size_t queue_bytes = 4 * 1024 * 1024
 Maximum accounted payload bytes in the input queue; producers wait until their payload fits.
std::size_t pending_payloads = 65536
 Maximum payloads awaiting time ordering; exceeding this fails the crate.
std::size_t pending_bytes = 64 * 1024 * 1024
 Maximum accounted payload bytes awaiting time ordering; exceeding this fails the crate.

Detailed Description

Workers can produce payloads faster than a crate can process or write them. The input queue limits make producers wait for space, allowing brief bursts without letting a slow consumer exhaust memory. A single payload larger than queue_bytes is rejected immediately because waiting cannot make it fit.

Limiting the queue alone is insufficient: the crate can drain it into the ordering buffer while an earlier event is still running. Those pending payloads cannot reach the plugin until a safe-time boundary proves their order. Separate pending limits bound this accumulation. Exceeding either fails the crate and wakes producers; blocking the crate here could prevent it from receiving the earlier payloads or progress messages needed to release pending data.

Counts bound the number of records, including many small records; bytes account for variable-sized contents such as waveforms. Byte limits count sizeof(GSROPayload) plus data->size_bytes() per payload. Allocator/container overhead, producer-held input, and plugin-retained state are not included, so these are not a total process-memory budget. Limits apply independently to each crate and must be positive. They control framework storage, not the implementation's frame duration or incomplete-frame policy.

Definition at line 28 of file gSROCrate.h.

Field Documentation

◆ pending_bytes

std::size_t GSROCrateLimits::pending_bytes = 64 * 1024 * 1024

Definition at line 37 of file gSROCrate.h.

◆ pending_payloads

std::size_t GSROCrateLimits::pending_payloads = 65536

Definition at line 35 of file gSROCrate.h.

◆ queue_bytes

std::size_t GSROCrateLimits::queue_bytes = 4 * 1024 * 1024

Definition at line 33 of file gSROCrate.h.

◆ queue_messages

std::size_t GSROCrateLimits::queue_messages = 1024

Definition at line 31 of file gSROCrate.h.


The documentation for this struct was generated from the following file: