vo_gl: Extract code to read a pnm file into a separate function
[mplayer.git] / codec-cfg.h
blob19fd47d94cab65707923bbd501cdfd530f3940f0
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_CODEC_CFG_H
20 #define MPLAYER_CODEC_CFG_H
22 #define CODECS_MAX_FOURCC 92
23 #define CODECS_MAX_OUTFMT 16
24 #define CODECS_MAX_INFMT 16
26 // Global flags:
27 #define CODECS_FLAG_SEEKABLE (1<<0)
28 #define CODECS_FLAG_ALIGN16 (1<<1)
30 // Outfmt flags:
31 #define CODECS_FLAG_FLIP (1<<0)
32 #define CODECS_FLAG_NOFLIP (1<<1)
33 #define CODECS_FLAG_YUVHACK (1<<2)
34 #define CODECS_FLAG_QUERY (1<<3)
35 #define CODECS_FLAG_STATIC (1<<4)
37 #define CODECS_STATUS__MIN 0
38 #define CODECS_STATUS_NOT_WORKING -1
39 #define CODECS_STATUS_PROBLEMS 0
40 #define CODECS_STATUS_WORKING 1
41 #define CODECS_STATUS_UNTESTED 2
42 #define CODECS_STATUS__MAX 2
45 #if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
46 #define GUID_TYPE 1
47 #define GUID_DEFINED 1
48 typedef struct {
49 unsigned long f1;
50 unsigned short f2;
51 unsigned short f3;
52 unsigned char f4[8];
53 } GUID;
54 #endif
57 typedef struct codecs {
58 unsigned int fourcc[CODECS_MAX_FOURCC];
59 unsigned int fourccmap[CODECS_MAX_FOURCC];
60 unsigned int outfmt[CODECS_MAX_OUTFMT];
61 unsigned char outflags[CODECS_MAX_OUTFMT];
62 unsigned int infmt[CODECS_MAX_INFMT];
63 unsigned char inflags[CODECS_MAX_INFMT];
64 char *name;
65 char *info;
66 char *comment;
67 char *dll;
68 char* drv;
69 GUID guid;
70 // short driver;
71 short flags;
72 short status;
73 short cpuflags;
74 } codecs_t;
76 int parse_codec_cfg(const char *cfgfile);
77 codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap,
78 codecs_t *start, int force);
79 codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap,
80 codecs_t *start, int force);
81 codecs_t* find_codec(unsigned int fourcc, unsigned int *fourccmap,
82 codecs_t *start, int audioflag, int force);
83 void list_codecs(int audioflag);
84 void codecs_uninit_free(void);
86 typedef char ** stringset_t;
87 void stringset_init(stringset_t *set);
88 void stringset_free(stringset_t *set);
89 void stringset_add(stringset_t *set, const char *str);
90 int stringset_test(stringset_t *set, const char *str);
92 #endif /* MPLAYER_CODEC_CFG_H */