summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_dvb.c10
-rw-r--r--src/input/libdvdnav/bswap.h10
-rw-r--r--src/input/libreal/rmff.c7
-rw-r--r--src/input/vcd/xine-extra.h4
4 files changed, 16 insertions, 15 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 38ad0be82..d29b08c49 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -120,7 +120,7 @@
#define BUFSIZE 16384
-#define NOPID 0xffff
+#define DVB_NOPID 0xffff
/* define stream types
* administrative/system PIDs first */
@@ -662,7 +662,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);
}
@@ -685,7 +685,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);
}
@@ -1153,7 +1153,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;
@@ -3063,7 +3063,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;
}
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 <sys/byteorder.h>
+#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 <libkern/OSByteOrder.h>
#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 <byteswap.h> or any other such
+ * Old FreeBSD and Windows don't have <byteswap.h> 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))
diff --git a/src/input/libreal/rmff.c b/src/input/libreal/rmff.c
index 0c4ee2ccd..419c5252e 100644
--- a/src/input/libreal/rmff.c
+++ b/src/input/libreal/rmff.c
@@ -30,14 +30,9 @@
*/
#include "xineutils.h"
+#include "bswap.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
*/
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