ascii-chat
Binary v0.16.50-198-g78f51665f
Library lib/v0.3.2-2240-g78f51665f
Video chat in your terminal
Loading...
Searching...
No Matches
frame_validator.c File Reference

Frame validation implementation for IMAGE_FRAME packets. More...

Go to the source code of this file.

Macros

#define NETWORK_FRAME_VALIDATOR_SIZE_BUFFER_SIZE   32

Functions

asciichat_error_t frame_check_size_overflow (size_t header_size, size_t data_size)
 Check for overflow when adding header to data.
asciichat_error_t frame_validate_legacy (size_t len, size_t expected_rgb_size)
 Validate legacy frame format.
asciichat_error_t frame_validate_new (void *data, size_t len, bool *out_compressed, uint32_t *out_data_size)
 Validate new frame format with optional compression.
void frame_extract_dimensions (const void *data, uint32_t *width, uint32_t *height)
 Extract width and height from frame header.
void frame_extract_new_header (const void *data, uint32_t *compressed, uint32_t *data_size)
 Extract compressed flag and data size from new format header.

Detailed Description

Frame validation implementation for IMAGE_FRAME packets.

Definition in file network/frame_validator.c.

Macro Definition Documentation

◆ NETWORK_FRAME_VALIDATOR_SIZE_BUFFER_SIZE

#define NETWORK_FRAME_VALIDATOR_SIZE_BUFFER_SIZE   32

Definition at line 8 of file network/frame_validator.c.

Referenced by frame_check_size_overflow(), and frame_validate_new().