Files
dat-thang/extra/dat-dpi/inc/cable_video.h
T
divorce b735900f2e 0.0.002
ddat interop with dat js
cable interop with cabal js
ddat's frontend = dat-thang
cable fe = cable-thang
dillo support based on cel's dillo-dat
bootstrap node
xplatform support

Signed-off-by: divo <418@cryspace.space>
2026-10-19 00:17:02 -04:00

23 lines
946 B
C

#ifndef CABLE_VIDEO_H
#define CABLE_VIDEO_H
#include <stddef.h>
#include <stdint.h>
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