shithub: mcfs

ref: 74533c8ff1ab84ff0949d52c3726ccfcfc1bf76a
dir: mcfs/common.h

View raw version
enum {
	Nodump = -1,
	Dumpaudio = -2,
	Dumpvideo = -3,

	FmtAv01 = 0x61763031u,
	FmtAvc1 = 0x61766331u,
	FmtMp4a = 0x6d703461u,
	FmtOpus = 0x6f707573u,
	FmtVp08 = 0x76703038u,
	FmtVp09 = 0x76703039u,

	/* fake ones, not supposed to show up in a mp4 */
	FmtVorbis = 0x766f7262u,
	FmtSrt = 0x00737274u, /* srt subtitles */
	FmtMp3 = 0x006d7033u,
	FmtTheora = 0x74687261u,
	FmtFlac = 0x666c6163u,
	FmtAss = 0x00617373u, /* ass subtitles */
};

#define min(a,b) ((a)<=(b)?(a):(b))

extern Biobuf stderr, out;
extern int dflag, trackdump;

#pragma varargck type "T" u32int
int isotypefmt(Fmt *f);

#pragma varargck type "P" uvlong
int srttsfmt(Fmt *f);

int isorun(Biobuf *f);
int matroskarun(Biobuf *f);

u32int crc32(u32int init, u8int *d, ulong len);