From ae318c94136e2ef8366d632b8aa450f4facee42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:11:08 +0100 Subject: Make rtsp_read_data accept a void* parameter for buffer. --- src/input/librtsp/rtsp.c | 4 ++-- src/input/librtsp/rtsp.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/librtsp/rtsp.c b/src/input/librtsp/rtsp.c index 530ffc6cf..a44d0e8e1 100644 --- a/src/input/librtsp/rtsp.c +++ b/src/input/librtsp/rtsp.c @@ -382,8 +382,8 @@ int rtsp_request_tearoff(rtsp_t *s, const char *what) { * read opaque data from stream */ -int rtsp_read_data(rtsp_t *s, char *buffer, unsigned int size) { - +int rtsp_read_data(rtsp_t *s, void *buffer_gen, unsigned int size) { + uint8_t *buffer = buffer_gen; int i,seq; if (size>=4) { diff --git a/src/input/librtsp/rtsp.h b/src/input/librtsp/rtsp.h index dc2624459..7f7a3ddba 100644 --- a/src/input/librtsp/rtsp.h +++ b/src/input/librtsp/rtsp.h @@ -51,7 +51,7 @@ int rtsp_request_tearoff(rtsp_t *s, const char *what); int rtsp_send_ok(rtsp_t *s); -int rtsp_read_data(rtsp_t *s, char *buffer, unsigned int size); +int rtsp_read_data(rtsp_t *s, void *buffer, unsigned int size); char* rtsp_search_answers(rtsp_t *s, const char *tag); void rtsp_add_to_payload(char **payload, const char *string); -- cgit v1.2.3 From 805373666699066d9dcbc77c288933025b65f889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:11:24 +0100 Subject: Make rmff_dump_header accept a void * parameter for buffer. --- src/input/libreal/rmff.c | 13 +++++++------ src/input/libreal/rmff.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/input') diff --git a/src/input/libreal/rmff.c b/src/input/libreal/rmff.c index 159b81ee6..68813ec29 100644 --- a/src/input/libreal/rmff.c +++ b/src/input/libreal/rmff.c @@ -35,7 +35,7 @@ * writes header data to a buffer */ -static void rmff_dump_fileheader(rmff_fileheader_t *fileheader, char *buffer) { +static void rmff_dump_fileheader(rmff_fileheader_t *fileheader, uint8_t *buffer) { if (!fileheader) return; fileheader->object_id=_X_BE_32(&fileheader->object_id); @@ -55,7 +55,7 @@ static void rmff_dump_fileheader(rmff_fileheader_t *fileheader, char *buffer) { fileheader->object_id=_X_BE_32(&fileheader->object_id); } -static void rmff_dump_prop(rmff_prop_t *prop, char *buffer) { +static void rmff_dump_prop(rmff_prop_t *prop, uint8_t *buffer) { if (!prop) return; prop->object_id=_X_BE_32(&prop->object_id); @@ -95,7 +95,7 @@ static void rmff_dump_prop(rmff_prop_t *prop, char *buffer) { prop->object_id=_X_BE_32(&prop->object_id); } -static void rmff_dump_mdpr(rmff_mdpr_t *mdpr, char *buffer) { +static void rmff_dump_mdpr(rmff_mdpr_t *mdpr, uint8_t *buffer) { int s1, s2, s3; @@ -143,7 +143,7 @@ static void rmff_dump_mdpr(rmff_mdpr_t *mdpr, char *buffer) { } -static void rmff_dump_cont(rmff_cont_t *cont, char *buffer) { +static void rmff_dump_cont(rmff_cont_t *cont, uint8_t *buffer) { int p; @@ -183,7 +183,7 @@ static void rmff_dump_cont(rmff_cont_t *cont, char *buffer) { cont->object_id=_X_BE_32(&cont->object_id); } -static void rmff_dump_dataheader(rmff_data_t *data, char *buffer) { +static void rmff_dump_dataheader(rmff_data_t *data, uint8_t *buffer) { if (!data) return; data->object_id=_X_BE_32(&data->object_id); @@ -203,7 +203,8 @@ static void rmff_dump_dataheader(rmff_data_t *data, char *buffer) { data->object_id=_X_BE_32(&data->object_id); } -int rmff_dump_header(rmff_header_t *h, char *buffer, int max) { +int rmff_dump_header(rmff_header_t *h, void *buf_gen, int max) { + uint8_t *buffer = buf_gen; int written=0; rmff_mdpr_t **stream=h->streams; diff --git a/src/input/libreal/rmff.h b/src/input/libreal/rmff.h index d39942088..5944f9451 100644 --- a/src/input/libreal/rmff.h +++ b/src/input/libreal/rmff.h @@ -245,7 +245,7 @@ int rmff_get_header_size(rmff_header_t *h); /* * dumps the header to . is the size of */ -int rmff_dump_header(rmff_header_t *h, char *buffer, int max); +int rmff_dump_header(rmff_header_t *h, void *buffer, int max); /* * dumps a packet header -- cgit v1.2.3 From 6a4ad1db844168cd5547850d9614704ac6312156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:14:34 +0100 Subject: Make rmff_dump_pheader accept a bytes buffer. --- src/input/libreal/rmff.c | 2 +- src/input/libreal/rmff.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/libreal/rmff.c b/src/input/libreal/rmff.c index 68813ec29..e942fe4cc 100644 --- a/src/input/libreal/rmff.c +++ b/src/input/libreal/rmff.c @@ -231,7 +231,7 @@ int rmff_dump_header(rmff_header_t *h, void *buf_gen, int max) { return written; } -void rmff_dump_pheader(rmff_pheader_t *h, char *data) { +void rmff_dump_pheader(rmff_pheader_t *h, uint8_t *data) { data[0]=(h->object_version>>8) & 0xff; data[1]=h->object_version & 0xff; diff --git a/src/input/libreal/rmff.h b/src/input/libreal/rmff.h index 5944f9451..010ee5154 100644 --- a/src/input/libreal/rmff.h +++ b/src/input/libreal/rmff.h @@ -250,7 +250,7 @@ int rmff_dump_header(rmff_header_t *h, void *buffer, int max); /* * dumps a packet header */ -void rmff_dump_pheader(rmff_pheader_t *h, char *data); +void rmff_dump_pheader(rmff_pheader_t *h, uint8_t *data); /* * frees a header struct -- cgit v1.2.3 From 02a0b5145f86b74717c76e195665fcb6ba1d7f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:15:29 +0100 Subject: Make sourcea bytes buffer. --- src/input/librtsp/rtsp_session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/librtsp/rtsp_session.c b/src/input/librtsp/rtsp_session.c index f3ddb59bc..84552503b 100644 --- a/src/input/librtsp/rtsp_session.c +++ b/src/input/librtsp/rtsp_session.c @@ -189,7 +189,7 @@ int rtsp_session_read (rtsp_session_t *this, char *data, int len) { int to_copy; char *dest=data; - char *source=this->recv + this->recv_read; + uint8_t *source=this->recv + this->recv_read; int fill=this->recv_size - this->recv_read; if (len < 0) -- cgit v1.2.3 From 98dfe82c2653661c254ebc5abfec6b0ba695c427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:21:48 +0100 Subject: Make sure that the sign of local variables and parameters of local functions are the same. --- src/input/input_dvb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index a998d274b..8dd7b2a33 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -432,7 +432,7 @@ static const Param transmissionmode_list [] = { }; -time_t dvb_mjdtime (char *buf); +time_t dvb_mjdtime (uint8_t *buf); static void load_epg_data(dvb_input_plugin_t *this); static void show_eit(dvb_input_plugin_t *this); @@ -491,7 +491,7 @@ static int find_descriptor(uint8_t tag, const unsigned char *buf, int descriptor /* Extract UTC time and date encoded in modified julian date format and return it as a time_t. */ -time_t dvb_mjdtime (char *buf) +time_t dvb_mjdtime (uint8_t *buf) { int i; unsigned int year, month, day, hour, min, sec; @@ -1203,8 +1203,8 @@ static void parse_pmt(dvb_input_plugin_t *this, const unsigned char *buf, int se static void dvb_parse_si(dvb_input_plugin_t *this) { - char *tmpbuffer; - char *bufptr; + uint8_t *tmpbuffer; + uint8_t *bufptr; int service_id; int result; int section_len; @@ -1403,8 +1403,8 @@ static void load_epg_data(dvb_input_plugin_t *this) int section_len = 0; unsigned int service_id=-1; int n; - char *eit = NULL; - char *foo = NULL; + uint8_t *eit = NULL; + uint8_t *foo = NULL; char *seen_channels = NULL; int text_len; struct pollfd fd; @@ -2476,7 +2476,7 @@ static void ts_rewrite_packets (dvb_input_plugin_t *this, unsigned char * origin static off_t dvb_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len) { dvb_input_plugin_t *this = (dvb_input_plugin_t *) this_gen; - char *buf = (char *)buf_gen; + uint8_t *buf = buf_gen; off_t n=0, total=0; int have_mutex=0; -- cgit v1.2.3 From 571219b513b4fe6a368a9af5d440ab780f3d306a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:24:01 +0100 Subject: Mark dvb_mjdtime as static. --- src/input/input_dvb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 8dd7b2a33..1151d9a81 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -432,7 +432,7 @@ static const Param transmissionmode_list [] = { }; -time_t dvb_mjdtime (uint8_t *buf); +static time_t dvb_mjdtime (uint8_t *buf); static void load_epg_data(dvb_input_plugin_t *this); static void show_eit(dvb_input_plugin_t *this); @@ -491,7 +491,7 @@ static int find_descriptor(uint8_t tag, const unsigned char *buf, int descriptor /* Extract UTC time and date encoded in modified julian date format and return it as a time_t. */ -time_t dvb_mjdtime (uint8_t *buf) +static time_t dvb_mjdtime (uint8_t *buf) { int i; unsigned int year, month, day, hour, min, sec; -- cgit v1.2.3