From 65f317b69e4091b4a228e1921755152911c2065c Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:30:55 +0200 Subject: Support Solaris byteorder.h macros. --- src/input/libdvdnav/bswap.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/libdvdnav/bswap.h b/src/input/libdvdnav/bswap.h index 36543fba5..2a2d222fe 100644 --- a/src/input/libdvdnav/bswap.h +++ b/src/input/libdvdnav/bswap.h @@ -41,6 +41,12 @@ #define B2N_32(x) x = bswap_32(x) #define B2N_64(x) x = bswap_64(x) +#elif defined(__SVR4) && defined(__sun) +#include +#define B2N_16(x) x = BSWAP_16(x) +#define B2N_32(x) x = BSWAP_32(x) +#define B2N_64(x) x = BSWAP_64(x) + #elif defined(__APPLE__) #include #define B2N_16(x) x = OSSwapBigToHostInt16(x) @@ -67,11 +73,11 @@ /* This is a slow but portable implementation, it has multiple evaluation * problems so beware. - * Old FreeBSD's and Solaris don't have or any other such + * Old FreeBSD and Windows don't have or any other such * functionality! */ -#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__) +#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__) #define B2N_16(x) \ x = ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)) -- cgit v1.2.3 From 1df3c181a6a80c0445da2ae27335fe323b43a011 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:32:10 +0200 Subject: Add printf format attribute. --- src/input/vcd/xine-extra.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/vcd/xine-extra.h b/src/input/vcd/xine-extra.h index cde9a26f6..2f8b12a71 100644 --- a/src/input/vcd/xine-extra.h +++ b/src/input/vcd/xine-extra.h @@ -49,7 +49,7 @@ In short this writes a message to buffer 'buf' and to stdout. */ void -xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args); +xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args) XINE_FORMAT_PRINTF(3, 0); /*! This routine is like xine_log, except it takes a va_list instead of a variable number of arguments and writes to stderr rather than @@ -58,7 +58,7 @@ xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args); In short this writes a message to buffer 'buf' and to stderr. */ -void xine_vlog_err(xine_t *this, int buf, const char *format, va_list args); +void xine_vlog_err(xine_t *this, int buf, const char *format, va_list args) XINE_FORMAT_PRINTF(3, 0); /*! Call this before calling any of the xine_log_msg or xine_log_err routines. It sets up the xine buffer that will be used in error -- cgit v1.2.3 From ca05584e624e78abfb5845daf298f973639b2a18 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:32:51 +0200 Subject: Avoid name collision (don't redefine NOPID). --- src/input/input_dvb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 736b4c6d7..98b343b44 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -115,7 +115,7 @@ #define BUFSIZE 16384 -#define NOPID 0xffff +#define DVB_NOPID 0xffff /* define stream types * administrative/system PIDs first */ @@ -657,7 +657,7 @@ static int dvb_set_pidfilter(dvb_input_plugin_t * this, int filter, ushort pid, { tuner_t *tuner = this->tuner; - if(this->channels[this->channel].pid [filter] !=NOPID) { + if(this->channels[this->channel].pid [filter] !=DVB_NOPID) { ioctl(tuner->fd_pidfilter[filter], DMX_STOP); } @@ -680,7 +680,7 @@ static int dvb_set_sectfilter(dvb_input_plugin_t * this, int filter, ushort pid, { tuner_t *tuner = this->tuner; - if(this->channels[this->channel].pid [filter] !=NOPID) { + if(this->channels[this->channel].pid [filter] !=DVB_NOPID) { ioctl(tuner->fd_pidfilter[filter], DMX_STOP); } @@ -1148,7 +1148,7 @@ static void parse_pmt(dvb_input_plugin_t *this, const unsigned char *buf, int se * parsing the descriptor. */ if(has_subs <= MAX_SUBTITLES) { xprintf(this->stream->xine,XINE_VERBOSITY_LOG,"input_dvb: Adding SUBTITLES: PID 0x%04x\n", elementary_pid); - if(this->channels[this->channel].subpid [has_subs] !=NOPID) { + if(this->channels[this->channel].subpid [has_subs] !=DVB_NOPID) { ioctl(this->tuner->fd_subfilter[has_subs], DMX_STOP); } this->channels[this->channel].subpid [has_subs] = elementary_pid; @@ -3056,7 +3056,7 @@ static int dvb_plugin_open(input_plugin_t * this_gen) /* Clear all pids, the pmt will tell us which to use */ for (x = 0; x < MAX_FILTERS; x++){ - this->channels[this->channel].pid[x] = NOPID; + this->channels[this->channel].pid[x] = DVB_NOPID; } -- cgit v1.2.3 From abb542ad1aa480c11e751218606aa1e85a859cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 13 Jun 2007 23:45:57 +0200 Subject: Don't redefine the BE_16/32 macros. Inspired by a patch by Albert Lee. --- src/input/libreal/rmff.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/input') diff --git a/src/input/libreal/rmff.c b/src/input/libreal/rmff.c index 0c4ee2ccd..3e8d5db9c 100644 --- a/src/input/libreal/rmff.c +++ b/src/input/libreal/rmff.c @@ -32,12 +32,6 @@ #include "xineutils.h" #include "rmff.h" -#define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) -#define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ - (((uint8_t*)(x))[1] << 16) | \ - (((uint8_t*)(x))[2] << 8) | \ - ((uint8_t*)(x))[3]) - /* * writes header data to a buffer */ -- cgit v1.2.3 From ac28cd6ce85dc08ac4bf23f33463b275804b87bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 14 Jun 2007 01:14:05 +0200 Subject: Include bswap.h too. --- src/input/libreal/rmff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/input') diff --git a/src/input/libreal/rmff.c b/src/input/libreal/rmff.c index 3e8d5db9c..419c5252e 100644 --- a/src/input/libreal/rmff.c +++ b/src/input/libreal/rmff.c @@ -30,6 +30,7 @@ */ #include "xineutils.h" +#include "bswap.h" #include "rmff.h" /* -- cgit v1.2.3