summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_asf.c64
-rw-r--r--src/demuxers/demux_film.c8
-rw-r--r--src/demuxers/demux_mng.c18
-rw-r--r--src/demuxers/demux_mpeg_block.c76
-rw-r--r--src/demuxers/demux_mpeg_pes.c67
-rw-r--r--src/demuxers/demux_mpgaudio.c11
-rw-r--r--src/demuxers/demux_ogg.c5
-rw-r--r--src/demuxers/demux_realaudio.c16
-rw-r--r--src/demuxers/demux_snd.c6
-rw-r--r--src/demuxers/demux_ts.c110
-rw-r--r--src/demuxers/demux_voc.c6
-rw-r--r--src/demuxers/demux_wc3movie.c6
12 files changed, 222 insertions, 171 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 0036fdbe9..2596ab40f 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.144 2003/11/26 23:44:09 f1rmb Exp $
+ * $Id: demux_asf.c,v 1.145 2003/12/05 15:54:57 f1rmb Exp $
*
* demultiplexer for asf streams
*
@@ -429,8 +429,7 @@ static int asf_read_header (demux_asf_t *this) {
* Parse the end of the header but do not demux the stream.
*/
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("demux_asf: warning: The stream id=%d is encrypted\n."),
- stream_id);
+ _("demux_asf: warning: The stream id=%d is encrypted\n."), stream_id);
_x_message(this->stream, XINE_MSG_ENCRYPTED_SOURCE,
_("Media stream scrambled/encrypted"), NULL);
this->mode = ASF_MODE_ENCRYPTED_CONTENT;
@@ -469,7 +468,8 @@ static int asf_read_header (demux_asf_t *this) {
this->streams[this->num_streams].buf_type =
_x_formattag_to_buf_audio ( wavex->wFormatTag );
if ( !this->streams[this->num_streams].buf_type ) {
- printf ("demux_asf: unknown audio type 0x%x\n", wavex->wFormatTag);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: unknown audio type 0x%x\n", wavex->wFormatTag);
this->streams[this->num_streams].buf_type = BUF_AUDIO_UNKNOWN;
}
@@ -505,8 +505,8 @@ static int asf_read_header (demux_asf_t *this) {
this->streams[this->num_streams].buf_type =
_x_fourcc_to_buf_video(bih->biCompression);
if( !this->streams[this->num_streams].buf_type ) {
- printf ("demux_asf: unknown video format %.4s\n",
- (char*)&bih->biCompression);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: unknown video format %.4s\n", (char*)&bih->biCompression);
this->streams[this->num_streams].buf_type = BUF_VIDEO_UNKNOWN;
}
@@ -517,7 +517,8 @@ static int asf_read_header (demux_asf_t *this) {
this->streams[this->num_streams].defrag = 0;
} else
- printf ("demux_asf: invalid bih_size received (%d), v_stream ignored.\n", i );
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: invalid bih_size received (%d), v_stream ignored.\n", i );
lprintf ("found a video stream id=%d, buf_type=%08x \n",
stream_id, this->streams[this->num_streams].buf_type);
@@ -651,7 +652,7 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
stream_id = this->streams[i].stream_id;
bitrate = this->bitrates[stream_id];
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
"demux_asf: stream: %d, bitrate %d bps\n", stream_id, bitrate);
if ((buf_type == BUF_VIDEO_BASE) &&
@@ -679,8 +680,8 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
_x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, bitrate);
- xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: video stream_id: %d, audio stream_id: %d\n",
- this->video_stream_id, this->audio_stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: video stream_id: %d, audio stream_id: %d\n", this->video_stream_id, this->audio_stream_id);
if(_x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO))
asf_send_audio_header(this, this->audio_stream);
@@ -790,13 +791,14 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_stream_t *stream,
/* cannot continue current packet: free it */
if (frag_offset != 0) {
/* cannot create new packet, will die soon */
- printf ("demux_asf: asf_send_buffer_nodefrag: invalid offset\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: asf_send_buffer_nodefrag: invalid offset\n");
this->input->seek (this->input, frag_len, SEEK_CUR);
return ;
} else {
/* create new packet */
- printf ("demux_asf: asf_send_buffer_nodefrag: packet not complete\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: asf_send_buffer_nodefrag: packet not complete\n");
stream->seq = seq;
stream->frag_offset = 0;
}
@@ -884,13 +886,13 @@ static void asf_send_buffer_defrag (demux_asf_t *this, asf_stream_t *stream,
/* cannot continue current packet: free it */
if (frag_offset != 0) {
/* cannot create new packet, will die soon */
- printf ("demux_asf: asf_send_buffer_defrag: invalid offset\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: asf_send_buffer_defrag: invalid offset\n");
this->input->seek (this->input, frag_len, SEEK_CUR);
return ;
} else {
/* create new packet */
- printf ("demux_asf: asf_send_buffer_defrag: packet not complete\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: asf_send_buffer_defrag: packet not complete\n");
stream->seq = seq;
stream->frag_offset = 0;
}
@@ -898,7 +900,7 @@ static void asf_send_buffer_defrag (demux_asf_t *this, asf_stream_t *stream,
}
if( stream->frag_offset + frag_len > DEFRAG_BUFSIZE ) {
- printf ("demux_asf: buffer overflow on defrag!\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: buffer overflow on defrag!\n");
} else {
this->input->read (this->input, &stream->buffer[stream->frag_offset], frag_len);
stream->frag_offset += frag_len;
@@ -1010,7 +1012,7 @@ static int asf_parse_packet_header(demux_asf_t *this) {
g.Data4[i] = get_byte(this);
}
if (get_guid_id(this, g) == GUID_ASF_HEADER) {
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "demux_asf: new asf header detected\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: new asf header detected\n");
if (demux_asf_send_headers_common(this, 0))
return 1;
invalid_packet = 1;
@@ -1187,7 +1189,8 @@ static int asf_parse_packet_payload_common(demux_asf_t *this,
exp_seq = (*stream)->seq;
}
if (exp_seq != *seq) {
- printf ("demux_asf: bad seq: seq = %d, expected = %d, stream seq = %d!\n", *seq, exp_seq, (*stream)->seq);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: bad seq: seq = %d, expected = %d, stream seq = %d!\n", *seq, exp_seq, (*stream)->seq);
/* the stream is corrupted, reset the decoder and restart at a new keyframe */
if ((*stream)->fifo) {
@@ -1496,7 +1499,7 @@ static int demux_asf_parse_http_references( demux_asf_t *this) {
memcpy(href, "mmsh", 4);
}
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "demux_asf: http ref: %s\n", href);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: http ref: %s\n", href);
uevent.type = XINE_EVENT_MRL_REFERENCE;
uevent.stream = this->stream;
uevent.data_length = strlen(href) + sizeof(xine_mrl_reference_data_t);
@@ -1675,14 +1678,17 @@ static int demux_asf_parse_asx_references( demux_asf_t *this) {
}
}
else
- printf("demux_asf: Wrong ASX version: %s\n", asx_prop->value);
-
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ _("demux_asf: Wrong ASX version: %s\n"), asx_prop->value);
+
}
else
- printf("demux_asf: Unable to find VERSION tag from ASX.\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: Unable to find VERSION tag from ASX.\n");
}
else
- printf("demux_asf: Unsupported XML type: '%s'.\n", xml_tree->name);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: Unsupported XML type: '%s'.\n", xml_tree->name);
xml_parser_free_tree(xml_tree);
__failure:
@@ -1880,12 +1886,12 @@ static int demux_asf_seek (demux_plugin_t *this_gen,
lprintf ("demux_asf_seek: seek back\n");
if (this->input->seek (this->input, start_pos, SEEK_SET) != start_pos) {
- printf ("demux_asf: demux_asf_seek: seek failed\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: demux_asf_seek: seek failed\n");
goto error;
}
if (asf_parse_packet_header(this)) {
- printf ("demux_asf: demux_asf_seek: get_packet failed\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: demux_asf_seek: get_packet failed\n");
goto error;
}
@@ -1985,9 +1991,9 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen,
xine_stream_t *stream,
input_plugin_t *input) {
- demux_asf_t *this;
- uint8_t buf[MAX_PREVIEW_SIZE+1];
- int len;
+ demux_asf_t *this;
+ uint8_t buf[MAX_PREVIEW_SIZE+1];
+ int len;
switch (stream->content_detection_method) {
case METHOD_BY_CONTENT:
@@ -2055,8 +2061,8 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen,
break;
default:
- printf ("demux_asf: warning, unkown method %d\n",
- stream->content_detection_method);
+ xprintf (stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_asf: warning, unkown method %d\n", stream->content_detection_method);
return NULL;
}
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c
index 40b132183..0e65514b0 100644
--- a/src/demuxers/demux_film.c
+++ b/src/demuxers/demux_film.c
@@ -21,7 +21,7 @@
* For more information on the FILM file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_film.c,v 1.72 2003/11/26 19:43:30 f1rmb Exp $
+ * $Id: demux_film.c,v 1.73 2003/12/05 15:54:57 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -185,8 +185,7 @@ static int open_film_file(demux_film_t *film) {
/* sanity check the chunk size */
if (i + chunk_size > film_header_size) {
- xine_log(film->stream->xine, XINE_LOG_MSG,
- _("invalid FILM chunk size\n"));
+ xine_log(film->stream->xine, XINE_LOG_MSG, _("invalid FILM chunk size\n"));
free (film->interleave_buffer);
free (film->sample_table);
free (film_header);
@@ -340,8 +339,7 @@ static int open_film_file(demux_film_t *film) {
break;
default:
- xine_log(film->stream->xine, XINE_LOG_MSG,
- _("unrecognized FILM chunk\n"));
+ xine_log(film->stream->xine, XINE_LOG_MSG, _("unrecognized FILM chunk\n"));
free (film->interleave_buffer);
free (film->sample_table);
free (film_header);
diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c
index 222d42477..f94babc8b 100644
--- a/src/demuxers/demux_mng.c
+++ b/src/demuxers/demux_mng.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_mng.c,v 1.16 2003/11/26 19:43:30 f1rmb Exp $
+ * $Id: demux_mng.c,v 1.17 2003/12/05 15:54:57 f1rmb Exp $
*
* demux_mng.c, Demuxer plugin for Multiple-image Network Graphics format
*
@@ -76,7 +76,7 @@ static void mymng_free(mng_ptr p, mng_uint32 size){
free(p);
}
-mng_bool mymng_open_stream(mng_handle mngh){
+static mng_bool mymng_open_stream(mng_handle mngh){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
if (this->input->get_current_pos(this->input) != 0) {
@@ -89,7 +89,7 @@ mng_bool mymng_open_stream(mng_handle mngh){
return MNG_TRUE;
}
-mng_bool mymng_close_stream(mng_handle mngh){
+static mng_bool mymng_close_stream(mng_handle mngh){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
this->status = DEMUX_FINISHED;
@@ -97,7 +97,7 @@ mng_bool mymng_close_stream(mng_handle mngh){
return MNG_TRUE;
}
-mng_bool mymng_read_stream(mng_handle mngh, mng_ptr buffer, mng_uint32 size, mng_uint32 *bytesread){
+static mng_bool mymng_read_stream(mng_handle mngh, mng_ptr buffer, mng_uint32 size, mng_uint32 *bytesread){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
*bytesread = this->input->read(this->input, buffer, size);
@@ -105,7 +105,7 @@ mng_bool mymng_read_stream(mng_handle mngh, mng_ptr buffer, mng_uint32 size, mng
return MNG_TRUE;
}
-mng_bool mymng_process_header(mng_handle mngh, mng_uint32 width, mng_uint32 height){
+static mng_bool mymng_process_header(mng_handle mngh, mng_uint32 width, mng_uint32 height){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
this->bih.biWidth = width;
@@ -118,13 +118,13 @@ mng_bool mymng_process_header(mng_handle mngh, mng_uint32 width, mng_uint32 heig
return MNG_TRUE;
}
-mng_uint32 mymng_get_tick_count(mng_handle mngh){
+static mng_uint32 mymng_get_tick_count(mng_handle mngh){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
return this->tick_count;
}
-mng_bool mymng_set_timer(mng_handle mngh, mng_uint32 msecs){
+static mng_bool mymng_set_timer(mng_handle mngh, mng_uint32 msecs){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
this->timer_count = msecs;
@@ -132,13 +132,13 @@ mng_bool mymng_set_timer(mng_handle mngh, mng_uint32 msecs){
return MNG_TRUE;
}
-mng_ptr mymng_get_canvas_line(mng_handle mngh, mng_uint32 line){
+static mng_ptr mymng_get_canvas_line(mng_handle mngh, mng_uint32 line){
demux_mng_t *this = (demux_mng_t*)mng_get_userdata(mngh);
return this->image + line * this->bih.biWidth * 3;
}
-mng_bool mymng_refresh(mng_handle mngh, mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h){
+static mng_bool mymng_refresh(mng_handle mngh, mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h){
return MNG_TRUE;
}
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 59fec5df8..6b26aa106 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.202 2003/11/26 19:43:30 f1rmb Exp $
+ * $Id: demux_mpeg_block.c,v 1.203 2003/12/05 15:54:57 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
* used with fixed blocksize devices (like dvd/vcd)
@@ -235,9 +235,9 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
while(p < (buf->content + this->blocksize)) {
if (p[0] || p[1] || (p[2] != 1)) {
- printf ("demux_mpeg_block: error! %02x %02x %02x (should be 0x000001)\n",
- p[0], p[1], p[2]);
- printf ("demux_mpeg_block: bad block. skipping.\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_mpeg_block: error! %02x %02x %02x (should be 0x000001)\n", p[0], p[1], p[2]);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_mpeg_block: bad block. skipping.\n");
/* FIXME: We should find some way for the input plugin to inform us of: -
* 1) Normal sector read.
* 2) Sector error read due to bad crc etc.
@@ -304,7 +304,9 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
} else if (this->stream_id == 0xFF) {
result = parse_program_stream_directory(this, p, buf);
} else {
- printf("xine-lib:demux_mpeg_block: Unrecognised stream_id 0x%02x. Please report this to xine developers.\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ _("xine-lib:demux_mpeg_block: "
+ "Unrecognised stream_id 0x%02x. Please report this to xine developers.\n"), this->stream_id);
buf->free_buffer (buf);
return;
}
@@ -313,7 +315,8 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
}
p+=result;
}
- printf ("demux_mpeg_block: error! freeing. Please report this to xine developers.\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+ _("demux_mpeg_block: error! freeing. Please report this to xine developers.\n"));
buf->free_buffer (buf);
return ;
}
@@ -325,85 +328,99 @@ static int32_t parse_padding_stream(demux_mpeg_block_t *this, uint8_t *p, buf_el
}
static int32_t parse_program_stream_map(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x.\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x.\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_ecm_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_emm_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_dsmcc_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_iec_13522_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeA_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeB_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeC_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeD_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeE_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_IEC14496_SL_packetized_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_IEC14496_FlexMux_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_program_stream_directory(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_ancillary_stream(demux_mpeg_block_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_block: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
@@ -640,11 +657,11 @@ static int32_t parse_pes_for_pts(demux_mpeg_block_t *this, uint8_t *p, buf_eleme
/* check PES scrambling_control */
if ((p[6] & 0x30) != 0) {
- printf("demux_mpeg_block: warning: PES header indicates that this stream may be encrypted (encryption mode %d)\n", (p[6] & 0x30) >> 4);
- xine_log (this->stream->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);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ _("demux_mpeg_block: warning: PES header indicates that this stream "
+ "may be encrypted (encryption mode %d)\n"), (p[6] & 0x30) >> 4);
_x_message (this->stream, XINE_MSG_ENCRYPTED_SOURCE,
- "Media stream scrambled/encrypted", NULL);
+ "Media stream scrambled/encrypted", NULL);
this->status = DEMUX_FINISHED;
buf->free_buffer(buf);
return -1;
@@ -899,8 +916,8 @@ static int32_t parse_private_stream_1(demux_mpeg_block_t *this, uint8_t *p, buf_
switch ((p[5]>>6) & 3) {
case 3: /* illegal, use 16-bits? */
default:
- printf ("illegal lpcm sample format (%d), assume 16-bit samples\n",
- (p[5]>>6) & 3 );
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "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;
case 2: bits_per_sample = 24; break;
@@ -935,7 +952,8 @@ static int32_t parse_private_stream_1(demux_mpeg_block_t *this, uint8_t *p, buf_
/* Some new streams have been encountered.
1) DVD+RW disc recorded with a Philips DVD recorder: - new unknown sub-stream id of 0xff
*/
- printf("demux_mpeg_block:Unrecognised private stream 1 0x%02x. Please report this to xine developers.\n", p[0]);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ "demux_mpeg_block:Unrecognised private stream 1 0x%02x. Please report this to xine developers.\n", p[0]);
buf->free_buffer(buf);
return -1;
}
@@ -1073,8 +1091,8 @@ 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)) {
- printf ("demux_mpeg_block: error %02x %02x %02x (should be 0x000001) \n",
- p[0], p[1], p[2]);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_mpeg_block: error %02x %02x %02x (should be 0x000001) \n", p[0], p[1], p[2]);
buf->free_buffer (buf);
return rate;
}
diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c
index d1753d907..ecaeedc38 100644
--- a/src/demuxers/demux_mpeg_pes.c
+++ b/src/demuxers/demux_mpeg_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_mpeg_pes.c,v 1.18 2003/11/26 19:43:30 f1rmb Exp $
+ * $Id: demux_mpeg_pes.c,v 1.19 2003/12/05 15:54:57 f1rmb Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -302,8 +302,11 @@ static void demux_mpeg_pes_parse_pack (demux_mpeg_pes_t *this, int preview_mode)
} else if (this->stream_id == 0xFF) {
result = parse_program_stream_directory(this, p, buf);
} else {
- printf("xine-lib:demux_mpeg_pes: Unrecognised stream_id 0x%02x. Please report this to xine developers.\n", this->stream_id);
- printf("xine-lib:demux_mpeg_pes: packet_len=%d\n", this->packet_len);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ _("xine-lib:demux_mpeg_pes: Unrecognised stream_id 0x%02x. "
+ "Please report this to xine developers.\n"), this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: packet_len=%d\n", this->packet_len);
buf->free_buffer (buf);
return;
}
@@ -323,85 +326,99 @@ static int32_t parse_padding_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_elem
}
static int32_t parse_program_stream_map(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x.\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x.\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_ecm_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_emm_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_dsmcc_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_iec_13522_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeA_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeB_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeC_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeD_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_h222_typeE_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_IEC14496_SL_packetized_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_IEC14496_FlexMux_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_program_stream_directory(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
static int32_t parse_ancillary_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) {
/* FIXME: Implement */
- printf("xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "xine-lib:demux_mpeg_pes: Unhandled stream_id 0x%02x\n", this->stream_id);
buf->free_buffer (buf);
return -1;
}
@@ -663,9 +680,9 @@ static int32_t parse_pes_for_pts(demux_mpeg_pes_t *this, uint8_t *p, buf_element
/* check PES scrambling_control */
if ((p[6] & 0x30) != 0) {
- printf("demux_mpeg_pes: warning: PES header indicates that this stream may be encrypted (encryption mode %d)\n", (p[6] & 0x30) >> 4);
- xine_log (this->stream->xine, XINE_LOG_MSG,
- _("demux_mpeg_pes: warning: PES header indicates that this stream may be encrypted (encryption mode %d)\n"), (p[6] & 0x30) >> 4);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ _("demux_mpeg_pes: warning: PES header indicates that "
+ "this stream may be encrypted (encryption mode %d)\n"), (p[6] & 0x30) >> 4);
_x_message (this->stream, XINE_MSG_ENCRYPTED_SOURCE,
"Media stream scrambled/encrypted", NULL);
this->status = DEMUX_FINISHED;
@@ -831,7 +848,8 @@ static int32_t parse_private_stream_1(demux_mpeg_pes_t *this, uint8_t *p, buf_el
switch ((p[5]>>6) & 3) {
case 3: /* illegal, use 16-bits? */
default:
- printf ("illegal lpcm sample format (%d), assume 16-bit samples\n",
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "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;
@@ -897,7 +915,8 @@ static int32_t parse_private_stream_1(demux_mpeg_pes_t *this, uint8_t *p, buf_el
/* Some new streams have been encountered.
1) DVD+RW disc recorded with a Philips DVD recorder: - new unknown sub-stream id of 0xff
*/
- printf("demux_mpeg_pes:Unrecognised private stream 1 0x%02x. Please report this to xine developers.\n", p[0]);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ _("demux_mpeg_pes:Unrecognised private stream 1 0x%02x. Please report this to xine developers.\n"), p[0]);
buf->free_buffer(buf);
return this->packet_len + result;
}
@@ -1063,8 +1082,8 @@ static int demux_mpeg_pes_estimate_rate (demux_mpeg_pes_t *this) {
/* we should now have a PES packet here */
if (p[0] || p[1] || (p[2] != 1)) {
- printf ("demux_mpeg_pes: error %02x %02x %02x (should be 0x000001) \n",
- p[0], p[1], p[2]);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_mpeg_pes: error %02x %02x %02x (should be 0x000001) \n", p[0], p[1], p[2]);
buf->free_buffer (buf);
return rate;
}
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 21eb10ef5..86f35c0ac 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.129 2003/11/26 22:40:25 tmattern Exp $
+ * $Id: demux_mpgaudio.c,v 1.130 2003/12/05 15:54:57 f1rmb Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -641,11 +641,11 @@ static int id3v22_parse_tag(demux_mpgaudio_t *this, int8_t *mp3_frame_header) {
if (tag_frame_header.id && tag_frame_header.size) {
if ((pos + tag_frame_header.size) <= tag_header.size) {
if (!id3v22_interp_frame(this, &tag_frame_header)) {
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
"id2v22: invalid frame content\n");
}
} else {
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
"id3v22: invalid frame header\n");
this->input->seek (this->input, tag_header.size - pos, SEEK_CUR);
return 1;
@@ -657,7 +657,7 @@ static int id3v22_parse_tag(demux_mpgaudio_t *this, int8_t *mp3_frame_header) {
return 1;
}
} else {
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
"id2v22: id3v2_parse_frame_header problem\n");
return 0;
}
@@ -665,8 +665,7 @@ static int id3v22_parse_tag(demux_mpgaudio_t *this, int8_t *mp3_frame_header) {
}
return 1;
} else {
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
- "id3v22: id3v2_parse_header problem\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "id3v22: id3v2_parse_header problem\n");
return 0;
}
}
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 31ac698ea..daadead45 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_ogg.c,v 1.121 2003/12/03 03:07:07 miguelfreitas Exp $
+ * $Id: demux_ogg.c,v 1.122 2003/12/05 15:54:57 f1rmb Exp $
*
* demultiplexer for ogg streams
*
@@ -1118,7 +1118,8 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
} else if (!strncmp (&op.packet[1], "theora", 4)) {
#ifdef HAVE_THEORA
- printf ("demux_ogg: Theorastreamsupport is highly alpha at the moment\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ogg: Theorastreamsupport is highly alpha at the moment\n");
if (theora_decode_header(&this->t_info, &this->t_comment, &op)>=0) {
diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c
index 88bdfc9e8..70ddddb53 100644
--- a/src/demuxers/demux_realaudio.c
+++ b/src/demuxers/demux_realaudio.c
@@ -22,7 +22,7 @@
* RealAudio File Demuxer by Mike Melanson (melanson@pcisys.net)
* improved by James Stembridge (jstembridge@users.sourceforge.net)
*
- * $Id: demux_realaudio.c,v 1.27 2003/11/16 23:33:43 f1rmb Exp $
+ * $Id: demux_realaudio.c,v 1.28 2003/12/05 15:54:57 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -103,7 +103,7 @@ static int open_ra_file(demux_ra_t *this) {
else if (version == 4)
hdr_size = BE_32(&file_header[0x12]) + 16;
else {
- printf("demux_realaudio: unknown version number %d\n", version);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_realaudio: unknown version number %d\n", version);
return 0;
}
@@ -111,7 +111,7 @@ static int open_ra_file(demux_ra_t *this) {
audio_header = xine_xmalloc(hdr_size);
if (_x_demux_read_header(this->input, audio_header, hdr_size) != hdr_size) {
- printf("demux_realaudio: unable to read header\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_realaudio: unable to read header\n");
free(audio_header);
return 0;
}
@@ -144,14 +144,15 @@ static int open_ra_file(demux_ra_t *this) {
if(audio_header[0x3D] == 4)
audio_fourcc = ME_32(&audio_header[0x3E]);
else {
- printf("demux_realaudio: invalid fourcc size %d\n", audio_header[0x3D]);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_realaudio: invalid fourcc size %d\n", audio_header[0x3D]);
free(audio_header);
return 0;
}
offset = 0x45;
} else {
- printf("demux_realaudio: header too small\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_realaudio: header too small\n");
free(audio_header);
return 0;
}
@@ -188,7 +189,8 @@ static int open_ra_file(demux_ra_t *this) {
if(audio_header[offset+2] == 4)
audio_fourcc = ME_32(&audio_header[offset+3]);
else {
- printf("demux_realaudio: invalid fourcc size %d\n", audio_header[offset+2]);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_realaudio: invalid fourcc size %d\n", audio_header[offset+2]);
free(audio_header);
return 0;
}
@@ -201,7 +203,7 @@ static int open_ra_file(demux_ra_t *this) {
this->data_start = hdr_size;
if (this->input->seek(this->input, this->data_start, SEEK_SET) !=
this->data_start) {
- printf("demux_realaudio: unable to seek to data start\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_realaudio: unable to seek to data start\n");
return 0;
}
diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c
index 0ac0f4a8c..dea265fb4 100644
--- a/src/demuxers/demux_snd.c
+++ b/src/demuxers/demux_snd.c
@@ -21,7 +21,7 @@
/*
* SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net)
*
- * $Id: demux_snd.c,v 1.36 2003/11/16 23:33:43 f1rmb Exp $
+ * $Id: demux_snd.c,v 1.37 2003/12/05 15:54:57 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -101,7 +101,7 @@ static int open_snd_file(demux_snd_t *this) {
if ((!this->audio_sample_rate) ||
(!this->audio_channels)) {
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("demux_snd: bad header parameters\n"));
+ _("demux_snd: bad header parameters\n"));
return 0;
}
@@ -136,7 +136,7 @@ static int open_snd_file(demux_snd_t *this) {
default:
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("demux_snd: unsupported audio type: %d\n"), encoding);
+ _("demux_snd: unsupported audio type: %d\n"), encoding);
return 0;
break;
}
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 6efce42c4..2e4001827 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.97 2003/11/26 19:43:31 f1rmb Exp $
+ * $Id: demux_ts.c,v 1.98 2003/12/05 15:54:57 f1rmb Exp $
*
* Demultiplexer for MPEG2 Transport Streams.
*
@@ -452,8 +452,8 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt,
* indicator set.
*/
if (!pusi) {
- printf ("demux_ts: demux error! PAT without payload unit "
- "start indicator\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: demux error! PAT without payload unit start indicator\n");
return;
}
@@ -462,7 +462,8 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt,
*/
pkt += pkt[4];
if (pkt - original_pkt > PKT_SIZE) {
- printf ("demux_ts: demux error! PAT with invalid pointer\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: demux error! PAT with invalid pointer\n");
return;
}
table_id = (unsigned int)pkt[5] ;
@@ -495,13 +496,14 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt,
}
if (pkt - original_pkt > BODY_SIZE - 1 - 3 - section_length) {
- printf ("demux_ts: FIXME: (unsupported )PAT spans multiple TS packets\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: FIXME: (unsupported )PAT spans multiple TS packets\n");
return;
}
if ((section_number != 0) || (last_section_number != 0)) {
- printf ("demux_ts: FIXME: (unsupported) PAT consists of multiple (%d) sections\n",
- last_section_number);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: FIXME: (unsupported) PAT consists of multiple (%d) sections\n", last_section_number);
return;
}
@@ -509,8 +511,9 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt,
calc_crc32 = demux_ts_compute_crc32 (this, pkt+5, section_length+3-4,
0xffffffff);
if (crc32 != calc_crc32) {
- printf ("demux_ts: demux error! PAT with invalid CRC32: packet_crc32: %.8x calc_crc32: %.8x\n",
- crc32,calc_crc32);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: demux error! PAT with invalid CRC32: packet_crc32: %.8x calc_crc32: %.8x\n",
+ crc32,calc_crc32);
return;
}
#ifdef TS_PAT_LOG
@@ -573,7 +576,7 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt,
}
}
-static int demux_ts_parse_pes_header (demux_ts_media *m,
+static int demux_ts_parse_pes_header (xine_t *xine, demux_ts_media *m,
uint8_t *buf, int packet_len,
xine_stream_t *stream) {
@@ -589,8 +592,8 @@ static int demux_ts_parse_pes_header (demux_ts_media *m,
/* we should have a PES packet here */
if (p[0] || p[1] || (p[2] != 1)) {
- printf ("demux_ts: error %02x %02x %02x (should be 0x000001) \n",
- p[0], p[1], p[2]);
+ xprintf (xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: error %02x %02x %02x (should be 0x000001) \n", p[0], p[1], p[2]);
return 0 ;
}
@@ -636,8 +639,8 @@ static int demux_ts_parse_pes_header (demux_ts_media *m,
/* sometimes corruption on header_len causes segfault in memcpy below */
if (header_len + 9 > pkt_len) {
- printf ("demux_ts: illegal value for PES_header_data_length (0x%x)\n",
- header_len);
+ xprintf (xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: illegal value for PES_header_data_length (0x%x)\n", header_len);
return 0;
}
@@ -755,8 +758,8 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts,
case (i.e. adaptation field only) when it does not get bumped. */
if (m->counter != INVALID_CC) {
if ((m->counter & 0x0f) != cc) {
- printf("demux_ts: PID 0x%.4x: unexpected cc %d (expected %d)\n",
- m->pid, cc, m->counter);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: PID 0x%.4x: unexpected cc %d (expected %d)\n", m->pid, cc, m->counter);
}
}
m->counter = cc;
@@ -787,9 +790,10 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts,
#endif
}
- if (!demux_ts_parse_pes_header(m, ts, len, this->stream)) {
+ if (!demux_ts_parse_pes_header(this->stream->xine, m, ts, len, this->stream)) {
m->corrupted_pes = 1;
- printf("demux_ts: PID 0x%.4x: corrupted pes encountered\n", m->pid);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: PID 0x%.4x: corrupted pes encountered\n", m->pid);
} else {
@@ -872,12 +876,12 @@ static void demux_ts_get_lang_desc(demux_ts_t *this, char *dest,
{
memcpy(dest, d + 2, 3);
dest[3] = 0;
- printf("demux_ts: found ISO 639 lang: %s\n", dest);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: found ISO 639 lang: %s\n", dest);
return;
}
d += 2 + d[1];
}
- printf("demux_ts: found no ISO 639 lang\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: found no ISO 639 lang\n");
memset(dest, 0, 4);
}
@@ -896,12 +900,13 @@ static void demux_ts_get_reg_desc(demux_ts_t *this, uint32_t *dest,
{
*dest = (d[2] << 24) | (d[3] << 16) | (d[4] << 8) | d[5];
- printf("demux_ts: found registration format identifier: 0x%.4x\n", *dest);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: found registration format identifier: 0x%.4x\n", *dest);
return;
}
d += 2 + d[1];
}
- printf("demux_ts: found no format id\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: found no format id\n");
*dest = 0;
}
@@ -957,7 +962,7 @@ static void demux_ts_parse_pmt (demux_ts_t *this,
/* sections start with a pointer. Skip it! */
pkt += pkt[4];
if (pkt - originalPkt > PKT_SIZE) {
- printf ("demux error! PMT with invalid pointer\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux error! PMT with invalid pointer\n");
return;
}
@@ -1009,8 +1014,8 @@ static void demux_ts_parse_pmt (demux_ts_t *this,
}
if ((section_number != 0) || (last_section_number != 0)) {
- printf ("demux_ts: FIXME (unsupported) PMT consists of multiple (%d)"
- "sections\n", last_section_number);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: FIXME (unsupported) PMT consists of multiple (%d) sections\n", last_section_number);
return;
}
}
@@ -1061,9 +1066,9 @@ static void demux_ts_parse_pmt (demux_ts_t *this,
this->pmt[program_count],
section_length+3-4, 0xffffffff);
if (crc32 != calc_crc32) {
- printf ("demux_ts: demux error! PMT with invalid CRC32: "
- "packet_crc32: %#.8x calc_crc32: %#.8x\n",
- crc32,calc_crc32);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: demux error! PMT with invalid CRC32: packet_crc32: %#.8x calc_crc32: %#.8x\n",
+ crc32,calc_crc32);
return;
}
#ifdef TS_PMT_LOG
@@ -1088,8 +1093,8 @@ static void demux_ts_parse_pmt (demux_ts_t *this,
stream = &this->pmt[program_count][12] + program_info_length;
coded_length = 13 + program_info_length;
if (coded_length > section_length) {
- printf ("demux error! PMT with inconsistent "
- "progInfo length\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux error! PMT with inconsistent progInfo length\n");
return;
}
section_length -= coded_length;
@@ -1105,8 +1110,8 @@ static void demux_ts_parse_pmt (demux_ts_t *this,
stream_info_length = ((stream[3] << 8) | stream[4]) & 0x0fff;
coded_length = 5 + stream_info_length;
if (coded_length > section_length) {
- printf ("demux error! PMT with inconsistent "
- "streamInfo length\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux error! PMT with inconsistent streamInfo length\n");
return;
}
@@ -1267,7 +1272,7 @@ static int sync_correct(demux_ts_t*this, uint8_t *buf, int32_t npkt_read) {
int sync_ok = 0;
int read_length;
- printf ("demux_ts: about to resync!\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: about to resync!\n");
for (p=0; p < npkt_read; p++) {
for(n=0; n < PKT_SIZE; n++) {
@@ -1292,14 +1297,15 @@ static int sync_correct(demux_ts_t*this, uint8_t *buf, int32_t npkt_read) {
n + p * PKT_SIZE);
/* FIXME: when read_length is not as required... we now stop demuxing */
if (read_length != (n + p * PKT_SIZE)) {
- printf ("demux_ts_tsync_correct: sync found, but read failed\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts_tsync_correct: sync found, but read failed\n");
return 0;
}
} else {
- printf ("demux_ts_tsync_correct: sync not found! Stop demuxing\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts_tsync_correct: sync not found! Stop demuxing\n");
return 0;
}
- printf ("demux_ts: resync successful!\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: resync successful!\n");
return 1;
}
@@ -1340,8 +1346,9 @@ static unsigned char * demux_synchronise(demux_ts_t* this) {
read_length = this->input->read(this->input, buf,
PKT_SIZE * NPKT_PER_READ);
if (read_length % PKT_SIZE) {
- printf ("demux_ts: read returned %d bytes (not a multiple of %d!)\n",
- read_length, PKT_SIZE);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: read returned %d bytes (not a multiple of %d!)\n",
+ read_length, PKT_SIZE);
this->status = DEMUX_FINISHED;
return NULL;
}
@@ -1362,7 +1369,7 @@ static unsigned char * demux_synchronise(demux_ts_t* this) {
} else read_zero = 0;
if (read_zero > 200) {
- printf ("demux_ts: read 0 packets too many times!\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: read 0 packets too many times!\n");
this->status = DEMUX_FINISHED;
return NULL;
}
@@ -1372,7 +1379,7 @@ static unsigned char * demux_synchronise(demux_ts_t* this) {
packet_number = 0;
if (!sync_detect(this, &buf[0], npkt_read)) {
- printf ("demux_ts: sync error.\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: sync error.\n");
this->status = DEMUX_FINISHED;
return NULL;
}
@@ -1516,12 +1523,12 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
* Discard packets that are obviously bad.
*/
if (sync_byte != 0x47) {
- printf ("demux error! invalid ts sync byte %.2x\n",
- sync_byte);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux error! invalid ts sync byte %.2x\n", sync_byte);
return;
}
if (transport_error_indicator) {
- printf ("demux error! transport error\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux error! transport error\n");
return;
}
if (pid == 0x1ffb) {
@@ -1531,7 +1538,8 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
if (transport_scrambling_control) {
if (this->videoPid == pid) {
- printf ("demux_ts: selected videoPid is scrambled; skipping...\n");
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: selected videoPid is scrambled; skipping...\n");
}
for (i=0; i < this->scrambled_npids; i++) {
if (this->scrambled_pids[i] == pid) return;
@@ -1539,7 +1547,7 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
this->scrambled_pids[this->scrambled_npids] = pid;
this->scrambled_npids++;
- printf ("demux_ts: PID 0x%.4x is scrambled!\n", pid);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: PID 0x%.4x is scrambled!\n", pid);
return;
}
@@ -1579,8 +1587,8 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
if ( (pes_stream_id >= VIDEO_STREAM_S) && (pes_stream_id <= VIDEO_STREAM_E) ) {
if ( this->videoPid == INVALID_PID) {
- printf ("demux_ts: auto-detected video pid 0x%.4x\n",
- pid);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: auto-detected video pid 0x%.4x\n", pid);
this->videoPid = pid;
this->videoMedia = this->media_num;
@@ -1589,8 +1597,8 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
} else if ( (pes_stream_id >= AUDIO_STREAM_S) && (pes_stream_id <= AUDIO_STREAM_E) ) {
if ( this->audioPid == INVALID_PID) {
- printf ("demux_ts: auto-detected audio pid 0x%.4x\n",
- pid);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: auto-detected audio pid 0x%.4x\n", pid);
this->audioPid = pid;
this->audioMedia = this->media_num;
@@ -1601,8 +1609,8 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
if (data_len > PKT_SIZE) {
- printf ("demux_ts: demux error! invalid payload size %d\n",
- data_len);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "demux_ts: demux error! invalid payload size %d\n", data_len);
} else {
diff --git a/src/demuxers/demux_voc.c b/src/demuxers/demux_voc.c
index 6aea2940e..4d909eeb8 100644
--- a/src/demuxers/demux_voc.c
+++ b/src/demuxers/demux_voc.c
@@ -25,7 +25,7 @@
* It will only play that block if it is PCM data. More variations will be
* supported as they are encountered.
*
- * $Id: demux_voc.c,v 1.36 2003/11/16 23:33:44 f1rmb Exp $
+ * $Id: demux_voc.c,v 1.37 2003/12/05 15:54:57 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -102,7 +102,7 @@ static int open_voc_file(demux_voc_t *this) {
/* so far, this demuxer only cares about type 1 blocks */
if (preamble[0] != 1) {
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("unknown VOC block type (0x%02X); please report to xine developers\n"),
+ _("unknown VOC block type (0x%02X); please report to xine developers\n"),
preamble[0]);
return 0;
}
@@ -117,7 +117,7 @@ static int open_voc_file(demux_voc_t *this) {
/* this app only knows how to deal with format 0 data (raw PCM) */
if (preamble[1] != 0) {
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("unknown VOC compression type (0x%02X); please report to xine developers\n"),
+ _("unknown VOC compression type (0x%02X); please report to xine developers\n"),
preamble[1]);
return 0;
}
diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c
index e90466b21..ea97b97e9 100644
--- a/src/demuxers/demux_wc3movie.c
+++ b/src/demuxers/demux_wc3movie.c
@@ -24,7 +24,7 @@
* For more information on the MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_wc3movie.c,v 1.48 2003/11/26 19:43:31 f1rmb Exp $
+ * $Id: demux_wc3movie.c,v 1.49 2003/12/05 15:54:57 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -187,7 +187,7 @@ static int demux_mve_send_chunk(demux_plugin_t *this_gen) {
if (palette_number >= this->number_of_shots) {
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("demux_wc3movie: SHOT chunk referenced invalid palette (%d >= %d)\n"),
+ _("demux_wc3movie: SHOT chunk referenced invalid palette (%d >= %d)\n"),
palette_number, this->number_of_shots);
this->status = DEMUX_FINISHED;
return this->status;
@@ -401,7 +401,7 @@ static int open_mve_file(demux_mve_t *this) {
if ((BE_32(&preamble[0]) != PALT_TAG) ||
(BE_32(&preamble[4]) != PALETTE_CHUNK_SIZE)) {
xine_log(this->stream->xine, XINE_LOG_MSG,
- _("demux_wc3movie: There was a problem while loading palette chunks\n"));
+ _("demux_wc3movie: There was a problem while loading palette chunks\n"));
free (this->palettes);
free (this->shot_offsets);
return 0;