diff options
Diffstat (limited to 'src/demuxers/demux_ogg.c')
-rw-r--r-- | src/demuxers/demux_ogg.c | 50 |
1 files changed, 19 insertions, 31 deletions
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); |