diff options
Diffstat (limited to 'src/libw32dll/common.c')
-rw-r--r-- | src/libw32dll/common.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/libw32dll/common.c b/src/libw32dll/common.c new file mode 100644 index 000000000..1f42288c2 --- /dev/null +++ b/src/libw32dll/common.c @@ -0,0 +1,39 @@ +#ifdef HAVE_DIRENT_H +#include <dirent.h> +#endif + +static char *get_win32_codecs_path(config_values_t *cfg) { + DIR *dir; + char *path, *cfgpath; + char *listpath[] = { "", + "/usr/lib/codecs", + "/usr/local/lib/codecs", + "/usr/lib/win32", + "/usr/local/lib/win32", + NULL }; + int i = 0; + + cfgpath = cfg->register_string (cfg, "decoder.external.win32_codecs_path", WIN32_PATH, + _("path to Win32 codecs"), + _("If you have the Windows or Apple Quicktime codec packs " + "installed, specify the path the codec directory here. " + "If xine can find the Windows or Apple Quicktime codecs, " + "it will use them to decode various Windows Media and " + "Quicktime streams for you. Consult the xine FAQ for " + "more information on how to install the codecs."), + 10, NULL, NULL); + + while (listpath[i]) { + if (i == 0) path = cfgpath; + else path = listpath[i]; + + if ((dir = opendir(path)) != NULL) { + closedir(dir); + return path; + } + + i++; + } + + return NULL; +} |