switch_ratio may not work with some filter chains
[mplayer/greg.git] / codec-cfg.h
blobf1853c744d43c0642def40552a7a160ecd9f6663
1 #ifndef __CODEC_CFG_H
2 #define __CODEC_CFG_H
4 #define CODEC_CFG_MIN 20030724
6 #define CODECS_MAX_FOURCC 32
7 #define CODECS_MAX_OUTFMT 16
8 #define CODECS_MAX_INFMT 16
10 // Global flags:
11 #define CODECS_FLAG_SEEKABLE (1<<0)
12 #define CODECS_FLAG_ALIGN16 (1<<1)
13 #define CODECS_FLAG_SELECTED (1<<15) /* for internal use */
15 // Outfmt flags:
16 #define CODECS_FLAG_FLIP (1<<0)
17 #define CODECS_FLAG_NOFLIP (1<<1)
18 #define CODECS_FLAG_YUVHACK (1<<2)
19 #define CODECS_FLAG_QUERY (1<<3)
20 #define CODECS_FLAG_STATIC (1<<4)
22 #define CODECS_STATUS__MIN 0
23 #define CODECS_STATUS_NOT_WORKING -1
24 #define CODECS_STATUS_PROBLEMS 0
25 #define CODECS_STATUS_WORKING 1
26 #define CODECS_STATUS_UNTESTED 2
27 #define CODECS_STATUS__MAX 2
30 #if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
31 #define GUID_TYPE
32 typedef struct {
33 unsigned long f1;
34 unsigned short f2;
35 unsigned short f3;
36 unsigned char f4[8];
37 } GUID;
38 #endif
41 typedef struct codecs_st {
42 unsigned int fourcc[CODECS_MAX_FOURCC];
43 unsigned int fourccmap[CODECS_MAX_FOURCC];
44 unsigned int outfmt[CODECS_MAX_OUTFMT];
45 unsigned char outflags[CODECS_MAX_OUTFMT];
46 unsigned int infmt[CODECS_MAX_INFMT];
47 unsigned char inflags[CODECS_MAX_INFMT];
48 char *name;
49 char *info;
50 char *comment;
51 char *dll;
52 char* drv;
53 GUID guid;
54 // short driver;
55 short flags;
56 short status;
57 short cpuflags;
58 } codecs_t;
60 int parse_codec_cfg(char *cfgfile);
61 codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
62 codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start);
63 codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,codecs_t *start,int audioflag);
64 void select_codec(char* codecname,int audioflag);
65 void list_codecs(int audioflag);
66 void codecs_reset_selection(int audioflag);
68 #endif