Mercurial > mplayer.hg
diff codec-cfg.h @ 25661:293aeec83153
Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
an almost-trivial implementation.
This allows making the builtin codec structs const, and it also makes
clearer that this "selected" status is not used outside the init functions.
author | reimar |
---|---|
date | Sat, 12 Jan 2008 14:05:46 +0000 |
parents | f8b5286f1df6 |
children | 4129c8cfa742 |
line wrap: on
line diff
--- a/codec-cfg.h Sat Jan 12 02:27:01 2008 +0000 +++ b/codec-cfg.h Sat Jan 12 14:05:46 2008 +0000 @@ -10,7 +10,6 @@ // Global flags: #define CODECS_FLAG_SEEKABLE (1<<0) #define CODECS_FLAG_ALIGN16 (1<<1) -#define CODECS_FLAG_SELECTED (1<<15) /* for internal use */ // Outfmt flags: #define CODECS_FLAG_FLIP (1<<0) @@ -65,9 +64,13 @@ codecs_t *start, int force); codecs_t* find_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start, int audioflag, int force); -void select_codec(char* codecname,int audioflag); void list_codecs(int audioflag); -void codecs_reset_selection(int audioflag); void codecs_uninit_free(void); +typedef char ** stringset_t; +void stringset_init(stringset_t *set); +void stringset_free(stringset_t *set); +void stringset_add(stringset_t *set, const char *str); +int stringset_test(stringset_t *set, const char *str); + #endif /* CODEC_CFG_H */