You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
804 B

// uds_frame.h
#pragma once
#include <stdint.h>
#define UDS_SOCK_PATH "/tmp/cam.sock"
#define UDS_MAGIC "FRA\0"
#define UDS_VERSION 1
enum {
WS_PIXFMT_RGB24 = 1,
WS_PIXFMT_RGBA32 = 2,
WS_PIXFMT_JPEG = 3
};
// 고정 길이 헤더 (리틀엔디언 가정; 동일 머신이라 문제 없음)
#pragma pack(push,1)
typedef struct {
char magic[4]; // "FRA\0"
uint32_t version; // 1
uint32_t ch; // 채널
uint32_t width; // 프레임 폭
uint32_t height; // 프레임 높이
uint32_t stride; // 한 줄 바이트 수
uint32_t pixfmt; // 1=RGB24, 2=RGBA32
uint64_t bytes; // 프레임 총 바이트
uint64_t ts_ns; // 타임스탬프(ns) (옵션: 0 가능)
} uds_frame_header_t;
#pragma pack(pop)