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
27 #define CODECS_FLAG_SEEKABLE (1<<0)
28 #define CODECS_FLAG_ALIGN16 (1<<1)
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)
47 #define GUID_DEFINED 1
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
];
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 */