ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
simple_frame_swap_t Struct Reference

Counters and timing measurements used to monitor frame delivery and quality. More...

#include <include/ascii-chat/video/rgba/video_frame.h>

Data Fields

atomic_t current_frame
 Atomic pointer to current frame (stored as uint64_t).
video_frame_t frame_a
 First pre-allocated frame.
video_frame_t frame_b
 Second pre-allocated frame.
atomic_t use_frame_a
 Atomic flag: true = use frame_a next, false = use frame_b.

Detailed Description

Counters and timing measurements used to monitor frame delivery and quality.

Simple atomic frame swap structure

Simplified frame management for basic use cases that don't need statistics. Uses atomic pointer swaps for lock-free frame updates. This is the pattern used by many video streaming services for simple frame delivery.

Note
This is a lighter-weight alternative to video_frame_buffer_t when statistics tracking is not needed.
Uses two pre-allocated frames that alternate on each update.
Atomic pointer swap enables lock-free operation.

Definition at line 268 of file video_frame.h.

Field Documentation

◆ current_frame

atomic_t simple_frame_swap_t::current_frame

Atomic pointer to current frame (stored as uint64_t).

Definition at line 269 of file video_frame.h.

Referenced by simple_frame_swap_create(), simple_frame_swap_get(), and simple_frame_swap_update().

◆ frame_a

video_frame_t simple_frame_swap_t::frame_a

First pre-allocated frame.

Definition at line 270 of file video_frame.h.

Referenced by simple_frame_swap_create(), simple_frame_swap_destroy(), and simple_frame_swap_update().

◆ frame_b

video_frame_t simple_frame_swap_t::frame_b

Second pre-allocated frame.

Definition at line 271 of file video_frame.h.

Referenced by simple_frame_swap_create(), simple_frame_swap_destroy(), and simple_frame_swap_update().

◆ use_frame_a

atomic_t simple_frame_swap_t::use_frame_a

Atomic flag: true = use frame_a next, false = use frame_b.

Definition at line 272 of file video_frame.h.

Referenced by simple_frame_swap_create(), and simple_frame_swap_update().


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