#pragma once #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { WS_PIXFMT_RGB24 = 0, // stride = width * 3 WS_PIXFMT_RGBA32 // stride = width * 4 } ws_pixfmt_t; // 시작/종료 int ws_init(int port, int channels, int max_frame_bytes); void ws_deinit(void); // 서버 스레드 실행(블로킹). 보통 별도 pthread에서 호출. int ws_server_run(void *arg); // 최신 프레임 게시(복사됨). render()에서 DQBUF 직후 호출 권장. void ws_publish_frame(int ch, const void* src, size_t len, int w, int h, int stride, ws_pixfmt_t fmt); #ifdef __cplusplus } #endif