diff options
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/Makefile.am | 119 | ||||
-rw-r--r-- | src/video_out/deinterlace.h | 2 | ||||
-rw-r--r-- | src/video_out/libdha/Makefile.am | 22 | ||||
-rw-r--r-- | src/video_out/libdha/kernelhelper/Makefile.am | 43 | ||||
-rw-r--r-- | src/video_out/macosx/Makefile.am | 25 | ||||
-rw-r--r-- | src/video_out/video_out_directfb.c | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | src/video_out/video_out_directx.c | 0 | ||||
-rw-r--r-- | src/video_out/video_out_fb.c | 81 | ||||
-rw-r--r-- | src/video_out/video_out_xcbshm.c | 29 | ||||
-rw-r--r-- | src/video_out/video_out_xcbxv.c | 62 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 40 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 71 | ||||
-rw-r--r-- | src/video_out/video_out_xxmc.c | 141 | ||||
-rw-r--r-- | src/video_out/vidix/Makefile.am | 17 | ||||
-rw-r--r-- | src/video_out/vidix/drivers/Makefile.am | 62 |
15 files changed, 348 insertions, 370 deletions
diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 148eda84c..a4f219b9c 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -1,14 +1,30 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE -AM_LDFLAGS = $(xineplug_ldflags) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) +AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -SUBDIRS = libdha vidix macosx +SUBDIRS = + +if BUILD_DHA_KMOD +SUBDIRS += libdha +endif + +# vidix depends on portions of dha +if ENABLE_VIDIX +if !BUILD_DHA_KMOD +SUBDIRS += libdha +endif +SUBDIRS += vidix +endif + +if ENABLE_MACOSX_VIDEO +SUBDIRS += macosx +endif 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 +noinst_HEADERS = deinterlace.h video_out_syncfb.h yuv2rgb.h x11osd.h xcbosd.h if HAVE_X11 X11OSD = x11osd.c @@ -16,72 +32,72 @@ xshm_module = xineplug_vo_out_xshm.la if HAVE_XV xv_module = xineplug_vo_out_xv.la endif -if HAVE_XVMC +if ENABLE_XVMC xvmc_module = xineplug_vo_out_xvmc.la endif -if HAVE_XXMC +if ENABLE_XXMC xxmc_module = xineplug_vo_out_xxmc.la endif -if HAVE_OPENGL +if ENABLE_OPENGL opengl_module = xineplug_vo_out_opengl.la endif -if HAVE_SYNCFB +if ENABLE_SYNCFB syncfb_module = xineplug_vo_out_syncfb.la endif -if HAVE_SUNFB -if HAVE_SUNDGA +if ENABLE_SUNFB +if ENABLE_SUNDGA pgx64_module = xineplug_vo_out_pgx64.la pgx32_module = xineplug_vo_out_pgx32.la endif endif endif -if HAVE_XCB +if ENABLE_XCB XCBOSD = xcbosd.c -if HAVE_XCBSHM +if ENABLE_XCBSHM xcbshm_module = xineplug_vo_out_xcbshm.la endif -if HAVE_XCBXV +if ENABLE_XCBXV xcbxv_module = xineplug_vo_out_xcbxv.la endif endif -if HAVE_VIDIX +if ENABLE_VIDIX vidix_module = xineplug_vo_out_vidix.la endif -if HAVE_AA +if ENABLE_AA aa_module = xineplug_vo_out_aa.la endif -if HAVE_CACA +if ENABLE_CACA caca_module = xineplug_vo_out_caca.la endif -if HAVE_FB +if ENABLE_FB fb_module = xineplug_vo_out_fb.la endif -if HAVE_DIRECTFB +if ENABLE_DIRECTFB directfb_module = xineplug_vo_out_directfb.la if HAVE_X11 directfb_module += xineplug_vo_out_xdirectfb.la endif endif -if HAVE_SDL +if ENABLE_SDL sdl_module = xineplug_vo_out_sdl.la endif -if HAVE_STK +if ENABLE_STK stk_module = xineplug_vo_out_stk.la endif -if HAVE_DIRECTX +if ENABLE_DIRECTX directx_module = xineplug_vo_out_directx.la endif -if HAVE_MACOSX_VIDEO +if ENABLE_MACOSX_VIDEO macosx_module = xineplug_vo_out_macosx.la endif @@ -104,101 +120,94 @@ xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \ xineplug_vo_out_xcbshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c video_out_xcbshm.c $(XCBOSD) xineplug_vo_out_xcbshm_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(XCB_LIBS) $(XCBSHM_LIBS) -xineplug_vo_out_xcbshm_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) +xineplug_vo_out_xcbshm_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) xineplug_vo_out_xcbxv_la_SOURCES = deinterlace.c video_out_xcbxv.c $(XCBOSD) xineplug_vo_out_xcbxv_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(XCBXV_LIBS) $(XCB_LIBS) -xineplug_vo_out_xcbxv_la_CFLAGS = $(VISIBILITY_FLAG) $(XCB_CFLAGS) $(XCBXV_CFLAGS) +xineplug_vo_out_xcbxv_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS) $(XCBXV_CFLAGS) xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_xshm.c $(X11OSD) xineplug_vo_out_xshm_la_LIBADD = $(MLIB_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xshm_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xshm_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xv_la_SOURCES = $(X11OSD) deinterlace.c video_out_xv.c xineplug_vo_out_xv_la_LIBADD = $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xv_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xv_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xvmc_la_SOURCES = deinterlace.c video_out_xvmc.c xineplug_vo_out_xvmc_la_LIBADD = $(XVMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xvmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) +xineplug_vo_out_xvmc_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) xineplug_vo_out_xxmc_la_SOURCES = $(X11OSD) deinterlace.c video_out_xxmc.c\ xvmc_mocomp.c xvmc_vld.c xxmc.h xineplug_vo_out_xxmc_la_LIBADD = $(XXMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xxmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xxmc_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_opengl.c myglext.h $(X11OSD) xineplug_vo_out_opengl_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) -xineplug_vo_out_opengl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_opengl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_syncfb_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c xineplug_vo_out_pgx64_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_pgx64_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) +xineplug_vo_out_pgx64_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) +xineplug_vo_out_pgx64_la_CPPFLAGS = $(AM_CPPFLAGS) $(SUNDGA_CPPFLAGS) xineplug_vo_out_pgx32_la_SOURCES = video_out_pgx32.c xineplug_vo_out_pgx32_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_pgx32_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) +xineplug_vo_out_pgx32_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) +xineplug_vo_out_pgx32_la_CPPFLAGS = $(AM_CPPFLAGS) $(SUNDGA_CPPFLAGS) xineplug_vo_out_vidix_la_SOURCES = video_out_vidix.c $(X11OSD) xineplug_vo_out_vidix_la_LIBADD = $(XINE_LIB) $(X_LIBS) \ $(top_builddir)/src/video_out/vidix/libvidix.la $(PTHREAD_LIBS) -xineplug_vo_out_vidix_la_CFLAGS = $(VISIBILITY_FLAG) $(VIDIX_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_vidix_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_vidix_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/video_out/vidix \ + -I$(top_srcdir)/src/video_out/vidix + xineplug_vo_out_aa_la_SOURCES = video_out_aa.c xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_aa_la_CFLAGS = $(VISIBILITY_FLAG) $(AALIB_CFLAGS) +xineplug_vo_out_aa_la_CFLAGS = $(AM_CFLAGS) $(AALIB_CFLAGS) xineplug_vo_out_caca_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_caca.c xineplug_vo_out_caca_la_LIBADD = $(CACA_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_caca_la_CFLAGS = $(VISIBILITY_FLAG) $(CACA_CFLAGS) +xineplug_vo_out_caca_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS) xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_fb.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_fb_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) 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_directfb_la_CFLAGS = $(AM_CFLAGS) $(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_xdirectfb_la_CFLAGS = $(AM_CFLAGS) $(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) +xineplug_vo_out_sdl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(SDL_CFLAGS) xineplug_vo_out_stk_la_SOURCES = video_out_stk.c xineplug_vo_out_stk_la_LIBADD = $(XINE_LIB) $(LIBSTK_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_stk_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBSTK_CFLAGS) +xineplug_vo_out_stk_la_CFLAGS = $(AM_CFLAGS) $(LIBSTK_CFLAGS) xineplug_vo_out_directx_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c -xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS) xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_directx_la_CFLAGS = $(VISIBILITY_FLAG) +xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS) xineplug_vo_out_none_la_SOURCES = video_out_none.c xineplug_vo_out_none_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_none_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_macosx_la_SOURCES = video_out_macosx.m -xineplug_vo_out_macosx_la_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -xineplug_vo_out_macosx_la_OBJCFLAGS = $(VISIBILITY_FLAG) -xineplug_vo_out_macosx_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ - $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -# The "-Wl,-framework -Wl,Cocoa" is needed for libtool versions before -# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220) -xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) \ - -Wl,-framework -Wl,Cocoa -framework Cocoa -framework OpenGL - -noinst_HEADERS = deinterlace.h video_out_syncfb.h \ - yuv2rgb.h x11osd.h xcbosd.h +xineplug_vo_out_macosx_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) +xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL diff --git a/src/video_out/deinterlace.h b/src/video_out/deinterlace.h index a9904b42a..6f398fcbd 100644 --- a/src/video_out/deinterlace.h +++ b/src/video_out/deinterlace.h @@ -41,7 +41,7 @@ void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[], #define DEINTERLACE_ONEFIELDXV 5 #define DEINTERLACE_LINEARBLEND 6 -static const char *deinterlace_methods[] = { +static const char *const deinterlace_methods[] = { "none", "bob", "weave", diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am index 8d94347d1..05aebb704 100644 --- a/src/video_out/libdha/Makefile.am +++ b/src/video_out/libdha/Makefile.am @@ -1,19 +1,23 @@ include $(top_srcdir)/misc/Makefile.common -EXTRA_DIST = README pci_db2c.awk +SUBDIRS = bin oth sysdep -SUBDIRS = bin kernelhelper oth sysdep +if BUILD_DHA_KMOD +SUBDIRS += kernelhelper +endif -AM_CFLAGS = @STATIC@ +AM_CFLAGS = $(DEFAULT_OCFLAGS) -if HAVE_VIDIX -dha_lib = libdha.la -endif +EXTRA_DIST = README pci_db2c.awk awk_generated = pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h CLEANFILES = $(awk_generated) -noinst_LTLIBRARIES = $(dha_lib) +noinst_HEADERS = AsmMacros.h libdha.h pci_ids.h pci_names.h pci_vendors.h + +if ENABLE_VIDIX +noinst_LTLIBRARIES = libdha.la +endif libdha_la_SOURCES = libdha.c mtrr.c pci.c mmi.c ports.c irq.c cpu_flush.c nodist_libdha_la_SOURCES = pci_names.c @@ -23,8 +27,6 @@ EXTRA_PROGRAMS = test test_SOURCES = test.c test_LDADD = $(top_builddir)/src/video_out/libdha/libdha.la -noinst_HEADERS = AsmMacros.h libdha.h pci_ids.h pci_names.h pci_vendors.h - ## for OpenBSD LIBS += -li386 ## We have to create some files, on the fly, this is why this rule is needed. @@ -33,7 +35,7 @@ oth/pci.db: $(awk_generated): pci_db2c.awk oth/pci.db LC_ALL=C $(AWK) -f $(top_srcdir)/src/video_out/libdha/pci_db2c.awk \ - $(top_srcdir)/src/video_out/libdha/oth/pci.db + $(top_srcdir)/src/video_out/libdha/oth/pci.db pci_names.lo: $(awk_generated) source='$*.c' object='$@' libtool=yes \ diff --git a/src/video_out/libdha/kernelhelper/Makefile.am b/src/video_out/libdha/kernelhelper/Makefile.am index 82a37eae3..fffaab433 100644 --- a/src/video_out/libdha/kernelhelper/Makefile.am +++ b/src/video_out/libdha/kernelhelper/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/misc/Makefile.common EXTRA_DIST = README dhahelper.c -KCFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -include `echo @LINUX_INCLUDE@ | sed -e 's/\-I//g'`/linux/modversions.h +KCFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -include `echo $(LINUX_INCLUDE) | sed -e 's/\-I//g'`/linux/modversions.h KVERSION = $(shell $(SHELL) -c 'uname -r') moddir = /lib/modules/$(KVERSION)/misc @@ -10,10 +10,8 @@ moddir = /lib/modules/$(KVERSION)/misc KCOMPILE = $(CC) $(CFLAGS) $(KCFLAGS) $(INCLUDES) $(LINUX_INCLUDE) if HAVE_LINUX -if BUILD_DHA_KMOD KERNEL_MODULE = dhahelper.o endif -endif noinst_HEADERS = dhahelper.h @@ -29,25 +27,24 @@ nodes: all: $(KERNEL_MODULE) install-exec-local: $(KERNEL_MODULE) -@BUILD_DHA_KMOD_TRUE@ @$(NORMAL_INSTALL) -@BUILD_DHA_KMOD_TRUE@ $(mkinstalldirs) $(DESTDIR)$(moddir) -@BUILD_DHA_KMOD_TRUE@ @list='$(KERNEL_MODULE)'; \ -@BUILD_DHA_KMOD_TRUE@ for p in $$list; do \ -@BUILD_DHA_KMOD_TRUE@ if test -f $$p; then \ -@BUILD_DHA_KMOD_TRUE@ echo "$(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p"; \ -@BUILD_DHA_KMOD_TRUE@ $(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p; \ -@BUILD_DHA_KMOD_TRUE@ else :; fi; \ -@BUILD_DHA_KMOD_TRUE@ done; \ -@BUILD_DHA_KMOD_TRUE@ $(DEPMOD) -a -@BUILD_DHA_KMOD_TRUE@ if test ! -c /dev/dhahelper; then \ -@BUILD_DHA_KMOD_TRUE@ $(MAKE) nodes; \ -@BUILD_DHA_KMOD_TRUE@ fi - + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(moddir) + @list='$(KERNEL_MODULE)'; \ + for p in $$list; do \ + if test -f $$p; then \ + echo "$(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p"; \ + $(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p; \ + else :; fi; \ + done; \ + $(DEPMOD) -a + if test ! -c /dev/dhahelper; then \ + $(MAKE) nodes; \ + fi uninstall-local: -@BUILD_DHA_KMOD_TRUE@ @$(NORMAL_UNINSTALL) -@BUILD_DHA_KMOD_TRUE@ @list='$(KERNEL_MODULE)'; \ -@BUILD_DHA_KMOD_TRUE@ for p in $$list; do \ -@BUILD_DHA_KMOD_TRUE@ echo "rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ -@BUILD_DHA_KMOD_TRUE@ rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ -@BUILD_DHA_KMOD_TRUE@ done + @$(NORMAL_UNINSTALL) + @list='$(KERNEL_MODULE)'; \ + for p in $$list; do \ + echo "rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done diff --git a/src/video_out/macosx/Makefile.am b/src/video_out/macosx/Makefile.am index a69f30dc5..ae6a5acc8 100644 --- a/src/video_out/macosx/Makefile.am +++ b/src/video_out/macosx/Makefile.am @@ -1,27 +1,12 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -EXTRA_DIST = \ - video_window.h \ - XineOpenGLView.m \ - XineOpenGLView.h \ - XineVideoWindow.m \ - XineVideoWindow.h - -if HAVE_MACOSX_VIDEO +xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h lib_LTLIBRARIES = libxineMacOSXVideo.la libxineMacOSXVideo_la_SOURCES = XineOpenGLView.m XineVideoWindow.m -# The "-Wl,-framework -Wl,..." is needed for libtool versions before -# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220) -libxineMacOSXVideo_la_LDFLAGS = -version-info \ - $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \ - -Wl,-framework -Wl,Cocoa -framework Cocoa \ - -Wl,-framework -Wl,OpenGL -framework OpenGL - -xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h - -endif - +libxineMacOSXVideo_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL \ + -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index efbb30f2d..a374c56de 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -1333,8 +1333,8 @@ static void update_config_cb (void *data, xine_cfg_entry_t *entry) { static void init_config (directfb_driver_t *this) { config_values_t *config = this->xine->config; - static const char *buffermode_enum[] = {"single", "double", "triple", 0}; - static const char *fieldparity_enum[] = {"none", "top", "bottom", 0}; + static const char *const buffermode_enum[] = {"single", "double", "triple", 0}; + static const char *const fieldparity_enum[] = {"none", "top", "bottom", 0}; this->buffermode = config->register_enum (config, "video.device.directfb_buffermode", this->buffermode, (char**)buffermode_enum, diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 7c3e5a78c..7c3e5a78c 100644..100755 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index e88def112..e2672e2a1 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project and Fredrik Noring + * Copyright (C) 2000-2007 the xine project and Fredrik Noring * * This file is part of xine, a free video player. * @@ -18,28 +18,28 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * $Id: video_out_fb.c,v 1.49 2006/12/19 19:10:51 dsalt Exp $ - * - * video_out_fb.c, frame buffer xine driver by Miguel Freitas + */ + +/** + * @file + * @brief Frame buffer xine driver * - * Contributors: + * @author Miguel Freitas * - * Fredrik Noring <noring@nocrew.org>: Zero copy buffers and clean up. + * @author Fredrik Noring <noring@nocrew.org>: + * Zero copy buffers and clean up. * - * based on xine's video_out_xshm.c... - * ...based on mpeg2dec code from - * Aaron Holtzman <aholtzma@ess.engr.uvic.ca> + * @author Aaron Holtzman <aholtzma@ess.engr.uvic.ca>: + * Based on xine's video_out_xshm.c, based on mpeg2dec code from * - * ideas from ppmtofb - Display P?M graphics on framebuffer devices - * by Geert Uytterhoeven and Chris Lawrence + * @author Geert Uytterhoeven and Chris Lawrence: + * Ideas from ppmtofb - Display P?M graphics on framebuffer devices. * - * Note: Use this with fbxine. It may work with the regular xine too, - * provided the visual type is changed (see below). + * @note Use this with fbxine. * - * TODO: VT switching (configurable) + * @todo VT Switching (configurable) */ -/* #define USE_X11_VISUAL */ - #define RECOMMENDED_NUM_BUFFERS 5 #define MAXIMUM_NUM_BUFFERS 25 @@ -356,21 +356,10 @@ static void reset_dest_pointers(fb_frame_t *frame, int flags) static void frame_reallocate(fb_driver_t *this, fb_frame_t *frame, uint32_t width, uint32_t height, int format) { - if(frame->chunk[0]) - { - free(frame->chunk[0]); - frame->chunk[0] = NULL; - } - if(frame->chunk[1]) - { - free(frame->chunk[1]); - frame->chunk[1] = NULL; - } - if(frame->chunk[2]) - { - free(frame->chunk[2]); - frame->chunk[2] = NULL; - } + free(frame->chunk[0]); + free(frame->chunk[1]); + free(frame->chunk[2]); + memset(frame->chunk, 0, sizeof(frame->chunk[0])*3); if(this->use_zero_copy) { @@ -380,10 +369,9 @@ static void frame_reallocate(fb_driver_t *this, fb_frame_t *frame, } else { - if(frame->data) - free(frame->data); - frame->data = xine_xmalloc(frame->sc.output_width * - frame->sc.output_height * + free(frame->data); + frame->data = xine_xcalloc(frame->sc.output_width * + frame->sc.output_height, this->bytes_per_pixel); } @@ -842,7 +830,7 @@ static void register_callbacks(fb_driver_t *this) static int open_fb_device(config_values_t *config, xine_t *xine) { - static char devkey[] = "video.device.fb_device"; /* Why static? */ + static const char devkey[] = "video.device.fb_device"; char *device_name; int fd; @@ -924,7 +912,7 @@ static int mode_visual(fb_driver_t *this, config_values_t *config, } } - xprintf(this->xine, XINE_VERBOSITY_LOG, _("video_out_fb: Your video mode was not recognized, sorry.\n")); + xprintf(this->xine, XINE_VERBOSITY_LOG, _("%s: Your video mode was not recognized, sorry.\n"), LOG_MODULE); return 0; } @@ -981,16 +969,16 @@ static void setup_buffers(fb_driver_t *this, this->cur_frame = this->old_frame = 0; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_fb: %d video RAM buffers are available.\n"), this->total_num_native_buffers); + _("%s: %d video RAM buffers are available.\n"), LOG_MODULE, this->total_num_native_buffers); if(this->total_num_native_buffers < RECOMMENDED_NUM_BUFFERS) { this->use_zero_copy = 0; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("WARNING: video_out_fb: Zero copy buffers are DISABLED because only %d buffers\n" + _("WARNING: %s: Zero copy buffers are DISABLED because only %d buffers\n" " are available which is less than the recommended %d buffers. Lowering\n" " the frame buffer resolution might help.\n"), - this->total_num_native_buffers, RECOMMENDED_NUM_BUFFERS); + LOG_MODULE, this->total_num_native_buffers, RECOMMENDED_NUM_BUFFERS); } else { @@ -998,8 +986,8 @@ static void setup_buffers(fb_driver_t *this, this->fb_var.yoffset = this->fb_var.yres; if(ioctl(this->fd, FBIOPAN_DISPLAY, &this->fb_var) == -1) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("WARNING: video_out_fb: Zero copy buffers are DISABLED because kernel driver\n" - " do not support screen panning (used for frame flips).\n")); + _("WARNING: %s: Zero copy buffers are DISABLED because kernel driver\n" + " do not support screen panning (used for frame flips).\n"), LOG_MODULE); } else { this->fb_var.yoffset = 0; ioctl(this->fd, FBIOPAN_DISPLAY, &this->fb_var); @@ -1067,12 +1055,13 @@ static vo_driver_t *fb_open_plugin(video_driver_class_t *class_gen, if(this->depth > 16) xprintf(this->xine, XINE_VERBOSITY_LOG, - _("WARNING: video_out_fb: current display depth is %d. For better performance\n" - " a depth of 16 bpp is recommended!\n\n"), this->depth); + _("WARNING: %s: current display depth is %d. For better performance\n" + " a depth of 16 bpp is recommended!\n\n"), LOG_MODULE, this->depth); xprintf(class->xine, XINE_VERBOSITY_DEBUG, - "video_out_fb: video mode depth is %d (%d bpp),\n" + "%s: video mode depth is %d (%d bpp),\n" " red: %d/%d, green: %d/%d, blue: %d/%d\n", + LOG_MODULE, this->depth, this->bpp, this->fb_var.red.length, this->fb_var.red.offset, this->fb_var.green.length, this->fb_var.green.offset, @@ -1125,11 +1114,7 @@ static void *fb_init_class(xine_t *xine, void *visual_gen) static const vo_info_t vo_info_fb = { 1, /* priority */ -#ifdef USE_X11_VISUAL - XINE_VISUAL_TYPE_X11 /* visual type */ -#else XINE_VISUAL_TYPE_FB /* visual type */ -#endif }; /* exported plugin catalog entry */ diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c index 5b4eb1fa3..a7c3b3028 100644 --- a/src/video_out/video_out_xcbshm.c +++ b/src/video_out/video_out_xcbshm.c @@ -154,8 +154,9 @@ static void create_ximage(xshm_driver_t *this, xshm_frame_t *frame, int width, i if (shmid < 0) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbshm: %s: allocating image\n" - "video_out_xcbshm: => not using MIT Shared Memory extension.\n"), strerror(errno)); + _("%s: %s: allocating image\n"), LOG_MODULE, strerror(errno)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); goto shm_fail1; } @@ -163,8 +164,9 @@ static void create_ximage(xshm_driver_t *this, xshm_frame_t *frame, int width, i if (frame->image == ((void *) -1)) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbshm: shared memory error (address error) when allocating image \n" - "video_out_xcbshm: => not using MIT Shared Memory extension.\n")); + _("%s: shared memory error (address error) when allocating image \n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); goto shm_fail2; } @@ -174,8 +176,9 @@ static void create_ximage(xshm_driver_t *this, xshm_frame_t *frame, int width, i if (generic_error != NULL) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbshm: x11 error during shared memory XImage creation\n" - "video_out_xcbshm: => not using MIT Shared Memory extension.\n")); + _("%s: x11 error during shared memory XImage creation\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); free(generic_error); goto shm_fail3; } @@ -736,7 +739,7 @@ static int xshm_get_property (vo_driver_t *this_gen, int property) { return this->sc.gui_height; default: xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbshm: tried to get unsupported property %d\n", property); + LOG_MODULE ": tried to get unsupported property %d\n", property); } return 0; @@ -752,7 +755,7 @@ static int xshm_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbshm: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); } else if (property == VO_PROP_BRIGHTNESS) { @@ -786,7 +789,7 @@ static int xshm_set_property (vo_driver_t *this_gen, } else { xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbshm: tried to set unsupported property %d\n", property); + LOG_MODULE ": tried to set unsupported property %d\n", property); } return value; @@ -1110,7 +1113,7 @@ static vo_driver_t *xshm_open_plugin(video_driver_class_t *class_gen, const void } else { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbshm: MIT shared memory extension not present on display.\n")); + _("%s: MIT shared memory extension not present on display.\n"), LOG_MODULE); this->use_shm = 0; } @@ -1148,8 +1151,8 @@ static vo_driver_t *xshm_open_plugin(video_driver_class_t *class_gen, const void swapped = cpu_byte_order != image_byte_order; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbshm: video mode depth is %d (%d bpp), %s, %sswapped,\n" - "\tred: %08x, green: %08x, blue: %08x\n", + LOG_MODULE ": video mode depth is %d (%d bpp), %s, %sswapped,\n" + LOG_MODULE ": red: %08x, green: %08x, blue: %08x\n", this->depth, this->bpp, visual_class_name(visualtype), swapped ? "" : "not ", @@ -1209,7 +1212,7 @@ static vo_driver_t *xshm_open_plugin(video_driver_class_t *class_gen, const void if (!mode) { xprintf (this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbshm: your video mode was not recognized, sorry :-(\n")); + _("%s: your video mode was not recognized, sorry :-(\n"), LOG_MODULE); return NULL; } diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index 432d93416..36d6de7a7 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -267,8 +267,9 @@ static void create_ximage(xv_driver_t *this, xv_frame_t *frame, int width, int h if (frame->xv_data_size == 0) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: XvShmCreateImage returned a zero size\n" - "video_out_xcbxv: => not using MIT Shared Memory extension.\n")); + _("%s: XvShmCreateImage returned a zero size\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); goto shm_fail1; } @@ -276,8 +277,9 @@ static void create_ximage(xv_driver_t *this, xv_frame_t *frame, int width, int h if (shmid < 0 ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: shared memory error in shmget: %s\n" - "video_out_xcbxv: => not using MIT Shared Memory extension.\n"), strerror(errno)); + _("%s: shared memory error in shmget: %s\n"), LOG_MODULE, strerror(errno)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); goto shm_fail1; } @@ -285,7 +287,9 @@ static void create_ximage(xv_driver_t *this, xv_frame_t *frame, int width, int h if (frame->image == ((void *) -1)) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: shared memory error (address error)\n"); + _("%s: shared memory error (address error)\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); goto shm_fail2; } @@ -295,8 +299,9 @@ static void create_ximage(xv_driver_t *this, xv_frame_t *frame, int width, int h if (generic_error != NULL) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: x11 error during shared memory XImage creation\n" - "video_out_xcbxv: => not using MIT Shared Memory extension.\n")); + _("%s: x11 error during shared memory XImage creation\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); free(generic_error); goto shm_fail3; } @@ -364,7 +369,7 @@ static void xv_update_frame_format (vo_driver_t *this_gen, || (frame->height != height) || (frame->format != format)) { - /* printf ("video_out_xcbxv: updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ + /* printf (LOG_MODULE ": updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ pthread_mutex_lock(&this->main_mutex); @@ -692,7 +697,7 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; xv_frame_t *frame = (xv_frame_t *) frame_gen; /* - printf ("video_out_xcbxv: xv_display_frame...\n"); + printf (LOG_MODULE ": xv_display_frame...\n"); */ /* @@ -759,7 +764,7 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { pthread_mutex_unlock(&this->main_mutex); /* - printf ("video_out_xcbxv: xv_display_frame... done\n"); + printf (LOG_MODULE ": xv_display_frame... done\n"); */ } @@ -775,7 +780,7 @@ static int xv_get_property (vo_driver_t *this_gen, int property) { break; } - lprintf("video_out_xcbxv: property #%d = %d\n", property, this->props[property].value); + lprintf(LOG_MODULE ": property #%d = %d\n", property, this->props[property].value); return this->props[property].value; } @@ -824,7 +829,7 @@ static int xv_set_property (vo_driver_t *this_gen, case VO_PROP_INTERLACED: this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xcbxv: VO_PROP_INTERLACED(%d)\n", this->props[property].value); + LOG_MODULE ": VO_PROP_INTERLACED(%d)\n", this->props[property].value); this->deinterlace_enabled = value; if (this->deinterlace_method == DEINTERLACE_ONEFIELDXV) { xv_compute_ideal_size (this); @@ -838,7 +843,7 @@ static int xv_set_property (vo_driver_t *this_gen, this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xcbxv: VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); this->sc.user_ratio = value; xv_compute_ideal_size (this); @@ -850,7 +855,7 @@ static int xv_set_property (vo_driver_t *this_gen, if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xcbxv: VO_PROP_ZOOM_X = %d\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ZOOM_X = %d\n", this->props[property].value); this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -864,7 +869,7 @@ static int xv_set_property (vo_driver_t *this_gen, if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xcbxv: VO_PROP_ZOOM_Y = %d\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ZOOM_Y = %d\n", this->props[property].value); this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -1146,7 +1151,7 @@ static void xv_check_capability (xv_driver_t *this, free(get_attribute_reply); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: port attribute %s (%d) value is %d\n", str_prop, property, int_default); + LOG_MODULE ": port attribute %s (%d) value is %d\n", str_prop, property, int_default); /* disable autopaint colorkey by default */ /* might be overridden using config entry */ @@ -1217,7 +1222,7 @@ static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { pthread_mutex_unlock(&this->main_mutex); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + LOG_MODULE ": bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); } static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { @@ -1237,7 +1242,7 @@ static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) pthread_mutex_unlock(&this->main_mutex); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: double buffering mode = %d\n", xv_double_buffer); + LOG_MODULE ": double buffering mode = %d\n", xv_double_buffer); } static void xv_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { @@ -1286,7 +1291,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis query_extension_reply = xcb_get_extension_data(this->connection, &xcb_xv_id); if (!query_extension_reply || !query_extension_reply->present) { - xprintf (class->xine, XINE_VERBOSITY_LOG, _("video_out_xcbxv: Xv extension not present.\n")); + xprintf (class->xine, XINE_VERBOSITY_LOG, _("%s: Xv extension not present.\n"), LOG_MODULE); return NULL; } @@ -1298,7 +1303,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis query_adaptors_reply = xcb_xv_query_adaptors_reply(this->connection, query_adaptors_cookie, NULL); if (!query_adaptors_reply) { - xprintf(class->xine, XINE_VERBOSITY_DEBUG, "video_out_xcbxv: XvQueryAdaptors failed.\n"); + xprintf(class->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": XvQueryAdaptors failed.\n"); return NULL; } @@ -1328,16 +1333,17 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis if (!xv_port) { xprintf(class->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: Xv extension is present but I couldn't find a usable yuv12 port.\n" - " Looks like your graphics hardware driver doesn't support Xv?!\n")); + _("%s: Xv extension is present but I couldn't find a usable yuv12 port.\n" + "\tLooks like your graphics hardware driver doesn't support Xv?!\n"), + LOG_MODULE); /* XvFreeAdaptorInfo (adaptor_info); this crashed on me (gb)*/ return NULL; } else xprintf(class->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: using Xv port %d from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), xv_port, + _("%s: using Xv port %d from adaptor %s for hardware " + "colorspace conversion and scaling.\n"), LOG_MODULE, xv_port, xcb_xv_adaptor_info_name(adaptor_it.data)); this->xv_port = xv_port; @@ -1409,7 +1415,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis if(!strcmp(xcb_xv_attribute_info_name(attribute_it.data), "XV_HUE")) { if (!strncmp(xcb_xv_adaptor_info_name(adaptor_it.data), "NV", 2)) { - xprintf (this->xine, XINE_VERBOSITY_NONE, "video_out_xcbxv: ignoring broken XV_HUE settings on NVidia cards"); + xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards"); } else { xv_check_capability (this, VO_PROP_HUE, attribute_it.data, adaptor_it.data->base_id, @@ -1479,7 +1485,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis free(query_attributes_reply); } else - xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_xcbxv: no port attributes defined.\n"); + xprintf(this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": no port attributes defined.\n"); free(query_adaptors_reply); /* @@ -1504,12 +1510,12 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis this->xv_format_yv12 = format_it.data->id; this->capabilities |= VO_CAP_YV12; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: this adaptor supports the yv12 format.\n")); + _("%s: this adaptor supports the yv12 format.\n"), LOG_MODULE); } else if (format_it.data->id == XINE_IMGFMT_YUY2) { this->xv_format_yuy2 = format_it.data->id; this->capabilities |= VO_CAP_YUY2; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xcbxv: this adaptor supports the yuy2 format.\n")); + _("%s: this adaptor supports the yuy2 format.\n"), LOG_MODULE); } } diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 00d3bee1c..79ab41e00 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -148,7 +148,7 @@ static int HandleXError (Display *display, XErrorEvent *xevent) { char str [1024]; XGetErrorText (display, xevent->error_code, str, 1024); - printf ("video_out_xshm: received X error event: %s\n", str); + printf (LOG_MODULE ": received X error event: %s\n", str); gX11Fail = 1; return 0; @@ -199,8 +199,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, if (myimage == NULL ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xshm: shared memory error when allocating image\n" - "video_out_xshm: => not using MIT Shared Memory extension.\n")); + _("%s: shared memory error when allocating image\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -215,8 +216,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, if (shminfo->shmid < 0 ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xshm: %s: allocating image\n" - "video_out_xshm: => not using MIT Shared Memory extension.\n"), strerror(errno)); + _("%s: %s: allocating image\n"), LOG_MODULE, strerror(errno)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -225,8 +227,9 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, if (shminfo->shmaddr == ((char *) -1)) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xshm: shared memory error (address error) when allocating image \n" - "video_out_xshm: => not using MIT Shared Memory extension.\n")); + _("%s: shared memory error (address error) when allocating image \n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; this->use_shm = 0; @@ -241,10 +244,11 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, XSync(this->display, False); if (gX11Fail) { - xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xshm: x11 error during shared memory XImage creation\n" - "video_out_xshm: => not using MIT Shared Memory extension.\n")); shmdt (shminfo->shmaddr); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: x11 error during shared memory XImage creation\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; this->use_shm = 0; @@ -284,7 +288,7 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo, this->bytes_per_pixel = this->bpp / 8; this->image_byte_order = myimage->byte_order; - myimage->data = xine_xmalloc (width * this->bytes_per_pixel * height); + myimage->data = xine_xcalloc (width * height, this->bytes_per_pixel); } return myimage; @@ -825,7 +829,7 @@ static int xshm_get_property (vo_driver_t *this_gen, int property) { return this->sc.gui_height; default: xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xshm: tried to get unsupported property %d\n", property); + LOG_MODULE ": tried to get unsupported property %d\n", property); } return 0; @@ -841,7 +845,7 @@ static int xshm_set_property (vo_driver_t *this_gen, value = XINE_VO_ASPECT_AUTO; this->sc.user_ratio = value; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xshm: aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); + LOG_MODULE ": aspect ratio changed to %s\n", _x_vo_scale_aspect_ratio_name(value)); } else if (property == VO_PROP_BRIGHTNESS) { @@ -875,7 +879,7 @@ static int xshm_set_property (vo_driver_t *this_gen, } else { xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xshm: tried to set unsupported property %d\n", property); + LOG_MODULE ": tried to set unsupported property %d\n", property); } return value; @@ -1167,7 +1171,7 @@ static vo_driver_t *xshm_open_plugin_2 (video_driver_class_t *class_gen, const v } else { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xshm: MIT shared memory extension not present on display.\n")); + _("%s: MIT shared memory extension not present on display.\n"), LOG_MODULE); this->use_shm = 0; } @@ -1188,8 +1192,8 @@ static vo_driver_t *xshm_open_plugin_2 (video_driver_class_t *class_gen, const v swapped = cpu_byte_order != this->image_byte_order; xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xshm: video mode depth is %d (%d bpp), %s, %sswapped,\n" - "\tred: %08lx, green: %08lx, blue: %08lx\n", + LOG_MODULE ": video mode depth is %d (%d bpp), %s, %sswapped,\n" + LOG_MODULE ": red: %08lx, green: %08lx, blue: %08lx\n", this->depth, this->bpp, visual_class_name(this->visual), swapped ? "" : "not ", @@ -1251,7 +1255,7 @@ static vo_driver_t *xshm_open_plugin_2 (video_driver_class_t *class_gen, const v if (!mode) { xprintf (this->xine, XINE_VERBOSITY_LOG, - _("video_out_xshm: your video mode was not recognized, sorry :-(\n")); + _("%s: your video mode was not recognized, sorry :-(\n"), LOG_MODULE); return NULL; } diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 95a847c2c..4338246ae 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -295,8 +295,9 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, if (image == NULL ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: XvShmCreateImage failed\n" - "video_out_xv: => not using MIT Shared Memory extension.\n")); + _("%s: XvShmCreateImage failed\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -321,16 +322,18 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, if (image->data_size==0) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: XvShmCreateImage returned a zero size\n" - "video_out_xv: => not using MIT Shared Memory extension.\n")); + _("%s: XvShmCreateImage returned a zero size\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } if (shminfo->shmid < 0 ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: shared memory error in shmget: %s\n" - "video_out_xv: => not using MIT Shared Memory extension.\n"), strerror(errno)); + _("%s: shared memory error in shmget: %s\n"), LOG_MODULE, strerror(errno)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -339,14 +342,14 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, if (shminfo->shmaddr == NULL) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: shared memory error (address error NULL)\n"); + LOG_MODULE ": shared memory error (address error NULL)\n"); this->use_shm = 0; goto finishShmTesting; } if (shminfo->shmaddr == ((char *) -1)) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: shared memory error (address error)\n"); + LOG_MODULE ": shared memory error (address error)\n"); this->use_shm = 0; goto finishShmTesting; } @@ -360,12 +363,13 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, shmctl(shminfo->shmid, IPC_RMID, 0); if (gX11Fail) { - xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: x11 error during shared memory XImage creation\n" - "video_out_xv: => not using MIT Shared Memory extension.\n")); shmdt (shminfo->shmaddr); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: x11 error during shared memory XImage creation\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -448,7 +452,7 @@ static void xv_update_frame_format (vo_driver_t *this_gen, || (frame->height != height) || (frame->format != format)) { - /* printf ("video_out_xv: updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ + /* printf (LOG_MODULE ": updating frame to %d x %d (ratio=%d, format=%08x)\n",width,height,ratio_code,format); */ LOCK_DISPLAY(this); @@ -784,7 +788,7 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { xv_driver_t *this = (xv_driver_t *) this_gen; xv_frame_t *frame = (xv_frame_t *) frame_gen; /* - printf ("video_out_xv: xv_display_frame...\n"); + printf (LOG_MODULE ": xv_display_frame...\n"); */ /* @@ -864,7 +868,7 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { } /* - printf ("video_out_xv: xv_display_frame... done\n"); + printf (LOG_MODULE ": xv_display_frame... done\n"); */ } @@ -880,7 +884,7 @@ static int xv_get_property (vo_driver_t *this_gen, int property) { break; } - lprintf("video_out_xv: property #%d = %d\n", property, this->props[property].value); + lprintf(LOG_MODULE ": property #%d = %d\n", property, this->props[property].value); return this->props[property].value; } @@ -925,7 +929,7 @@ static int xv_set_property (vo_driver_t *this_gen, case VO_PROP_INTERLACED: this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xv: VO_PROP_INTERLACED(%d)\n", this->props[property].value); + LOG_MODULE ": VO_PROP_INTERLACED(%d)\n", this->props[property].value); this->deinterlace_enabled = value; if (this->deinterlace_method == DEINTERLACE_ONEFIELDXV) { xv_compute_ideal_size (this); @@ -939,7 +943,7 @@ static int xv_set_property (vo_driver_t *this_gen, this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xv: VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); this->sc.user_ratio = value; xv_compute_ideal_size (this); @@ -951,7 +955,7 @@ static int xv_set_property (vo_driver_t *this_gen, if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xv: VO_PROP_ZOOM_X = %d\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ZOOM_X = %d\n", this->props[property].value); this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -965,7 +969,7 @@ static int xv_set_property (vo_driver_t *this_gen, if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xv: VO_PROP_ZOOM_Y = %d\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ZOOM_Y = %d\n", this->props[property].value); this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -1141,7 +1145,7 @@ static void xv_dispose (vo_driver_t *this_gen) { LOCK_DISPLAY(this); if(XvUngrabPort (this->display, this->xv_port, CurrentTime) != Success) { - xprintf (this->xine, XINE_VERBOSITY_DEBUG, "video_out_xv: xv_exit: XvUngrabPort() failed.\n"); + xprintf (this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": xv_exit: XvUngrabPort() failed.\n"); } XFreeGC(this->display, this->gc); UNLOCK_DISPLAY(this); @@ -1208,7 +1212,7 @@ static void xv_check_capability (xv_driver_t *this, this->props[property].atom, &int_default); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: port attribute %s (%d) value is %d\n", str_prop, property, int_default); + LOG_MODULE ": port attribute %s (%d) value is %d\n", str_prop, property, int_default); /* disable autopaint colorkey by default */ /* might be overridden using config entry */ @@ -1275,7 +1279,7 @@ static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { UNLOCK_DISPLAY(this); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + LOG_MODULE ": bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); } static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { @@ -1291,7 +1295,7 @@ static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) UNLOCK_DISPLAY(this); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: double buffering mode = %d\n", xv_double_buffer); + LOG_MODULE ": double buffering mode = %d\n", xv_double_buffer); } static void xv_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { @@ -1340,7 +1344,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * LOCK_DISPLAY(this); if (Success != XvQueryExtension(this->display, &ver,&rel, &req, &ev,&err)) { - xprintf (class->xine, XINE_VERBOSITY_LOG, _("video_out_xv: Xv extension not present.\n")); + xprintf (class->xine, XINE_VERBOSITY_LOG, _("%s: Xv extension not present.\n"), LOG_MODULE); UNLOCK_DISPLAY(this); return NULL; } @@ -1350,7 +1354,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * */ if (Success != XvQueryAdaptors(this->display,DefaultRootWindow(this->display), &adaptors, &adaptor_info)) { - xprintf(class->xine, XINE_VERBOSITY_DEBUG, "video_out_xv: XvQueryAdaptors failed.\n"); + xprintf(class->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": XvQueryAdaptors failed.\n"); UNLOCK_DISPLAY(this); return NULL; } @@ -1377,8 +1381,9 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * if (!xv_port) { xprintf(class->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: Xv extension is present but I couldn't find a usable yuv12 port.\n" - " Looks like your graphics hardware driver doesn't support Xv?!\n")); + _("%s: Xv extension is present but I couldn't find a usable yuv12 port.\n" + "\tLooks like your graphics hardware driver doesn't support Xv?!\n"), + LOG_MODULE); /* XvFreeAdaptorInfo (adaptor_info); this crashed on me (gb)*/ UNLOCK_DISPLAY(this); @@ -1386,8 +1391,8 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * } else xprintf(class->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: using Xv port %ld from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), xv_port, + _("%s: using Xv port %ld from adaptor %s for hardware " + "colorspace conversion and scaling.\n"), LOG_MODULE, xv_port, adaptor_info[adaptor_num].name); UNLOCK_DISPLAY(this); @@ -1469,7 +1474,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * if(!strcmp(attr[k].name, "XV_HUE")) { if (!strncmp(adaptor_info[adaptor_num].name, "NV", 2)) { - xprintf (this->xine, XINE_VERBOSITY_NONE, "video_out_xv: ignoring broken XV_HUE settings on NVidia cards"); + xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards"); } else { xv_check_capability (this, VO_PROP_HUE, attr[k], adaptor_info[adaptor_num].base_id, @@ -1539,7 +1544,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * XFree(attr); } else - xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_xv: no port attributes defined.\n"); + xprintf(this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": no port attributes defined.\n"); XvFreeAdaptorInfo(adaptor_info); /* @@ -1561,12 +1566,12 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void * this->xv_format_yv12 = fo[i].id; this->capabilities |= VO_CAP_YV12; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: this adaptor supports the yv12 format.\n")); + _("%s: this adaptor supports the yv12 format.\n"), LOG_MODULE); } else if (fo[i].id == XINE_IMGFMT_YUY2) { this->xv_format_yuy2 = fo[i].id; this->capabilities |= VO_CAP_YUY2; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xv: this adaptor supports the yuy2 format.\n")); + _("%s: this adaptor supports the yuy2 format.\n"), LOG_MODULE); } } diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 1c71bb534..9d4f89103 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -165,14 +165,10 @@ static void xxmc_xvmc_surface_handler_construct(xxmc_driver_t *this) xvmc_surface_handler_t *handler = &this->xvmc_surf_handler; pthread_mutex_init(&handler->mutex,NULL); - for (i=0; i<XVMC_MAX_SURFACES; ++i) { - handler->surfInUse[i] = 0; - handler->surfValid[i] = 0; - } - for (i=0; i<XVMC_MAX_SUBPICTURES; ++i) { - handler->subInUse[i] = 0; - handler->subValid[i] = 0; - } + memset(handler->surfInUse, 0, sizeof(*handler->surfInUse)*XVMC_MAX_SURFACES); + memset(handler->surfValid, 0, sizeof(*handler->surfValid)*XVMC_MAX_SURFACES); + memset(handler->subInUse, 0, sizeof(*handler->subInUse)*XVMC_MAX_SUBPICTURES); + memset(handler->subValid, 0, sizeof(*handler->subValid)*XVMC_MAX_SUBPICTURES); } static void xxmc_xvmc_destroy_surfaces(xxmc_driver_t *this) @@ -242,7 +238,7 @@ static XvMCSurface *xxmc_xvmc_alloc_surface(xxmc_driver_t *this, } XVMCUNLOCKDISPLAY( this->display ); xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Created surface %d\n",i); + LOG_MODULE ": Created surface %d\n",i); handler->surfInUse[i] = 1; handler->surfValid[i] = 1; pthread_mutex_unlock(&handler->mutex); @@ -262,7 +258,7 @@ static void xxmc_xvmc_free_surface(xxmc_driver_t *this, XvMCSurface *surf) if (index >= XVMC_MAX_SURFACES) return; pthread_mutex_lock(&handler->mutex); xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Disposing of surface %d\n",index); + LOG_MODULE ": Disposing of surface %d\n",index); handler->surfInUse[index]--; xxmc_xvmc_dump_surfaces(this); pthread_mutex_unlock(&handler->mutex); @@ -322,7 +318,7 @@ static XvMCSubpicture *xxmc_xvmc_alloc_subpicture } XVMCUNLOCKDISPLAY( this->display ); xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Created subpicture %d\n",i); + LOG_MODULE ": Created subpicture %d\n",i); handler->subInUse[i] = 1; handler->subValid[i] = 1; pthread_mutex_unlock(&handler->mutex); @@ -343,7 +339,7 @@ static void xxmc_xvmc_free_subpicture(xxmc_driver_t *this, XvMCSubpicture *sub) if (index >= XVMC_MAX_SUBPICTURES) return; pthread_mutex_lock(&handler->mutex); xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Disposing of subpicture %d\n",index); + LOG_MODULE ": Disposing of subpicture %d\n",index); handler->subInUse[index] = 0; xxmc_xvmc_dump_subpictures(this); pthread_mutex_unlock(&handler->mutex); @@ -647,8 +643,9 @@ static XvImage *create_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo, if (image == NULL ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: XvShmCreateImage failed\n" - "video_out_xxmc: => not using MIT Shared Memory extension.\n")); + _("%s: XvShmCreateImage failed\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -657,16 +654,18 @@ static XvImage *create_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo, if (image->data_size==0) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: XvShmCreateImage returned a zero size\n" - "video_out_xxmc: => not using MIT Shared Memory extension.\n")); + _("%s: XvShmCreateImage returned a zero size\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } if (shminfo->shmid < 0 ) { xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: shared memory error in shmget: %s\n" - "video_out_xxmc: => not using MIT Shared Memory extension.\n"), strerror(errno)); + _("%s: shared memory error in shmget: %s\n"), LOG_MODULE, strerror(errno)); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -675,14 +674,14 @@ static XvImage *create_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo, if (shminfo->shmaddr == NULL) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: shared memory error (address error NULL)\n"); + LOG_MODULE ": shared memory error (address error NULL)\n"); this->use_shm = 0; goto finishShmTesting; } if (shminfo->shmaddr == ((char *) -1)) { xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: shared memory error (address error)\n"); + LOG_MODULE ": shared memory error (address error)\n"); this->use_shm = 0; goto finishShmTesting; } @@ -696,12 +695,13 @@ static XvImage *create_ximage (xxmc_driver_t *this, XShmSegmentInfo *shminfo, shmctl(shminfo->shmid, IPC_RMID, 0); if (gX11Fail) { - xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: x11 error during shared memory XImage creation\n" - "video_out_xxmc: => not using MIT Shared Memory extension.\n")); shmdt (shminfo->shmaddr); shmctl (shminfo->shmid, IPC_RMID, 0); shminfo->shmid = -1; + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: x11 error during shared memory XImage creation\n"), LOG_MODULE); + xprintf(this->xine, XINE_VERBOSITY_LOG, + _("%s: => not using MIT Shared Memory extension.\n"), LOG_MODULE); this->use_shm = 0; goto finishShmTesting; } @@ -766,13 +766,13 @@ static void xxmc_dispose_context(xxmc_driver_t *driver) } xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Freeing up XvMC Surfaces and subpictures.\n"); + LOG_MODULE ": Freeing up XvMC Surfaces and subpictures.\n"); if (driver->xvmc_palette) free(driver->xvmc_palette); _x_dispose_xx44_palette( &driver->palette ); xxmc_xvmc_destroy_subpictures( driver ); xxmc_xvmc_destroy_surfaces( driver ); xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Freeing up XvMC Context.\n"); + LOG_MODULE ": Freeing up XvMC Context.\n"); XLockDisplay (driver->display); if (driver->subImage) dispose_ximage(driver, &driver->subShmInfo, driver->subImage); @@ -812,10 +812,10 @@ static int xxmc_find_context(xxmc_driver_t *driver, xine_xxmc_t *xxmc, curCap = driver->xvmc_cap; for (i =0; i < driver->xvmc_num_cap; ++i) { xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Surface type %d. Capabilities 0x%8x 0x%8x\n",i, + LOG_MODULE ": Surface type %d. Capabilities 0x%8x 0x%8x\n",i, curCap->mpeg_flags,curCap->accel_flags); xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Requests: 0x%8x 0x%8x\n", + LOG_MODULE ": Requests: 0x%8x 0x%8x\n", request_mpeg_flags,request_accel_flags); if (((curCap->mpeg_flags & request_mpeg_flags) == request_mpeg_flags) && ((curCap->accel_flags & request_accel_flags)) && @@ -846,7 +846,7 @@ static int xxmc_create_context(xxmc_driver_t *driver, unsigned width, unsigned h curCap = driver->xvmc_cap + driver->xvmc_cur_cap; xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Creating new XvMC Context %d\n",curCap->type_id); + LOG_MODULE ": Creating new XvMC Context %d\n",curCap->type_id); XVMCLOCKDISPLAY( driver->display ); if (Success == XvMCCreateContext( driver->display, driver->xv_port, curCap->type_id, width, @@ -879,7 +879,7 @@ static void xxmc_setup_subpictures(xxmc_driver_t *driver, unsigned width, unsign if ((driver->xvmc_backend_subpic = (curCap->flags & XVMC_BACKEND_SUBPICTURE))) xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Using Backend subpictures.\n"); + LOG_MODULE ": Using Backend subpictures.\n"); if (!driver->subImage) { /* @@ -895,7 +895,7 @@ static void xxmc_setup_subpictures(xxmc_driver_t *driver, unsigned width, unsign XUnlockDisplay (driver->display); if (NULL == driver->subImage) { xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: Failed allocating XvImage for supbictures.\n"); + LOG_MODULE ": Failed allocating XvImage for supbictures.\n"); return; } } @@ -990,8 +990,8 @@ static int xxmc_xvmc_update_context(xxmc_driver_t *driver, xxmc_frame_t *frame, return 0; xprintf(driver->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: New format. Need to change XvMC Context.\n" - "width: %d height: %d", width, height); + LOG_MODULE ": New format. Need to change XvMC Context.\n" + LOG_MODULE ": width: %d height: %d", width, height); if (frame_format_xxmc) { xprintf(driver->xine, XINE_VERBOSITY_LOG, " mpeg: %d acceleration: %d", xxmc->mpeg, xxmc->acceleration); @@ -1011,17 +1011,17 @@ static int xxmc_xvmc_update_context(xxmc_driver_t *driver, xxmc_frame_t *frame, if ((driver->xvmc_accel & (XINE_XVMC_ACCEL_MOCOMP | XINE_XVMC_ACCEL_IDCT))) { if (!xxmc_mocomp_create_macroblocks(driver, frame, 1)) { - lprintf("video_out_xxmc: ERROR: Macroblock allocation failed\n"); + printf(LOG_MODULE ": ERROR: Macroblock allocation failed\n"); xxmc_dispose_context( driver ); } } } if (!driver->contextActive) { - printf("video_out_xxmc: Using software decoding for this stream.\n"); + printf(LOG_MODULE ": Using software decoding for this stream.\n"); driver->xvmc_accel = 0; } else { - printf("video_out_xxmc: Using hardware decoding for this stream.\n"); + printf(LOG_MODULE ": Using hardware decoding for this stream.\n"); } driver->xvmc_mpeg = xxmc->mpeg; @@ -1057,9 +1057,9 @@ static void xxmc_frame_updates(xxmc_driver_t *driver, if (frame->xvmc_surf == NULL) { if (NULL == (frame->xvmc_surf = xxmc_xvmc_alloc_surface( driver, &driver->context))) { - fprintf(stderr, "video_out_xxmc: ERROR: Accelerated surface allocation failed.\n" - "video_out_xxmc: You are probably out of framebuffer memory.\n" - "video_out_xxmc: Falling back to software decoding.\n"); + fprintf(stderr, LOG_MODULE ": ERROR: Accelerated surface allocation failed.\n" + LOG_MODULE ": You are probably out of framebuffer memory.\n" + LOG_MODULE ": Falling back to software decoding.\n"); driver->xvmc_accel = 0; xxmc_dispose_context( driver ); return; @@ -1747,7 +1747,7 @@ static int xxmc_get_property (vo_driver_t *this_gen, int property) { break; } - lprintf("video_out_xxmc: property #%d = %d\n", property, this->props[property].value); + lprintf("%s: property #%d = %d\n", LOG_MODULE, property, this->props[property].value); return this->props[property].value; } @@ -1810,7 +1810,7 @@ static int xxmc_set_property (vo_driver_t *this_gen, case VO_PROP_INTERLACED: this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: VO_PROP_INTERLACED(%d)\n", this->props[property].value); + LOG_MODULE ": VO_PROP_INTERLACED(%d)\n", this->props[property].value); this->deinterlace_enabled = value; break; @@ -1820,7 +1820,7 @@ static int xxmc_set_property (vo_driver_t *this_gen, this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ASPECT_RATIO(%d)\n", this->props[property].value); this->sc.user_ratio = value; xxmc_compute_ideal_size (this); @@ -1832,7 +1832,7 @@ static int xxmc_set_property (vo_driver_t *this_gen, if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: VO_PROP_ZOOM_X = %d\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ZOOM_X = %d\n", this->props[property].value); this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -1846,7 +1846,7 @@ static int xxmc_set_property (vo_driver_t *this_gen, if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) { this->props[property].value = value; xprintf(this->xine, XINE_VERBOSITY_LOG, - "video_out_xxmc: VO_PROP_ZOOM_Y = %d\n", this->props[property].value); + LOG_MODULE ": VO_PROP_ZOOM_Y = %d\n", this->props[property].value); this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP; @@ -1993,7 +1993,7 @@ static void xxmc_dispose (vo_driver_t *this_gen) { XLockDisplay (this->display); if(XvUngrabPort (this->display, this->xv_port, CurrentTime) != Success) { - xprintf (this->xine, XINE_VERBOSITY_DEBUG, "video_out_xxmc: xxmc_exit: XvUngrabPort() failed.\n"); + xprintf (this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": xxmc_exit: XvUngrabPort() failed.\n"); } XFreeGC(this->display, this->gc); XUnlockDisplay (this->display); @@ -2057,7 +2057,7 @@ static void xxmc_check_capability (xxmc_driver_t *this, this->props[property].atom, &int_default); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: port attribute %s (%d) value is %d\n", str_prop, property, int_default); + LOG_MODULE ": port attribute %s (%d) value is %d\n", str_prop, property, int_default); /* * We enable autopaint by default. @@ -2119,7 +2119,7 @@ static void xxmc_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { XUnlockDisplay(this->display); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + LOG_MODULE ": bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); } static void xxmc_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { @@ -2135,7 +2135,7 @@ static void xxmc_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry XUnlockDisplay(this->display); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: double buffering mode = %d\n", xv_double_buffer); + LOG_MODULE ": double buffering mode = %d\n", xv_double_buffer); } static void xxmc_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { @@ -2195,7 +2195,7 @@ static void checkXvMCCap( xxmc_driver_t *this, XvPortID xv_port) return; } xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: XvMC extension present.\n"); + LOG_MODULE ": XvMC extension present.\n"); surfaceInfo = XvMCListSurfaceTypes(this->display, xv_port, &numSurf); if (0 == surfaceInfo) { @@ -2211,7 +2211,7 @@ static void checkXvMCCap( xxmc_driver_t *this, XvPortID xv_port) curCap = this->xvmc_cap; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Found %d XvMC surface types\n",numSurf); + LOG_MODULE ": Found %d XvMC surface types\n", numSurf); for (i=0; i< numSurf; ++i) { curCap->mpeg_flags = 0; @@ -2235,10 +2235,10 @@ static void checkXvMCCap( xxmc_driver_t *this, XvPortID xv_port) curCap->sub_max_height = curInfo->subpicture_max_height; curCap->flags = curInfo->flags; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Surface type %d: Max size: %d %d.\n", + LOG_MODULE ": Surface type %d: Max size: %d %d.\n", i,curCap->max_width,curCap->max_height); xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Surface type %d: Max subpic size: %d %d.\n", + LOG_MODULE ": Surface type %d: Max subpic size: %d %d.\n", i,curCap->sub_max_width,curCap->sub_max_height); curCap->type_id = curInfo->surface_type_id; @@ -2247,21 +2247,18 @@ static void checkXvMCCap( xxmc_driver_t *this, XvPortID xv_port) curCap->subPicType.id = 0; if (formatValues) { xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Surface type %d: Found %d XvMC subpicture " - "types\n",i,numSub); + LOG_MODULE ": Surface type %d: Found %d XvMC subpicture types\n",i,numSub); for (j = 0; j<numSub; ++j) { if (formatValues[j].id == FOURCC_IA44) { curCap->subPicType = formatValues[j]; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Surface type %d: Detected and using " - "IA44 subpicture type.\n",i); + LOG_MODULE ": Surface type %d: Detected and using IA44 subpicture type.\n",i); /* Prefer IA44 */ break; } else if (formatValues[j].id == FOURCC_AI44) { curCap->subPicType = formatValues[j]; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Surface type %d: Detected AI44 " - "subpicture type.\n",i); + LOG_MODULE ": Surface type %d: Detected AI44 subpicture type.\n",i); } } } @@ -2292,9 +2289,8 @@ static void checkXvMCCap( xxmc_driver_t *this, XvPortID xv_port) free(this->xvmc_cap); this->xvmc_cap = 0; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: Apparent attempt to use a direct XvMC " - "context\nvideo_out_xxmc: on a remote display. " - "Falling back to XV.\n"); + LOG_MODULE ": Apparent attempt to use a direct XvMC context on a remote display.\n" + LOG_MODULE ": Falling back to Xv.\n"); XVMCUNLOCKDISPLAY( this->display ); xvmc_context_writer_unlock( &this->xvmc_lock ); return; @@ -2350,7 +2346,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi XLockDisplay(this->display); if (Success != XvQueryExtension(this->display, &ver,&rel, &req, &ev,&err)) { - xprintf (class->xine, XINE_VERBOSITY_LOG, _("video_out_xxmc: Xv extension not present.\n")); + xprintf (class->xine, XINE_VERBOSITY_LOG, _("%s: Xv extension not present.\n"), LOG_MODULE); XUnlockDisplay(this->display); return NULL; } @@ -2360,7 +2356,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi */ if (Success != XvQueryAdaptors(this->display,DefaultRootWindow(this->display), &adaptors, &adaptor_info)) { - xprintf(class->xine, XINE_VERBOSITY_DEBUG, "video_out_xxmc: XvQueryAdaptors failed.\n"); + xprintf(class->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": XvQueryAdaptors failed.\n"); XUnlockDisplay(this->display); return NULL; } @@ -2387,8 +2383,9 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi if (!xv_port) { xprintf(class->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: Xv extension is present but I couldn't find a usable yuv12 port.\n" - " Looks like your graphics hardware driver doesn't support Xv?!\n")); + _("%s: Xv extension is present but I couldn't find a usable yuv12 port.\n" + "\tLooks like your graphics hardware driver doesn't support Xv?!\n"), + LOG_MODULE); /* XvFreeAdaptorInfo (adaptor_info); this crashed on me (gb)*/ XUnlockDisplay(this->display); @@ -2396,8 +2393,8 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi } else xprintf(class->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: using Xv port %ld from adaptor %s for hardware " - "colorspace conversion and scaling.\n"), xv_port, + _("%s: using Xv port %ld from adaptor %s for hardware " + "colorspace conversion and scaling.\n"), LOG_MODULE, xv_port, adaptor_info[adaptor_num].name); XUnlockDisplay(this->display); @@ -2473,7 +2470,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi if((attr[k].flags & XvSettable) && (attr[k].flags & XvGettable)) { if(!strcmp(attr[k].name, "XV_HUE")) { if (!strncmp(adaptor_info[adaptor_num].name, "NV", 2)) { - xprintf (this->xine, XINE_VERBOSITY_NONE, "video_out_xxmc: ignoring broken XV_HUE settings on NVidia cards\n"); + xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards\n"); } else { xxmc_check_capability (this, VO_PROP_HUE, attr[k], adaptor_info[adaptor_num].base_id, "XV_HUE", @@ -2543,7 +2540,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi XFree(attr); } else - xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_xxmc: no port attributes defined.\n"); + xprintf(this->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": no port attributes defined.\n"); XvFreeAdaptorInfo(adaptor_info); /* @@ -2572,12 +2569,12 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi this->xv_format_yv12 = fo[i].id; this->capabilities |= VO_CAP_YV12; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: this adaptor supports the yv12 format.\n")); + _("%s: this adaptor supports the yv12 format.\n"), LOG_MODULE); } else if (fo[i].id == XINE_IMGFMT_YUY2) { this->xv_format_yuy2 = fo[i].id; this->capabilities |= VO_CAP_YUY2; xprintf(this->xine, XINE_VERBOSITY_LOG, - _("video_out_xxmc: this adaptor supports the yuy2 format.\n")); + _("%s: this adaptor supports the yuy2 format.\n"), LOG_MODULE); } } @@ -2635,10 +2632,10 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi this->cur_field = XVMC_FRAME_PICTURE; #ifdef HAVE_VLDXVMC - printf("video_out_xxmc: Unichrome CPU saving is %s.\n", + printf("%s: Unichrome CPU saving is %s.\n", LOG_MODULE, (this->cpu_save_enabled) ? "on":"off"); #else - printf("video_out_xxmc: warning - compiled with no vld extensions.\n"); + printf("%s: warning - compiled with no vld extensions.\n", LOG_MODULE); #endif this->props[VO_PROP_MAX_NUM_FRAMES].value = (use_more_frames) ? 15:8; this->cpu_saver = 0.; diff --git a/src/video_out/vidix/Makefile.am b/src/video_out/vidix/Makefile.am index 2ca8f168a..7f19e7ce8 100644 --- a/src/video_out/vidix/Makefile.am +++ b/src/video_out/vidix/Makefile.am @@ -1,21 +1,16 @@ include $(top_srcdir)/misc/Makefile.common -EXTRA_DIST = README vidix.txt - SUBDIRS = drivers -AM_CFLAGS = @STATIC@ +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix -I$(top_builddir)/src/video_out/libdha -if HAVE_VIDIX -vidix_lib = libvidix.la -endif +EXTRA_DIST = README vidix.txt -noinst_LTLIBRARIES = $(vidix_lib) +noinst_HEADERS = fourcc.h vidix.h vidixlib.h + +noinst_LTLIBRARIES = libvidix.la libvidix_la_SOURCES = vidixlib.c libvidix_la_LIBADD = $(DYNAMIC_LD_LIBS) $(top_builddir)/src/video_out/libdha/libdha.la -noinst_HEADERS = fourcc.h vidix.h vidixlib.h - -AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ - -I$(top_builddir)/src/video_out/libdha diff --git a/src/video_out/vidix/drivers/Makefile.am b/src/video_out/vidix/drivers/Makefile.am index f438dde36..db3adc078 100644 --- a/src/video_out/vidix/drivers/Makefile.am +++ b/src/video_out/vidix/drivers/Makefile.am @@ -1,9 +1,16 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ + -I$(top_srcdir)/src/video_out/libdha -I$(top_builddir)/src/video_out/libdha +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = genfb_vid.c -if HAVE_VIDIX -vidix_drivers = \ +noinst_HEADERS = mach64.h glint_regs.h pm3_regs.h radeon.h savage_regs.h \ + cyberblade_regs.h unichrome_regs.h sis_defs.h sis_regs.h + +vidix_LTLIBRARIES = \ mach64_vid.la \ mga_crtc2_vid.la \ mga_vid.la \ @@ -16,51 +23,34 @@ vidix_drivers = \ nvidia_vid.la \ sis_vid.la \ savage_vid.la -endif -vidix_LTLIBRARIES = $(vidix_drivers) - -radeon_vid_la_SOURCES = radeon_vid.c -radeon_vid_la_LDFLAGS = -avoid-version -module -lm - -rage128_vid_la_SOURCES = radeon_vid.c -rage128_vid_la_LDFLAGS = -avoid-version -module -lm -rage128_vid_la_CFLAGS = -DRAGE128 $(AM_CFLAGS) - -pm2_vid_la_SOURCES = pm2_vid.c -pm2_vid_la_LDFLAGS = -avoid-version -module - -pm3_vid_la_SOURCES = pm3_vid.c -pm3_vid_la_LDFLAGS = -avoid-version -module +cyberblade_vid_la_SOURCES = cyberblade_vid.c mach64_vid_la_SOURCES = mach64_vid.c -mach64_vid_la_LDFLAGS = -avoid-version -module + +mga_crtc2_vid_la_SOURCES = mga_vid.c +mga_crtc2_vid_la_LIBADD = -lm +mga_crtc2_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DCRTC2 mga_vid_la_SOURCES = mga_vid.c -mga_vid_la_LDFLAGS = -avoid-version -module -lm +mga_vid_la_LIBADD = -lm -mga_crtc2_vid_la_SOURCES = mga_vid.c -mga_crtc2_vid_la_LDFLAGS = -avoid-version -module -lm -mga_crtc2_vid_la_CFLAGS = -DCRTC2 $(AM_CFLAGS) +nvidia_vid_la_SOURCES = nvidia_vid.c -cyberblade_vid_la_SOURCES = cyberblade_vid.c -cyberblade_vid_la_LDFLAGS = -avoid-version -module +pm2_vid_la_SOURCES = pm2_vid.c -unichrome_vid_la_SOURCES = unichrome_vid.c -unichrome_vid_la_LDFLAGS = -avoid-version -module +pm3_vid_la_SOURCES = pm3_vid.c -nvidia_vid_la_SOURCES = nvidia_vid.c -nvidia_vid_la_LDFLAGS = -avoid-version -module +radeon_vid_la_SOURCES = radeon_vid.c +radeon_vid_la_LIBADD = -lm -sis_vid_la_SOURCES = sis_vid.c sis_bridge.c -sis_vid_la_LDFLAGS = -avoid-version -module +rage128_vid_la_SOURCES = radeon_vid.c +rage128_vid_la_LIBADD = -lm +rage128_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DRAGE128 savage_vid_la_SOURCES = savage_vid.c -savage_vid_la_LDFLAGS = -avoid-version -module -lm +savage_vid_la_LIBADD = -lm -noinst_HEADERS = mach64.h glint_regs.h pm3_regs.h radeon.h savage_regs.h \ - cyberblade_regs.h unichrome_regs.h sis_defs.h sis_regs.h +sis_vid_la_SOURCES = sis_vid.c sis_bridge.c -AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ - -I$(top_srcdir)/src/video_out/libdha \ - -I$(top_builddir)/src/video_out/libdha +unichrome_vid_la_SOURCES = unichrome_vid.c |