2001-04-06 23:20:46 +00:00
|
|
|
#ifndef __CODEC_CFG_H
|
|
|
|
#define __CODEC_CFG_H
|
|
|
|
|
2002-01-17 09:20:29 +00:00
|
|
|
#define CODECS_MAX_FOURCC 32
|
2002-02-12 17:33:27 +00:00
|
|
|
#define CODECS_MAX_OUTFMT 16
|
|
|
|
#define CODECS_MAX_INFMT 16
|
2001-04-06 23:20:46 +00:00
|
|
|
|
2001-04-07 21:27:57 +00:00
|
|
|
// Global flags:
|
2001-04-10 20:09:23 +00:00
|
|
|
#define CODECS_FLAG_SEEKABLE (1<<0)
|
2001-04-06 23:20:46 +00:00
|
|
|
|
2001-04-07 21:27:57 +00:00
|
|
|
// Outfmt flags:
|
2001-04-06 23:56:42 +00:00
|
|
|
#define CODECS_FLAG_FLIP (1<<0)
|
|
|
|
#define CODECS_FLAG_NOFLIP (1<<1)
|
|
|
|
#define CODECS_FLAG_YUVHACK (1<<2)
|
2002-03-21 19:53:31 +00:00
|
|
|
#define CODECS_FLAG_QUERY (1<<3)
|
2001-04-06 23:56:42 +00:00
|
|
|
|
2002-03-18 01:52:51 +00:00
|
|
|
#define CODECS_STATUS__MIN 0
|
|
|
|
#define CODECS_STATUS_NOT_WORKING -1
|
|
|
|
#define CODECS_STATUS_PROBLEMS 0
|
|
|
|
#define CODECS_STATUS_WORKING 1
|
|
|
|
#define CODECS_STATUS_UNTESTED 2
|
|
|
|
#define CODECS_STATUS__MAX 2
|
2001-04-08 23:42:25 +00:00
|
|
|
|
2001-07-29 02:08:27 +00:00
|
|
|
// Codec family/driver:
|
|
|
|
#define AFM_MPEG 1
|
|
|
|
#define AFM_PCM 2
|
|
|
|
#define AFM_AC3 3
|
|
|
|
#define AFM_ACM 4
|
|
|
|
#define AFM_ALAW 5
|
|
|
|
#define AFM_GSM 6
|
|
|
|
#define AFM_DSHOW 7
|
|
|
|
#define AFM_DVDPCM 8
|
2001-08-15 11:50:55 +00:00
|
|
|
#define AFM_HWAC3 9
|
2001-09-01 19:44:49 +00:00
|
|
|
#define AFM_VORBIS 10
|
2001-09-21 21:40:16 +00:00
|
|
|
#define AFM_FFMPEG 11
|
2001-10-23 12:03:41 +00:00
|
|
|
#define AFM_MAD 12
|
2001-12-27 05:09:43 +00:00
|
|
|
#define AFM_MSADPCM 13
|
2001-12-09 16:20:03 +00:00
|
|
|
#define AFM_A52 14
|
|
|
|
#define AFM_G72X 15
|
2001-12-27 05:09:43 +00:00
|
|
|
#define AFM_IMAADPCM 16
|
2002-02-25 02:48:37 +00:00
|
|
|
#define AFM_DK4ADPCM 17
|
|
|
|
#define AFM_DK3ADPCM 18
|
2002-02-01 05:33:46 +00:00
|
|
|
#define AFM_ROQAUDIO 19
|
2002-03-18 23:30:04 +00:00
|
|
|
#define AFM_AAC 20
|
2001-07-29 02:08:27 +00:00
|
|
|
|
|
|
|
#define VFM_MPEG 1
|
|
|
|
#define VFM_VFW 2
|
|
|
|
#define VFM_ODIVX 3
|
|
|
|
#define VFM_DSHOW 4
|
|
|
|
#define VFM_FFMPEG 5
|
|
|
|
#define VFM_VFWEX 6
|
|
|
|
#define VFM_DIVX4 7
|
2001-08-11 23:11:16 +00:00
|
|
|
#define VFM_RAW 8
|
2002-03-19 07:07:06 +00:00
|
|
|
#define VFM_MSRLE 9
|
2001-10-22 19:04:09 +00:00
|
|
|
#define VFM_XANIM 10
|
2001-11-11 13:35:00 +00:00
|
|
|
#define VFM_MSVIDC 11
|
2001-11-28 01:35:55 +00:00
|
|
|
#define VFM_FLI 12
|
2001-12-21 16:39:54 +00:00
|
|
|
#define VFM_CINEPAK 13
|
2001-12-23 22:20:46 +00:00
|
|
|
#define VFM_QTRLE 14
|
2001-12-27 21:32:17 +00:00
|
|
|
#define VFM_NUV 15
|
2002-01-04 05:57:00 +00:00
|
|
|
#define VFM_CYUV 16
|
2002-01-18 05:43:48 +00:00
|
|
|
#define VFM_QTSMC 17
|
2002-01-22 05:39:34 +00:00
|
|
|
#define VFM_DUCKTM1 18
|
2002-02-01 05:33:46 +00:00
|
|
|
#define VFM_ROQVIDEO 19
|
2002-02-09 20:05:49 +00:00
|
|
|
#define VFM_QTRPZA 20
|
2002-02-11 09:15:59 +00:00
|
|
|
#define VFM_MPNG 21
|
2002-03-10 22:49:18 +00:00
|
|
|
#define VFM_IJPG 22
|
2002-03-21 01:21:49 +00:00
|
|
|
#define VFM_HUFFYUV 23
|
2002-03-22 22:12:09 +00:00
|
|
|
#define VFM_ZLIB 24
|
2001-04-06 23:56:42 +00:00
|
|
|
|
2001-09-02 17:21:22 +00:00
|
|
|
#ifndef GUID_TYPE
|
|
|
|
#define GUID_TYPE
|
2001-04-06 23:20:46 +00:00
|
|
|
typedef struct {
|
2001-04-07 00:51:38 +00:00
|
|
|
unsigned long f1;
|
|
|
|
unsigned short f2;
|
|
|
|
unsigned short f3;
|
|
|
|
unsigned char f4[8];
|
2001-04-06 23:20:46 +00:00
|
|
|
} GUID;
|
2001-09-02 17:21:22 +00:00
|
|
|
#endif
|
|
|
|
|
2001-04-06 23:20:46 +00:00
|
|
|
|
2001-10-20 18:49:08 +00:00
|
|
|
typedef struct codecs_st {
|
2001-04-08 23:42:25 +00:00
|
|
|
unsigned int fourcc[CODECS_MAX_FOURCC];
|
|
|
|
unsigned int fourccmap[CODECS_MAX_FOURCC];
|
|
|
|
unsigned int outfmt[CODECS_MAX_OUTFMT];
|
|
|
|
unsigned char outflags[CODECS_MAX_OUTFMT];
|
2002-02-12 17:33:27 +00:00
|
|
|
unsigned int infmt[CODECS_MAX_INFMT];
|
|
|
|
unsigned char inflags[CODECS_MAX_INFMT];
|
2001-04-06 23:20:46 +00:00
|
|
|
char *name;
|
|
|
|
char *info;
|
|
|
|
char *comment;
|
|
|
|
char *dll;
|
|
|
|
GUID guid;
|
2001-04-08 23:42:25 +00:00
|
|
|
short driver;
|
|
|
|
short flags;
|
|
|
|
short status;
|
2001-04-11 20:55:14 +00:00
|
|
|
short cpuflags;
|
2001-12-23 11:58:57 +00:00
|
|
|
short priority;
|
2001-04-06 23:20:46 +00:00
|
|
|
} codecs_t;
|
|
|
|
|
2001-12-27 18:38:10 +00:00
|
|
|
int parse_codec_cfg(char *cfgfile);
|
2001-04-10 23:18:01 +00:00
|
|
|
codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
|
|
|
|
codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
|
|
|
|
codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,codecs_t *start,int audioflag);
|
2001-09-27 12:59:35 +00:00
|
|
|
void list_codecs(int audioflag);
|
2001-04-06 23:20:46 +00:00
|
|
|
|
|
|
|
#endif
|