ref: 190e3848a9ecf54d0b1a5863d1ed653f0fa24ae8
dir: /stream.h/
typedef struct Stream Stream;
typedef struct Streamhdr Streamhdr;
typedef struct Streamframe Streamframe;
typedef struct Streaminfo Streaminfo;
typedef struct Streamops Streamops;
#pragma incomplete Stream
enum {
FmtAV1,
};
struct Streamframe {
u8int *buf;
int sz;
uvlong offset;
uvlong timestamp;
};
struct Streamops {
Stream *(*open)(char *filename, Streaminfo *info, int *failed);
u8int *(*alloc)(void *aux, int sz);
void (*close)(Stream *s);
vlong (*offset)(Stream *s);
int (*read)(Stream *s, Streamframe *f);
void *aux;
};
struct Streamhdr {
Streamops ops;
};
struct Streaminfo {
struct {
uvlong denum, num;
}timebase;
int fmt;
int w;
int h;
};
Stream *Sopen(char *filename, Streaminfo *info);
vlong Soffset(Stream *s);
void Sclose(Stream *s);
int Sread(Stream *s, Streamframe *f);