summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-02-17 17:32:49 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-02-17 17:32:49 +0000
commit31c216d7c3195e7975040ceb5445f200db384c84 (patch)
treebd34b07ef3db8ab9dab46229c6289321eb12f324 /src/demuxers
parent5106a372ebd84fda2e004541efebd7c366201efd (diff)
downloadxine-lib-31c216d7c3195e7975040ceb5445f200db384c84.tar.gz
xine-lib-31c216d7c3195e7975040ceb5445f200db384c84.tar.bz2
big debug output cleanup. removed debug output from log window, logging
relevant information like stream type/size/bitrate instead. demuxer cleanup, removed no-longer-needed macros :-) switched off video_out/libmpeg2/... verbose log output messages. CVS patchset: 1503 CVS date: 2002/02/17 17:32:49
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_asf.c97
-rw-r--r--src/demuxers/demux_avi.c20
-rw-r--r--src/demuxers/demux_cda.c33
-rw-r--r--src/demuxers/demux_elem.c33
-rw-r--r--src/demuxers/demux_mpeg.c42
-rw-r--r--src/demuxers/demux_mpeg_block.c60
-rw-r--r--src/demuxers/demux_mpgaudio.c38
-rw-r--r--src/demuxers/demux_ogg.c50
-rw-r--r--src/demuxers/demux_pes.c40
-rw-r--r--src/demuxers/demux_qt.c75
-rw-r--r--src/demuxers/demux_ts.c16
11 files changed, 168 insertions, 336 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 4fef54fb8..a61102349 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.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_asf.c,v 1.22 2002/02/09 07:13:22 guenter Exp $
+ * $Id: demux_asf.c,v 1.23 2002/02/17 17:32:49 guenter Exp $
*
* demultiplexer for asf streams
*
@@ -58,26 +58,6 @@
#define VALID_ENDS "asf,wmv"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
typedef struct {
int num;
int seq;
@@ -235,7 +215,7 @@ static uint8_t get_byte (demux_asf_t *this) {
/* printf ("%02x ", buf); */
if (i != 1) {
- LOG_MSG(this->xine, _("demux_asf: end of data\n"));
+ printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -252,7 +232,7 @@ static uint16_t get_le16 (demux_asf_t *this) {
/* printf (" [%02x %02x] ", buf[0], buf[1]); */
if (i != 2) {
- LOG_MSG(this->xine, _("demux_asf: end of data\n"));
+ printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -269,7 +249,7 @@ static uint32_t get_le32 (demux_asf_t *this) {
/* printf ("%02x %02x %02x %02x ", buf[0], buf[1], buf[2], buf[3]); */
if (i != 4) {
- LOG_MSG(this->xine, _("demux_asf: end of data\n"));
+ printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -284,7 +264,7 @@ static uint64_t get_le64 (demux_asf_t *this) {
i = this->input->read (this->input, buf, 8);
if (i != 8) {
- LOG_MSG(this->xine, _("demux_asf: end of data\n"));
+ printf ("demux_asf: end of data\n");
this->status = DEMUX_FINISHED;
}
@@ -337,13 +317,13 @@ static void asf_send_audio_header (demux_asf_t *this, int stream_id) {
formattag_to_buf_audio ( wavex->wFormatTag );
if ( !this->streams[this->num_streams].buf_type ) {
- LOG_MSG(this->xine, _("demux_asf: unknown audio type 0x%x\n"), wavex->wFormatTag);
+ printf ("demux_asf: unknown audio type 0x%x\n", wavex->wFormatTag);
this->streams[this->num_streams].buf_type = BUF_CONTROL_NOP;
- }
- else
- LOG_MSG(this->xine, _("demux_asf: audio format : %s (wFormatTag 0x%x)\n"),
- buf_audio_name(this->streams[this->num_streams].buf_type),
- wavex->wFormatTag);
+ } else
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: audio format : %s (wFormatTag 0x%x)\n"),
+ buf_audio_name(this->streams[this->num_streams].buf_type),
+ wavex->wFormatTag);
this->streams[this->num_streams].buf_type |= this->num_audio_streams;
this->streams[this->num_streams].fifo = this->audio_fifo;
@@ -361,7 +341,7 @@ static void asf_send_audio_header (demux_asf_t *this, int stream_id) {
buf->content = buf->mem;
memcpy (buf->content, this->wavex, this->wavex_size);
- LOG_MSG(this->xine, _("demux_asf: wavex header is %d bytes long\n"), this->wavex_size);
+ printf ("demux_asf: wavex header is %d bytes long\n", this->wavex_size);
buf->size = this->wavex_size;
buf->type = this->streams[this->num_streams].buf_type;
@@ -388,7 +368,7 @@ static void asf_send_video_header (demux_asf_t *this, int stream_id) {
fourcc_to_buf_video((void*)&bih->biCompression);
if( !this->streams[this->num_streams].buf_type ) {
- LOG_MSG(this->xine, _("demux_asf: unknown video format %.4s\n"),
+ printf ("demux_asf: unknown video format %.4s\n",
(char*)&bih->biCompression);
this->status = DEMUX_FINISHED;
@@ -404,8 +384,9 @@ static void asf_send_video_header (demux_asf_t *this, int stream_id) {
/*
printf ("demux_asf: video format : %.4s\n", (char*)&bih->biCompression);
*/
- LOG_MSG(this->xine, _("demux_asf: video format : %s\n"),
- buf_video_name(this->streams[this->num_streams].buf_type));
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: video format : %s\n"),
+ buf_video_name(this->streams[this->num_streams].buf_type));
buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
buf->content = buf->mem;
@@ -428,7 +409,7 @@ static int asf_read_header (demux_asf_t *this) {
get_guid(this, &g);
if (memcmp(&g, &asf_header, sizeof(GUID))) {
- LOG_MSG(this->xine, _("demux_asf: file doesn't start with an asf header\n"));
+ printf ("demux_asf: file doesn't start with an asf header\n");
return 0;
}
get_le64(this);
@@ -462,8 +443,9 @@ static int asf_read_header (demux_asf_t *this) {
else
this->rate = 0;
- LOG_MSG(this->xine, _("demux_asf: stream length is %d sec, rate is %d bytes/sec\n"),
- this->length, this->rate);
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: stream length is %d sec, rate is %d bytes/sec\n"),
+ this->length, this->rate);
start_time = get_le32(this); /* start timestamp in 1/1000 s*/
@@ -513,7 +495,7 @@ static int asf_read_header (demux_asf_t *this) {
this->reorder_w=(buffer[2]<<8)|buffer[1];
this->reorder_b=(buffer[4]<<8)|buffer[3];
this->reorder_w/=this->reorder_b;
- LOG_MSG(this->xine, _("demux_asf: audio conceal interleave detected (%d x %d x %d)\n"),
+ printf ("demux_asf: audio conceal interleave detected (%d x %d x %d)\n",
this->reorder_w, this->reorder_h, this->reorder_b );
} else {
this->reorder_b=this->reorder_h=this->reorder_w=1;
@@ -612,7 +594,7 @@ static int asf_get_packet(demux_asf_t *this) {
if (this->packet_flags & 0x40) {
get_le16(this);
- LOG_MSG(this->xine, _("demux_asf: absolute size ignored\n"));
+ printf ("demux_asf: absolute size ignored\n");
hdr_size += 2;
}
@@ -647,8 +629,8 @@ static void hexdump (unsigned char *data, int len, xine_t *xine) {
int i;
for (i=0; i<len; i++)
- LOG_MSG(xine, "%02x ", data[i]);
- LOG_MSG(xine, "\n");
+ printf ( "%02x ", data[i]);
+ printf ("\n");
}
@@ -815,7 +797,7 @@ static void asf_send_buffer_defrag (demux_asf_t *this, asf_stream_t *stream,
}
if( stream->frag_offset + frag_len > DEFRAG_BUFSIZE ) {
- LOG_MSG(this->xine, _("demux_asf: buffer overflow on defrag!\n"));
+ printf ("demux_asf: buffer overflow on defrag!\n");
}
else {
this->input->read (this->input, &stream->buffer[stream->frag_offset], frag_len);
@@ -846,7 +828,7 @@ static void asf_read_packet(demux_asf_t *this) {
this->input->seek (this->input, this->packet_size_left, SEEK_CUR);
if (!asf_get_packet(this)) {
- LOG_MSG(this->xine, _("demux_asf: get_packet failed\n"));
+ printf ("demux_asf: get_packet failed\n");
this->status = DEMUX_FINISHED;
return ;
}
@@ -880,7 +862,7 @@ static void asf_read_packet(demux_asf_t *this) {
this->packet_size_left -= 4;
break;
default:
- LOG_MSG(this->xine, _("demux_asf: unknow segtype %x\n"), this->segtype);
+ printf ("demux_asf: unknow segtype %x\n", this->segtype);
frag_offset = get_le32(this);
this->packet_size_left -= 4;
break;
@@ -1059,7 +1041,7 @@ static void demux_asf_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_asf: stop...ignored\n"));
+ printf ("demux_asf: stop...ignored\n");
return;
}
@@ -1145,10 +1127,14 @@ static void demux_asf_start (demux_plugin_t *this_gen,
return;
}
- LOG_MSG(this->xine, _("demux_asf: title : %s\n"), this->title);
- LOG_MSG(this->xine, _("demux_asf: author : %s\n"), this->author);
- LOG_MSG(this->xine, _("demux_asf: copyright : %s\n"), this->copyright);
- LOG_MSG(this->xine, _("demux_asf: comment : %s\n"), this->comment);
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: title : %s\n"), this->title);
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: author : %s\n"), this->author);
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: copyright : %s\n"), this->copyright);
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_asf: comment : %s\n"), this->comment);
/*
* seek to start position
@@ -1176,8 +1162,8 @@ static void demux_asf_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_asf_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_asf: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_asf: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -1250,10 +1236,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_asf_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_asf: 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"),
+ printf ("demux_asf: 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;
}
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 6bb2b1ae3..eb31c2245 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.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_avi.c,v 1.63 2002/02/09 07:13:22 guenter Exp $
+ * $Id: demux_avi.c,v 1.64 2002/02/17 17:32:49 guenter Exp $
*
* demultiplexer for avi streams
*
@@ -50,20 +50,20 @@
#ifdef __GNUC__
#define LOG_MSG_STDERR(xine, message, args...) { \
- xine_log(xine, XINE_LOG_DEMUX, message, ##args); \
+ xine_log(xine, XINE_LOG_FORMAT, message, ##args); \
fprintf(stderr, message, ##args); \
}
#define LOG_MSG(xine, message, args...) { \
- xine_log(xine, XINE_LOG_DEMUX, message, ##args); \
+ xine_log(xine, XINE_LOG_FORMAT, message, ##args); \
printf(message, ##args); \
}
#else
#define LOG_MSG_STDERR(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
+ xine_log(xine, XINE_LOG_FORMAT, __VA_ARGS__); \
fprintf(stderr, __VA_ARGS__); \
}
#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
+ xine_log(xine, XINE_LOG_FORMAT, __VA_ARGS__); \
printf(__VA_ARGS__); \
}
#endif
@@ -849,7 +849,7 @@ static void *demux_avi_loop (void *this_gen) {
}
}
- LOG_MSG(this->xine, _("demux_avi: demux loop finished.\n"));
+ printf ("demux_avi: demux loop finished.\n");
pthread_exit(NULL);
@@ -863,7 +863,7 @@ static void demux_avi_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_avi: stop...ignored\n"));
+ printf ("demux_avi: stop...ignored\n");
return;
}
@@ -1100,13 +1100,13 @@ static int demux_avi_open(demux_plugin_t *this_gen,
if (this->avi) {
- LOG_MSG(this->xine, _("demux_avi: %ld frames\n"), this->avi->video_frames);
+ printf ("demux_avi: %ld frames\n", this->avi->video_frames);
strncpy(this->last_mrl, input->get_mrl (input), 1024);
return DEMUX_CAN_HANDLE;
} else
- LOG_MSG(this->xine, _("demux_avi: AVI_init failed (AVI_errno: %d)\n"), this->AVI_errno);
+ printf ("demux_avi: AVI_init failed (AVI_errno: %d)\n", this->AVI_errno);
return DEMUX_CANNOT_HANDLE;
}
@@ -1143,7 +1143,7 @@ static int demux_avi_open(demux_plugin_t *this_gen,
strncpy(this->last_mrl, input->get_mrl (input), 1024);
return DEMUX_CAN_HANDLE;
} else {
- LOG_MSG(this->xine, _("demux_avi: AVI_init failed (AVI_errno: %d)\n"),
+ printf ("demux_avi: AVI_init failed (AVI_errno: %d)\n",
this->AVI_errno);
return DEMUX_CANNOT_HANDLE;
}
diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c
index d5fd46b0f..55e8b5be5 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.7 2002/02/09 07:13:22 guenter Exp $
+ * $Id: demux_cda.c,v 1.8 2002/02/17 17:32:49 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -36,26 +36,6 @@
#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
#define DEMUX_CDA_IFACE_VERSION 3
typedef struct {
@@ -152,7 +132,7 @@ static void demux_cda_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_cda: stop...ignored\n"));
+ printf ("demux_cda: stop...ignored\n");
return;
}
@@ -227,7 +207,7 @@ static void demux_cda_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_cda_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_cda: can't create new thread (%s)\n"), strerror(err));
+ printf ("demux_cda: can't create new thread (%s)\n", strerror(err));
exit(1);
}
}
@@ -302,10 +282,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_cda_t *this;
if (iface != 6) {
- 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"),
+ printf ("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;
}
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index 608c74fa0..e48182520 100644
--- a/src/demuxers/demux_elem.c
+++ b/src/demuxers/demux_elem.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_elem.c,v 1.33 2002/02/09 07:13:22 guenter Exp $
+ * $Id: demux_elem.c,v 1.34 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for elementary mpeg streams
*
@@ -45,26 +45,6 @@
#define VALID_ENDS ".mpv"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
typedef struct {
demux_plugin_t demux_plugin;
@@ -247,8 +227,8 @@ static void demux_mpeg_elem_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_mpeg_elem_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_elem: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_elem: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -359,10 +339,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpeg_elem_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_elem: 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"),
+ printf ("demux_elem: 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;
}
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index ddfc39cfc..6a4bfd4a1 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.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_mpeg.c,v 1.49 2002/02/09 07:13:22 guenter Exp $
+ * $Id: demux_mpeg.c,v 1.50 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -45,26 +45,6 @@
#define VALID_MRLS "stdin,fifo"
#define VALID_ENDS "mpg,mpeg,mpe"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
#define NUM_PREVIEW_BUFFERS 150
typedef struct demux_mpeg_s {
@@ -126,8 +106,7 @@ static uint32_t read_bytes (demux_mpeg_t *this, int n) {
res = (buf[2]<<8) | buf[3] | (buf[1]<<16) | (buf[0] << 24);
break;
default:
- LOG_MSG_STDERR(this->xine,
- _("How how - something wrong in wonderland demux:read_bytes (%d)\n"), n);
+ printf ("demux_mpeg: how how - something wrong in wonderland demux:read_bytes (%d)\n", n);
exit (1);
}
@@ -664,7 +643,7 @@ static void *demux_mpeg_loop (void *this_gen) {
}
}
- LOG_MSG(this->xine, _("demux loop finished (status: %d, buf:%x)\n"),
+ printf ("demux_mpeg: demux loop finished (status: %d, buf:%x)\n",
this->status, w);
pthread_exit(NULL);
@@ -678,7 +657,7 @@ static void demux_mpeg_stop (demux_plugin_t *this_gen) {
buf_element_t *buf;
void *p;
- LOG_MSG(this->xine, _("demux_mpeg: stop...\n"));
+ printf ("demux_mpeg: stop...\n");
if (this->status != DEMUX_OK) {
@@ -781,8 +760,8 @@ static void demux_mpeg_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_mpeg_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_mpeg: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_mpeg: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -870,7 +849,7 @@ static int demux_mpeg_open(demux_plugin_t *this_gen,
return DEMUX_CANNOT_HANDLE;
}
- LOG_MSG_STDERR(this->xine, _("You should specify mpeg(mpeg1/mpeg2) stream type.\n"));
+ xine_log (this->xine, XINE_LOG_MSG, _("demux_mpeg: please specify mpeg(mpeg1/mpeg2) stream type.\n"));
return DEMUX_CANNOT_HANDLE;
}
}
@@ -934,10 +913,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpeg_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_mpeg: 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"),
+ printf ("demux_mpeg: 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;
}
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 53f1a0b86..a3519c6aa 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.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_mpeg_block.c,v 1.76 2002/02/09 07:13:23 guenter Exp $
+ * $Id: demux_mpeg_block.c,v 1.77 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -45,26 +45,6 @@
#define VALID_MRLS "dvd,stdin,fifo"
#define VALID_ENDS "vob"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
#define NUM_PREVIEW_BUFFERS 250
#define DISC_TRESHOLD 90000
@@ -114,7 +94,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
if (buf==NULL) {
xine_next_mrl_event_t event;
- LOG_MSG(this->xine, _("demux_mpeg_block: read_block failed\n"));
+ printf ("demux_mpeg_block: read_block failed\n");
/*
* check if seamless branching is possible
@@ -128,12 +108,12 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
char *next_mrl = event.mrl;
- LOG_MSG(this->xine, _("demux_mpeg_block: checking if we can branch to %s\n"), next_mrl);
+ printf ("demux_mpeg_block: checking if we can branch to %s\n", next_mrl);
if (next_mrl && this->input->is_branch_possible
&& this->input->is_branch_possible (this->input, next_mrl)) {
- LOG_MSG(this->xine, _("demux_mpeg_block: branching\n"));
+ printf ("demux_mpeg_block: branching\n");
this->input->close (this->input);
this->input->open (this->input, next_mrl);
@@ -263,13 +243,14 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
/* we should now have a PES packet here */
if (p[0] || p[1] || (p[2] != 1)) {
- LOG_MSG(this->xine, _("demux_mpeg_block: error! %02x %02x %02x (should be 0x000001) \n"),
+ printf ("demux_mpeg_block: error! %02x %02x %02x (should be 0x000001)\n",
p[0], p[1], p[2]);
buf->free_buffer (buf);
this->warned++;
if (this->warned > 5) {
- LOG_MSG(this->xine, _("demux_mpeg_block: too many errors, stopping playback. Maybe this stream is scrambled?\n"));
+ xine_log (this->xine, XINE_LOG_MSG,
+ _("demux_mpeg_block: too many errors, stopping playback. Maybe this stream is scrambled?\n"));
this->status = DEMUX_FINISHED;
}
@@ -374,7 +355,9 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
} else { /* mpeg 2 */
/* check PES scrambling_control */
if (((p[6] & 0x30) != 0) && !this->warned) {
- LOG_MSG(this->xine, _("demux_mpeg_block: warning: pes header indicates that this stream may be encrypted (encryption mode %d)\n"), (p[6] & 0x30) >> 4);
+
+ xine_log (this->xine, XINE_LOG_MSG,
+ _("demux_mpeg_block: warning: pes header indicates that this stream may be encrypted (encryption mode %d)\n"), (p[6] & 0x30) >> 4);
this->warned = 1;
}
@@ -488,7 +471,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
switch ((p[5]>>6) & 3) {
case 3: /* illegal, use 16-bits? */
default:
- LOG_MSG(this->xine, _("illegal lpcm sample format (%d), assume 16-bit samples\n"),
+ printf ("illegal lpcm sample format (%d), assume 16-bit samples\n",
(p[5]>>6) & 3 );
case 0: bits_per_sample = 16; break;
case 1: bits_per_sample = 20; break;
@@ -648,7 +631,7 @@ static int demux_mpeg_block_estimate_rate (demux_mpeg_block_t *this) {
/* we should now have a PES packet here */
if (p[0] || p[1] || (p[2] != 1)) {
- LOG_MSG(this->xine, _("demux_mpeg_block: error %02x %02x %02x (should be 0x000001) \n"),
+ printf ("demux_mpeg_block: error %02x %02x %02x (should be 0x000001) \n",
p[0], p[1], p[2]);
buf->free_buffer (buf);
return rate;
@@ -749,7 +732,7 @@ static void demux_mpeg_block_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_mpeg_block: stop...ignored\n"));
+ printf ("demux_mpeg_block: stop...ignored\n");
return;
}
@@ -869,8 +852,8 @@ static void demux_mpeg_block_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_mpeg_block_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_mpeg_block: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_mpeg_block: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -886,11 +869,11 @@ static void demux_mpeg_block_accept_input (demux_mpeg_block_t *this,
strncpy (this->cur_mrl, input->get_mrl(input), 256);
- LOG_MSG(this->xine, _("demux_mpeg_block: mrl %s is new, will estimated bitrate\n"),
+ printf ("demux_mpeg_block: mrl %s is new, will estimated bitrate\n",
this->cur_mrl);
} else
- LOG_MSG(this->xine, _("demux_mpeg_block: mrl %s is known, estimated bitrate: %d\n"),
+ printf ("demux_mpeg_block: mrl %s is known, estimated bitrate: %d\n",
this->cur_mrl, this->rate * 50 * 8);
}
@@ -1046,12 +1029,11 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpeg_block_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_mpeg_block: 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"),
+ printf ("demux_mpeg_block: 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;
+ return NULL;
}
this = xine_xmalloc (sizeof (demux_mpeg_block_t));
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index df01ac14d..f5860a87b 100644
--- a/src/demuxers/demux_mpgaudio.c
+++ b/src/demuxers/demux_mpgaudio.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_mpgaudio.c,v 1.34 2002/02/09 07:13:23 guenter Exp $
+ * $Id: demux_mpgaudio.c,v 1.35 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -43,26 +43,6 @@
#define VALID_ENDS "mp3,mp2,mpa,mpega"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
typedef struct {
demux_plugin_t demux_plugin;
@@ -173,7 +153,8 @@ static void mpg123_decode_header(demux_mpgaudio_t *this,unsigned long newhead)
tpf /= freqs[sampling_frequency] << lsf;
bitrate = (double) framesize / tpf;
- LOG_MSG(this->xine, _("mpgaudio: bitrate = %.2fkbps\n"), bitrate/1024.0*8.0 );
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("mpgaudio: bitrate = %.2fkbps\n"), bitrate/1024.0*8.0 );
this->stream_length = (int)(this->input->get_length(this->input) / bitrate);
}
@@ -262,7 +243,7 @@ static void demux_mpgaudio_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_mpgaudio_block: stop...ignored\n"));
+ printf ("demux_mpgaudio_block: stop...ignored\n");
return;
}
@@ -366,8 +347,8 @@ static void demux_mpgaudio_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_mpgaudio_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_mpgaudio: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_mpgaudio: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -464,10 +445,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpgaudio_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_mpeg: 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"),
+ printf ("demux_mpeg: 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;
}
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index c1382cbdb..941c4512b 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.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_ogg.c,v 1.14 2002/02/09 07:13:23 guenter Exp $
+ * $Id: demux_ogg.c,v 1.15 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for ogg streams
*
@@ -46,26 +46,6 @@
#define VALID_ENDS "ogg"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
typedef struct demux_ogg_s {
demux_plugin_t demux_plugin;
@@ -87,7 +67,7 @@ typedef struct demux_ogg_s {
ogg_sync_state oy;
ogg_stream_state os;
ogg_page og;
-
+
ogg_stream_state oss[MAX_STREAMS];
uint32_t buf_types[MAX_STREAMS];
int num_streams;
@@ -124,7 +104,7 @@ static void demux_ogg_send_package (demux_ogg_t *this, int is_content) {
cur_serno = ogg_page_serialno (&this->og);
if (ogg_page_bos(&this->og)) {
- LOG_MSG(this->xine, _("demux_ogg: beginning of stream\ndemux_ogg: serial number %d\n"),
+ printf ("demux_ogg: beginning of stream\ndemux_ogg: serial number %d\n",
ogg_page_serialno (&this->og));
}
@@ -140,7 +120,7 @@ static void demux_ogg_send_package (demux_ogg_t *this, int is_content) {
stream_num = this->num_streams;
this->buf_types[stream_num] = 0;
- LOG_MSG(this->xine, _("demux_ogg: found a new stream, serialnumber %d\n"), cur_serno);
+ printf ("demux_ogg: found a new stream, serialnumber %d\n", cur_serno);
this->num_streams++;
}
@@ -155,9 +135,18 @@ static void demux_ogg_send_package (demux_ogg_t *this, int is_content) {
/* detect buftype */
if (!strncmp (&op.packet[1], "vorbis", 6)) {
this->buf_types[stream_num] = BUF_AUDIO_VORBIS;
+
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("ogg: vorbis audio stream detected\n"));
+
} else {
- LOG_MSG(this->xine, _("demux_ogg: unknown streamtype, signature: >%.8s<\n"),
+ printf ("demux_ogg: unknown streamtype, signature: >%.8s<\n",
op.packet);
+
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("ogg: unknown stream type (signature >%.8s<)\n"),
+ op.packet);
+
this->buf_types[stream_num] = BUF_CONTROL_NOP;
}
}
@@ -255,7 +244,7 @@ static void demux_ogg_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_ogg: stop...ignored\n"));
+ printf ("demux_ogg: stop...ignored\n");
return;
}
@@ -339,7 +328,7 @@ static void demux_ogg_start (demux_plugin_t *this_gen,
off_t cur_pos = this->input->get_current_pos (this->input);
/*
- if ( (!start_pos) && (start_time))
+ if ( (!start_pos) && (start_time))
start_pos = start_time * this->rate;
*/
@@ -357,8 +346,8 @@ static void demux_ogg_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_ogg_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_ogg: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_ogg: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -430,8 +419,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_ogg_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_ogg: plugin doesn't support plugin API version %d.\n"
+ printf( _("demux_ogg: 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);
diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c
index 2a5305aee..b8dc3cd55 100644
--- a/src/demuxers/demux_pes.c
+++ b/src/demuxers/demux_pes.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_pes.c,v 1.18 2002/02/09 07:13:23 guenter Exp $
+ * $Id: demux_pes.c,v 1.19 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -46,26 +46,6 @@
#define VALID_MRLS "fifo,stdin"
#define VALID_ENDS "vdr"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
typedef struct demux_pes_s {
demux_plugin_t demux_plugin;
@@ -122,8 +102,7 @@ static uint32_t read_bytes (demux_pes_t *this, int n) {
res = (buf[2]<<8) | buf[3] | (buf[1]<<16) | (buf[0] << 24);
break;
default:
- LOG_MSG_STDERR(this->xine,
- _("How how - something wrong in wonderland demux:read_bytes (%d)\n"), n);
+ printf ("demux_pes: how how - something wrong in wonderland demux:read_bytes (%d)\n", n);
exit (1);
}
@@ -346,7 +325,7 @@ static void *demux_pes_loop (void *this_gen) {
}
}
- LOG_MSG(this->xine, _("demux loop finished (status: %d, buf:%x)\n"),
+ printf ("demux_pes: demux loop finished (status: %d, buf:%x)\n",
this->status, w);
pthread_exit(NULL);
@@ -360,7 +339,7 @@ static void demux_pes_stop (demux_plugin_t *this_gen) {
buf_element_t *buf;
void *p;
- LOG_MSG(this->xine, _("demux_pes: stop...\n"));
+ printf ("demux_pes: stop...\n");
if (this->status != DEMUX_OK) {
@@ -456,8 +435,8 @@ static void demux_pes_start (demux_plugin_t *this_gen,
if ((err = pthread_create (&this->thread,
NULL, demux_pes_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_pes: can't create new thread (%s)\n"),
- strerror(err));
+ printf ("demux_pes: can't create new thread (%s)\n",
+ strerror(err));
exit (1);
}
}
@@ -586,10 +565,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_pes_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_pes: 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"),
+ printf ("demux_pes: 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;
}
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index a739bfa59..203d1f20e 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.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_qt.c,v 1.20 2002/02/09 07:13:23 guenter Exp $
+ * $Id: demux_qt.c,v 1.21 2002/02/17 17:32:50 guenter Exp $
*
* demultiplexer for quicktime streams, based on:
*
@@ -56,26 +56,6 @@
#define VALID_ENDS "mov"
-#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, __VA_ARGS__); \
- fprintf(stderr, __VA_ARGS__); \
- }
-#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
- printf(__VA_ARGS__); \
- }
-#endif
-
/* OpenQuicktime Codec Parameter Types */
#define QUICKTIME_UNKNOWN_PARAMETER -1
#define QUICKTIME_STRING_PARAMETER 0
@@ -3195,8 +3175,8 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov,
quicktime_read_char32(file, (char *)&zlibfourcc);
zlibfourcc = quicktime_atom_read_size((char *)&zlibfourcc);
- if(zlibfourcc != QT_zlib)
- LOG_MSG(xine, _("Header not compressed with zlib\n"));
+ if (zlibfourcc != QT_zlib)
+ printf ("demux_qt: header not compressed with zlib\n");
if(compressed_atom.size - 4 > 0) {
offset = file->ftell_position + compressed_atom.size - 4;
@@ -3217,7 +3197,7 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov,
/* Allocate buffer for compressed header */
cmov_buf = (unsigned char *)malloc( cmov_sz );
if (cmov_buf == 0) {
- LOG_MSG_STDERR(xine, _("QT cmov: malloc err 0"));
+ printf ("demux_qt: QT cmov: malloc err 0");
exit(1);
}
/* Read in compressed header */
@@ -3225,7 +3205,7 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov,
tlen = file->quicktime_read_data(file, (char*)cmov_buf, cmov_sz);
if (tlen != 1) {
- LOG_MSG_STDERR(xine, _("QT cmov: read err tlen %llu\n"), tlen);
+ printf ("demux_qt: QT cmov: read err tlen %llu\n", tlen);
free(cmov_buf);
return 0;
}
@@ -3234,7 +3214,7 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov,
moov_sz += 16; /* slop?? */
moov_buf = (unsigned char *)malloc( moov_sz );
if (moov_buf == 0) {
- LOG_MSG_STDERR(xine, _("QT cmov: malloc err moov_sz %u\n"), moov_sz);
+ printf ("demux_qt: QT cmov: malloc err moov_sz %u\n", moov_sz);
exit(1);
}
@@ -3248,12 +3228,12 @@ static int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov,
zret = inflateInit(&zstrm);
if (zret != Z_OK) {
- LOG_MSG_STDERR(xine, _("QT cmov: inflateInit err %d\n"), zret);
+ printf ("demux_qt: QT cmov: inflateInit err %d\n", zret);
break;
}
zret = inflate(&zstrm, Z_NO_FLUSH);
if ((zret != Z_OK) && (zret != Z_STREAM_END)) {
- LOG_MSG_STDERR(xine, _("QT cmov inflate: ERR %d\n"), zret);
+ printf ("demux_qt: QT cmov inflate: ERR %d\n", zret);
break;
} else {
FILE *DecOut;
@@ -3962,7 +3942,7 @@ static quicktime_t* quicktime_open(input_plugin_t *input, xine_t *xine)
if(quicktime_read_info(new_file, xine)) {
quicktime_close(new_file);
- LOG_MSG(xine, _("demux_qt: quicktime_open: error in header\n"));
+ printf ("demux_qt: quicktime_open: error in header\n");
new_file = 0;
}
@@ -4131,7 +4111,7 @@ static void demux_qt_stop (demux_plugin_t *this_gen) {
void *p;
if (this->status != DEMUX_OK) {
- LOG_MSG(this->xine, _("demux_qt: stop...ignored\n"));
+ printf ("demux_qt: stop...ignored\n");
return;
}
@@ -4192,13 +4172,13 @@ static int demux_qt_detect_compressors (demux_qt_t *this) {
this->bih.biCompression=mmioFOURCC('c', 'v', 'i', 'd');
}
- if (!this->video_type ) {
- LOG_MSG(this->xine, _("demux_qt: unknown video codec >%s<\n"), video);
+ if (!this->video_type) {
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_qt: unknown video codec '%s'\n"), video);
return 0;
}
- LOG_MSG(this->xine, _("demux_qt: video codec >%s<\n"), buf_video_name(this->video_type));
-
+ printf ("demux_qt: video codec is '%s'\n", video);
this->wavex.nChannels = quicktime_track_channels (this->qt, 0);
this->wavex.nSamplesPerSec = quicktime_sample_rate (this->qt, 0);
@@ -4212,13 +4192,16 @@ static int demux_qt_detect_compressors (demux_qt_t *this) {
this->has_audio = quicktime_has_audio (this->qt);
audio = quicktime_audio_compressor (this->qt, 0);
+
+ printf ("demux_qt: audio codec is '%s'\n", audio);
+
if (!strncasecmp (audio, "raw ", 4)) {
this->audio_type = BUF_AUDIO_LPCM_LE;
this->wavex.wFormatTag = WAVE_FORMAT_ADPCM;
} else if (!strncasecmp (audio, ".mp3", 4)) {
this->audio_type = BUF_AUDIO_MPEG;
} else {
- LOG_MSG(this->xine, _("demux_qt: unknown audio codec >%s<\n"),
+ printf ("demux_qt: unknown audio codec >%s<\n",
audio);
this->audio_type = BUF_CONTROL_NOP;
}
@@ -4250,12 +4233,13 @@ static void demux_qt_start (demux_plugin_t *this_gen,
return;
}
- LOG_MSG(this->xine, _("demux_qt: video codec %s (%f fps), audio codec %s (%ld Hz, %d bits)\n"),
- quicktime_video_compressor (this->qt,0),
- quicktime_frame_rate (this->qt,0),
- quicktime_audio_compressor (this->qt,0),
- quicktime_sample_rate (this->qt,0),
- quicktime_audio_bits (this->qt,0));
+ xine_log (this->xine, XINE_LOG_FORMAT,
+ _("demux_qt: video codec %s (%f fps), audio codec %s (%ld Hz, %d bits)\n"),
+ quicktime_video_compressor (this->qt,0),
+ quicktime_frame_rate (this->qt,0),
+ quicktime_audio_compressor (this->qt,0),
+ quicktime_sample_rate (this->qt,0),
+ quicktime_audio_bits (this->qt,0));
if (!demux_qt_detect_compressors (this)) {
this->status = DEMUX_FINISHED;
@@ -4329,7 +4313,7 @@ static void demux_qt_start (demux_plugin_t *this_gen,
this->status = DEMUX_OK ;
if ((err = pthread_create (&this->thread, NULL, demux_qt_loop, this)) != 0) {
- LOG_MSG_STDERR(this->xine, _("demux_qt: can't create new thread (%s)\n"), strerror(err));
+ printf ("demux_qt: can't create new thread (%s)\n", strerror(err));
exit (1);
}
}
@@ -4417,10 +4401,9 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_qt_t *this;
if (iface != 6) {
- LOG_MSG(xine,
- _("demux_qt: 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"),
+ printf ("demux_qt: 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;
}
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 44e05147c..6fea5bdac 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.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_ts.c,v 1.36 2002/02/09 07:13:23 guenter Exp $
+ * $Id: demux_ts.c,v 1.37 2002/02/17 17:32:50 guenter Exp $
*
* Demultiplexer for MPEG2 Transport Streams.
*
@@ -76,20 +76,20 @@
#ifdef __GNUC__
#define LOG_MSG_STDERR(xine, message, args...) { \
- xine_log(xine, XINE_LOG_DEMUX, message, ##args); \
+ xine_log(xine, XINE_LOG_FORMAT, message, ##args); \
fprintf(stderr, message, ##args); \
}
#define LOG_MSG(xine, message, args...) { \
- xine_log(xine, XINE_LOG_DEMUX, message, ##args); \
+ xine_log(xine, XINE_LOG_FORMAT, message, ##args); \
printf(message, ##args); \
}
#else
#define LOG_MSG_STDERR(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
+ xine_log(xine, XINE_LOG_FORMAT, __VA_ARGS__); \
fprintf(stderr, __VA_ARGS__); \
}
#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_DEMUX, __VA_ARGS__); \
+ xine_log(xine, XINE_LOG_FORMAT, __VA_ARGS__); \
printf(__VA_ARGS__); \
}
#endif
@@ -242,8 +242,8 @@ static void demux_ts_parse_pat (demux_ts *this, unsigned char *original_pkt,
* indicator set.
*/
if (!pusi) {
- LOG_MSG (this->xine, _("demux_ts: demux error! PAT without payload unit "
- "start indicator\n"));
+ printf ("demux_ts: demux error! PAT without payload unit "
+ "start indicator\n");
return;
}
@@ -252,7 +252,7 @@ static void demux_ts_parse_pat (demux_ts *this, unsigned char *original_pkt,
*/
pkt += pkt[4];
if (pkt - original_pkt > PKT_SIZE) {
- LOG_MSG (this->xine, _("demux_ts: demux error! PAT with invalid pointer\n"));
+ printf ("demux_ts: demux error! PAT with invalid pointer\n");
return;
}
table_id = (unsigned int)pkt[5] ;