#ifndef CABLE_VIDEO_H #define CABLE_VIDEO_H #include #include typedef struct cable_video_source cable_video_source_t; /* Read an OBS MPEG-TS feed from a local UDP socket, normally port 5000. * Pixels are copied as RGB24; a generation change means a new frame arrived. */ cable_video_source_t *cable_video_source_open(const char *url); void cable_video_source_close(cable_video_source_t *source); int cable_video_source_frame(cable_video_source_t *source, uint8_t *rgb, size_t capacity, unsigned *width, unsigned *height, uint64_t *generation); /* Encode/decode one low-resolution JPEG frame for volatile Cable media. */ int cable_video_encode_jpeg(const uint8_t *rgb, unsigned width, unsigned height, uint8_t *jpeg, size_t capacity, size_t *written); int cable_video_decode_jpeg(const uint8_t *jpeg, size_t length, uint8_t *rgb, size_t capacity, unsigned *width, unsigned *height); #endif