diff options
Diffstat (limited to 'src')
137 files changed, 342 insertions, 385 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 0d5621593..6718b4805 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,15 +20,10 @@ SUBDIRS = \ libdts \ libmad \ libw32dll \ - liblpcm \ libxinevdec \ libxineadec \ - libvorbis \ - libtheora \ - libspeex \ libreal \ libfaad \ - libflac \ libmusepack \ post \ combined diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index d52f700f3..20a4e708b 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -4,8 +4,6 @@ AM_CPPFLAGS = -DXINE_COMPILE EXTRA_DIST = audio_irixal_out.c -libdir = $(XINE_PLUGINDIR) - if HAVE_OSS oss_module = xineplug_ao_out_oss.la endif @@ -57,7 +55,7 @@ endif # all xine audio out plugins should be named like the # scheme "xineplug_ao_out_" # -lib_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ +xineplug_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ $(oss_module) \ $(alsa_module) \ $(sun_module) \ @@ -70,14 +68,6 @@ lib_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ $(fusionsound_module) \ $(jack_module) -#lib_LTLIBRARIES = \ -# $(alsa_module) \ -# $(arts_module) \ -# $(esd_module) \ -# $(irixal_module) \ -# $(oss_module) \ -# $(sun_module) - xineplug_ao_out_none_la_SOURCES = audio_none_out.c xineplug_ao_out_none_la_LIBADD = $(XINE_LIB) xineplug_ao_out_none_la_CFLAGS = $(VISIBILITY_FLAG) diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 3651d21da..6ad78da2a 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -265,10 +265,7 @@ static long ao_alsa_get_volume_from_percent(int val, long min, long max) { * Error callback, we need to control this, * error message should be printed only in DEBUG mode. */ -static void -#ifdef __GNUC__ - __attribute__((format (printf, 5, 6))) -#endif +static void XINE_FORMAT_PRINTF(5, 6) error_callback(const char *file, int line, const char *function, int err, const char *fmt, ...) { #ifdef DEBUG @@ -663,15 +660,7 @@ static int ao_alsa_delay (ao_driver_t *this_gen) { struct timeval now; printf("audio_alsa_out:delay:ENTERED\n"); #endif - err=snd_pcm_delay( this->audio_fd, &delay ); - - int state = snd_pcm_state(this->audio_fd); - - /* check for idle states, which need to be handled as delay=0 */ - if(state == SND_PCM_STATE_PREPARED || state == SND_PCM_STATE_PAUSED || - state == SND_PCM_STATE_OPEN || SND_PCM_STATE_XRUN) { - return 0; - } + err = snd_pcm_delay( this->audio_fd, &delay ); #ifdef LOG_DEBUG printf("audio_alsa_out:delay:delay all=%ld err=%d\n",delay, err); @@ -679,8 +668,11 @@ static int ao_alsa_delay (ao_driver_t *this_gen) { printf("audio_alsa_out:delay: Time = %ld.%ld\n", now.tv_sec, now.tv_usec); printf("audio_alsa_out:delay:FINISHED\n"); #endif - return delay; + if (err || (delay < 0)) + delay = 0; + + return delay; } #if 0 diff --git a/src/audio_out/audio_directx2_out.c b/src/audio_out/audio_directx2_out.c index aff4412ec..7161f192d 100644 --- a/src/audio_out/audio_directx2_out.c +++ b/src/audio_out/audio_directx2_out.c @@ -151,10 +151,7 @@ static int buffer_ready(dx2_driver_t *this); /* popup a dialog with error */ -static void -#ifdef __GNUC__ - __attribute__((format (printf, 1, 2))) -#endif +static void XINE_FORMAT_PRINTF(1, 2) error_message(const char *fmt, ...) { char message[256]; va_list ap; diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index d2147ac52..d2147ac52 100755..100644 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c index 93361d2f3..5923eb658 100644 --- a/src/audio_out/audio_sun_out.c +++ b/src/audio_out/audio_sun_out.c @@ -126,10 +126,10 @@ typedef struct sun_driver_s { #ifdef __svr4__ #if SW_SAMPLE_COUNT struct timeval tv0; - uint_t sample0; + size_t sample0; #endif - uint_t last_samplecnt; + size_t last_samplecnt; #endif } sun_driver_t; @@ -604,8 +604,8 @@ static int ao_sun_delay(ao_driver_t *this_gen) /* compute "current sample" based on real time */ { struct timeval tv1; - uint_t cur_sample; - uint_t msec; + size_t cur_sample; + size_t msec; gettimeofday(&tv1, NULL); @@ -807,7 +807,7 @@ static int ao_sun_get_property (ao_driver_t *this_gen, int property) { this->mixer_volume = info.play.gain * 100 / AUDIO_MAX_GAIN; } return this->mixer_volume; -#if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ +#ifdef HAVE_AUDIO_INFO_T_OUTPUT_MUTED case AO_PROP_MUTE_VOL: if (ioctl(this->audio_fd, AUDIO_GETINFO, &info) < 0) return 0; @@ -836,7 +836,7 @@ static int ao_sun_set_property (ao_driver_t *this_gen, int property, int value) if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) return ~value; return value; -#if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ +#ifdef HAVE_AUDIO_INFO_T_OUTPUT_MUTED case AO_PROP_MUTE_VOL: info.output_muted = value != 0; if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am index 0d27f71c0..884fcf0cc 100644 --- a/src/combined/Makefile.am +++ b/src/combined/Makefile.am @@ -4,9 +4,18 @@ if HAVE_WAVPACK xineplug_wavpack = xineplug_wavpack.la endif -xineplug_LTLIBRARIES = $(xineplug_wavpack) +if HAVE_LIBFLAC +xineplug_flac = xineplug_flac.la +endif + +xineplug_LTLIBRARIES = $(xineplug_wavpack) $(xineplug_flac) xineplug_wavpack_la_SOURCES = demux_wavpack.c decoder_wavpack.c combined_wavpack.c combined_wavpack.h xineplug_wavpack_la_CFLAGS = $(VISIBILITY_FLAG) $(WAVPACK_CFLAGS) -I$(srcdir)/../demuxers xineplug_wavpack_la_LIBADD = $(XINE_LIB) $(WAVPACK_LIBS) xineplug_wavpack_la_LDFLAGS = $(xineplug_ldflags) + +xineplug_flac_la_SOURCES = demux_flac.c decoder_flac.c demux_flac.h +xineplug_flac_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBFLAC_CFLAGS) +xineplug_flac_la_LIBADD = $(XINE_LIB) $(LIBFLAC_LIBS) +xineplug_flac_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libflac/decoder_flac.c b/src/combined/decoder_flac.c index 9b77cc27d..9b77cc27d 100644 --- a/src/libflac/decoder_flac.c +++ b/src/combined/decoder_flac.c diff --git a/src/libflac/demux_flac.c b/src/combined/demux_flac.c index 43ee17d5c..43ee17d5c 100644 --- a/src/libflac/demux_flac.c +++ b/src/combined/demux_flac.c diff --git a/src/libflac/demux_flac.h b/src/combined/demux_flac.h index 6086781d1..6086781d1 100644 --- a/src/libflac/demux_flac.h +++ b/src/combined/demux_flac.h diff --git a/src/demuxers/demux_iff.c b/src/demuxers/demux_iff.c index cc4df0c85..7ca851718 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -148,7 +148,7 @@ typedef struct { * different decoding deltas */ -static int8_t delta_decode_block(int8_t *source, int32_t n, int8_t *dest, int8_t x, int8_t *table) { +static int8_t delta_decode_block(const int8_t *source, int32_t n, int8_t *dest, int8_t x, const int8_t *table) { int32_t i; int lim = n * 2; @@ -163,7 +163,7 @@ static int8_t delta_decode_block(int8_t *source, int32_t n, int8_t *dest, int8_t } /* Decode a complete delta encoded array */ -static void delta_decode(int8_t *dest, int8_t *source, int32_t n, int8_t *table){ +static void delta_decode(int8_t *dest, const int8_t *source, int32_t n, const int8_t *table){ delta_decode_block(&source[2], n-2, dest, source[1], table); } diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 4144f3049..f837a2272 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -417,31 +417,31 @@ typedef struct { #if DEBUG_ATOM_LOAD #define debug_atom_load printf #else -static inline void __attribute__((format (printf, 1, 2))) debug_atom_load(const char *format, ...) {} +static inline void XINE_FORMAT_PRINTF(1, 2) debug_atom_load(const char *format, ...) {} #endif #if DEBUG_EDIT_LIST #define debug_edit_list printf #else -static inline void __attribute__((format (printf, 1, 2))) debug_edit_list(const char *format, ...) {} +static inline void XINE_FORMAT_PRINTF(1, 2) debug_edit_list(const char *format, ...) {} #endif #if DEBUG_FRAME_TABLE #define debug_frame_table printf #else -static inline void __attribute__((format (printf, 1, 2))) debug_frame_table(const char *format, ...) {} +static inline void XINE_FORMAT_PRINTF(1, 2) debug_frame_table(const char *format, ...) {} #endif #if DEBUG_VIDEO_DEMUX #define debug_video_demux printf #else -static inline void __attribute__((format (printf, 1, 2))) debug_video_demux(const char *format, ...) {} +static inline void XINE_FORMAT_PRINTF(1, 2) debug_video_demux(const char *format, ...) {} #endif #if DEBUG_AUDIO_DEMUX #define debug_audio_demux printf #else -static inline void __attribute__((format (printf, 1, 2))) debug_audio_demux(const char *format, ...) {} +static inline void XINE_FORMAT_PRINTF(1, 2) debug_audio_demux(const char *format, ...) {} #endif static inline void dump_moov_atom(unsigned char *moov_atom, int moov_atom_size) { @@ -832,7 +832,7 @@ static qt_error parse_trak_atom (qt_trak *trak, int color_index; int color_dec; int color_greyscale; - unsigned char *color_table; + const unsigned char *color_table; /* initialize trak structure */ trak->edit_list_count = 0; diff --git a/src/demuxers/iff.h b/src/demuxers/iff.h index 9d4fb5abe..64f44fd94 100644 --- a/src/demuxers/iff.h +++ b/src/demuxers/iff.h @@ -118,7 +118,8 @@ #define HAMBITS_RED 2 /* modify red component */ #define HAMBITS_GREEN 3 /* modify green component */ -int bitplainoffeset[] = { 1, 2, 4, 8, +static const int bitplainoffeset[] = { + 1, 2, 4, 8, 16, 32, 64, 128, 1, 2, 4, 8, 16, 32, 64, 128, @@ -237,9 +238,9 @@ typedef struct { #define max_volume 65536 /* Unity = Fixed 1.0 = maximum volume */ -int8_t fibonacci[] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 }; +static const int8_t fibonacci[] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 }; -int8_t exponential[] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 }; +static const int8_t exponential[] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 }; typedef struct { uint32_t oneShotHiSamples; /* # samples in the high octave 1-shot part */ diff --git a/src/demuxers/qtpalette.h b/src/demuxers/qtpalette.h index 18b47c697..a8a44e916 100644 --- a/src/demuxers/qtpalette.h +++ b/src/demuxers/qtpalette.h @@ -7,14 +7,14 @@ #ifndef QTPALETTE_H #define QTPALETTE_H -unsigned char qt_default_palette_4[4 * 4] = { +static const unsigned char qt_default_palette_4[4 * 4] = { 0x93, 0x65, 0x5E, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xDF, 0xD0, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00 }; -unsigned char qt_default_palette_16[16 * 4] = { +static const unsigned char qt_default_palette_16[16 * 4] = { 0xFF, 0xFB, 0xFF, 0x00, 0xEF, 0xD9, 0xBB, 0x00, 0xE8, 0xC9, 0xB1, 0x00, @@ -33,7 +33,7 @@ unsigned char qt_default_palette_16[16 * 4] = { 0x00, 0x00, 0x00, 0x00 }; -unsigned char qt_default_palette_256[256 * 4] = { +static const unsigned char qt_default_palette_256[256 * 4] = { /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, 0x00, /* 1, 0x01 */ 0xFF, 0xFF, 0xCC, 0x00, /* 2, 0x02 */ 0xFF, 0xFF, 0x99, 0x00, diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am index 8bf9c9427..5f413f804 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -2,8 +2,6 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(X_CFLAGS) $(LIBFAME_CFLAGS) -libdir = $(XINE_PLUGINDIR) - if HAVE_DXR3 dxr3_modules = xineplug_decode_dxr3_video.la \ xineplug_decode_dxr3_spu.la \ @@ -19,7 +17,7 @@ if HAVE_LIBRTE link_rte = -lrte endif -lib_LTLIBRARIES = $(dxr3_modules) +xineplug_LTLIBRARIES = $(dxr3_modules) xineplug_decode_dxr3_video_la_SOURCES = dxr3_decode_video.c xineplug_decode_dxr3_video_la_LIBADD = $(XINE_LIB) diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 68adf84be..a2a1ea3a4 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -8,8 +8,6 @@ else SUBDIRS = vcd dvb libreal librtsp libdvdnav endif -libdir = $(XINE_PLUGINDIR) - ## # IMPORTANT: # --------- @@ -52,7 +50,7 @@ endif AM_CFLAGS = -D_LARGEFILE64_SOURCE $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) -lib_LTLIBRARIES = \ +xineplug_LTLIBRARIES = \ xineplug_inp_file.la \ xineplug_inp_http.la \ $(in_dvd) \ diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index d21c8e4db..7dd9ae21a 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -988,10 +988,7 @@ static int parse_url (char *urlbuf, char** host, int *port) { } #endif -static int -#ifdef __GNUC__ -__attribute__((format (printf, 4, 5))) -#endif +static int XINE_FORMAT_PRINTF(4, 5) network_command( xine_stream_t *stream, int socket, char *data_buf, char *msg, ...) { char buf[_BUFSIZ]; diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 39507ac15..10d6eca55 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -986,8 +986,13 @@ static int tuner_tune_it (tuner_t *this, struct dvb_frontend_parameters if (poll(pfd,1,3000)){ if (pfd[0].revents & POLLIN){ - if (ioctl(this->fd_frontend, FE_GET_EVENT, &event) == -EOVERFLOW){ +#ifdef EOVERFLOW + if (ioctl(this->fd_frontend, FE_GET_EVENT, &event) == -EOVERFLOW) { print_error("EOVERFLOW"); +#else + if (ioctl(this->fd_frontend, FE_GET_EVENT, &event) == -EINVAL) { + print_error("EINVAL"); +#endif return 0; } if (event.parameters.frequency <= 0) diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 944ae88bd..de47de0d5 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -64,21 +64,17 @@ #endif /* WIN32 */ -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(HAVE_LINUX_CDROM_H) +#include <linux/cdrom.h> +#elif defined(HAVE_SYS_DVDIO_H) #include <sys/dvdio.h> #include <sys/cdio.h> /* CDIOCALLOW etc... */ -#elif defined(HAVE_LINUX_CDROM_H) -#include <linux/cdrom.h> #elif defined(HAVE_SYS_CDIO_H) #include <sys/cdio.h> -#else - -#ifdef WIN32 +#elif defined(WIN32) #include <io.h> /* read() */ #else #warning "This might not compile due to missing cdrom ioctls" -#endif /* WIN32 */ - #endif /* DVDNAV includes */ diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index b9f516931..540abd0f4 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -304,7 +304,7 @@ gnomevfs_klass_dispose (input_class_t *this_gen) g_free (this); } -static char * ignore_scheme[] = { "cdda", "file", "http" }; +static const char *const ignore_scheme[] = { "cdda", "file", "http" }; static input_plugin_t * gnomevfs_klass_get_instance (input_class_t *klass_gen, xine_stream_t *stream, diff --git a/src/input/pnm.c b/src/input/pnm.c index 432520f6e..cba0aff1f 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -169,13 +169,13 @@ static const uint32_t pnm_available_bandwidths[]={14400,19200,28800,33600,34430, 115200,262200,393216,524300,1544000,10485800}; #define PNM_TWENTYFOUR_SIZE 16 -static unsigned char pnm_twentyfour[]={ +static const unsigned char pnm_twentyfour[]={ 0xd5, 0x42, 0xa3, 0x1b, 0xef, 0x1f, 0x70, 0x24, 0x85, 0x29, 0xb3, 0x8d, 0xba, 0x11, 0xf3, 0xd6 }; /* now other data follows. marked with 0x0000 at the beginning */ -int after_chunks_length=6; -unsigned char after_chunks[]={ +static const int after_chunks_length=6; +static const unsigned char after_chunks[]={ 0x00, 0x00, /* mark */ 0x50, 0x84, /* seems to be fixated */ diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 98903aac8..16eece779 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -2,14 +2,12 @@ include $(top_srcdir)/misc/Makefile.common SUBDIRS = libcdio libvcd -libdir = $(XINE_PLUGINDIR) - vcd_SRCS = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c EXTRA_DIST = $(vcd_SRCS) if ENABLE_VCD -lib_LTLIBRARIES = xineplug_inp_vcd.la +xineplug_LTLIBRARIES = xineplug_inp_vcd.la AM_CFLAGS = $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) diff --git a/src/input/vcd/xine-extra.h b/src/input/vcd/xine-extra.h index d0b2a0bb5..cde9a26f6 100644 --- a/src/input/vcd/xine-extra.h +++ b/src/input/vcd/xine-extra.h @@ -80,11 +80,7 @@ bool xine_log_init(xine_t *this); an error, such as logging wasn't initialized. On error, nothing is logged. */ -bool xine_log_msg(const char *format, ...) -#ifdef __GNUC__ -__attribute__((format (printf, 1, 2))) -#endif -; +bool xine_log_msg(const char *format, ...) XINE_FORMAT_PRINTF(1, 2); /*! This routine is like xine_log without any xine-specific paramenters. Before calling this routine you should have set up a xine log buffer via @@ -96,11 +92,7 @@ __attribute__((format (printf, 1, 2))) an error, such as logging wasn't initialized. On error, nothing is logged. */ -bool xine_log_err(const char *format, ...) -#ifdef __GNUC__ -__attribute__((format (printf, 1, 2))) -#endif -; +bool xine_log_err(const char *format, ...) XINE_FORMAT_PRINTF(1, 2); /* Free all (num_mrls) MRLS. */ void xine_free_mrls(int *num_mrls, xine_mrl_t **mrls); diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 920b5c1d8..a15899f2d 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -88,7 +88,7 @@ Convert an autoplay enumeration into an vcdinfo itemtype enumeration. See definitions in vcdplayer.h and vcdinfo.h to get the below correct. */ -vcdinfo_item_enum_t autoplay2itemtype[]={ +static const vcdinfo_item_enum_t autoplay2itemtype[]={ VCDINFO_ITEM_TYPE_TRACK, /* VCDPLAYER_AUTOPLAY_TRACK */ VCDINFO_ITEM_TYPE_ENTRY, /* VCDPLAYER_AUTOPLAY_ENTRY */ VCDINFO_ITEM_TYPE_SEGMENT, /* VCDPLAYER_AUTOPLAY_SEGMENT */ diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index f296a0ef3..6a0aebe62 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -1,12 +1,10 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) - if A52 a52_module = xineplug_decode_a52.la endif -lib_LTLIBRARIES = $(a52_module) +xineplug_LTLIBRARIES = $(a52_module) if EXTERNAL_A52DEC internal_sources = @@ -20,7 +18,7 @@ internal_sources = \ endif xineplug_decode_a52_la_SOURCES = \ - xine_decoder.c \ + xine_a52_decoder.c \ $(internal_sources) if EXTERNAL_A52DEC @@ -30,7 +28,7 @@ xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -lm endif xineplug_decode_a52_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_a52_la_LDFLAGS = -avoid-version -module +xineplug_decode_a52_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = \ a52.h \ diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_a52_decoder.c index 5435e9664..5435e9664 100644 --- a/src/liba52/xine_decoder.c +++ b/src/liba52/xine_a52_decoder.c diff --git a/src/libdts/Makefile.am b/src/libdts/Makefile.am index 4cf54884f..207755f1f 100644 --- a/src/libdts/Makefile.am +++ b/src/libdts/Makefile.am @@ -1,12 +1,10 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) - if DTS dts_module = xineplug_decode_dts.la endif -lib_LTLIBRARIES = $(dts_module) +xineplug_LTLIBRARIES = $(dts_module) if EXTERNAL_LIBDTS fnsa = @@ -16,9 +14,9 @@ fnsa = -fno-strict-aliasing internal_sources = bitstream.c downmix.c parse.c endif -xineplug_decode_dts_la_SOURCES = xine_decoder.c $(internal_sources) +xineplug_decode_dts_la_SOURCES = xine_dts_decoder.c $(internal_sources) xineplug_decode_dts_la_CFLAGS = $(LIBDTS_CFLAGS) $(VISIBILITY_FLAG) $(fnsa) -xineplug_decode_dts_la_LDFLAGS = -avoid-version -module +xineplug_decode_dts_la_LDFLAGS = $(xineplug_ldflags) if EXTERNAL_LIBDTS xineplug_decode_dts_la_LIBADD = $(XINE_LIB) $(LIBDTS_LIBS) -lm diff --git a/src/libdts/xine_decoder.c b/src/libdts/xine_dts_decoder.c index 902d8c5b6..902d8c5b6 100644 --- a/src/libdts/xine_decoder.c +++ b/src/libdts/xine_dts_decoder.c diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am index dcc57792a..d1a4ed865 100644 --- a/src/libfaad/Makefile.am +++ b/src/libfaad/Makefile.am @@ -2,13 +2,11 @@ include $(top_srcdir)/misc/Makefile.common SUBDIRS = codebook -libdir = $(XINE_PLUGINDIR) - if BUILD_FAAD faad_module = xineplug_decode_faad.la endif -lib_LTLIBRARIES = $(faad_module) +xineplug_LTLIBRARIES = $(faad_module) VPATH = @srcdir@:@srcdir@/codebook: @@ -52,9 +50,9 @@ xineplug_decode_faad_la_SOURCES = \ ssr_ipqf.c \ syntax.c \ tns.c \ - xine_decoder.c + xine_faad_decoder.c -xineplug_decode_faad_la_LDFLAGS = -avoid-version -module +xineplug_decode_faad_la_LDFLAGS = $(xineplug_ldflags) xineplug_decode_faad_la_LIBADD = -lm $(XINE_LIB) noinst_HEADERS = \ diff --git a/src/libfaad/xine_decoder.c b/src/libfaad/xine_faad_decoder.c index aa528a34d..aa528a34d 100644 --- a/src/libfaad/xine_decoder.c +++ b/src/libfaad/xine_faad_decoder.c diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index 5f08ea20e..19ea72b5e 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -16,33 +16,30 @@ endif DISTCLEANFILES = ffmpeg_config.h # this must always be included, even if the current machine has no DXR3... -EXTRA_DIST = xine_encoder.c diff_to_ffmpeg_cvs.txt +EXTRA_DIST = ffmpeg_encoder.c diff_to_ffmpeg_cvs.txt INTERNAL_DOCS = diff_to_ffmpeg_cvs.txt -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la +xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la if HAVE_DXR3 AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \ $(ZLIB_CPPFLAGS) -xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \ - xine_encoder.c mpeg_parser.c +xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \ + ffmpeg_encoder.c ff_mpeg_parser.c ffmpeg_decoder.h \ + ff_mpeg_parser.h else AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS) -xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \ - mpeg_parser.c +xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \ + ff_mpeg_parser.c ffmpeg_decoder.h ff_mpeg_parser.h endif xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @IMPURE_TEXT_LDFLAGS@ +xineplug_decode_ff_la_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \ $(link_ffmpeg) $(PTHREAD_LIBS) xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_decode_dvaudio_la_LDFLAGS = -avoid-version -module -xineplug_decode_dvaudio_la_SOURCES = dvaudio_decoder.c +xineplug_decode_dvaudio_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) - -noinst_HEADERS = xine_decoder.h mpeg_parser.h diff --git a/src/libffmpeg/audio_decoder.c b/src/libffmpeg/ff_audio_decoder.c index 7ab1f56b4..e0d6e5cab 100644 --- a/src/libffmpeg/audio_decoder.c +++ b/src/libffmpeg/ff_audio_decoder.c @@ -45,7 +45,7 @@ #include "buffer.h" #include "xineutils.h" #include "bswap.h" -#include "xine_decoder.h" +#include "ffmpeg_decoder.h" #define AUDIOBUFSIZE (64 * 1024) diff --git a/src/libffmpeg/dvaudio_decoder.c b/src/libffmpeg/ff_dvaudio_decoder.c index 2c851bae1..2c851bae1 100644 --- a/src/libffmpeg/dvaudio_decoder.c +++ b/src/libffmpeg/ff_dvaudio_decoder.c diff --git a/src/libffmpeg/mpeg_parser.c b/src/libffmpeg/ff_mpeg_parser.c index 14a08a456..fcee29a80 100644 --- a/src/libffmpeg/mpeg_parser.c +++ b/src/libffmpeg/ff_mpeg_parser.c @@ -27,7 +27,7 @@ /* #define LOG */ -#include "mpeg_parser.h" +#include "ff_mpeg_parser.h" /* mpeg frame rate table from lavc */ static const int frame_rate_tab[][2] = { diff --git a/src/libffmpeg/mpeg_parser.h b/src/libffmpeg/ff_mpeg_parser.h index 859a0fcec..b307714cc 100644 --- a/src/libffmpeg/mpeg_parser.h +++ b/src/libffmpeg/ff_mpeg_parser.h @@ -26,7 +26,7 @@ #define HAVE_MPEG_PARSER_H #include "xine_internal.h" -#include "xine_decoder.h" +#include "ffmpeg_decoder.h" #define BUFFER_SIZE (1194 * 1024) /* libmpeg2's buffer size */ diff --git a/src/libffmpeg/video_decoder.c b/src/libffmpeg/ff_video_decoder.c index 38cf160c5..e04c680b7 100644 --- a/src/libffmpeg/video_decoder.c +++ b/src/libffmpeg/ff_video_decoder.c @@ -45,8 +45,8 @@ #include "bswap.h" #include "buffer.h" #include "xineutils.h" -#include "xine_decoder.h" -#include "mpeg_parser.h" +#include "ffmpeg_decoder.h" +#include "ff_mpeg_parser.h" #ifdef HAVE_FFMPEG # include <postprocess.h> diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/ffmpeg_decoder.c index 2eeb9746b..6f85cc1fa 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/ffmpeg_decoder.c @@ -30,7 +30,7 @@ #include "xine_internal.h" -#include "xine_decoder.h" +#include "ffmpeg_decoder.h" /* * common initialisation diff --git a/src/libffmpeg/xine_decoder.h b/src/libffmpeg/ffmpeg_decoder.h index 879ee3175..879ee3175 100644 --- a/src/libffmpeg/xine_decoder.h +++ b/src/libffmpeg/ffmpeg_decoder.h diff --git a/src/libffmpeg/xine_encoder.c b/src/libffmpeg/ffmpeg_encoder.c index e234b4ddc..e234b4ddc 100644 --- a/src/libffmpeg/xine_encoder.c +++ b/src/libffmpeg/ffmpeg_encoder.c diff --git a/src/libffmpeg/libavcodec/bitstream.c b/src/libffmpeg/libavcodec/bitstream.c index 22d256df5..22d256df5 100755..100644 --- a/src/libffmpeg/libavcodec/bitstream.c +++ b/src/libffmpeg/libavcodec/bitstream.c diff --git a/src/libffmpeg/libavcodec/h261data.h b/src/libffmpeg/libavcodec/h261data.h index 2a93b73e3..2a93b73e3 100755..100644 --- a/src/libffmpeg/libavcodec/h261data.h +++ b/src/libffmpeg/libavcodec/h261data.h diff --git a/src/libffmpeg/libavcodec/h264idct.c b/src/libffmpeg/libavcodec/h264idct.c index a6a56d33a..a6a56d33a 100755..100644 --- a/src/libffmpeg/libavcodec/h264idct.c +++ b/src/libffmpeg/libavcodec/h264idct.c diff --git a/src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c b/src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c index 14391e60c..14391e60c 100755..100644 --- a/src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c +++ b/src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c diff --git a/src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c b/src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c index 37f4de58f..37f4de58f 100755..100644 --- a/src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c +++ b/src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c diff --git a/src/libffmpeg/libavcodec/ulti.c b/src/libffmpeg/libavcodec/ulti.c index b4028f439..b4028f439 100755..100644 --- a/src/libffmpeg/libavcodec/ulti.c +++ b/src/libffmpeg/libavcodec/ulti.c diff --git a/src/libffmpeg/libavcodec/ulti_cb.h b/src/libffmpeg/libavcodec/ulti_cb.h index 2d8c9082c..2d8c9082c 100755..100644 --- a/src/libffmpeg/libavcodec/ulti_cb.h +++ b/src/libffmpeg/libavcodec/ulti_cb.h diff --git a/src/libflac/Makefile.am b/src/libflac/Makefile.am deleted file mode 100644 index 6449820bc..000000000 --- a/src/libflac/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -include $(top_srcdir)/misc/Makefile.common - -libdir = $(XINE_PLUGINDIR) - -if HAVE_LIBFLAC -lib_LTLIBRARIES = xineplug_flac.la -endif - -xineplug_flac_la_SOURCES = demux_flac.c decoder_flac.c -xineplug_flac_la_LIBADD = $(LIBFLAC_LIBS) $(XINE_LIB) -xineplug_flac_la_CFLAGS = $(LIBFLAC_CFLAGS) $(VISIBILITY_FLAG) -xineplug_flac_la_LDFLAGS = -avoid-version -module - -noinst_HEADERS = demux_flac.h diff --git a/src/liblpcm/Makefile.am b/src/liblpcm/Makefile.am deleted file mode 100644 index e8527ee5c..000000000 --- a/src/liblpcm/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -include $(top_srcdir)/misc/Makefile.common - -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_lpcm.la - -xineplug_decode_lpcm_la_SOURCES = xine_decoder.c -xineplug_decode_lpcm_la_LIBADD = $(XINE_LIB) -xineplug_decode_lpcm_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_lpcm_la_LDFLAGS = -avoid-version -module diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am index 8d704205b..c879645c5 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -4,13 +4,11 @@ AM_CFLAGS = -DOPT_SPEED EXTRA_DIST = imdct_l_arm.S -libdir = $(XINE_PLUGINDIR) - if MAD mad_module = xineplug_decode_mad.la endif -lib_LTLIBRARIES = $(mad_module) +xineplug_LTLIBRARIES = $(mad_module) if EXTERNAL_LIBMAD internal_sources = @@ -29,7 +27,7 @@ internal_sources = \ endif xineplug_decode_mad_la_SOURCES = \ - xine_decoder.c \ + xine_mad_decoder.c \ $(internal_sources) if EXTERNAL_LIBMAD @@ -38,7 +36,7 @@ else xineplug_decode_mad_la_LIBADD = $(XINE_LIB) endif xineplug_decode_mad_la_CFLAGS = $(LIBMAD_CFLAGS) $(VISIBILITY_FLAG) -xineplug_decode_mad_la_LDFLAGS = -avoid-version -module +xineplug_decode_mad_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = \ D.dat \ diff --git a/src/libmad/bit.c b/src/libmad/bit.c index 8d9571e8f..8d9571e8f 100755..100644 --- a/src/libmad/bit.c +++ b/src/libmad/bit.c diff --git a/src/libmad/fixed.h b/src/libmad/fixed.h index 658b3399e..658b3399e 100755..100644 --- a/src/libmad/fixed.h +++ b/src/libmad/fixed.h diff --git a/src/libmad/frame.c b/src/libmad/frame.c index 6fe1970c0..6fe1970c0 100755..100644 --- a/src/libmad/frame.c +++ b/src/libmad/frame.c diff --git a/src/libmad/frame.h b/src/libmad/frame.h index 270420ab8..270420ab8 100755..100644 --- a/src/libmad/frame.h +++ b/src/libmad/frame.h diff --git a/src/libmad/layer12.c b/src/libmad/layer12.c index 25fd04d70..25fd04d70 100755..100644 --- a/src/libmad/layer12.c +++ b/src/libmad/layer12.c diff --git a/src/libmad/layer3.c b/src/libmad/layer3.c index c5d46e8d1..c5d46e8d1 100755..100644 --- a/src/libmad/layer3.c +++ b/src/libmad/layer3.c diff --git a/src/libmad/synth.c b/src/libmad/synth.c index c05ad3efc..c05ad3efc 100755..100644 --- a/src/libmad/synth.c +++ b/src/libmad/synth.c diff --git a/src/libmad/timer.c b/src/libmad/timer.c index 9aa2e8924..9aa2e8924 100755..100644 --- a/src/libmad/timer.c +++ b/src/libmad/timer.c diff --git a/src/libmad/timer.h b/src/libmad/timer.h index 88e997d5e..88e997d5e 100755..100644 --- a/src/libmad/timer.h +++ b/src/libmad/timer.h diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_mad_decoder.c index 28407cfec..28407cfec 100644 --- a/src/libmad/xine_decoder.c +++ b/src/libmad/xine_mad_decoder.c diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index 550ce581f..66fb39f13 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -1,10 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(LIBMPEG2_CFLAGS) - -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_mpeg2.la +xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = \ cpu_state.c \ @@ -23,12 +19,12 @@ xineplug_decode_mpeg2_la_SOURCES = \ slice_xvmc.c \ slice_xvmc_vld.c \ stats.c \ - xine_decoder.c \ + xine_mpeg2_decoder.c \ libmpeg2_accel.c xineplug_decode_mpeg2_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm -xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_mpeg2_la_LDFLAGS = -avoid-version -module +xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = vlc.h mpeg2.h xvmc.h xvmc_vld.h mpeg2_internal.h idct_mlib.h vis.h \ libmpeg2_accel.h diff --git a/src/libmpeg2/slice.c b/src/libmpeg2/slice.c index 8cb5c33b6..91a4c47b1 100644 --- a/src/libmpeg2/slice.c +++ b/src/libmpeg2/slice.c @@ -32,7 +32,7 @@ #include "vlc.h" -static int non_linear_quantizer_scale [] = { +static const int non_linear_quantizer_scale [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 48, 52, diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_mpeg2_decoder.c index 8c0d176c0..8c0d176c0 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/xine_mpeg2_decoder.c diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 03dae6cba..49959da86 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -1,16 +1,13 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(LIBMPEG2_CFLAGS) - SUBDIRS = libmpeg2 -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_mpeg2.la +xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = \ - xine_decoder.c + xine_mpeg2_decoder.c +xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ +xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libmpeg2new/xine_decoder.c b/src/libmpeg2new/xine_mpeg2new_decoder.c index 9e36772b7..9e36772b7 100644 --- a/src/libmpeg2new/xine_decoder.c +++ b/src/libmpeg2new/xine_mpeg2new_decoder.c diff --git a/src/libmusepack/Makefile.am b/src/libmusepack/Makefile.am index 021ec0985..d39426597 100644 --- a/src/libmusepack/Makefile.am +++ b/src/libmusepack/Makefile.am @@ -4,10 +4,8 @@ SUBDIRS = musepack EXTRA_DIST = diff_against_svn.patch -libdir = $(XINE_PLUGINDIR) - if MUSEPACK -lib_LTLIBRARIES = xineplug_decode_mpc.la +xineplug_LTLIBRARIES = xineplug_decode_mpc.la endif if EXTERNAL_MPCDEC @@ -23,7 +21,6 @@ else xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) endif -xineplug_decode_mpc_la_SOURCES = $(internal_sources) xine_decoder.c +xineplug_decode_mpc_la_SOURCES = $(internal_sources) xine_musepack_decoder.c xineplug_decode_mpc_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_mpc_la_LDFLAGS = -avoid-version -module - +xineplug_decode_mpc_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libmusepack/diff_against_svn.patch b/src/libmusepack/diff_against_svn.patch index aca00556c..1d44efb95 100644 --- a/src/libmusepack/diff_against_svn.patch +++ b/src/libmusepack/diff_against_svn.patch @@ -1,5 +1,6 @@ Use xine's inttypes. The file config_types.h is generated from config_types.h.in in musepack SVN. +Check for previous swap32 definition before writing a new swap32 function. Index: src/libmusepack/musepack/config_types.h =================================================================== @@ -33,3 +34,22 @@ diff -u -r1.1 synth_filter.c /* C O N S T A N T S */ #undef _ +diff -r d25b274e6e6a src/libmusepack/musepack/internal.h +--- a/src/libmusepack/musepack/internal.h Wed Apr 04 13:41:11 2007 +0200 ++++ b/src/libmusepack/musepack/internal.h Wed Apr 04 13:42:45 2007 +0200 +@@ -8,6 +8,7 @@ enum { + MPC_DECODER_SYNTH_DELAY = 481 + }; + ++#ifndef swap32 + /// Big/little endian 32 bit byte swapping routine. + static inline + mpc_uint32_t swap32(mpc_uint32_t val) { +@@ -16,6 +17,7 @@ mpc_uint32_t swap32(mpc_uint32_t val) { + (mpc_uint32_t)src[0] | + ((mpc_uint32_t)src[1] << 8) | ((mpc_uint32_t)src[2] << 16) | ((mpc_uint32_t)src[3] << 24); + } ++#endif + + /// Searches for a ID3v2-tag and reads the length (in bytes) of it. + /// \param reader supplying raw stream data diff --git a/src/libmusepack/musepack/internal.h b/src/libmusepack/musepack/internal.h index 42a0e7156..f86b45bb3 100644 --- a/src/libmusepack/musepack/internal.h +++ b/src/libmusepack/musepack/internal.h @@ -8,6 +8,7 @@ enum { MPC_DECODER_SYNTH_DELAY = 481 }; +#ifndef swap32 /// Big/little endian 32 bit byte swapping routine. static inline mpc_uint32_t swap32(mpc_uint32_t val) { @@ -16,6 +17,7 @@ mpc_uint32_t swap32(mpc_uint32_t val) { (mpc_uint32_t)src[0] | ((mpc_uint32_t)src[1] << 8) | ((mpc_uint32_t)src[2] << 16) | ((mpc_uint32_t)src[3] << 24); } +#endif /// Searches for a ID3v2-tag and reads the length (in bytes) of it. /// \param reader supplying raw stream data diff --git a/src/libmusepack/xine_decoder.c b/src/libmusepack/xine_musepack_decoder.c index 26c2eddf5..26c2eddf5 100644 --- a/src/libmusepack/xine_decoder.c +++ b/src/libmusepack/xine_musepack_decoder.c diff --git a/src/libreal/Makefile.am b/src/libreal/Makefile.am index 114a473a7..c9cf62984 100644 --- a/src/libreal/Makefile.am +++ b/src/libreal/Makefile.am @@ -4,7 +4,7 @@ if ENABLE_REAL xineplug_LTLIBRARIES = xineplug_decode_real.la endif -xineplug_decode_real_la_SOURCES = xine_decoder.c real_common.c audio_decoder.c +xineplug_decode_real_la_SOURCES = xine_real_video_decoder.c real_common.c xine_real_audio_decoder.c xineplug_decode_real_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) xineplug_decode_real_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_decode_real_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libreal/audio_decoder.c b/src/libreal/xine_real_audio_decoder.c index d1bb94230..d1bb94230 100644 --- a/src/libreal/audio_decoder.c +++ b/src/libreal/xine_real_audio_decoder.c diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_real_video_decoder.c index ea1fc8c54..ea1fc8c54 100644 --- a/src/libreal/xine_decoder.c +++ b/src/libreal/xine_real_video_decoder.c diff --git a/src/libspeex/Makefile.am b/src/libspeex/Makefile.am deleted file mode 100644 index bfe6f35b9..000000000 --- a/src/libspeex/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -include $(top_srcdir)/misc/Makefile.common - -libdir = $(XINE_PLUGINDIR) - -if HAVE_SPEEX -speex_module = xineplug_decode_speex.la -endif - -lib_LTLIBRARIES = $(speex_module) - -xineplug_decode_speex_la_SOURCES = xine_decoder.c -xineplug_decode_speex_la_LIBADD = $(SPEEX_LIBS) $(XINE_LIB) -xineplug_decode_speex_la_CFLAGS = $(VISIBILITY_FLAGS) $(SPEEX_CFLAGS) -xineplug_decode_speex_la_LDFLAGS = -avoid-version -module diff --git a/src/libspucc/Makefile.am b/src/libspucc/Makefile.am index fff0ab47c..aefe4d7c1 100644 --- a/src/libspucc/Makefile.am +++ b/src/libspucc/Makefile.am @@ -1,10 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) +xineplug_LTLIBRARIES = xineplug_decode_spucc.la -lib_LTLIBRARIES = xineplug_decode_spucc.la - -xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_decoder.c +xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_cc_decoder.c xineplug_decode_spucc_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing xineplug_decode_spucc_la_LIBADD = $(XINE_LIB) xineplug_decode_spucc_la_LDFLAGS = -avoid-version -module diff --git a/src/libspucc/cc_decoder.c b/src/libspucc/cc_decoder.c index ba688accf..46ea5c02c 100644 --- a/src/libspucc/cc_decoder.c +++ b/src/libspucc/cc_decoder.c @@ -72,7 +72,7 @@ enum { WHITE, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, BLACK }; /* color mapping to OSD text color indices */ -static int text_colormap[NUM_FG_COL] = { +static const int text_colormap[NUM_FG_COL] = { OSD_TEXT1, OSD_TEXT2, OSD_TEXT3, OSD_TEXT4, OSD_TEXT5, OSD_TEXT6, OSD_TEXT7 }; @@ -91,7 +91,7 @@ typedef struct colorinfo_s { } colorinfo_t; -static colorinfo_t cc_text_trans[NUM_FG_COL] = { +static const colorinfo_t cc_text_trans[NUM_FG_COL] = { /* white, black border, translucid */ { CLUT_Y_CR_CB_INIT(0x80, 0x80, 0x80), @@ -142,7 +142,7 @@ static colorinfo_t cc_text_trans[NUM_FG_COL] = { } }; -static colorinfo_t cc_text_solid[NUM_FG_COL] = { +static const colorinfo_t cc_text_solid[NUM_FG_COL] = { /* white, black border, solid */ { CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), @@ -194,21 +194,21 @@ static colorinfo_t cc_text_solid[NUM_FG_COL] = { }; -static uint8_t cc_text_trans_alpha[TEXT_PALETTE_SIZE] = { +static const uint8_t cc_text_trans_alpha[TEXT_PALETTE_SIZE] = { 0, 8, 9, 10, 11, 12, 15, 15, 15, 15, 15 }; -static uint8_t cc_text_solid_alpha[TEXT_PALETTE_SIZE] = { +static const uint8_t cc_text_solid_alpha[TEXT_PALETTE_SIZE] = { 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 }; -static colorinfo_t *cc_text_palettes[NUM_CC_PALETTES] = { +static const colorinfo_t *const cc_text_palettes[NUM_CC_PALETTES] = { cc_text_trans, cc_text_solid }; -static uint8_t *cc_alpha_palettes[NUM_CC_PALETTES] = { +static const uint8_t *const cc_alpha_palettes[NUM_CC_PALETTES] = { cc_text_trans_alpha, cc_text_solid_alpha }; @@ -221,11 +221,11 @@ static uint8_t *cc_alpha_palettes[NUM_CC_PALETTES] = { #define MAX(a, b) ((a) > (b)? (a) : (b)) /* mapping from PAC row code to actual CC row */ -static int rowdata[] = {10, -1, 0, 1, 2, 3, 11, 12, 13, 14, 4, 5, 6, +static const int rowdata[] = {10, -1, 0, 1, 2, 3, 11, 12, 13, 14, 4, 5, 6, 7, 8, 9}; /* FIXME: do real TM */ /* must be mapped as a music note in the captioning font */ -static char specialchar[] = {'®','°','½','¿','T','¢','£','¶','à', +static const char specialchar[] = {'®','°','½','¿','T','¢','£','¶','à', TRANSP_SPACE,'è','â','ê','î','ô','û'}; /* character translation table - EIA 608 codes are not all the same as ASCII */ @@ -798,8 +798,8 @@ static void ccmem_exit(cc_memory_t *this) static void cc_renderer_build_palette(cc_renderer_t *this) { int i, j; - colorinfo_t *cc_text = cc_text_palettes[this->cc_state->cc_cfg->cc_scheme]; - uint8_t *cc_alpha = cc_alpha_palettes[this->cc_state->cc_cfg->cc_scheme]; + const colorinfo_t *cc_text = cc_text_palettes[this->cc_state->cc_cfg->cc_scheme]; + const uint8_t *cc_alpha = cc_alpha_palettes[this->cc_state->cc_cfg->cc_scheme]; memset(this->cc_palette, 0, sizeof (this->cc_palette)); memset(this->cc_trans, 0, sizeof (this->cc_trans)); diff --git a/src/libspucc/xine_decoder.c b/src/libspucc/xine_cc_decoder.c index 1a32274f6..1a32274f6 100644 --- a/src/libspucc/xine_decoder.c +++ b/src/libspucc/xine_cc_decoder.c diff --git a/src/libspucmml/Makefile.am b/src/libspucmml/Makefile.am index cf9095399..ac2970482 100644 --- a/src/libspucmml/Makefile.am +++ b/src/libspucmml/Makefile.am @@ -1,10 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) +xineplug_LTLIBRARIES = xineplug_decode_spucmml.la -lib_LTLIBRARIES = xineplug_decode_spucmml.la - -xineplug_decode_spucmml_la_SOURCES = xine_decoder.c +xineplug_decode_spucmml_la_SOURCES = xine_cmml_decoder.c xineplug_decode_spucmml_la_LIBADD = $(XINE_LIB) xineplug_decode_spucmml_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_spucmml_la_LDFLAGS = -avoid-version -module +xineplug_decode_spucmml_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libspucmml/xine_decoder.c b/src/libspucmml/xine_cmml_decoder.c index 13cb6c066..13cb6c066 100644 --- a/src/libspucmml/xine_decoder.c +++ b/src/libspucmml/xine_cmml_decoder.c diff --git a/src/libspudec/Makefile.am b/src/libspudec/Makefile.am index d50c49ca6..208d994f5 100644 --- a/src/libspudec/Makefile.am +++ b/src/libspudec/Makefile.am @@ -1,14 +1,12 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_spu.la +xineplug_LTLIBRARIES = xineplug_decode_spu.la if HAVE_DVDNAV xineplug_decode_spu_la_SOURCES = \ spu.c \ - xine_decoder.c + xine_spu_decoder.c xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(DVDNAV_LIBS) $(PTHREAD_LIBS) else @@ -16,13 +14,13 @@ else xineplug_decode_spu_la_SOURCES = \ nav_read.c \ spu.c \ - xine_decoder.c + xine_spu_decoder.c AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) endif xineplug_decode_spu_la_CFLAGS = $(DVDNAV_CFLAGS) $(VISIBILITY_FLAG) -xineplug_decode_spu_la_LDFLAGS = -avoid-version -module +xineplug_decode_spu_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = spu.h diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_spu_decoder.c index 30c7f18c9..c98d9e4dd 100644 --- a/src/libspudec/xine_decoder.c +++ b/src/libspudec/xine_spu_decoder.c @@ -49,7 +49,7 @@ #define LOG_BUTTON 1 */ -static clut_t default_clut[] = { +static const clut_t default_clut[] = { CLUT_Y_CR_CB_INIT(0x00, 0x80, 0x80), CLUT_Y_CR_CB_INIT(0xbf, 0x80, 0x80), CLUT_Y_CR_CB_INIT(0x10, 0x80, 0x80), diff --git a/src/libspudvb/Makefile.am b/src/libspudvb/Makefile.am index 1efc8252f..e385e5553 100644 --- a/src/libspudvb/Makefile.am +++ b/src/libspudvb/Makefile.am @@ -1,10 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) +xineplug_LTLIBRARIES = xineplug_decode_spudvb.la -lib_LTLIBRARIES = xineplug_decode_spudvb.la - -xineplug_decode_spudvb_la_SOURCES = xine_decoder.c +xineplug_decode_spudvb_la_SOURCES = xine_spudvb_decoder.c xineplug_decode_spudvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) xineplug_decode_spudvb_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_spudvb_la_LDFLAGS = -avoid-version -module +xineplug_decode_spudvb_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libspudvb/xine_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index f2fcfe182..f2fcfe182 100644 --- a/src/libspudvb/xine_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c diff --git a/src/libsputext/Makefile.am b/src/libsputext/Makefile.am index 362f9319e..5e4ce59d0 100644 --- a/src/libsputext/Makefile.am +++ b/src/libsputext/Makefile.am @@ -1,17 +1,13 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) +AM_LDFLAGS = $(xineplug_ldflags) -sputext_decoder = xineplug_decode_sputext.la xineplug_dmx_sputext.la - -lib_LTLIBRARIES = $(sputext_decoder) +xineplug_LTLIBRARIES = xineplug_decode_sputext.la xineplug_dmx_sputext.la xineplug_dmx_sputext_la_SOURCES = demux_sputext.c xineplug_dmx_sputext_la_LIBADD = $(XINE_LIB) xineplug_dmx_sputext_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_dmx_sputext_la_LDFLAGS = -avoid-version -module -xineplug_decode_sputext_la_SOURCES = xine_decoder.c +xineplug_decode_sputext_la_SOURCES = xine_sputext_decoder.c xineplug_decode_sputext_la_LIBADD = $(XINE_LIB) xineplug_decode_sputext_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_sputext_la_LDFLAGS = -avoid-version -module diff --git a/src/libsputext/xine_decoder.c b/src/libsputext/xine_sputext_decoder.c index e8ef631ca..e8ef631ca 100644 --- a/src/libsputext/xine_decoder.c +++ b/src/libsputext/xine_sputext_decoder.c diff --git a/src/libtheora/Makefile.am b/src/libtheora/Makefile.am deleted file mode 100644 index d3813765d..000000000 --- a/src/libtheora/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -include $(top_srcdir)/misc/Makefile.common - -AM_CFLAGS = $(THEORA_CFLAGS) - -libdir = $(XINE_PLUGINDIR) - -if HAVE_THEORA -theora_module = xineplug_decode_theora.la -endif - -lib_LTLIBRARIES = $(theora_module) - -xineplug_decode_theora_la_SOURCES = xine_decoder.c -xineplug_decode_theora_la_LIBADD = $(OGG_LIBS) $(THEORA_LIBS) $(XINE_LIB) -xineplug_decode_theora_la_LDFLAGS = -avoid-version -module diff --git a/src/libvorbis/Makefile.am b/src/libvorbis/Makefile.am deleted file mode 100644 index 09abced93..000000000 --- a/src/libvorbis/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -include $(top_srcdir)/misc/Makefile.common - -libdir = $(XINE_PLUGINDIR) - -if HAVE_VORBIS -vorbis_module = xineplug_decode_vorbis.la -endif - -lib_LTLIBRARIES = $(vorbis_module) - -xineplug_decode_vorbis_la_SOURCES = xine_decoder.c -xineplug_decode_vorbis_la_LIBADD = $(VORBIS_LIBS) $(OGG_LIBS) $(XINE_LIB) -xineplug_decode_vorbis_la_CFLAGS = $(VORBIS_CFLAGS) $(VISIBILITY_FLAG) -xineplug_decode_vorbis_la_LDFLAGS = -avoid-version -module diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 46027d0f1..358eea40a 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -9,9 +9,7 @@ w32dll_codec = xineplug_decode_w32dll.la qt_codec = xineplug_decode_qt.la endif -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = $(w32dll_codec) $(qt_codec) +xineplug_LTLIBRARIES = $(w32dll_codec) $(qt_codec) EXTRA_DIST = common.c diff --git a/src/libw32dll/wine/debugtools.h b/src/libw32dll/wine/debugtools.h index 038c05309..3b342e10c 100644 --- a/src/libw32dll/wine/debugtools.h +++ b/src/libw32dll/wine/debugtools.h @@ -80,11 +80,7 @@ static inline LPCSTR debugstr_w( LPCWSTR s ) { return debugstr_wn( s, 80 ); } #endif #if 0 /* dbg_printf already defined as a macro */ -#ifdef __GNUC__ -extern int dbg_printf(const char *format, ...) __attribute__((format (printf,1,2))); -#else -extern int dbg_printf(const char *format, ...); -#endif +extern int dbg_printf(const char *format, ...) XINE_FORMAT_PRINTF(1,2); #endif #define TRACE_(X) TRACE diff --git a/src/libw32dll/wine/ext.h b/src/libw32dll/wine/ext.h index 7b284ca79..f0f505c4d 100644 --- a/src/libw32dll/wine/ext.h +++ b/src/libw32dll/wine/ext.h @@ -2,6 +2,7 @@ #define loader_ext_h #include "windef.h" +#include "attributes.h" extern LPVOID FILE_dommap( int unix_handle, LPVOID start, DWORD size_high, DWORD size_low, @@ -9,6 +10,6 @@ extern LPVOID FILE_dommap( int unix_handle, LPVOID start, int prot, int flags ); extern int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low ); extern int wcsnicmp(const unsigned short* s1, const unsigned short* s2, int n); -extern int __attribute__ ((format (printf, 1, 2))) __vprintf( const char *format, ... ); +extern int XINE_FORMAT_PRINTF(1, 2) __vprintf( const char *format, ... ); #endif diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index 4fe1956b7..397779f72 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -12,6 +12,7 @@ for DLL to know too much about its environment. ************************************************************/ #include "config.h" +#include "attributes.h" #define QTX @@ -183,7 +184,7 @@ static void longcount_stub(long long* z) int LOADER_DEBUG=1; // active only if compiled with -DDETAILED_OUT //#define DETAILED_OUT -static inline void __attribute__((__format__(__printf__, 1, 2))) dbgprintf(char* fmt, ...) +static inline void XINE_FORMAT_PRINTF(1, 2) dbgprintf(char* fmt, ...) { #ifdef DETAILED_OUT if(LOADER_DEBUG) @@ -3976,7 +3977,7 @@ static void* exp__dllonexit() return NULL; } -static int __attribute__((__format__(__printf__, 2, 3))) expwsprintfA(char* string, char* format, ...) +static int XINE_FORMAT_PRINTF(2, 3) expwsprintfA(char* string, char* format, ...) { va_list va; int result; @@ -3987,7 +3988,7 @@ static int __attribute__((__format__(__printf__, 2, 3))) expwsprintfA(char* stri return result; } -static int __attribute__((__format__(__printf__, 2, 3))) expsprintf(char* str, const char* format, ...) +static int XINE_FORMAT_PRINTF(2, 3) expsprintf(char* str, const char* format, ...) { va_list args; int r; @@ -3997,7 +3998,7 @@ static int __attribute__((__format__(__printf__, 2, 3))) expsprintf(char* str, c va_end(args); return r; } -static int __attribute__((__format__(__printf__, 2, 3))) expsscanf(const char* str, const char* format, ...) +static int XINE_FORMAT_PRINTF(2, 3) expsscanf(const char* str, const char* format, ...) { va_list args; int r; @@ -4013,7 +4014,7 @@ static void* expfopen(const char* path, const char* mode) //return fopen(path, mode); return fdopen(0, mode); // everything on screen } -static int __attribute__((__format__(__printf__, 2, 3)))expfprintf(void* stream, const char* format, ...) +static int XINE_FORMAT_PRINTF(2, 3)expfprintf(void* stream, const char* format, ...) { va_list args; int r = 0; @@ -4026,7 +4027,7 @@ static int __attribute__((__format__(__printf__, 2, 3)))expfprintf(void* stream, return r; } -static int __attribute__((__format__(__printf__, 1, 2))) expprintf(const char* format, ...) +static int XINE_FORMAT_PRINTF(1, 2) expprintf(const char* format, ...) { va_list args; int r; diff --git a/src/libxineadec/Makefile.am b/src/libxineadec/Makefile.am index 7f34b4bfd..b2ffcf078 100644 --- a/src/libxineadec/Makefile.am +++ b/src/libxineadec/Makefile.am @@ -2,26 +2,41 @@ include $(top_srcdir)/misc/Makefile.common EXTRA_DIST = fooaudio.c -libdir = $(XINE_PLUGINDIR) - SUBDIRS = gsm610 nosefart -lib_LTLIBRARIES = \ +AM_LDFLAGS = $(xineplug_ldflags) + +if HAVE_VORBIS +vorbis_module = xineplug_decode_vorbis.la +endif + +if HAVE_SPEEX +speex_module = xineplug_decode_speex.la +endif + +xineplug_LTLIBRARIES = \ xineplug_decode_gsm610.la \ - xineplug_decode_nsf.la + xineplug_decode_nsf.la \ + xineplug_decode_lpcm.la \ + $(vorbis_module) \ + $(speex_module) xineplug_decode_gsm610_la_SOURCES = gsm610.c xineplug_decode_gsm610_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_gsm610_la_LDFLAGS = -avoid-version -module -xineplug_decode_gsm610_la_LIBADD = \ - $(XINE_LIB) \ - $(top_builddir)/src/libxineadec/gsm610/libgsm610.la +xineplug_decode_gsm610_la_LIBADD = $(XINE_LIB) gsm610/libgsm610.la xineplug_decode_nsf_la_SOURCES = nsf.c xineplug_decode_nsf_la_CFLAGS = $(VISIBILITY_FLAG) -DNSF_PLAYER -fno-strict-aliasing -xineplug_decode_nsf_la_LDFLAGS = -avoid-version -module -xineplug_decode_nsf_la_LIBADD = -lm \ - $(XINE_LIB) \ - $(top_builddir)/src/libxineadec/nosefart/libnosefart.la +xineplug_decode_nsf_la_LIBADD = $(XINE_LIB) -lm nosefart/libnosefart.la + +xineplug_decode_lpcm_la_SOURCES = xine_lpcm_decoder.c +xineplug_decode_lpcm_la_CFLAGS = $(VISIBILITY_FLAG) +xineplug_decode_lpcm_la_LIBADD = $(XINE_LIB) + +xineplug_decode_vorbis_la_SOURCES = xine_vorbis_decoder.c +xineplug_decode_vorbis_la_LIBADD = $(XINE_LIB) $(VORBIS_LIBS) $(OGG_LIBS) +xineplug_decode_vorbis_la_CFLAGS = $(VISIBILITY_FLAG) $(VORBIS_CFLAGS) -# noinst_HEADERS = +xineplug_decode_speex_la_SOURCES = xine_speex_decoder.c +xineplug_decode_speex_la_LIBADD = $(XINE_LIB) $(SPEEX_LIBS) +xineplug_decode_speex_la_CFLAGS = $(VISIBILITY_FLAGS) $(SPEEX_CFLAGS) diff --git a/src/libxineadec/nosefart/log.h b/src/libxineadec/nosefart/log.h index c3494a6c7..a12deff0a 100644 --- a/src/libxineadec/nosefart/log.h +++ b/src/libxineadec/nosefart/log.h @@ -27,15 +27,12 @@ #define _LOG_H_ #include <stdio.h> +#include "attributes.h" extern int log_init(void); extern void log_shutdown(void); extern void log_print(const char *string); -extern void log_printf(const char *format, ...) -#ifdef __GNUC__ -__attribute__ ((format (printf, 1, 2))) -#endif -; +extern void log_printf(const char *format, ...) XINE_FORMAT_PRINTF(1, 2); #endif /* _LOG_H_ */ diff --git a/src/liblpcm/xine_decoder.c b/src/libxineadec/xine_lpcm_decoder.c index 43bea4cbf..43bea4cbf 100644 --- a/src/liblpcm/xine_decoder.c +++ b/src/libxineadec/xine_lpcm_decoder.c diff --git a/src/libspeex/xine_decoder.c b/src/libxineadec/xine_speex_decoder.c index b729dc3bb..b729dc3bb 100644 --- a/src/libspeex/xine_decoder.c +++ b/src/libxineadec/xine_speex_decoder.c diff --git a/src/libvorbis/xine_decoder.c b/src/libxineadec/xine_vorbis_decoder.c index ef8575949..ef8575949 100644 --- a/src/libvorbis/xine_decoder.c +++ b/src/libxineadec/xine_vorbis_decoder.c diff --git a/src/libxinevdec/Makefile.am b/src/libxinevdec/Makefile.am index 903399cbb..87ee050e6 100644 --- a/src/libxinevdec/Makefile.am +++ b/src/libxinevdec/Makefile.am @@ -13,8 +13,13 @@ if HAVE_GDK_PIXBUF gdkpixbuf_module = xineplug_decode_gdk_pixbuf.la endif +if HAVE_THEORA +theora_module = xineplug_decode_theora.la +endif + xineplug_LTLIBRARIES = $(image_module) \ $(gdkpixbuf_module) \ + $(theora_module) \ xineplug_decode_bitplane.la \ xineplug_decode_rgb.la \ xineplug_decode_yuv.la @@ -36,3 +41,6 @@ xineplug_decode_gdk_pixbuf_la_SOURCES = gdkpixbuf.c xineplug_decode_gdk_pixbuf_la_CFLAGS = $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS) xineplug_decode_gdk_pixbuf_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) $(GDK_PIXBUF_LIBS) +xineplug_decode_theora_la_SOURCES = xine_theora_decoder.c +xineplug_decode_theora_la_CFLAGS = $(AM_CFLAGS) $(OGG_CFLAGS) $(THEORA_CFLAGS) +xineplug_decode_theora_la_LIBADD = $(XINE_LIB) $(OGG_LIBS) $(THEORA_LIBS) diff --git a/src/libtheora/xine_decoder.c b/src/libxinevdec/xine_theora_decoder.c index 032f8800f..032f8800f 100644 --- a/src/libtheora/xine_decoder.c +++ b/src/libxinevdec/xine_theora_decoder.c diff --git a/src/post/audio/Makefile.am b/src/post/audio/Makefile.am index 9cb93dd5a..f4018a780 100644 --- a/src/post/audio/Makefile.am +++ b/src/post/audio/Makefile.am @@ -2,9 +2,7 @@ include $(top_srcdir)/misc/Makefile.common noinst_HEADERS = dsp.h filter.h window.h audio_filters.h -libdir = $(XINE_PLUGINDIR)/post - -lib_LTLIBRARIES = xineplug_post_audio_filters.la +xinepost_LTLIBRARIES = xineplug_post_audio_filters.la xineplug_post_audio_filters_la_SOURCES = \ upmix.c upmix_mono.c filter.c window.c stretch.c volnorm.c audio_filters.c diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c index 76c9afe58..975d8b79e 100644 --- a/src/post/audio/upmix.c +++ b/src/post/audio/upmix.c @@ -57,7 +57,7 @@ typedef struct{ } biquad_t; /* S-parameters for designing 4th order Butterworth filter */ -static biquad_t s_param[2] = {{{1.0,0.0,0.0},{1.0,0.765367,1.0}}, +static const biquad_t s_param[2] = {{{1.0,0.0,0.0},{1.0,0.765367,1.0}}, {{1.0,0.0,0.0},{1.0,1.847759,1.0}}}; /* Data for specific instances of this filter */ diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am index 0914e114a..d2d1d5c10 100644 --- a/src/post/deinterlace/Makefile.am +++ b/src/post/deinterlace/Makefile.am @@ -4,9 +4,7 @@ SUBDIRS = plugins EXTRA_DIST = -libdir = $(XINE_PLUGINDIR)/post - -lib_LTLIBRARIES = xineplug_post_tvtime.la +xinepost_LTLIBRARIES = xineplug_post_tvtime.la xineplug_post_tvtime_la_SOURCES = xine_plugin.c \ deinterlace.c pulldown.c speedy.c tvtime.c diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index e6e785211..17d170127 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -32,8 +32,6 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \ -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc -libdir = $(XINE_PLUGINDIR)/post - noinst_LTLIBRARIES = libdeinterlaceplugins.la libdeinterlaceplugins_la_SOURCES = \ diff --git a/src/post/deinterlace/pulldown.c b/src/post/deinterlace/pulldown.c index 41b31d596..cb263ccfb 100644 --- a/src/post/deinterlace/pulldown.c +++ b/src/post/deinterlace/pulldown.c @@ -85,19 +85,19 @@ * */ -/* Offset 1 2 3 4 5 */ -/* Field Pattern [T B T][B T][B T B] [T B] */ -/* Action Copy Save Merge Copy Copy */ -/* Bot Top */ -int tff_top_pattern[] = { 0, 1, 0, 0, 0 }; -int tff_bot_pattern[] = { 0, 0, 0, 1, 0 }; - -/* Offset 1 2 3 4 5 */ -/* Field Pattern [B T B][T B][T B T] [B T] */ -/* Action Copy Save Merge Copy Copy */ -/* Top Bot */ -int bff_top_pattern[] = { 0, 0, 0, 1, 0 }; -int bff_bot_pattern[] = { 0, 1, 0, 0, 0 }; +/* Offset 1 2 3 4 5 */ +/* Field Pattern [T B T][B T][B T B] [T B] */ +/* Action Copy Save Merge Copy Copy */ +/* Bot Top */ +static const int tff_top_pattern[] = { 0, 1, 0, 0, 0 }; +static const int tff_bot_pattern[] = { 0, 0, 0, 1, 0 }; + +/* Offset 1 2 3 4 5 */ +/* Field Pattern [B T B][T B][T B T] [B T] */ +/* Action Copy Save Merge Copy Copy */ +/* Top Bot */ +static const int bff_top_pattern[] = { 0, 0, 0, 1, 0 }; +static const int bff_bot_pattern[] = { 0, 1, 0, 0, 0 }; /* Timestamp mangling */ /* From the DVD : 0 + 3003+ 6006 + 9009+ 12012 = 15015 */ diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am index 4aeda8f04..e6bae3374 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -1,7 +1,5 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR)/post - EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \ gfontrle.c mathtools.c @@ -10,7 +8,7 @@ EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_releas #CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-Os/-O2/g'` CFLAGS = `echo @CFLAGS@ | sed -e 's/-Os/-O2/g'` -lib_LTLIBRARIES = xineplug_post_goom.la +xinepost_LTLIBRARIES = xineplug_post_goom.la ## doesn't work #if PPC_ARCH diff --git a/src/post/goom/gfontlib.c b/src/post/goom/gfontlib.c index 2bc366305..2bc366305 100755..100644 --- a/src/post/goom/gfontlib.c +++ b/src/post/goom/gfontlib.c diff --git a/src/post/goom/gfontlib.h b/src/post/goom/gfontlib.h index 0520b7da9..0520b7da9 100755..100644 --- a/src/post/goom/gfontlib.h +++ b/src/post/goom/gfontlib.h diff --git a/src/post/goom/gfontrle.c b/src/post/goom/gfontrle.c index a22545a1e..a22545a1e 100755..100644 --- a/src/post/goom/gfontrle.c +++ b/src/post/goom/gfontrle.c diff --git a/src/post/goom/mathtools.h b/src/post/goom/mathtools.h index 165fc66b0..165fc66b0 100755..100644 --- a/src/post/goom/mathtools.h +++ b/src/post/goom/mathtools.h diff --git a/src/post/goom/mmx.h b/src/post/goom/mmx.h index b650d8b12..b650d8b12 100755..100644 --- a/src/post/goom/mmx.h +++ b/src/post/goom/mmx.h diff --git a/src/post/goom/surf3d.c b/src/post/goom/surf3d.c index ba8c69094..ba8c69094 100755..100644 --- a/src/post/goom/surf3d.c +++ b/src/post/goom/surf3d.c diff --git a/src/post/goom/surf3d.h b/src/post/goom/surf3d.h index 482b6a090..482b6a090 100755..100644 --- a/src/post/goom/surf3d.h +++ b/src/post/goom/surf3d.h diff --git a/src/post/goom/tentacle3d.c b/src/post/goom/tentacle3d.c index e1e2157e7..e1e2157e7 100755..100644 --- a/src/post/goom/tentacle3d.c +++ b/src/post/goom/tentacle3d.c diff --git a/src/post/goom/tentacle3d.h b/src/post/goom/tentacle3d.h index ad0858fad..ad0858fad 100755..100644 --- a/src/post/goom/tentacle3d.h +++ b/src/post/goom/tentacle3d.h diff --git a/src/post/goom/v3d.h b/src/post/goom/v3d.h index 7690847f2..7690847f2 100755..100644 --- a/src/post/goom/v3d.h +++ b/src/post/goom/v3d.h diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am index f5497b1af..c18b4e19c 100644 --- a/src/post/mosaico/Makefile.am +++ b/src/post/mosaico/Makefile.am @@ -1,8 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR)/post - -lib_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la +xinepost_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la xineplug_post_mosaico_la_SOURCES = mosaico.c xineplug_post_mosaico_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index 2e60671b5..5fc425cdf 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -15,9 +15,7 @@ endif # work, but at least it compiles. AM_CFLAGS = $(ff_cflags) -fomit-frame-pointer -libdir = $(XINE_PLUGINDIR)/post - -lib_LTLIBRARIES = xineplug_post_planar.la +xinepost_LTLIBRARIES = xineplug_post_planar.la xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \ denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c index 154d5f8cc..a5bf03039 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -62,7 +62,7 @@ typedef struct noise_param_t { static int nonTempRandShift[MAX_RES]= {-1}; -static int patt[4] = { +static const int patt[4] = { -1,0,1,0 }; diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index c66e40459..c66e40459 100755..100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am index dc7679103..f42598d9c 100644 --- a/src/post/visualizations/Makefile.am +++ b/src/post/visualizations/Makefile.am @@ -2,9 +2,7 @@ include $(top_srcdir)/misc/Makefile.common EXTRA_DIST = fooviz.c -libdir = $(XINE_PLUGINDIR)/post - -lib_LTLIBRARIES = xineplug_post_visualizations.la +xinepost_LTLIBRARIES = xineplug_post_visualizations.la xineplug_post_visualizations_la_SOURCES = \ visualizations.c fft.c fftscope.c oscope.c fftgraph.c diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 34971377c..148eda84c 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -5,7 +5,7 @@ AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = libdha vidix macosx -EXTRA_DIST = video_out_directfb.c video_out_directx.c video_out_macosx.m +EXTRA_DIST = video_out_directfb.c video_out_directfb_fb.c video_out_directfb_x.c video_out_directx.c video_out_macosx.m VIDIX_CFLAGS = -I$(top_builddir)/src/video_out/vidix \ -I$(top_srcdir)/src/video_out/vidix @@ -64,6 +64,9 @@ endif if HAVE_DIRECTFB directfb_module = xineplug_vo_out_directfb.la +if HAVE_X11 +directfb_module += xineplug_vo_out_xdirectfb.la +endif endif if HAVE_SDL @@ -162,10 +165,14 @@ xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) xineplug_vo_out_fb_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) -xineplug_vo_out_directfb_la_SOURCES = video_out_directfb.c $(X11OSD) -xineplug_vo_out_directfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS) $(PTHREAD_LIBS) +xineplug_vo_out_directfb_la_SOURCES = video_out_directfb_fb.c +xineplug_vo_out_directfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(PTHREAD_LIBS) xineplug_vo_out_directfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xdirectfb_la_SOURCES = video_out_directfb_x.c $(X11OSD) +xineplug_vo_out_xdirectfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS) $(PTHREAD_LIBS) +xineplug_vo_out_xdirectfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing + xineplug_vo_out_sdl_la_SOURCES = video_out_sdl.c xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) xineplug_vo_out_sdl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SDL_CFLAGS) diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index a51940952..efbb30f2d 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -31,7 +31,7 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 # include <X11/Xlib.h> #endif @@ -44,7 +44,7 @@ #include "xineutils.h" #include "vo_scale.h" -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 # include "x11osd.h" #endif @@ -118,7 +118,7 @@ typedef struct directfb_driver_s { int flicker_filtering; int field_parity; -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 /* X11 related stuff */ Display *display; int screen; @@ -317,7 +317,7 @@ static void directfb_update_frame_format (vo_driver_t *this_gen, frame->ratio = ratio; } -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 static uint32_t directfb_colorkey_to_pixel (directfb_driver_t *this) { switch (this->depth) { case 8: @@ -343,7 +343,7 @@ static uint32_t directfb_colorkey_to_pixel (directfb_driver_t *this) { static void directfb_clean_output_area (directfb_driver_t *this) { if (this->visual_type == XINE_VISUAL_TYPE_X11 || this->visual_type == XINE_VISUAL_TYPE_X11_2) { -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->config.options & DLOP_DST_COLORKEY) { int i; @@ -410,7 +410,7 @@ static void directfb_overlay_begin (vo_driver_t *this_gen, this->ovl_changed += changed; if (this->ovl_changed) { -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->xoverlay) { LOCK_DISPLAY(); x11osd_clear (this->xoverlay); @@ -554,7 +554,7 @@ static void directfb_overlay_blend (vo_driver_t *this_gen, if (overlay->unscaled) { if (!this->ovl_changed) return; -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->xoverlay) { LOCK_DISPLAY(); x11osd_blend (this->xoverlay, overlay); @@ -586,7 +586,7 @@ static void directfb_overlay_end (vo_driver_t *this_gen, vo_frame_t *frame_gen) directfb_driver_t *this = (directfb_driver_t *) this_gen; if (this->ovl_changed) { -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->xoverlay) { LOCK_DISPLAY(); x11osd_expose (this->xoverlay); @@ -1120,7 +1120,7 @@ static int directfb_gui_data_exchange (vo_driver_t *this_gen, switch (data_type) { case XINE_GUI_SEND_DRAWABLE_CHANGED: lprintf ("drawable changed.\n"); -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->visual_type == XINE_VISUAL_TYPE_X11 || this->visual_type == XINE_VISUAL_TYPE_X11_2) { this->drawable = (Drawable) data; @@ -1140,7 +1140,7 @@ static int directfb_gui_data_exchange (vo_driver_t *this_gen, case XINE_GUI_SEND_EXPOSE_EVENT: lprintf ("expose event.\n"); -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->visual_type == XINE_VISUAL_TYPE_X11 || this->visual_type == XINE_VISUAL_TYPE_X11_2) { if (this->xoverlay) { @@ -1182,7 +1182,7 @@ static void directfb_dispose (vo_driver_t *this_gen) { if (this->cur_frame) this->cur_frame->vo_frame.dispose (&this->cur_frame->vo_frame); -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->visual_type == XINE_VISUAL_TYPE_X11 || this->visual_type == XINE_VISUAL_TYPE_X11_2) { LOCK_DISPLAY(); @@ -1280,7 +1280,7 @@ static void update_config_cb (void *data, xine_cfg_entry_t *entry) { this->layer->SetDstColorKey (this->layer, (this->colorkey & 0xff0000) >> 16, (this->colorkey & 0x00ff00) >> 8, (this->colorkey & 0x0000ff) >> 0); -#ifdef HAVE_X11 +#ifdef DIRECTFB_X11 if (this->xoverlay) { x11osd_colorkey (this->xoverlay, directfb_colorkey_to_pixel(this), &this->sc); @@ -1893,6 +1893,7 @@ static void dispose_class_fb (video_driver_class_t *this_gen) { free (this); } +#ifndef DIRECTFB_X11 static void *init_class_fb (xine_t *xine, void *visual_gen) { directfb_class_t *this; const char *error; @@ -1925,7 +1926,7 @@ static const vo_info_t vo_info_directfb_fb = { /*** XDirectFB plugin functions ****/ -#ifdef HAVE_X11 +#else static vo_driver_t *open_plugin_x11 (video_driver_class_t *class_gen, const void *visual_gen) { directfb_class_t *class = (directfb_class_t *) class_gen; directfb_driver_t *this; @@ -2163,9 +2164,10 @@ static const vo_info_t vo_info_directfb_x11_2 = { const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ +#ifndef DIRECTFB_X11 { PLUGIN_VIDEO_OUT, VIDEO_OUT_DRIVER_IFACE_VERSION, "DirectFB", XINE_VERSION_CODE, &vo_info_directfb_fb, init_class_fb }, -#ifdef HAVE_X11 +#else { PLUGIN_VIDEO_OUT, VIDEO_OUT_DRIVER_IFACE_VERSION, "XDirectFB", XINE_VERSION_CODE, &vo_info_directfb_x11, init_class_x11 }, { PLUGIN_VIDEO_OUT, VIDEO_OUT_DRIVER_IFACE_VERSION, "XDirectFB", diff --git a/src/video_out/video_out_directfb_fb.c b/src/video_out/video_out_directfb_fb.c new file mode 100644 index 000000000..182a56941 --- /dev/null +++ b/src/video_out/video_out_directfb_fb.c @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2007 the xine project + * + * This file is part of xine, a free video player. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * + * DirectFB output plugin (console version wrapper) + */ + +#undef DIRECTFB_X11 +#include "video_out_directfb.c" diff --git a/src/video_out/video_out_directfb_x.c b/src/video_out/video_out_directfb_x.c new file mode 100644 index 000000000..b3a1f53b7 --- /dev/null +++ b/src/video_out/video_out_directfb_x.c @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2007 the xine project + * + * This file is part of xine, a free video player. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * + * DirectFB output plugin (X version wrapper) + */ + +#define DIRECTFB_X11 +#include "video_out_directfb.c" diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 7c3e5a78c..7c3e5a78c 100755..100644 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index b85bd3ccf..a027f2e06 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -966,7 +966,7 @@ static int render_setup_fp_yuv (opengl_driver_t *this) { * List of render backends */ /* name, display, image, setup, needsrgb, defaction, fallback */ -opengl_render_t opengl_rb[] = { +static const opengl_render_t opengl_rb[] = { { "2D_Tex_Fragprog", render_tex2d, render_image_fp_yuv, render_setup_fp_yuv, 0, RENDER_NONE, 1 }, { "2D_Tex", render_tex2d, render_image_tex, @@ -1007,7 +1007,7 @@ static void *render_run (opengl_driver_t *this) { opengl_frame_t *frame; struct timeval curtime; struct timespec timeout; - opengl_render_t *render; + const opengl_render_t *render; lprintf ("* render thread created\n"); while (1) { diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 0abe2f0fc..fd19f391b 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -54,7 +54,7 @@ static void dispose_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo, * is more efficient than VLD. */ -static unsigned accel_priority[] = { +static const unsigned int accel_priority[] = { #ifdef HAVE_VLDXVMC XINE_XVMC_ACCEL_VLD, #endif diff --git a/src/video_out/vidix/drivers/Makefile.am b/src/video_out/vidix/drivers/Makefile.am index 3c0369af7..f438dde36 100644 --- a/src/video_out/vidix/drivers/Makefile.am +++ b/src/video_out/vidix/drivers/Makefile.am @@ -2,8 +2,6 @@ include $(top_srcdir)/misc/Makefile.common EXTRA_DIST = genfb_vid.c -libdir = $(XINE_PLUGINDIR)/vidix - if HAVE_VIDIX vidix_drivers = \ mach64_vid.la \ @@ -20,7 +18,7 @@ vidix_drivers = \ savage_vid.la endif -lib_LTLIBRARIES = $(vidix_drivers) +vidix_LTLIBRARIES = $(vidix_drivers) radeon_vid_la_SOURCES = radeon_vid.c radeon_vid_la_LDFLAGS = -avoid-version -module -lm diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index cd87c2947..d39c99aba 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -174,7 +174,7 @@ typedef struct { }sXYData; -static sIIRCoefficients iir_cf[] = { +static const sIIRCoefficients iir_cf[] = { /* 31 Hz*/ { EQ_REAL(9.9691562441e-01), EQ_REAL(1.5421877947e-03), EQ_REAL(1.9968961468e+00) }, /* 62 Hz*/ @@ -281,11 +281,12 @@ typedef struct { struct audio_fifo_s { audio_buffer_t *first; audio_buffer_t *last; - int num_buffers; pthread_mutex_t mutex; pthread_cond_t not_empty; pthread_cond_t empty; + + int num_buffers; }; diff --git a/src/xine-engine/broadcaster.c b/src/xine-engine/broadcaster.c index 3beacb226..30cdadc7c 100644 --- a/src/xine-engine/broadcaster.c +++ b/src/xine-engine/broadcaster.c @@ -73,9 +73,10 @@ struct broadcaster_s { int msock; /* master network socket */ xine_list_t *connections; /* active connections */ - int running; pthread_t manager_thread; pthread_mutex_t lock; + + int running; }; @@ -136,10 +137,7 @@ static int sock_data_write(xine_t *xine, int socket, char *buf, int len) { return wlen; } -static int -#ifdef __GNUC__ -__attribute__((format (printf, 3, 4))) -#endif +static int XINE_FORMAT_PRINTF(3, 4) sock_string_write(xine_t *xine, int socket, char *msg, ...) { char buf[_BUFSIZ]; va_list args; @@ -181,10 +179,7 @@ static void broadcaster_data_write(broadcaster_t *this, char *buf, int len) { } } -static void -#ifdef __GNUC__ -__attribute__((format (printf, 2, 3))) -#endif +static void XINE_FORMAT_PRINTF(2, 3) broadcaster_string_write(broadcaster_t *this, char *msg, ...) { char buf[_BUFSIZ]; va_list args; diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 161ec70a9..619a34c4c 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -49,17 +49,17 @@ typedef struct video_db_s { uint32_t fourcc[20]; uint32_t buf_type; - char *name; + const char *name; } video_db_t; typedef struct audio_db_s { uint32_t formattag[10]; uint32_t buf_type; - char *name; + const char *name; } audio_db_t; -static video_db_t video_db[] = { +static const video_db_t video_db[] = { { { meFOURCC('m', 'p', 'e', 'g'), @@ -767,7 +767,7 @@ static video_db_t video_db[] = { }; -static audio_db_t audio_db[] = { +static const audio_db_t audio_db[] = { { { 0x2000, diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 28b44fd51..ec5f5c856 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -51,7 +51,7 @@ typedef struct { const char *new; } config_entry_translation_t; -static config_entry_translation_t config_entry_translation[] = { +static const config_entry_translation_t config_entry_translation[] = { { "audio.a52_pass_through", "" }, { "audio.alsa_a52_device", "audio.device.alsa_passthrough_device" }, { "audio.alsa_default_device", "audio.device.alsa_default_device" }, diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index d8715fb85..56850ba2d 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -83,12 +83,13 @@ typedef struct { xine_stream_t *stream; FILE *file; /* destination file */ - int regular; /* permit reading from the file */ char *preview; /* preview data */ off_t preview_size; /* size of read preview data */ off_t curpos; /* current position */ off_t savepos; /* amount of already saved data */ + + int regular; /* permit reading from the file */ } rip_input_plugin_t; diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index d35eba736..c72241487 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -96,7 +96,7 @@ static void remove_segv_handler(void){ #endif /* 0 */ -static int plugin_iface_versions[] = { +static const int plugin_iface_versions[] = { INPUT_PLUGIN_IFACE_VERSION, DEMUXER_PLUGIN_IFACE_VERSION, AUDIO_DECODER_IFACE_VERSION, diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index b33d81f6e..b68b3b5c2 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -109,21 +109,21 @@ #endif typedef struct osd_fontchar_s { + uint8_t *bmp; uint16_t code; uint16_t width; uint16_t height; - uint8_t *bmp; } osd_fontchar_t; struct osd_font_s { char name[40]; char *filename; + osd_fontchar_t *fontchar; + osd_font_t *next; uint16_t version; uint16_t size; uint16_t num_fontchars; - osd_fontchar_t *fontchar; - osd_font_t *next; - int loaded; + uint16_t loaded; }; #ifdef HAVE_FT2 diff --git a/src/xine-engine/video_overlay.c b/src/xine-engine/video_overlay.c index 3189214a8..7bd9292c8 100644 --- a/src/xine-engine/video_overlay.c +++ b/src/xine-engine/video_overlay.c @@ -51,6 +51,8 @@ typedef struct video_overlay_showing_s { typedef struct video_overlay_s { video_overlay_manager_t video_overlay; + xine_t *xine; + pthread_mutex_t events_mutex; video_overlay_events_t events[MAX_EVENTS]; pthread_mutex_t objects_mutex; @@ -58,7 +60,6 @@ typedef struct video_overlay_s { pthread_mutex_t showing_mutex; video_overlay_showing_t showing[MAX_SHOWING]; int showing_changed; - xine_t *xine; } video_overlay_t; diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index e58d9ed61..166d7a3ef 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -521,7 +521,7 @@ void xine_set_param (xine_stream_t *stream, int param, int value) { break; case XINE_PARAM_EARLY_FINISHED_EVENT: - stream->early_finish_event = value; + stream->early_finish_event = !!value; break; case XINE_PARAM_DELAY_FINISHED_EVENT: @@ -529,7 +529,7 @@ void xine_set_param (xine_stream_t *stream, int param, int value) { break; case XINE_PARAM_GAPLESS_SWITCH: - stream->gapless_switch = value; + stream->gapless_switch = !!value; break; default: diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h index 4d22226ac..b533286c8 100644 --- a/src/xine-utils/attributes.h +++ b/src/xine-utils/attributes.h @@ -69,4 +69,16 @@ # endif #endif +/* Format attributes */ +#ifdef SUPPORT_ATTRIBUTE_FORMAT +# define XINE_FORMAT_PRINTF(fmt,var) __attribute__((format(printf, fmt, var))) +#else +# define XINE_FORMAT_PRINTF(fmt,var) +#endif +#ifdef SUPPORT_ATTRIBUTE_FORMAT_ARG +# define XINE_FORMAT_PRINTF_ARG(fmt) __attribute__((format_arg(fmt))) +#else +# define XINE_FORMAT_PRINTF_ARG(fmt) +#endif + #endif /* ATTRIBUTE_H_ */ diff --git a/src/xine-utils/ring_buffer.c b/src/xine-utils/ring_buffer.c index 0dfd370f1..dc8ddbf80 100644 --- a/src/xine-utils/ring_buffer.c +++ b/src/xine-utils/ring_buffer.c @@ -70,11 +70,12 @@ struct xine_ring_buffer_s { uint8_t *buffer_end; size_t free_size; /* size of the free zone */ - pthread_cond_t free_size_cond; - int free_size_needed; - size_t full_size; /* size of the full zone */ + + pthread_cond_t free_size_cond; pthread_cond_t full_size_cond; + + int free_size_needed; int full_size_needed; xine_pool_t *chunk_pool; @@ -84,9 +85,9 @@ struct xine_ring_buffer_s { uint8_t *extra_buffer; size_t extra_buffer_size; - int EOS; - pthread_mutex_t lock; + + int EOS; }; /* Constructor */ diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index 43e046a45..f6a0498e8 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -72,10 +72,7 @@ #endif /* !__linux__ */ -static void -#ifdef __GNUC__ -__attribute__((format (printf, 3, 4))) -#endif +static void XINE_FORMAT_PRINTF(3, 4) set_hc_result(xine_health_check_t* hc, int state, const char *format, ...) { |