From 66f1aca41a4ff7668e5c21f59c3b2170d3d265e7 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Thu, 5 Apr 2007 13:07:13 +0200 Subject: Fixed current audio sync, delay was always 0. Checked snd_pcm_delay return code, and don't trust negative values. --- src/audio_out/audio_alsa_out.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 3651d21da..f176b7594 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -663,15 +663,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 +671,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 -- cgit v1.2.3 From d4c9af94f21cd575bd57da36d489d37812a5610e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 15:31:01 +0200 Subject: Use xineplug_LTLIBRARIES wherever possible. --- src/audio_out/Makefile.am | 4 +--- src/dxr3/Makefile.am | 4 +--- src/input/Makefile.am | 4 +--- src/input/vcd/Makefile.am | 4 +--- src/libspucc/Makefile.am | 4 +--- src/libspudvb/Makefile.am | 4 +--- src/libw32dll/Makefile.am | 4 +--- 7 files changed, 7 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index d52f700f3..1329b0f62 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) \ 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/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/libspucc/Makefile.am b/src/libspucc/Makefile.am index ec12c1bc7..aefe4d7c1 100644 --- a/src/libspucc/Makefile.am +++ b/src/libspucc/Makefile.am @@ -1,8 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_spucc.la +xineplug_LTLIBRARIES = xineplug_decode_spucc.la xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_cc_decoder.c xineplug_decode_spucc_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing diff --git a/src/libspudvb/Makefile.am b/src/libspudvb/Makefile.am index b4ae9befe..e385e5553 100644 --- a/src/libspudvb/Makefile.am +++ b/src/libspudvb/Makefile.am @@ -1,8 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -libdir = $(XINE_PLUGINDIR) - -lib_LTLIBRARIES = xineplug_decode_spudvb.la +xineplug_LTLIBRARIES = xineplug_decode_spudvb.la xineplug_decode_spudvb_la_SOURCES = xine_spudvb_decoder.c xineplug_decode_spudvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) 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 -- cgit v1.2.3 From e7b343f647fa5c44551946b39afdeebe0812c8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 16:17:04 +0200 Subject: Define a xinepostdir directory to point to the post-plugins path. Together with this, define a xinepost_LTLIBRARIES class that is used to install the post-plugins in the correct directory. Also add the rule to remove them. --- src/post/audio/Makefile.am | 4 +--- src/post/deinterlace/Makefile.am | 4 +--- src/post/deinterlace/plugins/Makefile.am | 2 -- src/post/goom/Makefile.am | 4 +--- src/post/mosaico/Makefile.am | 4 +--- src/post/planar/Makefile.am | 4 +--- src/post/visualizations/Makefile.am | 4 +--- 7 files changed, 6 insertions(+), 20 deletions(-) (limited to 'src') 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/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/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/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/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 -- cgit v1.2.3 From 8d13033d6c84109fff3d2788d9bb844462ad6b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 16:18:25 +0200 Subject: Similarly, add a vidix_LTLIBRARIES class to install the vidix drivers in the correct location. --- src/video_out/vidix/drivers/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3 From 0a725e9e1bceb83c24c0e2455d640fd616be74a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 6 Apr 2007 16:28:15 +0200 Subject: Remove a redundant comment. --- src/audio_out/Makefile.am | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index 1329b0f62..20a4e708b 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -68,14 +68,6 @@ xineplug_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) -- cgit v1.2.3 From 433a362b6dcff0d02f8181bf75fbeedff09b775f Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 6 Apr 2007 16:28:01 +0100 Subject: Remove executable status from all files which shouldn't have it. --- src/audio_out/audio_directx_out.c | 0 src/libffmpeg/libavcodec/bitstream.c | 0 src/libffmpeg/libavcodec/h261data.h | 0 src/libffmpeg/libavcodec/h264idct.c | 0 src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c | 0 src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c | 0 src/libffmpeg/libavcodec/ulti.c | 0 src/libffmpeg/libavcodec/ulti_cb.h | 0 src/libmad/bit.c | 0 src/libmad/fixed.h | 0 src/libmad/frame.c | 0 src/libmad/frame.h | 0 src/libmad/layer12.c | 0 src/libmad/layer3.c | 0 src/libmad/synth.c | 0 src/libmad/timer.c | 0 src/libmad/timer.h | 0 src/post/goom/gfontlib.c | 0 src/post/goom/gfontlib.h | 0 src/post/goom/gfontrle.c | 0 src/post/goom/mathtools.h | 0 src/post/goom/mmx.h | 0 src/post/goom/surf3d.c | 0 src/post/goom/surf3d.h | 0 src/post/goom/tentacle3d.c | 0 src/post/goom/tentacle3d.h | 0 src/post/goom/v3d.h | 0 src/post/planar/pp.c | 0 src/video_out/video_out_directx.c | 0 29 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/audio_out/audio_directx_out.c mode change 100755 => 100644 src/libffmpeg/libavcodec/bitstream.c mode change 100755 => 100644 src/libffmpeg/libavcodec/h261data.h mode change 100755 => 100644 src/libffmpeg/libavcodec/h264idct.c mode change 100755 => 100644 src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c mode change 100755 => 100644 src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c mode change 100755 => 100644 src/libffmpeg/libavcodec/ulti.c mode change 100755 => 100644 src/libffmpeg/libavcodec/ulti_cb.h mode change 100755 => 100644 src/libmad/bit.c mode change 100755 => 100644 src/libmad/fixed.h mode change 100755 => 100644 src/libmad/frame.c mode change 100755 => 100644 src/libmad/frame.h mode change 100755 => 100644 src/libmad/layer12.c mode change 100755 => 100644 src/libmad/layer3.c mode change 100755 => 100644 src/libmad/synth.c mode change 100755 => 100644 src/libmad/timer.c mode change 100755 => 100644 src/libmad/timer.h mode change 100755 => 100644 src/post/goom/gfontlib.c mode change 100755 => 100644 src/post/goom/gfontlib.h mode change 100755 => 100644 src/post/goom/gfontrle.c mode change 100755 => 100644 src/post/goom/mathtools.h mode change 100755 => 100644 src/post/goom/mmx.h mode change 100755 => 100644 src/post/goom/surf3d.c mode change 100755 => 100644 src/post/goom/surf3d.h mode change 100755 => 100644 src/post/goom/tentacle3d.c mode change 100755 => 100644 src/post/goom/tentacle3d.h mode change 100755 => 100644 src/post/goom/v3d.h mode change 100755 => 100644 src/post/planar/pp.c mode change 100755 => 100644 src/video_out/video_out_directx.c (limited to 'src') diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/bitstream.c b/src/libffmpeg/libavcodec/bitstream.c old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/h261data.h b/src/libffmpeg/libavcodec/h261data.h old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/h264idct.c b/src/libffmpeg/libavcodec/h264idct.c old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c b/src/libffmpeg/libavcodec/ppc/dsputil_h264_altivec.c old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c b/src/libffmpeg/libavcodec/ppc/dsputil_h264_template_altivec.c old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/ulti.c b/src/libffmpeg/libavcodec/ulti.c old mode 100755 new mode 100644 diff --git a/src/libffmpeg/libavcodec/ulti_cb.h b/src/libffmpeg/libavcodec/ulti_cb.h old mode 100755 new mode 100644 diff --git a/src/libmad/bit.c b/src/libmad/bit.c old mode 100755 new mode 100644 diff --git a/src/libmad/fixed.h b/src/libmad/fixed.h old mode 100755 new mode 100644 diff --git a/src/libmad/frame.c b/src/libmad/frame.c old mode 100755 new mode 100644 diff --git a/src/libmad/frame.h b/src/libmad/frame.h old mode 100755 new mode 100644 diff --git a/src/libmad/layer12.c b/src/libmad/layer12.c old mode 100755 new mode 100644 diff --git a/src/libmad/layer3.c b/src/libmad/layer3.c old mode 100755 new mode 100644 diff --git a/src/libmad/synth.c b/src/libmad/synth.c old mode 100755 new mode 100644 diff --git a/src/libmad/timer.c b/src/libmad/timer.c old mode 100755 new mode 100644 diff --git a/src/libmad/timer.h b/src/libmad/timer.h old mode 100755 new mode 100644 diff --git a/src/post/goom/gfontlib.c b/src/post/goom/gfontlib.c old mode 100755 new mode 100644 diff --git a/src/post/goom/gfontlib.h b/src/post/goom/gfontlib.h old mode 100755 new mode 100644 diff --git a/src/post/goom/gfontrle.c b/src/post/goom/gfontrle.c old mode 100755 new mode 100644 diff --git a/src/post/goom/mathtools.h b/src/post/goom/mathtools.h old mode 100755 new mode 100644 diff --git a/src/post/goom/mmx.h b/src/post/goom/mmx.h old mode 100755 new mode 100644 diff --git a/src/post/goom/surf3d.c b/src/post/goom/surf3d.c old mode 100755 new mode 100644 diff --git a/src/post/goom/surf3d.h b/src/post/goom/surf3d.h old mode 100755 new mode 100644 diff --git a/src/post/goom/tentacle3d.c b/src/post/goom/tentacle3d.c old mode 100755 new mode 100644 diff --git a/src/post/goom/tentacle3d.h b/src/post/goom/tentacle3d.h old mode 100755 new mode 100644 diff --git a/src/post/goom/v3d.h b/src/post/goom/v3d.h old mode 100755 new mode 100644 diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c old mode 100755 new mode 100644 diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c old mode 100755 new mode 100644 -- cgit v1.2.3 From 162053c1e9e40f223e498dd0630487db86f68543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 7 Apr 2007 19:13:16 +0200 Subject: Revert changeset 8383: variable-sized structures and arrays don't seem to get along that well. --- src/xine-engine/buffer_types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 4a71a99c2..2d455b67c 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -49,13 +49,13 @@ typedef struct video_db_s { uint32_t fourcc[20]; uint32_t buf_type; - const char name[]; + const char *name; } video_db_t; typedef struct audio_db_s { uint32_t formattag[10]; uint32_t buf_type; - const char name[]; + const char *name; } audio_db_t; -- cgit v1.2.3 From 13ef1266e96335725e4b00cbe84753cfb1d9c52c Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 7 Apr 2007 18:34:07 +0100 Subject: Use CC_ATTRIBUTE_FORMAT; replace __attribute((format(printf, ...))) accordingly. --- src/audio_out/audio_alsa_out.c | 5 +---- src/audio_out/audio_directx2_out.c | 5 +---- src/demuxers/demux_qt.c | 10 +++++----- src/input/input_cdda.c | 5 +---- src/input/vcd/xine-extra.h | 12 ++---------- src/libw32dll/wine/debugtools.h | 6 +----- src/libw32dll/wine/ext.h | 3 ++- src/libw32dll/wine/win32.c | 13 +++++++------ src/libxineadec/nosefart/log.h | 7 ++----- src/xine-engine/broadcaster.c | 10 ++-------- src/xine-utils/attributes.h | 12 ++++++++++++ src/xine-utils/xine_check.c | 5 +---- 12 files changed, 37 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index f176b7594..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 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/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 4144f3049..6693637c7 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) { 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/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/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/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 +#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/xine-engine/broadcaster.c b/src/xine-engine/broadcaster.c index 8ab661d3e..30cdadc7c 100644 --- a/src/xine-engine/broadcaster.c +++ b/src/xine-engine/broadcaster.c @@ -137,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; @@ -182,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-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/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, ...) { -- cgit v1.2.3 From b56784ba37622f28147b6a10c7ba77f9c9fbf2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 7 Apr 2007 20:12:19 +0200 Subject: video_overlay_s uses C's inheritance-like definition, so the first field has to be video_overlay. --- src/xine-engine/video_overlay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xine-engine/video_overlay.c b/src/xine-engine/video_overlay.c index 04a3034a3..7bd9292c8 100644 --- a/src/xine-engine/video_overlay.c +++ b/src/xine-engine/video_overlay.c @@ -49,10 +49,10 @@ typedef struct video_overlay_showing_s { typedef struct video_overlay_s { - xine_t *xine; - 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; -- cgit v1.2.3