convert some printfs to mp_msg
[mplayer/glamo.git] / codec-cfg.h
blob49e9e2551cfe3cb052393ed66da1cdc14ca22966
1 #ifndef __CODEC_CFG_H
2 #define __CODEC_CFG_H
4 #define CODEC_CFG_MIN 20050728
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 1
32 #define GUID_DEFINED 1
33 typedef struct {
34 unsigned long f1;
35 unsigned short f2;
36 unsigned short f3;
37 unsigned char f4[8];
38 } GUID;
39 #endif
42 typedef struct codecs_st {
43 unsigned int fourcc[CODECS_MAX_FOURCC];
44 unsigned int fourccmap[CODECS_MAX_FOURCC];
45 unsigned int outfmt[CODECS_MAX_OUTFMT];
46 unsigned char outflags[CODECS_MAX_OUTFMT];
47 unsigned int infmt[CODECS_MAX_INFMT];
48 unsigned char inflags[CODECS_MAX_INFMT];
49 char *name;
50 char *info;
51 char *comment;
52 char *dll;
53 char* drv;
54 GUID guid;
55 // short driver;
56 short flags;
57 short status;
58 short cpuflags;
59 } codecs_t;
61 int parse_codec_cfg(char *cfgfile);
62 codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap,
63 codecs_t *start, int force);
64 codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap,
65 codecs_t *start, int force);
66 codecs_t* find_codec(unsigned int fourcc, unsigned int *fourccmap,
67 codecs_t *start, int audioflag, int force);
68 void select_codec(char* codecname,int audioflag);
69 void list_codecs(int audioflag);
70 void codecs_reset_selection(int audioflag);
71 void codecs_uninit_free();
73 #endif