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
24 #define CODECS_MAX_FOURCC 92
25 #define CODECS_MAX_OUTFMT 16
26 #define CODECS_MAX_INFMT 16
29 #define CODECS_FLAG_SEEKABLE (1<<0)
30 #define CODECS_FLAG_ALIGN16 (1<<1)
33 #define CODECS_FLAG_FLIP (1<<0)
34 #define CODECS_FLAG_NOFLIP (1<<1)
35 #define CODECS_FLAG_YUVHACK (1<<2)
36 #define CODECS_FLAG_QUERY (1<<3)
37 #define CODECS_FLAG_STATIC (1<<4)
39 #define CODECS_STATUS__MIN 0
40 #define CODECS_STATUS_NOT_WORKING -1
41 #define CODECS_STATUS_PROBLEMS 0
42 #define CODECS_STATUS_WORKING 1
43 #define CODECS_STATUS_UNTESTED 2
44 #define CODECS_STATUS__MAX 2
47 #if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
49 #define GUID_DEFINED 1
59 typedef struct codecs
{
60 unsigned int fourcc
[CODECS_MAX_FOURCC
];
61 unsigned int fourccmap
[CODECS_MAX_FOURCC
];
62 unsigned int outfmt
[CODECS_MAX_OUTFMT
];
63 unsigned char outflags
[CODECS_MAX_OUTFMT
];
64 unsigned int infmt
[CODECS_MAX_INFMT
];
65 unsigned char inflags
[CODECS_MAX_INFMT
];
77 int parse_codec_cfg(const char *cfgfile
);
78 codecs_t
* find_video_codec(unsigned int fourcc
, unsigned int *fourccmap
,
79 codecs_t
*start
, int force
);
80 codecs_t
* find_audio_codec(unsigned int fourcc
, unsigned int *fourccmap
,
81 codecs_t
*start
, int force
);
82 codecs_t
* find_codec(unsigned int fourcc
, unsigned int *fourccmap
,
83 codecs_t
*start
, int audioflag
, int force
);
84 void list_codecs(int audioflag
);
85 void codecs_uninit_free(void);
87 typedef char ** stringset_t
;
88 void stringset_init(stringset_t
*set
);
89 void stringset_free(stringset_t
*set
);
90 void stringset_add(stringset_t
*set
, const char *str
);
91 int stringset_test(stringset_t
*set
, const char *str
);
93 #endif /* MPLAYER_CODEC_CFG_H */