summaryrefslogtreecommitdiff
path: root/src/xine-engine/load_plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r--src/xine-engine/load_plugins.c73
1 files changed, 46 insertions, 27 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 488911e6d..49f177af4 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.62 2001/12/21 23:34:07 f1rmb Exp $
+ * $Id: load_plugins.c,v 1.63 2001/12/27 14:30:30 f1rmb Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -51,6 +51,26 @@
#define LOAD_LOG
*/
+#ifdef __GNUC__
+#define LOG_MSG_STDERR(xine, message, args...) { \
+ xine_log(xine, XINE_LOG_PLUGIN, message, ##args); \
+ fprintf(stderr, message, ##args); \
+ }
+#define LOG_MSG(xine, message, args...) { \
+ xine_log(xine, XINE_LOG_PLUGIN, message, ##args); \
+ printf(message, ##args); \
+ }
+#else
+#define LOG_MSG_STDERR(xine, ...) { \
+ xine_log(xine, XINE_LOG_PLUGIN, __VAR_ARGS__); \
+ fprintf(stderr, __VA_ARGS__); \
+ }
+#define LOG_MSG(xine, ...) { \
+ xine_log(xine, XINE_LOG_PLUGIN, __VAR_ARGS__); \
+ printf(__VA_ARGS__); \
+ }
+#endif
+
/* transition code; between xine 0.9.7 and 0.9.8, the dxr3enc driver
* was integrated in the dxr3 driver and no longer exists as a seperate
* plugin. upgraded installs may have an old dxr3enc driver left in the
@@ -98,8 +118,8 @@ void load_demux_plugins (xine_t *this,
DIR *dir;
if(this == NULL || config == NULL) {
- printf("%s(%s@%d): parameter should be non null, exiting\n",
- __FILE__, __XINE_FUNCTION__, __LINE__);
+ LOG_MSG(this, _("%s(%s@%d): parameter should be non null, exiting\n"),
+ __FILE__, __XINE_FUNCTION__, __LINE__);
exit(1);
}
@@ -133,7 +153,7 @@ void load_demux_plugins (xine_t *this,
plugin_name = str;
if(!(plugin = dlopen (str, RTLD_LAZY))) {
- printf ("load_plugins: cannot open demux plugin %s:\n%s\n",
+ LOG_MSG(this, _("load_plugins: cannot open demux plugin %s:\n%s\n"),
str, dlerror());
} else {
@@ -147,15 +167,15 @@ void load_demux_plugins (xine_t *this,
if (dxp) {
this->demuxer_plugins[this->num_demuxer_plugins] = dxp;
- printf("load_plugins: demux plugin found : %s\n",
- this->demuxer_plugins[this->num_demuxer_plugins]->get_identifier());
+ LOG_MSG(this, _("load_plugins: demux plugin found : %s\n"),
+ this->demuxer_plugins[this->num_demuxer_plugins]->get_identifier());
this->num_demuxer_plugins++;
}
}
if(this->num_demuxer_plugins > DEMUXER_PLUGIN_MAX) {
- printf ("load_plugins: too many demux plugins installed, exiting.\n");
+ LOG_MSG(this, _("load_plugins: too many demux plugins installed, exiting.\n"));
exit(1);
}
}
@@ -291,8 +311,8 @@ void load_input_plugins (xine_t *this,
plugin_name = str;
if(!(plugin = dlopen (str, RTLD_LAZY))) {
- printf("load_plugins: cannot open input plugin %s:\n%s\n",
- str, dlerror());
+ LOG_MSG(this, _("load_plugins: cannot open input plugin %s:\n%s\n"),
+ str, dlerror());
} else {
void *(*initplug) (int, xine_t *);
@@ -303,19 +323,19 @@ void load_input_plugins (xine_t *this,
if (ip) {
this->input_plugins[this->num_input_plugins] = ip;
- printf("load_plugins: input plugin found : %s\n",
- this->input_plugins[this->num_input_plugins]->get_identifier(this->input_plugins[this->num_input_plugins]));
+ LOG_MSG(this, _("load_plugins: input plugin found : %s\n"),
+ this->input_plugins[this->num_input_plugins]->get_identifier(this->input_plugins[this->num_input_plugins]));
this->num_input_plugins++;
}
} else {
- printf ("load_plugins: %s is no valid input plugin (lacks init_input_plugin() function)\n", str);
+ LOG_MSG(this, _("load_plugins: %s is no valid input plugin (lacks init_input_plugin() function)\n"), str);
}
if(this->num_input_plugins > INPUT_PLUGIN_MAX) {
- fprintf(stderr, "%s(%d): too many input plugins installed, "
- "exiting.\n", __FILE__, __LINE__);
+ LOG_MSG_STDERR(this, _("%s(%d): too many input plugins installed, "
+ "exiting.\n"), __FILE__, __LINE__);
exit(1);
}
}
@@ -327,8 +347,8 @@ void load_input_plugins (xine_t *this,
remove_segv_handler();
if (this->num_input_plugins == 0) {
- fprintf (stderr, "load_plugins: no input plugins found in %s! - "
- "Did you install xine correctly??\n", XINE_PLUGINDIR);
+ LOG_MSG_STDERR(this, _("load_plugins: no input plugins found in %s! - "
+ "Did you install xine correctly??\n"), XINE_PLUGINDIR);
exit (1);
}
@@ -446,8 +466,8 @@ void load_decoder_plugins (xine_t *this,
if(this == NULL || config == NULL) {
- printf("%s(%s@%d): parameter should be non null, exiting\n",
- __FILE__, __XINE_FUNCTION__, __LINE__);
+ LOG_MSG(this, _("%s(%s@%d): parameter should be non null, exiting\n"),
+ __FILE__, __XINE_FUNCTION__, __LINE__);
exit(1);
}
@@ -506,7 +526,7 @@ void load_decoder_plugins (xine_t *this,
if(!(plugin = dlopen (str, RTLD_LAZY))) {
- printf ("load_plugins: failed to load plugin %s:\n%s\n",
+ LOG_MSG(this, _("load_plugins: failed to load plugin %s:\n%s\n"),
str, dlerror());
} else {
@@ -534,8 +554,8 @@ void load_decoder_plugins (xine_t *this,
spu_prio[streamtype] = plugin_prio;
}
- printf("spu decoder plugin found : %s\n",
- sdp->get_identifier());
+ LOG_MSG(this, _("spu decoder plugin found : %s\n"),
+ sdp->get_identifier());
}
}
}
@@ -562,8 +582,8 @@ void load_decoder_plugins (xine_t *this,
video_prio[streamtype] = plugin_prio;
}
- printf("video decoder plugin found : %s\n",
- vdp->get_identifier());
+ LOG_MSG(this, _("video decoder plugin found : %s\n"),
+ vdp->get_identifier());
}
}
@@ -586,8 +606,8 @@ void load_decoder_plugins (xine_t *this,
audio_prio[streamtype] = plugin_prio;
}
- printf("audio decoder plugin found : %s\n",
- adp->get_identifier());
+ LOG_MSG(this, _("audio decoder plugin found : %s\n"),
+ adp->get_identifier());
}
}
@@ -939,8 +959,7 @@ char **xine_list_audio_output_plugins(void) {
return plugin_ids;
}
-ao_driver_t *xine_load_audio_output_plugin(config_values_t *config,
- char *id) {
+ao_driver_t *xine_load_audio_output_plugin(config_values_t *config, char *id) {
DIR *dir;
ao_driver_t *aod = NULL;