diff options
Diffstat (limited to 'src/demuxers/demux_cda.c')
-rw-r--r-- | src/demuxers/demux_cda.c | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c index cf6589a6a..1f3438460 100644 --- a/src/demuxers/demux_cda.c +++ b/src/demuxers/demux_cda.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: demux_cda.c,v 1.3 2001/12/10 23:40:29 f1rmb Exp $ + * $Id: demux_cda.c,v 1.4 2001/12/27 14:30:29 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -36,12 +36,34 @@ #include "compat.h" #include "demux.h" +#ifdef __GNUC__ +#define LOG_MSG_STDERR(xine, message, args...) { \ + xine_log(xine, XINE_LOG_DEMUX, message, ##args); \ + fprintf(stderr, message, ##args); \ + } +#define LOG_MSG(xine, message, args...) { \ + xine_log(xine, XINE_LOG_DEMUX, message, ##args); \ + printf(message, ##args); \ + } +#else +#define LOG_MSG_STDERR(xine, ...) { \ + xine_log(xine, XINE_LOG_DEMUX, __VAR_ARGS__); \ + fprintf(stderr, __VA_ARGS__); \ + } +#define LOG_MSG(xine, ...) { \ + xine_log(xine, XINE_LOG_DEMUX, __VAR_ARGS__); \ + printf(__VA_ARGS__); \ + } +#endif + #define DEMUX_CDA_IFACE_VERSION 3 typedef struct { demux_plugin_t demux_plugin; + xine_t *xine; + config_values_t *config; fifo_buffer_t *video_fifo; @@ -131,7 +153,7 @@ static void demux_cda_stop (demux_plugin_t *this_gen) { void *p; if (this->status != DEMUX_OK) { - printf ("demux_cda: stop...ignored\n"); + LOG_MSG(this->xine, _("demux_cda: stop...ignored\n")); return; } @@ -206,7 +228,7 @@ static void demux_cda_start (demux_plugin_t *this_gen, if ((err = pthread_create (&this->thread, NULL, demux_cda_loop, this)) != 0) { - fprintf (stderr, "demux_cda: can't create new thread (%s)\n", strerror(err)); + LOG_MSG_STDERR(this->xine, _("demux_cda: can't create new thread (%s)\n"), strerror(err)); exit(1); } } @@ -281,15 +303,17 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_cda_t *this; if (iface != 6) { - printf( "demux_cda: plugin doesn't support plugin API version %d.\n" - "demux_cda: this means there's a version mismatch between xine and this " - "demux_cda: demuxer plugin.\nInstalling current demux plugins should help.\n", + LOG_MSG(xine, + _("demux_cda: plugin doesn't support plugin API version %d.\n" + " this means there's a version mismatch between xine and this " + " demuxer plugin.\nInstalling current demux plugins should help.\n"), iface); return NULL; } this = (demux_cda_t *) xine_xmalloc(sizeof(demux_cda_t)); this->config = xine->config; + this->xine = xine; this->demux_plugin.interface_version = DEMUX_CDA_IFACE_VERSION; this->demux_plugin.open = demux_cda_open; |