summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-11-18 15:08:30 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-11-18 15:08:30 +0000
commita9e9849d4128003eff55a70be96e7ca02eae6b66 (patch)
treec420c0fe197287a4c89a3cea5c5f5487802d5dab
parentcf45a6df3ddbb900ca213cf300244cd017bc1d2c (diff)
downloadxine-lib-a9e9849d4128003eff55a70be96e7ca02eae6b66.tar.gz
xine-lib-a9e9849d4128003eff55a70be96e7ca02eae6b66.tar.bz2
more cleanups, config stuff bugfixes
CVS patchset: 1068 CVS date: 2001/11/18 15:08:30
-rw-r--r--src/audio_out/audio_arts_out.c4
-rw-r--r--src/audio_out/audio_esd_out.c4
-rw-r--r--src/audio_out/audio_oss_out.c4
-rw-r--r--src/xine-engine/configfile.c31
-rw-r--r--src/xine-engine/load_plugins.c51
5 files changed, 64 insertions, 30 deletions
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c
index 682c4a6ce..b4d3933b2 100644
--- a/src/audio_out/audio_arts_out.c
+++ b/src/audio_out/audio_arts_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_arts_out.c,v 1.7 2001/11/17 14:26:37 f1rmb Exp $
+ * $Id: audio_arts_out.c,v 1.8 2001/11/18 15:08:30 guenter Exp $
*/
/* required for swab() */
@@ -41,7 +41,7 @@
#include "xineutils.h"
#include "audio_out.h"
-#define AO_OUT_ARTS_IFACE_VERSION 2
+#define AO_OUT_ARTS_IFACE_VERSION 3
#define AUDIO_NUM_FRAGMENTS 15
#define AUDIO_FRAGMENT_SIZE 8192
diff --git a/src/audio_out/audio_esd_out.c b/src/audio_out/audio_esd_out.c
index 353302d69..5a395b6ee 100644
--- a/src/audio_out/audio_esd_out.c
+++ b/src/audio_out/audio_esd_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_esd_out.c,v 1.14 2001/11/18 03:53:23 guenter Exp $
+ * $Id: audio_esd_out.c,v 1.15 2001/11/18 15:08:30 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -39,7 +39,7 @@
#include "audio_out.h"
#include "metronom.h"
-#define AO_OUT_ESD_IFACE_VERSION 2
+#define AO_OUT_ESD_IFACE_VERSION 3
#define GAP_TOLERANCE 5000
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index 636637ce9..d4b22806b 100644
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_oss_out.c,v 1.50 2001/11/18 03:53:23 guenter Exp $
+ * $Id: audio_oss_out.c,v 1.51 2001/11/18 15:08:30 guenter Exp $
*
* 20-8-2001 First implementation of Audio sync and Audio driver separation.
* Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -78,7 +78,7 @@
# define AFMT_AC3 0x00000400
#endif
-#define AO_OUT_OSS_IFACE_VERSION 2
+#define AO_OUT_OSS_IFACE_VERSION 3
#define AUDIO_NUM_FRAGMENTS 15
#define AUDIO_FRAGMENT_SIZE 8192
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 8926aff7d..8d18cd94c 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: configfile.c,v 1.6 2001/11/18 03:53:25 guenter Exp $
+ * $Id: configfile.c,v 1.7 2001/11/18 15:08:31 guenter Exp $
*
* config file management - implementation
*
@@ -36,6 +36,10 @@
#include "configfile.h"
#include "xineutils.h"
+/*
+#define CONFIG_LOG
+*/
+
/*
* internal utility functions
@@ -72,7 +76,9 @@ static cfg_entry_t *config_file_add (config_values_t *this, char *key) {
this->last = entry;
+#ifdef CONFIG_LOG
printf ("configfile: add entry key=%s\n", key);
+#endif
return entry;
}
@@ -105,7 +111,9 @@ static char *config_file_register_string (config_values_t *this,
assert (def_value);
assert (description);
+#ifdef CONFIG_LOG
printf ("configfile: registering %s\n", key);
+#endif
/* make sure this entry exists, create it if not */
@@ -146,7 +154,9 @@ static int config_file_register_num (config_values_t *this,
assert (key);
assert (description);
+#ifdef CONFIG_LOG
printf ("configfile: registering %s\n", key);
+#endif
/* make sure this entry exists, create it if not */
@@ -192,7 +202,9 @@ static int config_file_register_bool (config_values_t *this,
assert (key);
assert (description);
+#ifdef CONFIG_LOG
printf ("configfile: registering %s\n", key);
+#endif
/* make sure this entry exists, create it if not */
@@ -239,7 +251,9 @@ static int config_file_register_range (config_values_t *this,
assert (key);
assert (description);
+#ifdef CONFIG_LOG
printf ("configfile: registering %s\n", key);
+#endif
/* make sure this entry exists, create it if not */
@@ -284,8 +298,10 @@ static int config_file_parse_enum (char *str, char **values) {
while (*value) {
+#ifdef CONFIG_LOG
printf ("configfile: parse enum, >%s< ?= >%s<\n",
*value, str);
+#endif
if (!strcmp (*value, str))
return i;
@@ -294,8 +310,10 @@ static int config_file_parse_enum (char *str, char **values) {
i++;
}
+#ifdef CONFIG_LOG
printf ("configfile: warning, >%s< is not a valid enum here, using 0\n",
str);
+#endif
return 0;
}
@@ -314,7 +332,9 @@ static int config_file_register_enum (config_values_t *this,
assert (values);
assert (description);
+#ifdef CONFIG_LOG
printf ("configfile: registering %s\n", key);
+#endif
/* make sure this entry exists, create it if not */
@@ -357,8 +377,10 @@ static void config_file_update_num (config_values_t *this,
if (!entry) {
+#ifdef CONFIG_LOG
printf ("configfile: WARNING! tried to update unknown key %s (to %d)\n",
key, value);
+#endif
return;
}
@@ -378,8 +400,10 @@ static void config_file_update_string (config_values_t *this,
if (!entry) {
+#ifdef CONFIG_LOG
printf ("configfile: WARNING! tried to update unknown key %s (to %s)\n",
key, value);
+#endif
return;
}
@@ -399,7 +423,9 @@ static void config_file_save (config_values_t *this) {
sprintf (filename, "%s/.xine/config", xine_get_homedir());
+#ifdef CONFIG_LOG
printf ("writing config file to %s\n", filename);
+#endif
f_config = fopen (filename, "w");
@@ -544,6 +570,9 @@ config_values_t *config_file_init (char *filename) {
/*
* $Log: configfile.c,v $
+ * Revision 1.7 2001/11/18 15:08:31 guenter
+ * more cleanups, config stuff bugfixes
+ *
* Revision 1.6 2001/11/18 03:53:25 guenter
* new configfile interface, code cleanup, xprintf is gone
*
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 147e3b88a..728b1870d 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: load_plugins.c,v 1.55 2001/11/18 03:53:25 guenter Exp $
+ * $Id: load_plugins.c,v 1.56 2001/11/18 15:08:31 guenter Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -50,6 +50,10 @@
#define __FUNCTION__ __func__
#endif
+/*
+#define LOAD_LOG
+*/
+
extern int errno;
static char *plugin_name;
@@ -68,9 +72,9 @@ void (*old_segv_handler)(int);
#endif
static void segv_handler (int hubba) {
- fprintf(stderr,"\nInitialization of plugin '%s' failed (segmentation fault).\n",plugin_name);
- fprintf(stderr,"You probably need to remove the offending file.\n");
- fprintf(stderr,"(This error is usually due an incorrect plugin version)\n");
+ printf ("\nload_plugins: Initialization of plugin '%s' failed (segmentation fault).\n",plugin_name);
+ printf ("load_plugins: You probably need to remove the offending file.\n");
+ printf ("load_plugins: (This error is usually due an incorrect plugin version)\n");
exit(1);
}
@@ -140,10 +144,11 @@ void load_demux_plugins (xine_t *this,
plugin_name = str;
if(!(plugin = dlopen (str, RTLD_LAZY))) {
- fprintf(stderr, "load_plugins: cannot open demux plugin %s:\n%s\n",
+ printf ("load_plugins: cannot open demux plugin %s:\n%s\n",
str, dlerror());
- }
- else {
+
+ } else {
+
void *(*initplug) (int, xine_t *);
if((initplug = dlsym(plugin, "init_demuxer_plugin")) != NULL) {
@@ -161,8 +166,7 @@ void load_demux_plugins (xine_t *this,
}
if(this->num_demuxer_plugins > DEMUXER_PLUGIN_MAX) {
- fprintf(stderr, "%s(%d): too many demux plugins installed, "
- "exiting.\n", __FILE__, __LINE__);
+ printf ("load_plugins: too many demux plugins installed, exiting.\n");
exit(1);
}
}
@@ -266,12 +270,6 @@ void load_input_plugins (xine_t *this,
config_values_t *config, int iface_version) {
DIR *dir;
- if(this == NULL || config == NULL) {
- printf("%s(%s@%d): parameter should be non null, exiting\n",
- __FILE__, __FUNCTION__, __LINE__);
- exit(1);
- }
-
this->num_input_plugins = 0;
install_segv_handler();
@@ -349,9 +347,6 @@ static char **_xine_get_featured_input_plugin_ids(xine_t *this, int feature) {
int i;
int n = 0;
- if(!this)
- return NULL;
-
if(!this->num_input_plugins)
return NULL;
@@ -819,19 +814,25 @@ char **xine_list_audio_output_plugins(void) {
if(!(plugin = dlopen (str, RTLD_LAZY))) {
- /* printf("load_plugins: cannot load plugin %s (%s)\n",
- str, dlerror()); */
+ printf("load_plugins: cannot load plugin %s (%s)\n",
+ str, dlerror());
} else {
ao_info_t* (*getinfo) ();
ao_info_t *ao_info;
- /* printf ("load_plugins: plugin %s successfully loaded.\n", str); */
+#ifdef LOAD_LOG
+ printf ("load_plugins: plugin %s successfully loaded.\n", str);
+#endif
if ((getinfo = dlsym(plugin, "get_audio_out_plugin_info")) != NULL) {
ao_info = getinfo();
- /* printf("load_plugins: id=%s, priority=%d\n", ao_info->id, ao_info->priority); */
+
+#ifdef LOAD_LOG
+ printf("load_plugins: id=%s, priority=%d, interface_version=%d\n",
+ ao_info->id, ao_info->priority, ao_info->interface_version);
+#endif
if ( ao_info->interface_version == AUDIO_OUT_IFACE_VERSION) {
@@ -848,13 +849,17 @@ char **xine_list_audio_output_plugins(void) {
j--;
}
- /*printf("i = %d, id=%s, priority=%d\n", i, ao_info->id, ao_info->priority); */
plugin_ids[i] = (char *) malloc (strlen(ao_info->id)+1);
strcpy (plugin_ids[i], ao_info->id);
plugin_prios[i] = ao_info->priority;
num_plugins++;
plugin_ids[num_plugins] = NULL;
+ } else {
+
+ printf ("load_plugins: audio output plugin >%s< doesn't support interface version %d\n",
+ ao_info->id, AUDIO_OUT_IFACE_VERSION);
+
}
} else {