From c5f621c76a628b66803d04c405bacf8689a8b485 Mon Sep 17 00:00:00 2001 From: Ben Taylor Date: Wed, 13 Jun 2007 16:17:05 -0400 Subject: Clean up solaris PTHREAD_CFLAGS/PTHREAD_LIBS --- m4/pthreads.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/pthreads.m4 b/m4/pthreads.m4 index c35d697e9..65d3a9756 100644 --- a/m4/pthreads.m4 +++ b/m4/pthreads.m4 @@ -22,7 +22,7 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ *-darwin*) PTHREAD_CFLAGS="" ;; *-solaris*) # Handle Studio compiler - CC_CHECK_CFLAGS([-mt], [PTHREAD_CFLAGS="-mt -D_REENTRANT"], [PTHREAD_CFLAGS="-D_REENTRANT"]);; + CC_CHECK_CFLAGS([-mt], [PTHREAD_CFLAGS="-mt"]);; *) PTHREAD_CFLAGS="-pthread" ;; esac fi @@ -31,8 +31,8 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ *-hpux11*) PTHREAD_LIBS="-lpthread" ;; *-darwin*) PTHREAD_LIBS="" ;; *-solaris*) - # Handle Studio compiler - CC_CHECK_CFLAGS([-mt], [PTHREAD_LIBS="-lpthread -lposix4 -lrt"], [PTHREAD_LIBS="-lpthread -lposix4 -lrt"]);; + # Use the same libraries for gcc and sun studio cc + PTHREAD_LIBS="-lpthread -lposix4 -lrt";; *) PTHREAD_LIBS="-pthread" ;; esac fi -- cgit v1.2.3 From 86f8ad6c47e917e6ed79e3783f8572975b7fdf9e Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:30:46 +0200 Subject: Fix compiler warning (pointer arithmetic). --- src/demuxers/demux_flac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c index 3c343bdf2..9b4914b5e 100644 --- a/src/demuxers/demux_flac.c +++ b/src/demuxers/demux_flac.c @@ -192,7 +192,7 @@ static int open_flac_file(demux_flac_t *flac) { lprintf ("VORBIS_COMMENT metadata\n"); { char comments[block_length]; - void *ptr = comments; + char *ptr = comments; uint32_t length, user_comment_list_length; int cn; char *comment; -- cgit v1.2.3 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(-) 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 81930a60c6933097ef90d77747e65ff47dbbe070 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:31:55 +0200 Subject: Avoid name collison (don't redefine TRANSPARENT). --- src/video_out/x11osd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_out/x11osd.c b/src/video_out/x11osd.c index f1e0656d1..dbfa53ec7 100644 --- a/src/video_out/x11osd.c +++ b/src/video_out/x11osd.c @@ -436,7 +436,7 @@ void x11osd_clear(x11osd *osd) osd->clean = WIPED; } -#define TRANSPARENT 0xffffffff +#define X11OSD_TRANSPARENT 0xffffffff #define saturate(n, l, u) ((n) < (l) ? (l) : ((n) > (u) ? (u) : (n))) @@ -526,13 +526,13 @@ void x11osd_blend(x11osd *osd, vo_overlay_t *overlay) } } else { - palette[use_clip_palette][j] = TRANSPARENT; + palette[use_clip_palette][j] = X11OSD_TRANSPARENT; } } max_palette_colour[use_clip_palette] = overlay->rle[i].color; } - if(palette[use_clip_palette][overlay->rle[i].color] != TRANSPARENT) { + if(palette[use_clip_palette][overlay->rle[i].color] != X11OSD_TRANSPARENT) { XSetForeground(osd->display, osd->gc, palette[use_clip_palette][overlay->rle[i].color]); XFillRectangle(osd->display, osd->bitmap, osd->gc, overlay->x + x, overlay->y + y, width, 1); if(osd->mode==X11OSD_SHAPED) -- 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(-) 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 b5de10c039578f1b02c8163924a5330d53728494 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:32:29 +0200 Subject: pgx32/64 need SUNDGA_CFLAGS --- src/video_out/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index a97d1d8ac..408eb1e95 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -140,11 +140,11 @@ xineplug_vo_out_syncfb_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c xineplug_vo_out_pgx64_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) -xineplug_vo_out_pgx64_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) +xineplug_vo_out_pgx64_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SUNDGA_CFLAGS) xineplug_vo_out_pgx32_la_SOURCES = video_out_pgx32.c xineplug_vo_out_pgx32_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) -xineplug_vo_out_pgx32_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) +xineplug_vo_out_pgx32_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SUNDGA_CFLAGS) xineplug_vo_out_vidix_la_SOURCES = video_out_vidix.c $(X11OSD) xineplug_vo_out_vidix_la_LIBADD = $(XINE_LIB) $(X_LIBS) \ -- 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(-) 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 11cae1abb320725afe0fb9a3d188250ed2157d1d Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:42:17 +0200 Subject: Fix parameter type. --- src/xine-engine/osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index b68b3b5c2..c4709c8ab 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -1005,7 +1005,7 @@ static int osd_search(osd_fontchar_t *array, size_t n, uint16_t code) { * get next unicode value */ static uint16_t osd_iconv_getunicode(xine_t *xine, - iconv_t *cd, const char *encoding, ICONV_CONST char **inbuf, + iconv_t cd, const char *encoding, ICONV_CONST char **inbuf, size_t *inbytesleft) { uint16_t unicode; char *outbuf = (char*)&unicode; -- cgit v1.2.3 From 3aa7cc767f81803598c18044d45ebc9bdfe0c8cd Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:44:16 +0200 Subject: Make explanation a constant string (gettext() strings are never freed). --- src/xine-engine/xine_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 166d7a3ef..a4a7ecbf9 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -947,7 +947,7 @@ xine_post_out_t * xine_get_audio_source(xine_stream_t *stream) { int _x_message(xine_stream_t *stream, int type, ...) { xine_ui_message_data_t *data; xine_event_t event; - char *explanation; + const char *explanation; int size; int n; va_list ap; -- 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(-) 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(+) 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 From 9f35b93d3ee2a40444c538247cfc5b05b4b0bf89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 14 Jun 2007 16:15:08 +0200 Subject: Disable mediaLib support by default. The licenses probably disallow the distribution of xine binaries built against mediaLib. And on non-VIS capable boxes is probably worse than our own code. --- ChangeLog | 3 +++ configure.ac | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3a4cf78d..ddb00eabc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ xine-lib (1.1.8) (Unreleased) * Send a channel changed event to the frontend when receiving the SYNC string from last.fm streaming server. + * Disable mediaLib support by default (the licenses probably disallow the + distribution of xine binaries built against mediaLib, and on non-VIS + capable boxes is probably worse than our own code). xine-lib (1.1.7) * Support libdca (new name for libdts) by shuffling around the dts.h file. diff --git a/configure.ac b/configure.ac index 0d4736179..3d08dd44b 100644 --- a/configure.ac +++ b/configure.ac @@ -451,12 +451,12 @@ AC_ARG_ENABLE([vis], AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs])) AC_ARG_ENABLE([mlib], - AS_HELP_STRING([--disable-mlib], [do not build Sun mediaLib support])) + AS_HELP_STRING([--enable-mlib], [build Sun mediaLib support])) AC_ARG_ENABLE([mlib-lazyload], AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime])) -if test "x$enable_mlib" != xno; then +if test "x$enable_mlib" = xyes; then if test "x$MLIBHOME" = x; then mlibhome=/opt/SUNWmlib else -- cgit v1.2.3