2004-08-23 04:42:35 +00:00
|
|
|
#ifndef _av_roq_h
|
|
|
|
#define _av_roq_h
|
|
|
|
|
|
|
|
#define RoQ_INFO 0x1001
|
|
|
|
#define RoQ_QUAD_CODEBOOK 0x1002
|
|
|
|
#define RoQ_QUAD_VQ 0x1011
|
|
|
|
#define RoQ_SOUND_MONO 0x1020
|
|
|
|
#define RoQ_SOUND_STEREO 0x1021
|
|
|
|
|
|
|
|
#define RoQ_ID_MOT 0x00
|
|
|
|
#define RoQ_ID_FCC 0x01
|
|
|
|
#define RoQ_ID_SLD 0x02
|
|
|
|
#define RoQ_ID_CCC 0x03
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
unsigned char y0, y1, y2, y3, u, v;
|
|
|
|
} roq_cell;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int idx[4];
|
|
|
|
} roq_qcell;
|
|
|
|
|
|
|
|
typedef struct {
|
2005-12-21 03:07:33 +00:00
|
|
|
vfsfile_t *fp;
|
2004-08-23 04:42:35 +00:00
|
|
|
unsigned int maxpos; //addition for pack files. all seeks add this, all tells subtract this.
|
|
|
|
int buf_size;
|
|
|
|
unsigned char *buf;
|
|
|
|
roq_cell cells[256];
|
|
|
|
roq_qcell qcells[256];
|
2005-08-12 19:37:24 +00:00
|
|
|
short snd_sqr_arr[256];
|
2014-02-07 08:38:40 +00:00
|
|
|
qofs_t roq_start, aud_pos, vid_pos;
|
2004-08-23 04:42:35 +00:00
|
|
|
long *frame_offset;
|
|
|
|
unsigned long num_frames, num_audio_bytes;
|
|
|
|
int width, height, frame_num, audio_channels;
|
|
|
|
unsigned char *y[2], *u[2], *v[2];
|
|
|
|
long stream_length;
|
|
|
|
int audio_buf_size, audio_size;
|
|
|
|
unsigned char *audio;
|
|
|
|
} roq_info;
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
void roq_init(void);
|
|
|
|
void roq_cleanup(void);
|
|
|
|
roq_info *roq_open(char *fname);
|
|
|
|
void roq_close(roq_info *ri);
|
|
|
|
int roq_read_frame(roq_info *ri);
|
|
|
|
int roq_read_audio(roq_info *ri);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|