summaryrefslogtreecommitdiff
path: root/src/libxinevdec
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec')
-rw-r--r--src/libxinevdec/cinepak.c4
-rw-r--r--src/libxinevdec/cyuv.c10
-rw-r--r--src/libxinevdec/fli.c29
-rw-r--r--src/libxinevdec/idcinvideo.c4
-rw-r--r--src/libxinevdec/image.c8
-rw-r--r--src/libxinevdec/interplayvideo.c5
-rw-r--r--src/libxinevdec/msrle.c16
-rw-r--r--src/libxinevdec/qtrpza.c16
-rw-r--r--src/libxinevdec/qtsmc.c34
-rw-r--r--src/libxinevdec/roqvideo.c8
-rw-r--r--src/libxinevdec/yuv_frames.c7
11 files changed, 74 insertions, 67 deletions
diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c
index a814dc757..45232f37b 100644
--- a/src/libxinevdec/cinepak.c
+++ b/src/libxinevdec/cinepak.c
@@ -22,7 +22,7 @@
* based on overview of Cinepak algorithm and example decoder
* by Tim Ferguson: http://www.csse.monash.edu.au/~timf/
*
- * $Id: cinepak.c,v 1.33 2003/11/16 23:33:47 f1rmb Exp $
+ * $Id: cinepak.c,v 1.34 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdlib.h>
@@ -534,7 +534,7 @@ static void *init_plugin (xine_t *xine, void *data) {
cvid_class_t *this;
- this = (cvid_class_t *) malloc (sizeof (cvid_class_t));
+ this = (cvid_class_t *) xine_xmalloc (sizeof (cvid_class_t));
this->decoder_class.open_plugin = open_plugin;
this->decoder_class.get_identifier = get_identifier;
diff --git a/src/libxinevdec/cyuv.c b/src/libxinevdec/cyuv.c
index 3e43ca579..1ca568cd1 100644
--- a/src/libxinevdec/cyuv.c
+++ b/src/libxinevdec/cyuv.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: cyuv.c,v 1.21 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: cyuv.c,v 1.22 2003/12/05 15:55:01 f1rmb Exp $
*/
/* And this is the header that came with the CYUV decoder: */
@@ -170,8 +170,8 @@ static void cyuv_decode_data (video_decoder_t *this_gen,
if( this->size + buf->size > this->bufsize ) {
this->bufsize = this->size + 2 * buf->size;
- printf("CYUV: increasing source buffer to %d to avoid overflow.\n",
- this->bufsize);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "CYUV: increasing source buffer to %d to avoid overflow.\n", this->bufsize);
this->buf = realloc( this->buf, this->bufsize );
}
@@ -223,7 +223,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
cyuv_decoder_t *this ;
- this = (cyuv_decoder_t *) malloc (sizeof (cyuv_decoder_t));
+ this = (cyuv_decoder_t *) xine_xmalloc (sizeof (cyuv_decoder_t));
this->video_decoder.decode_data = cyuv_decode_data;
this->video_decoder.flush = cyuv_flush;
@@ -256,7 +256,7 @@ static void *init_plugin (xine_t *xine, void *data) {
cyuv_class_t *this;
- this = (cyuv_class_t *) malloc (sizeof (cyuv_class_t));
+ this = (cyuv_class_t *) xine_xmalloc (sizeof (cyuv_class_t));
this->decoder_class.open_plugin = open_plugin;
this->decoder_class.get_identifier = get_identifier;
diff --git a/src/libxinevdec/fli.c b/src/libxinevdec/fli.c
index 98e03190d..8578e41c1 100644
--- a/src/libxinevdec/fli.c
+++ b/src/libxinevdec/fli.c
@@ -23,7 +23,7 @@
* avoid when implementing a FLI decoder, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: fli.c,v 1.23 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: fli.c,v 1.24 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdio.h>
@@ -338,8 +338,8 @@ static void decode_fli_frame(fli_decoder_t *this) {
this->ghost_image[ghost_pixel_ptr++] = palette_idx1;
pixel_countdown--;
if (pixel_countdown < 0)
- printf ("fli warning: pixel_countdown < 0 (%d)\n",
- pixel_countdown);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "fli warning: pixel_countdown < 0 (%d)\n", pixel_countdown);
}
} else { /* copy bytes if byte_run < 0 */
byte_run = -byte_run;
@@ -348,8 +348,8 @@ static void decode_fli_frame(fli_decoder_t *this) {
this->ghost_image[ghost_pixel_ptr++] = palette_idx1;
pixel_countdown--;
if (pixel_countdown < 0)
- printf ("fli warning: pixel_countdown < 0 (%d)\n",
- pixel_countdown);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "fli warning: pixel_countdown < 0 (%d)\n", pixel_countdown);
}
}
}
@@ -362,11 +362,10 @@ static void decode_fli_frame(fli_decoder_t *this) {
/* copy the chunk (uncompressed frame) to the ghost image and
* schedule the whole frame to be updated */
if (chunk_size - 6 > this->width * this->height) {
- printf(
- _("FLI: in chunk FLI_COPY : source data (%d bytes) bigger than" \
- " image, skipping chunk\n"),
- chunk_size - 6);
- break;
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "FLI: in chunk FLI_COPY : source data (%d bytes) bigger than image, skipping chunk\n",
+ chunk_size - 6);
+ break;
} else
memcpy(this->ghost_image, &this->buf[stream_ptr], chunk_size - 6);
stream_ptr += chunk_size - 6;
@@ -379,7 +378,8 @@ static void decode_fli_frame(fli_decoder_t *this) {
break;
default:
- printf (_("FLI: Unrecognized chunk type: %d\n"), chunk_type);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "FLI: Unrecognized chunk type: %d\n", chunk_type);
break;
}
@@ -404,10 +404,9 @@ static void decode_fli_frame(fli_decoder_t *this) {
/* by the end of the chunk, the stream ptr should equal the frame
* size (minus 1, possibly); if it doesn't, issue a warning */
if ((stream_ptr != this->size) && (stream_ptr != this->size - 1))
- printf (
- _(" warning: processed FLI chunk where chunk size = %d\n" \
- " and final chunk ptr = %d\n"),
- this->size, stream_ptr);
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "warning: processed FLI chunk where chunk size = %d\nand final chunk ptr = %d\n",
+ this->size, stream_ptr);
}
/**************************************************************************
diff --git a/src/libxinevdec/idcinvideo.c b/src/libxinevdec/idcinvideo.c
index 7f01b73d8..d6efd0b89 100644
--- a/src/libxinevdec/idcinvideo.c
+++ b/src/libxinevdec/idcinvideo.c
@@ -21,7 +21,7 @@
* the Id CIN format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: idcinvideo.c,v 1.18 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: idcinvideo.c,v 1.19 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdio.h>
@@ -108,7 +108,7 @@ static void huff_decode(idcinvideo_decoder_t *this) {
while(node_num >= HUF_TOKENS) {
if(!bit_pos) {
if(dat_pos > this->size) {
- printf("Huffman decode error.\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "Huffman decode error.\n");
return;
}
bit_pos = 8;
diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c
index c700443c3..aaa955001 100644
--- a/src/libxinevdec/image.c
+++ b/src/libxinevdec/image.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: image.c,v 1.10 2003/11/26 19:43:37 f1rmb Exp $
+ * $Id: image.c,v 1.11 2003/12/05 15:55:01 f1rmb Exp $
*
* a image video decoder
*/
@@ -280,7 +280,7 @@ static void image_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (!this->png_ptr) {
if (initialize_png_reader(this) < 0) {
- printf("image: failed to init png reader\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "image: failed to init png reader\n");
}
}
if (!this->video_open) {
@@ -294,7 +294,7 @@ static void image_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->pts = buf->pts;
if (process_data(this, buf->content, buf->size) < 0)
{
- printf("image: error processing data\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "image: error processing data\n");
}
}
@@ -365,7 +365,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen,
*/
if (initialize_png_reader(this) < 0) {
- printf("image: failed to init png reader\n");
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "image: failed to init png reader\n");
}
return &this->video_decoder;
diff --git a/src/libxinevdec/interplayvideo.c b/src/libxinevdec/interplayvideo.c
index 261a69192..98a99c288 100644
--- a/src/libxinevdec/interplayvideo.c
+++ b/src/libxinevdec/interplayvideo.c
@@ -21,7 +21,7 @@
* For more information regarding the Interplay MVE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: interplayvideo.c,v 1.7 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: interplayvideo.c,v 1.8 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdio.h>
@@ -1107,7 +1107,8 @@ static void interplay_decode_frame(interplay_decoder_t *this) {
/* on the way out, make sure all the video data bytes were consumed */
if (stream_ptr != this->size)
- printf ("Interplay video warning: Finished decode with bytes left over (%d < %d)\n",
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "Interplay video warning: Finished decode with bytes left over (%d < %d)\n",
stream_ptr, this->size);
debug_interplay ("code counts:\n");
diff --git a/src/libxinevdec/msrle.c b/src/libxinevdec/msrle.c
index a9398c85b..10c013c02 100644
--- a/src/libxinevdec/msrle.c
+++ b/src/libxinevdec/msrle.c
@@ -21,7 +21,7 @@
* For more information on the MS RLE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: msrle.c,v 1.21 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: msrle.c,v 1.22 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdio.h>
@@ -113,14 +113,16 @@ static void decode_msrle8(msrle_decoder_t *this) {
/* copy pixels from encoded stream */
if ((row_ptr + pixel_ptr + stream_byte > frame_size) ||
(row_ptr < 0)) {
- printf(_("MS RLE: frame ptr just went out of bounds (1)\n"));
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "MS RLE: frame ptr just went out of bounds (1)\n");
return;
}
rle_code = stream_byte;
extra_byte = stream_byte & 0x01;
if (stream_ptr + rle_code + extra_byte > this->size) {
- printf(_("MS RLE: stream ptr just went out of bounds (2)\n"));
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "MS RLE: stream ptr just went out of bounds (2)\n");
return;
}
@@ -143,7 +145,8 @@ static void decode_msrle8(msrle_decoder_t *this) {
/* decode a run of data */
if ((row_ptr + pixel_ptr + stream_byte > frame_size) ||
(row_ptr < 0)) {
- printf(_("MS RLE: frame ptr just went out of bounds (2)\n"));
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "MS RLE: frame ptr just went out of bounds (2)\n");
return;
}
@@ -164,8 +167,9 @@ static void decode_msrle8(msrle_decoder_t *this) {
/* one last sanity check on the way out */
if (stream_ptr < this->size)
- printf(_("MS RLE: ended frame decode with bytes left over (%d < %d)\n"),
- stream_ptr, this->size);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "MS RLE: ended frame decode with bytes left over (%d < %d)\n",
+ stream_ptr, this->size);
}
/**************************************************************************
diff --git a/src/libxinevdec/qtrpza.c b/src/libxinevdec/qtrpza.c
index 3299d1e36..6be138f81 100644
--- a/src/libxinevdec/qtrpza.c
+++ b/src/libxinevdec/qtrpza.c
@@ -21,7 +21,7 @@
* For more information about the RPZA format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtrpza.c,v 1.19 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: qtrpza.c,v 1.20 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdio.h>
@@ -126,8 +126,9 @@ static void decode_qtrpza(qtrpza_decoder_t *this) {
/* First byte is always 0xe1. Warn if it's different */
if ((unsigned char)this->buf[stream_ptr] != 0xe1)
- printf(_("First chunk byte is 0x%02x instead of 0x1e\n"),
- (unsigned char)this->buf[stream_ptr]);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "First chunk byte is 0x%02x instead of 0x1e\n",
+ (unsigned char)this->buf[stream_ptr]);
/* Get chunk size, ingnoring first byte */
chunk_size = BE_32(&this->buf[stream_ptr]) & 0x00FFFFFF;
@@ -135,7 +136,8 @@ static void decode_qtrpza(qtrpza_decoder_t *this) {
/* If length mismatch use size from MOV file and try to decode anyway */
if (chunk_size != this->size)
- printf(_("MOV chunk size != encoded chunk size; using MOV chunk size\n"));
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "MOV chunk size != encoded chunk size; using MOV chunk size\n");
chunk_size = this->size;
@@ -268,9 +270,9 @@ static void decode_qtrpza(qtrpza_decoder_t *this) {
/* Unknown opcode */
default:
- printf(_("Unknown opcode %d in rpza chunk."
- " Skip remaining %d bytes of chunk data.\n"), opcode,
- chunk_size - stream_ptr);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "Unknown opcode %d in rpza chunk.Skip remaining %d bytes of chunk data.\n",
+ opcode, chunk_size - stream_ptr);
return;
} /* Opcode switch */
diff --git a/src/libxinevdec/qtsmc.c b/src/libxinevdec/qtsmc.c
index 8bdf7b7bf..b7a43d0a4 100644
--- a/src/libxinevdec/qtsmc.c
+++ b/src/libxinevdec/qtsmc.c
@@ -23,7 +23,7 @@
* For more information on the SMC format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtsmc.c,v 1.19 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: qtsmc.c,v 1.20 2003/12/05 15:55:01 f1rmb Exp $
*/
#include <stdio.h>
@@ -136,8 +136,9 @@ static void decode_qtsmc(qtsmc_decoder_t *this) {
chunk_size = BE_32(&this->buf[stream_ptr]) & 0x00FFFFFF;
stream_ptr += 4;
if (chunk_size != this->size)
- printf(_("warning: MOV chunk size != encoded chunk size (%d != %d); using MOV chunk size\n"),
- chunk_size, this->size);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "warning: MOV chunk size != encoded chunk size (%d != %d); using MOV chunk size\n",
+ chunk_size, this->size);
chunk_size = this->size;
total_blocks = (this->width * this->height) / (4 * 4);
@@ -147,16 +148,16 @@ static void decode_qtsmc(qtsmc_decoder_t *this) {
/* sanity checks */
/* make sure stream ptr hasn't gone out of bounds */
if (stream_ptr > chunk_size) {
- printf(_(
- "SMC decoder just went out of bounds (stream ptr = %d, chunk size = %d)\n"),
- stream_ptr, chunk_size);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "SMC decoder just went out of bounds (stream ptr = %d, chunk size = %d)\n",
+ stream_ptr, chunk_size);
return;
}
/* make sure the row pointer hasn't gone wild */
if (row_ptr >= image_size) {
- printf(_(
- "SMC decoder just went out of bounds (row ptr = %d, height = %d)\n"),
- row_ptr, image_size);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "SMC decoder just went out of bounds (row ptr = %d, height = %d)\n",
+ row_ptr, image_size);
return;
}
@@ -177,9 +178,9 @@ static void decode_qtsmc(qtsmc_decoder_t *this) {
/* sanity check */
if ((row_ptr == 0) && (pixel_ptr == 0)) {
- printf(_(
- "encountered repeat block opcode (%02X) but no blocks rendered yet\n"),
- opcode & 0xF0);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "encountered repeat block opcode (%02X) but no blocks rendered yet\n",
+ opcode & 0xF0);
break;
}
@@ -215,9 +216,9 @@ static void decode_qtsmc(qtsmc_decoder_t *this) {
/* sanity check */
if ((row_ptr == 0) && (pixel_ptr < 2 * 4)) {
- printf(_(
- "encountered repeat block opcode (%02X) but not enough blocks rendered yet\n"),
- opcode & 0xF0);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "encountered repeat block opcode (%02X) but not enough blocks rendered yet\n",
+ opcode & 0xF0);
break;
}
@@ -487,7 +488,8 @@ static void decode_qtsmc(qtsmc_decoder_t *this) {
break;
case 0xF0:
- printf(_("0xF0 opcode seen in SMC chunk (xine developers would like to know)\n"));
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "0xF0 opcode seen in SMC chunk (xine developers would like to know)\n");
break;
}
}
diff --git a/src/libxinevdec/roqvideo.c b/src/libxinevdec/roqvideo.c
index 88f895df5..baf0e48b2 100644
--- a/src/libxinevdec/roqvideo.c
+++ b/src/libxinevdec/roqvideo.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: roqvideo.c,v 1.23 2003/11/16 23:33:48 f1rmb Exp $
+ * $Id: roqvideo.c,v 1.24 2003/12/05 15:55:01 f1rmb Exp $
*/
/* And this is the header that came with the RoQ video decoder: */
@@ -363,7 +363,7 @@ static void roqvideo_decode_frame(roqvideo_decoder_t *ri) {
}
break;
default:
- printf("Unknown vq code: %d\n", vqid);
+ xprintf(ri->stream->xine, XINE_VERBOSITY_DEBUG, "Unknown vq code: %d\n", vqid);
}
}
@@ -434,8 +434,8 @@ static void roqvideo_decode_data (video_decoder_t *this_gen,
if( this->size + buf->size > this->bufsize ) {
this->bufsize = this->size + 2 * buf->size;
- printf("RoQ: increasing source buffer to %d to avoid overflow.\n",
- this->bufsize);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "RoQ: increasing source buffer to %d to avoid overflow.\n", this->bufsize);
this->buf = realloc( this->buf, this->bufsize );
}
diff --git a/src/libxinevdec/yuv_frames.c b/src/libxinevdec/yuv_frames.c
index 662f5dec9..9ff515fa6 100644
--- a/src/libxinevdec/yuv_frames.c
+++ b/src/libxinevdec/yuv_frames.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: yuv_frames.c,v 1.7 2003/11/26 19:43:37 f1rmb Exp $
+ * $Id: yuv_frames.c,v 1.8 2003/12/05 15:55:01 f1rmb Exp $
*
* dummy video decoder for uncompressed video frames as delivered by v4l
*/
@@ -108,8 +108,7 @@ static void yuv_frames_dispose (video_decoder_t *this_gen) {
static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream) {
yuv_frames_decoder_t *this ;
- this = (yuv_frames_decoder_t *) malloc (sizeof (yuv_frames_decoder_t));
- memset(this, 0, sizeof (yuv_frames_decoder_t));
+ this = (yuv_frames_decoder_t *) xine_xmalloc (sizeof (yuv_frames_decoder_t));
this->video_decoder.decode_data = yuv_frames_decode_data;
this->video_decoder.flush = yuv_frames_flush;
@@ -144,7 +143,7 @@ static void *init_plugin (xine_t *xine, void *data) {
mpeg2_class_t *this;
- this = (mpeg2_class_t *) malloc (sizeof (mpeg2_class_t));
+ this = (mpeg2_class_t *) xine_xmalloc (sizeof (mpeg2_class_t));
this->decoder_class.open_plugin = open_plugin;
this->decoder_class.get_identifier = get_identifier;