From 658039cb9ccea6fc915dff2bb5eaa37e9b51dac0 Mon Sep 17 00:00:00 2001 From: phintuka Date: Tue, 20 May 2008 10:06:20 +0000 Subject: Moved file extension lists to const tables --- config.c | 180 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 95 insertions(+), 85 deletions(-) diff --git a/config.c b/config.c index ae2f026e..7ee7af90 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: config.c,v 1.64 2008-05-18 20:24:51 phintuka Exp $ + * $Id: config.c,v 1.65 2008-05-20 10:06:20 phintuka Exp $ * */ @@ -234,6 +234,91 @@ const char * const config_t::s_osdScalings[] = { NULL }; +static const char exts_playlist[][4] = { + "asx", + "m3u", + "pls", + "ram", +}; + +static const char exts_audio[][8] = { + "ac3", + "asf", + "au", + "aud", + "flac", + "mpa", + "mpega", + "mp2", + "mp3", + "m4a", + "ogg", + "ogm", + "ra", + "spx", + "wav", + "wma", +}; + +static const char exts_video[][8] = { + "asf", + "avi", + "dat", + "divx", + "dv", + "fli", + "flv", + "iso", /* maybe dvd */ + "mkv", + "mov", + "mpeg", + "mpg", + "mpv", + "mp4", + "m2v", + "m4v", + "pes", + "rm", + "ts", + "vdr", + "vob", + "wmv", + "xvid", +}; + +static const char exts_image[][8] = { + "bmp", + "gif", + "jpeg", + "jpg", + "mng", + "png", + "tiff", +}; + +#define DEF_EXT_IS(TYPE) \ +static bool ext_is_ ## TYPE(const char *ext) \ +{ \ + for(unsigned int i=0; i