summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_ogg.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 304142bc9..9d1207fd1 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_ogg.c,v 1.152 2004/08/30 12:33:07 conrad Exp $
+ * $Id: demux_ogg.c,v 1.153 2004/09/01 00:09:13 athp Exp $
*
* demultiplexer for ogg streams
*
@@ -66,6 +66,11 @@
#define LOG
*/
+#undef LOG_PACKETS
+#undef LOG_PREVIEWS
+#undef LOG_PTS
+#undef LOG_VIDEO_PACKETS
+
#include "xine_internal.h"
#include "xineutils.h"
#include "demux.h"
@@ -338,7 +343,9 @@ static void send_ogg_packet (demux_ogg_t *this,
static void check_newpts (demux_ogg_t *this, int64_t pts, int video, int preview) {
int64_t diff;
+#ifdef LOG_PTS
lprintf ("new pts %" PRId64 " found in stream\n",pts);
+#endif
diff = pts - this->last_pts[video];
@@ -598,7 +605,9 @@ static void send_ogg_buf (demux_ogg_t *this,
data = op->packet+1+hdrlen;
size = op->bytes-1-hdrlen;
}
+#ifdef LOG_PACKETS
lprintf ("audio data size %d\n", size);
+#endif
if ((op->granulepos != -1) || (this->si[stream_num]->header_granulepos != -1)) {
pts = get_pts(this, stream_num, op->granulepos );
@@ -606,11 +615,13 @@ static void send_ogg_buf (demux_ogg_t *this,
} else
pts = 0;
+#ifdef LOG_PACKETS
lprintf ("audiostream %d op-gpos %" PRId64 " hdr-gpos %" PRId64 " pts %" PRId64 " \n",
stream_num,
op->granulepos,
this->si[stream_num]->header_granulepos,
pts);
+#endif
_x_demux_send_data(this->audio_fifo, data, size,
pts, this->si[stream_num]->buf_types, decoder_flags,
@@ -640,11 +651,13 @@ static void send_ogg_buf (demux_ogg_t *this,
} else
pts = 0;
+#ifdef LOG_PACKETS
lprintf ("theorastream %d op-gpos %" PRId64 " hdr-gpos %" PRId64 " pts %" PRId64 " \n",
stream_num,
op->granulepos,
this->si[stream_num]->header_granulepos,
pts);
+#endif
send_ogg_packet (this, this->video_fifo, op, pts, decoder_flags, stream_num);
@@ -658,7 +671,9 @@ static void send_ogg_buf (demux_ogg_t *this,
int size;
int64_t pts;
+#ifdef LOG_VIDEO_PACKETS
lprintf ("video buffer, type=%08x\n", this->si[stream_num]->buf_types);
+#endif
if (op->packet[0] == PACKET_TYPE_COMMENT ) {
read_chapter_comment(this, op);
@@ -672,11 +687,13 @@ static void send_ogg_buf (demux_ogg_t *this,
} else
pts = 0;
+#ifdef LOG_VIDEO_PACKETS
lprintf ("videostream %d op-gpos %" PRId64 " hdr-gpos %" PRId64 " pts %" PRId64 " \n",
stream_num,
op->granulepos,
this->si[stream_num]->header_granulepos,
pts);
+#endif
_x_demux_send_data(this->video_fifo, data, size,
pts, this->si[stream_num]->buf_types, decoder_flags,
@@ -728,6 +745,8 @@ static void send_ogg_buf (demux_ogg_t *this,
this->video_fifo->put (this->video_fifo, buf);
}
}
+ } else {
+ lprintf("unknown stream type %x\n", this->si[stream_num]->buf_types);
}
}
@@ -1309,8 +1328,10 @@ static void send_header (demux_ogg_t *this) {
if (this->si[i]->headers > 0)
done = 0;
+#ifdef LOG_PREVIEWS
lprintf ("%d preview buffers left to send from stream %d\n",
this->si[i]->headers, i);
+#endif
}
}
}
@@ -1335,7 +1356,9 @@ static int demux_ogg_send_chunk (demux_plugin_t *this_gen) {
ogg_handle_event(this);
+#ifdef LOG_PACKETS
lprintf ("send package...\n");
+#endif
if (!read_ogg_packet(this)) {
this->status = DEMUX_FINISHED;