# HG changeset patch
# User Diego 'Flameeyes' Pettenò <[EMAIL PROTECTED]>
# Date 1181382240 -7200
# Node ID 3af1d4d300e8952d855ff3fc819dd6d94cb7de01
# Parent cea95767fc03e30a507310363a1eb4652af58546
Convert all input plugins to use void * as type for the buf parameter of read()
function, and declare a new buf variable in the function as needed.
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_cdda.c
--- a/src/input/input_cdda.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_cdda.c Sat Jun 09 11:23:10 2007 +0200
@@ -2243,7 +2243,7 @@ static uint32_t cdda_plugin_get_capabili
}
-static off_t cdda_plugin_read (input_plugin_t *this_gen, char *buf, off_t len)
{
+static off_t cdda_plugin_read (input_plugin_t *this_gen, void *buf, off_t len)
{
/* only allow reading in block-sized chunks */
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_dvb.c
--- a/src/input/input_dvb.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_dvb.c Sat Jun 09 11:23:10 2007 +0200
@@ -2468,8 +2468,10 @@ static void ts_rewrite_packets (dvb_inpu
}
static off_t dvb_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t len) {
+ void *buf_gen, off_t len) {
dvb_input_plugin_t *this = (dvb_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
+
off_t n=0, total=0;
int have_mutex=0;
struct pollfd pfd;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_dvd.c
--- a/src/input/input_dvd.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_dvd.c Sat Jun 09 11:23:10 2007 +0200
@@ -853,8 +853,9 @@ static buf_element_t *dvd_plugin_read_bl
return buf;
}
-static off_t dvd_plugin_read (input_plugin_t *this_gen, char *ch_buf, off_t
len) {
+static off_t dvd_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t
len) {
/* dvd_input_plugin_t *this = (dvd_input_plugin_t*)this_gen; */
+ char *ch_buf = (char *)buf_gen;
/* FIXME: Tricking the demux_mpeg_block plugin */
ch_buf[0] = 0;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_file.c
--- a/src/input/input_file.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_file.c Sat Jun 09 11:23:10 2007 +0200
@@ -144,7 +144,7 @@ static int check_mmap_file(file_input_pl
}
#endif
-static off_t file_plugin_read (input_plugin_t *this_gen, char *buf, off_t len)
{
+static off_t file_plugin_read (input_plugin_t *this_gen, void *buf, off_t len)
{
file_input_plugin_t *this = (file_input_plugin_t *) this_gen;
#ifdef HAVE_MMAP
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_gnome_vfs.c
--- a/src/input/input_gnome_vfs.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_gnome_vfs.c Sat Jun 09 11:23:10 2007 +0200
@@ -75,8 +75,9 @@ gnomevfs_plugin_get_capabilities (input_
#define SSH_BUFFER_SIZE 256 * 1024
static off_t
-gnomevfs_plugin_read (input_plugin_t *this_gen, char *buf, off_t len)
-{
+gnomevfs_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
+{
+ char *buf = (char *)buf_gen;
gnomevfs_input_t *this = (gnomevfs_input_t *) this_gen;
off_t n, num_bytes;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_http.c
--- a/src/input/input_http.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_http.c Sat Jun 09 11:23:10 2007 +0200
@@ -404,8 +404,9 @@ error:
}
static off_t http_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t nlen) {
+ void *buf_gen, off_t nlen) {
http_input_plugin_t *this = (http_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n, num_bytes;
num_bytes = 0;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_mms.c
--- a/src/input/input_mms.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_mms.c Sat Jun 09 11:23:10 2007 +0200
@@ -98,8 +98,9 @@ typedef struct {
} mms_input_class_t;
static off_t mms_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t len) {
- mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen;
+ void *buf_gen, off_t len) {
+ mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n = 0;
lprintf ("mms_plugin_read: %"PRId64" bytes ...\n", len);
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_net.c
--- a/src/input/input_net.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_net.c Sat Jun 09 11:23:10 2007 +0200
@@ -249,8 +249,9 @@ static int host_connect(const char *host
#define HIGH_WATER_MARK 100
static off_t net_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t len) {
- net_input_plugin_t *this = (net_input_plugin_t *) this_gen;
+ void *buf_gen, off_t len) {
+ net_input_plugin_t *this = (net_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n, total;
lprintf("reading %" PRIdMAX " bytes...\n", (intmax_t)len);
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_pnm.c
--- a/src/input/input_pnm.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_pnm.c Sat Jun 09 11:23:10 2007 +0200
@@ -76,8 +76,9 @@ typedef struct {
static off_t pnm_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t len) {
- pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen;
+ void *buf_gen, off_t len) {
+ pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n;
lprintf ("pnm_plugin_read: %"PRId64" bytes ...\n", len);
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_pvr.c
--- a/src/input/input_pvr.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_pvr.c Sat Jun 09 11:23:10 2007 +0200
@@ -423,8 +423,9 @@ static uint32_t pvr_plugin_get_capabilit
}
-static off_t pvr_plugin_read (input_plugin_t *this_gen, char *buf, off_t len) {
+static off_t pvr_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t
len) {
/*pvr_input_plugin_t *this = (pvr_input_plugin_t *) this_gen;*/
+ char *buf = (char *)buf_gen;
/* FIXME: Tricking the demux_mpeg_block plugin */
buf[0] = 0;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_rtp.c
--- a/src/input/input_rtp.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_rtp.c Sat Jun 09 11:23:10 2007 +0200
@@ -432,8 +432,9 @@ static void * input_plugin_read_loop(voi
/* ***************************************************************** */
static off_t rtp_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t length) {
+ void *buf_gen, off_t length) {
rtp_input_plugin_t *this = (rtp_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
struct timeval tv;
struct timespec timeout;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_rtsp.c
--- a/src/input/input_rtsp.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_rtsp.c Sat Jun 09 11:23:10 2007 +0200
@@ -77,7 +77,7 @@ typedef struct {
static off_t rtsp_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t len) {
+ void *buf, off_t len) {
rtsp_input_plugin_t *this = (rtsp_input_plugin_t *) this_gen;
off_t n;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_smb.c
--- a/src/input/input_smb.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_smb.c Sat Jun 09 11:23:10 2007 +0200
@@ -66,9 +66,10 @@ smb_plugin_get_capabilities (input_plugi
static off_t
-smb_plugin_read (input_plugin_t *this_gen, char *buf, off_t len)
-{
- smb_input_t *this = (smb_input_t *) this_gen;
+smb_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
+{
+ smb_input_t *this = (smb_input_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n, num_bytes;
num_bytes = 0;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_stdin_fifo.c
--- a/src/input/input_stdin_fifo.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_stdin_fifo.c Sat Jun 09 11:23:10 2007 +0200
@@ -81,9 +81,10 @@ static off_t stdin_plugin_get_current_po
static off_t stdin_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t len) {
+ void *buf_gen, off_t len) {
stdin_input_plugin_t *this = (stdin_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n, total;
lprintf ("reading %"PRId64" bytes...\n", len);
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_v4l.c
--- a/src/input/input_v4l.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_v4l.c Sat Jun 09 11:23:10 2007 +0200
@@ -1192,7 +1192,7 @@ static int v4l_adjust_realtime_speed(v4l
* Plugin read.
* This function is not supported by the plugin.
*/
-static off_t v4l_plugin_read (input_plugin_t *this_gen, char *buf, off_t len) {
+static off_t v4l_plugin_read (input_plugin_t *this_gen, void *buf, off_t len) {
lprintf("Read not supported\n");
return 0;
}
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/input/input_vcd.c
--- a/src/input/input_vcd.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/input/input_vcd.c Sat Jun 09 11:23:10 2007 +0200
@@ -340,9 +340,10 @@ static int sun_vcd_read(vcd_input_plugin
#if defined (__linux__)
static off_t vcd_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t nlen) {
+ void *buf_gen, off_t nlen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
static struct cdrom_msf msf ;
static cdsector_t data;
struct cdrom_msf0 *end_msf;
@@ -398,8 +399,9 @@ static off_t vcd_plugin_read (input_plug
}
#elif defined (__FreeBSD__)
static off_t vcd_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t nlen) {
+ void *buf_gen, off_t nlen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
static cdsector_t data;
int bsize = 2352;
@@ -422,9 +424,10 @@ static off_t vcd_plugin_read (input_plug
}
#elif defined (__sun)
static off_t vcd_plugin_read (input_plugin_t *this_gen,
- char *buf, off_t nlen) {
+ void *buf_gen, off_t nlen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
static cdsector_t data;
struct cdrom_msf0 *end_msf;
long lba;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/vdr/input_vdr.c
--- a/src/vdr/input_vdr.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/vdr/input_vdr.c Sat Jun 09 11:23:10 2007 +0200
@@ -1308,9 +1308,10 @@ static int internal_write_event_play_ext
}
static off_t vdr_plugin_read(input_plugin_t *this_gen,
- char *buf, off_t len)
+ void *buf_gen, off_t len)
{
vdr_input_plugin_t *this = (vdr_input_plugin_t *) this_gen;
+ char *buf = (char *)buf_gen;
off_t n, total;
#ifdef LOG_READ
lprintf ("reading %lld bytes...\n", len);
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/xine-engine/input_cache.c
--- a/src/xine-engine/input_cache.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/xine-engine/input_cache.c Sat Jun 09 11:23:10 2007 +0200
@@ -62,8 +62,9 @@ typedef struct {
/*
* read data from input plugin and write it into file
*/
-static off_t cache_plugin_read(input_plugin_t *this_gen, char *buf, off_t len)
{
- cache_input_plugin_t *this = (cache_input_plugin_t *)this_gen;
+static off_t cache_plugin_read(input_plugin_t *this_gen, void *buf_gen, off_t
len) {
+ cache_input_plugin_t *this = (cache_input_plugin_t *)this_gen;
+ char *buf = (char *)buf_gen;
off_t read_len = 0;
off_t main_read;
diff -r 3af1d4d300e8952d855ff3fc819dd6d94cb7de01 -r
cea95767fc03e30a507310363a1eb4652af58546 src/xine-engine/input_rip.c
--- a/src/xine-engine/input_rip.c Sat Jun 09 11:44:00 2007 +0200
+++ b/src/xine-engine/input_rip.c Sat Jun 09 11:23:10 2007 +0200
@@ -100,8 +100,9 @@ static off_t min_off(off_t a, off_t b) {
/*
* read data from input plugin and write it into file
*/
-static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) {
- rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen;
+static off_t rip_plugin_read(input_plugin_t *this_gen, void *buf_gen, off_t
len) {
+ rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen;
+ char *buf = (char *)buf_gen;
off_t retlen, npreview, nread, nwrite, nread_orig, nread_file;
lprintf("reading %"PRId64" bytes (curpos = %"PRId64", savepos =
%"PRId64")\n", len, this->curpos, this->savepos);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog