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

Go to the source code of this file.

Data Structures

struct  video_frame_t
 When code needs to work with simple frame swap, it keeps current_frame, frame_a, frame_b, use_frame_a here instead of scattering it across globals. Initialization establishes the handles and sizes; teardown must release any allocation, lock, thread, or callback context recorded in those fields. More...
struct  video_frame_buffer_t
 One captured, decoded, or rendered video frame and its timing metadata. More...
struct  video_frame_stats_t
 Counters and timing measurements used to monitor frame delivery and quality. More...
struct  simple_frame_swap_t
 Counters and timing measurements used to monitor frame delivery and quality. More...

Macros

#define VIDEO_FRAME_BUFFER_SIZE   MAX_FRAME_BUFFER_SIZE
 Video frame buffer size (2MB per frame).
#define MAX_FRAME_BUFFERS   2
 Maximum number of frame buffers (double buffering).

Functions

video_frame_buffer_t * video_frame_buffer_create (const char *client_id)
 Create a double-buffered video frame manager.
void video_frame_buffer_destroy (video_frame_buffer_t *vfb)
 Destroy frame buffer and free all resources.
video_frame_t * video_frame_begin_write (video_frame_buffer_t *vfb)
 Writer API: Start writing a new frame.
void video_frame_commit (video_frame_buffer_t *vfb)
 Writer API: Commit the frame and swap buffers.
const video_frame_t * video_frame_get_latest (video_frame_buffer_t *vfb)
 Reader API: Get latest frame if available.
const video_frame_t * video_frame_peek_latest (video_frame_buffer_t *vfb)
void video_frame_get_stats (video_frame_buffer_t *vfb, video_frame_stats_t *stats)
 Get frame statistics for quality monitoring.
simple_frame_swap_t * simple_frame_swap_create (void)
 Create a simple atomic frame swap.
void simple_frame_swap_destroy (simple_frame_swap_t *sfs)
 Destroy simple frame swap and free resources.
void simple_frame_swap_update (simple_frame_swap_t *sfs, const void *data, size_t size)
 Update frame data in simple frame swap.
const video_frame_t * simple_frame_swap_get (simple_frame_swap_t *sfs)
 Get current frame from simple frame swap.