2001-04-07 01:20:46 +02:00
|
|
|
#ifndef __CODEC_CFG_H
|
|
|
|
#define __CODEC_CFG_H
|
|
|
|
|
2006-10-22 18:16:34 +02:00
|
|
|
#define CODEC_CFG_MIN 20061022
|
2002-05-27 00:39:38 +02:00
|
|
|
|
2002-01-17 10:20:29 +01:00
|
|
|
#define CODECS_MAX_FOURCC 32
|
2002-02-12 18:33:27 +01:00
|
|
|
#define CODECS_MAX_OUTFMT 16
|
|
|
|
#define CODECS_MAX_INFMT 16
|
2001-04-07 01:20:46 +02:00
|
|
|
|
2001-04-07 23:27:57 +02:00
|
|
|
// Global flags:
|
2001-04-10 22:09:23 +02:00
|
|
|
#define CODECS_FLAG_SEEKABLE (1<<0)
|
2002-06-26 00:26:34 +02:00
|
|
|
#define CODECS_FLAG_ALIGN16 (1<<1)
|
2002-03-25 04:02:57 +01:00
|
|
|
#define CODECS_FLAG_SELECTED (1<<15) /* for internal use */
|
2001-04-07 01:20:46 +02:00
|
|
|
|
2001-04-07 23:27:57 +02:00
|
|
|
// Outfmt flags:
|
2001-04-07 01:56:42 +02:00
|
|
|
#define CODECS_FLAG_FLIP (1<<0)
|
|
|
|
#define CODECS_FLAG_NOFLIP (1<<1)
|
|
|
|
#define CODECS_FLAG_YUVHACK (1<<2)
|
2002-03-21 20:53:31 +01:00
|
|
|
#define CODECS_FLAG_QUERY (1<<3)
|
2002-05-16 23:50:38 +02:00
|
|
|
#define CODECS_FLAG_STATIC (1<<4)
|
2001-04-07 01:56:42 +02:00
|
|
|
|
2002-03-18 02:52:51 +01: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-09 01:42:25 +02:00
|
|
|
|
2001-04-07 01:56:42 +02:00
|
|
|
|
2004-04-30 18:56:00 +02:00
|
|
|
#if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
|
2004-10-09 09:38:45 +02:00
|
|
|
#define GUID_TYPE 1
|
|
|
|
#define GUID_DEFINED 1
|
2001-04-07 01:20:46 +02:00
|
|
|
typedef struct {
|
2001-04-07 02:51:38 +02:00
|
|
|
unsigned long f1;
|
|
|
|
unsigned short f2;
|
|
|
|
unsigned short f3;
|
|
|
|
unsigned char f4[8];
|
2001-04-07 01:20:46 +02:00
|
|
|
} GUID;
|
2001-09-02 19:21:22 +02:00
|
|
|
#endif
|
|
|
|
|
2001-04-07 01:20:46 +02:00
|
|
|
|
2001-10-20 20:49:08 +02:00
|
|
|
typedef struct codecs_st {
|
2001-04-09 01:42:25 +02: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 18:33:27 +01:00
|
|
|
unsigned int infmt[CODECS_MAX_INFMT];
|
|
|
|
unsigned char inflags[CODECS_MAX_INFMT];
|
2001-04-07 01:20:46 +02:00
|
|
|
char *name;
|
|
|
|
char *info;
|
|
|
|
char *comment;
|
|
|
|
char *dll;
|
2002-08-30 23:44:20 +02:00
|
|
|
char* drv;
|
2001-04-07 01:20:46 +02:00
|
|
|
GUID guid;
|
2002-08-30 23:44:20 +02:00
|
|
|
// short driver;
|
2001-04-09 01:42:25 +02:00
|
|
|
short flags;
|
|
|
|
short status;
|
2001-04-11 22:55:14 +02:00
|
|
|
short cpuflags;
|
2001-04-07 01:20:46 +02:00
|
|
|
} codecs_t;
|
|
|
|
|
2006-07-09 19:45:36 +02:00
|
|
|
int parse_codec_cfg(const char *cfgfile);
|
2005-08-31 01:56:24 +02:00
|
|
|
codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap,
|
|
|
|
codecs_t *start, int force);
|
|
|
|
codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap,
|
|
|
|
codecs_t *start, int force);
|
|
|
|
codecs_t* find_codec(unsigned int fourcc, unsigned int *fourccmap,
|
|
|
|
codecs_t *start, int audioflag, int force);
|
2002-09-26 03:28:32 +02:00
|
|
|
void select_codec(char* codecname,int audioflag);
|
2001-09-27 14:59:35 +02:00
|
|
|
void list_codecs(int audioflag);
|
2002-03-25 04:07:27 +01:00
|
|
|
void codecs_reset_selection(int audioflag);
|
2006-02-09 15:08:03 +01:00
|
|
|
void codecs_uninit_free(void);
|
2001-04-07 01:20:46 +02:00
|
|
|
|
|
|
|
#endif
|