4 #ifdef CONFIG_VIDEO_CAPTURE
11 typedef enum capturevideoformat_e
13 CAPTUREVIDEOFORMAT_AVI_I420,
14 CAPTUREVIDEOFORMAT_OGG_VORBIS_THEORA
18 typedef struct capturevideostate_s
34 unsigned char *screenbuffer;
35 unsigned char *outbuffer;
36 char basename[MAX_QPATH];
39 // precomputed RGB to YUV tables
40 // converts the RGB values to YUV (see cap_avi.c for how to use them)
41 short rgbtoyuvscaletable[3][3][256];
42 unsigned char yuvnormalizetable[3][256];
44 // precomputed gamma ramp (only needed if the capturevideo module uses RGB output)
45 // note: to map from these values to RGB24, you have to multiply by 255.0/65535.0, then add 0.5, then cast to integer
46 unsigned short vidramp[256 * 3];
48 // stuff to be filled in by the video format module
49 capturevideoformat_t format;
50 const char *formatextension;
53 // cls.capturevideo.videofile = FS_OpenRealFile(va(vabuf, sizeof(vabuf), "%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension), "wb", false);
54 void (*endvideo) (void);
55 void (*videoframes) (int num);
56 void (*soundframe) (const portable_sampleframe_t *paintbuffer, size_t length);
58 // format specific data