summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/README3
-rw-r--r--doc/README.syncfb280
-rw-r--r--doc/faq/faq.docbook2
-rw-r--r--m4/summary.m43
-rw-r--r--m4/video_out.m419
-rw-r--r--misc/xine-lib.spec.in39
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/video_out/Makefile.am10
-rw-r--r--src/video_out/video_out_syncfb.c1120
-rw-r--r--src/video_out/video_out_syncfb.h236
-rw-r--r--src/xine-engine/configfile.c2
13 files changed, 7 insertions, 1713 deletions
diff --git a/ChangeLog b/ChangeLog
index aa626d700..1ea6c2484 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,9 @@ xine-lib (1.1.90) (Unreleased)
for specific input protocols.
* Check for supported extensions before opening the plugin and remove
redundant core from plugins.
+ * Remove SyncFB video output plugin, the kernel module needed is no more
+ active and thus it's no more usable. If you were using SyncFB somehow,
+ please use DirectFB or VIDIX instead.
xine-lib (1.1.9.1)
* Security fixes:
diff --git a/doc/Makefile.am b/doc/Makefile.am
index c456d8438..f5ba23474 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS = man hackersguide faq
doc_DATA = README README.dvb README.dxr3 \
README.freebsd README.irix README.network_dvd README.opengl \
- README.solaris README.syncfb README_xxmc.html README.MINGWCROSS \
+ README.solaris README_xxmc.html README.MINGWCROSS \
README.WIN32 README.macosx
EXTRA_DIST = $(doc_DATA)
diff --git a/doc/README b/doc/README
index 2674a0869..2c01dc5ce 100644
--- a/doc/README
+++ b/doc/README
@@ -40,6 +40,3 @@ README.opengl
README.solaris
hints on running xine on Solaris
-
-README.syncfb
- information about xine's SyncFB video output plugin
diff --git a/doc/README.syncfb b/doc/README.syncfb
deleted file mode 100644
index fc90ff586..000000000
--- a/doc/README.syncfb
+++ /dev/null
@@ -1,280 +0,0 @@
-
- ===== =====
- XINE video output plugin for MATROX G200/G400/G450 cards *only*
- ===== =====
-
-
-* WHAT IS THIS PLUGIN ABOUT and WHY SHOULD I EVEN CONSIDER TO USE IT? :)
-
- This xine video output plugin uses the so called SyncFB driver (from
- the Teletux project) which provides special hardware features of
- Matrox G200 and newer cards like hardware deinterlacing, scaling and
- synchronization of your video output to the vertical retrace of your
- monitor - just to name a few. The plugin makes all those features
- available to xine and because all this tasks are done by the graphic
- card there is no need for xine to do them in software -- so you save
- precious CPU time which you may gonna need for other things. :-)
-
- Ok ok -- why should you want to have your video output synchronized to
- something called the vertical retrace of your monitor?! Well... :)
-
- In order to have an optimal DVD playback the update of the image needs
- to be syncronized with the vertical refresh of the screen. Otherwise
- you will sometimes see part of frame n and part of frame n+1 during
- playback of a movie. Resulting in tearing artefacts on moving objects.
-
- When using this plugin the update of the screen is done during the
- vertical retrace of your monitor and those tearing artefacts are gone
- forever.
-
- Also the SyncFB kernel module and this plugin totally by-pass XFree86
- for anything else but some data gathering routines needed to place the
- overlay at the right spot. So on some machines you will gain some
- performance too because of the different way the SyncFB kernel module
- handles your video output.
-
- Last but not least, you may ask what's so special about deinterlacing?
- There are already several deinterlacing methods available in xine and
- why should you care about another one? Well (again)... ;-))
-
- All current deinterlacers in xine are done in software and therefore
- will cost you some CPU power. The SyncFB video out plugin will use the
- hardware deinterlacing support of your graphic card, thus saving your
- CPU power because everything is done by your GPU...
-
-
-* WILL IT WORK WITH MY G200/G400/G450/... CARD?
-
- So far the plugin and the kernel module itself are only being tested
- on G400 cards by its developers thus we cannot tell about newer
- or older generation chips.
-
- Nevertheless we have received positive feedback that the SyncFB kernel
- module and this plugin work fine with G450 cards too.
-
- If you have got things working on older/newer chips, please let us
- know about your success and we will place a note here... :-)
-
-
-* AND HOW DOES IT WORK?
-
- The SyncFB driver is a kernel module you will have to load that makes
- a special device (e.g. /dev/syncfb) available which is opened by the
- plugin and controlled with certain ioctl calls. Easy, isn't it? ;-)
-
- That module is based on the mga_vid driver from Aaron Holzmann and was
- advanced (and reworked) by Matthias Oelmann.
-
-
-* OK I HEARD ENOUGH - HOW DO I INSTALL and USE IT? :)
-
- Currently the Teletux project which maintains the kernel module seems
- orphaned and therefore there hasn't been any progress nor release in a
- fair amount of time. :( We will try to resolve this situation so that
- the development continues again. As soon as there are any news on this
- matter, this README will be updated accordingly. For the time being
- you can still use the current Teletux SyncFB kernel module which works
- just fine, so there is no need to worry. :-)
-
- Back to the original subject. In order to install and use the SyncFB
- kernel module, you *will* need a fresh CVS checkout of the sources
- because the last official release is rather outdated.
-
- This sounds more complicated than it actually is. You will only have
- to execute the following two commands to get the sources in a sub-dir
- called teletux. When you are asked for password, just press return.
-
- cvs -d:pserver:anonymous@cvs.teletux.sf.net:/cvsroot/teletux login
- cvs -d:pserver:anonymous@cvs.teletux.sf.net:/cvsroot/teletux co -P teletux
-
- Now enter the directory teletux/syncfb, that's where the actual kernel
- modul sources are located. Before you can compile the module, you will
- have to change two lines in the Makefile itself to make it work.
-
- In the second line, there is a phrase like "-I/usr/include" which you
- have to change to "-I/usr/src/linux/include". In line seven, you need
- to remove syncfbtv and syncfb_test from the OBJ list.
-
- Now execute a "make" and the module will be compiled. Place the
- resulting syncfb.o in your modules dir which is usually...
-
- /lib/modules/KERNEL_VERSION/
-
- ... and issue a "depmod -a" after it. That's it - the kernel module is
- installed. To load the syncfb module, execute "modprobe syncfb" every
- time you (re)start your computer. This will automatically create the
- required /dev/syncfb device if you have devfs support, otherwise you
- need to issue a "mknod /dev/syncfb c 178 0" once to create the
- device yourself permanently.
-
- Once the module is loaded, you can start xine with the "-V SyncFB"
- option to use this plugin. xine automatically remembers the video out
- plugin you last used, so you only have to use this option once too. :)
- But don't forget, the module *always* has to be already loaded before
- you start xine, otherwise xine will fallback to Xv/XShm or some other
- available video out plugin.
-
-
-* THE VIDEO IS JERKING - WHAT'S THE MATTER?!
-
- Playing back video material that is mastered for e.g. NTSC can cause
- this jerking if your monitor is not running at a refresh rate that is
- a multiple of 30 (PAL: 25).
-
- You can try to fix that by switching your monitor to the appropriate
- refresh rates (e.g. 50/75/100 Hz for PAL, 60/90/120 Hz for NTSC). You
- will need to add so called modelines to your XFree86 config to make
- those modes available, if you don't already have them.
-
- Here is is a short listing of some sample modelines. Please add only
- those two lines (for NTSC and PAL) which exactly fit the screensize
- you are running your X Server with. You need to add those lines to the
- monitor section of your XF86Config file as well as include their names
- in the screen section (subsection display of the color depth your are
- using).
-
- USE THE FOLLOWING MODELINES AT YOUR OWN RISK. THEY COULD DAMAGE YOUR
- MONITOR PERMANTELY - PLEASE TAKE CAUTION AND DON'T BLAME US. YOU HAVE
- BEEN WARNED.
-
- So much for the standard disclaimer. :)
-
- Note: If you want to be on the safe side, generate your very own
- modelines with an application like kvideogen for example.
-
- Also the modelines may need some fine tuning for your setup. You
- can use xvidtune (comes with XFree86) to do that.
-
- # 1024x768
-
- Modeline "1024x768pal" 64.94 1024 1040 1216 1328 768 768 775 802
- Modeline "1024x768ntsc" 54.32 1024 1040 1216 1328 768 768 774 802
-
- # 1152x864
-
- Modeline "1152x864pal" 68.82 1152 1168 1384 1496 864 864 871 902
- Modeline "1152x864ntsc" 80.93 1152 1168 1384 1496 864 864 872 902
-
- # 1280x1024
-
- none yet - might be added in the future
-
- So before you run xine just turn to the appropriate refresh rate and
- the jerking *should* be gone. (you may also want to have a look at the
- XF86VidMode support included in xine which makes on-the-fly resolution
- switching possible when fullscreen is toggled)
-
-
-* WHAT SCREENSIZE SHOULD I PREFER?
-
- Well. It is important that the screensize you choose for DVD playback
- is exactly the same screensize you're starting up your X Server with
- if you are not using the XF86VidMode extension which will properly do
- the switching for you and take care that the plugin is updated
- accordingly. So you shouldn't switch down to 1024x768 yourself if you
- are running 1280x1024 because that gives you a virtual screensize
- of 1280x1024 in a resolution of 1024x768 - and the plugin can't handle
- that - and probably never will... ok... never say never. ;)
-
- You may want to have a look at the XF86VidMode support in xine which
- will enable on-the-fly resolution switching when activating fullscreen.
-
- Now back to the question. A screensize of 800x600 should be it for
- non-anamorphic DVDs because their resolution is 720x576 for pal DVDs
- and 720x480 for ntsc ones. If you've an anamorphic DVD, you should use
- a higher resolution - 1024x768 will be best because the image only has
- to be horizontally scaled to get back to the original geometry of 16:9
- which is easier to be done.
-
-
-* WHAT ABOUT DEINTERLACING?!
-
- Pressing 'i' during playback will toggle hardware deinterlacing. A
- decrease in picture quality is a known side effect, yet you won't see
- any artefacts caused by interlacing anymore. :-)
-
- One more note, hardware deinterlacing uses BOB as deinterlacing method
- and is totally independent from the software deinterlacing in xine. So
- specifing a different deinterlacing method in your .xinerc won't have
- any effect on this feature.
-
- Nevertheless we are thinking about making software deinterlacing also
- available as an option. It's on the TODO list... :)
-
-
-* HEY! THE OVERLAY TURNS OFF WHEN THE WINDOW IS PARTLY OFF THE DESKTOP!?
-
- That's done on purpose. It prevents possible yet harmless screen
- corruption. And by the way - why would you want to see a movie just
- partly?! ;-)
-
-
-* MY DESKTOP BACKGROUND IMAGE GETS CORRUPTED WHEN USING THIS PLUGIN!
-
- Even though it doesn't look nice, it's nevertheless harmless. So no
- need to worry about it. XFree86 is using your free video memory as
- cache for certain things. Now when you use this plugin that part of
- your video memory could also be used by the syncfb module. So your
- image data cached there will be corrupted. Unfortunately there is no
- way to avoid it. Yet, like stated earlier, it is truely harmless and
- just a cosmetical side effect.
-
-
-* THE XINE PANEL DOES NOT APPEAR WHEN I WATCH A MOVIE IN FULLSCREEN?!
-
- Actually it does appear - you just don't see it. :) This is a side
- effect of how SyncFB works. The X server can't display anything where
- the actual overlay from SyncFB is being displayed because this area in
- your video memory is constantly over written - so are the changes done
- by your X Server (like a window graphic that is placed there).
-
- This is just cosmetical and harmless, so no need to worry. If you want
- to do something with the xine panel when the video overlay is taking
- all your screen, just switch back to window mode and do what you have
- to do and after that, back to fullscreen it goes. :-)
-
-
-* KNOWN BUGs
-
- + the default_repeat config option is currently hardcoded to 0 because
- any higher value than 1 will trigger a bug with the SyncFB kernel module
- that results in a distorted picture (depending on video resolution)
- [this bug is hard to trace, so don't hold your breath for now]
-
- + SyncFB overlay won't turn off when video window is minimized or
- somehow else hidden.
- [currently there is no way for the SyncFB plugin to know about the
- state of the video window except if the original xine-ui hide function
- is used to hide the video window... this will be fixed soon]
-
- + zooming feature is currently deactivated because it exposes a bug
- with the SyncFB kernel module
- [for now, don't expect this to be fixed soon - sorry]
-
- + the syncfb kernel module needs updating pretty badly
-
-
-* WHAT IS ON THE TODO LIST?
-
- + fix above listed bugs in the SyncFB kernel module
-
- + make software deinterlacing available as an option
-
- + RGB support
- (unlikely at the moment because there is no need for it)
-
- + check if the video source is not too big in terms of dimensions for
- the video memory left (video memory - X reserved video memory)
-
- + bug fixes
- + more sanity checks
- + new features
- + optimizations
-
-
-* CONTACTS and FEEDBACK
-
- Your first starting point should be this README followed by the FAQ. :-)
- If you don't find your answers there or if you found a bug, please leave
- a message on the xine user mailinglist (see the general README).
-
diff --git a/doc/faq/faq.docbook b/doc/faq/faq.docbook
index fa414f1e9..57da1c5bd 100644
--- a/doc/faq/faq.docbook
+++ b/doc/faq/faq.docbook
@@ -1828,7 +1828,7 @@
</para>
<para>
Drivers that access hardware directly includes VIDIX (warning: requires
- root priviledges or kernel helper) and SyncFB (requires kernel helper - Matrox only).
+ root priviledges or kernel helper).
User may try one of those, but should be warned that with root access
they can cause the system to crash hard. The support is also limited to
a couple of graphics cards only.
diff --git a/m4/summary.m4 b/m4/summary.m4
index a96e11e5a..9661f072b 100644
--- a/m4/summary.m4
+++ b/m4/summary.m4
@@ -179,9 +179,6 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " * video driver plugins:"
if test x"$no_x" != x"yes"; then
echo " - XShm (X11 shared memory)"
- if test x"$have_syncfb" = x"yes"; then
- echo " - SyncFB (for Matrox G200/G400 cards)"
- fi
if test x"$have_xv" = x"yes"; then
if test x"$have_xv_static" = x"yes"; then
echo " - Xv (XVideo *static*)"
diff --git a/m4/video_out.m4 b/m4/video_out.m4
index 043d563e8..df782ff06 100644
--- a/m4/video_out.m4
+++ b/m4/video_out.m4
@@ -2,7 +2,7 @@ dnl -----------------
dnl Video out plugins
dnl -----------------
AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
- dnl Setup defaults for the target operating system. For example, syncfb is
+ dnl Setup defaults for the target operating system. For example, linuxfb is
dnl only ever available on Linux, so don't bother checking for it unless
dnl explicitly requested to do so on other operating systems.
dnl Notes:
@@ -11,7 +11,6 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
dnl - dxr3 is Linux only
dnl - Mac OS X video is Mac OS X only
dnl - OpenGL requires Xwindows
- dnl - SyncFB is Linux only, but disabled by default
dnl - Vidix is FreeBSD and Linux only
dnl - XvMC and xxmc depend on Xv
@@ -24,7 +23,6 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
default_enable_linuxfb=disable
default_enable_macosx_video=disable
default_enable_opengl=enable
- default_enable_syncfb=disable
default_enable_vidix=disable
default_enable_xinerama=enable
default_enable_xvmc=enable
@@ -293,21 +291,6 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
AM_CONDITIONAL([ENABLE_SUNFB], [test x"$have_sunfb" = x"yes"])
- dnl syncfb (Linux only)
- AC_ARG_ENABLE([syncfb],
- [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])],
- [test x"$enableval" != x"no" && enable_syncfb="yes"],
- [test $default_enable_syncfb = disable && enable_syncfb="no"])
- dnl There's no good test for this. If the user says so, then do it
- if test x"$enable_syncfb" != x"no" && test x"$no_x" != x"yes"; then
- have_syncfb=yes
- fi
- if test x"$enable_syncfb" = x"yes" && test x"$have_syncfb" != x"yes"; then
- AC_MSG_ERROR([Linux syncfb support requested, but required X support is disabled])
- fi
- AM_CONDITIONAL([ENABLE_SYNCFB], [test x"$have_syncfb" = x"yes"])
-
-
dnl xcb
AC_ARG_WITH([xcb],
[AS_HELP_STRING([--with-xcb], [Enable support for XCB video out plugins])],
diff --git a/misc/xine-lib.spec.in b/misc/xine-lib.spec.in
index 6c5d9b96c..30a54a114 100644
--- a/misc/xine-lib.spec.in
+++ b/misc/xine-lib.spec.in
@@ -51,9 +51,6 @@
%if %{?BUILD_DIRECTFB:0}%{!?BUILD_DIRECTFB:1}
%define BUILD_DIRECTFB 0
%endif
-%if %{?BUILD_SYNCFB:0}%{!?BUILD_SYNCFB:1}
-%define BUILD_SYNCFB 0
-%endif
%if %{?BUILD_W32DLL:0}%{!?BUILD_W32DLL:1}
%define BUILD_W32DLL 0
%endif
@@ -364,30 +361,6 @@ Videovýstupní modul libxine, který používá OpenGL (3D grafické karty).
libxine Videoausgabeplugin per OpenGL (3D Grafikkarte)
%endif
-%if %BUILD_SYNCFB
-%package syncfb
-Summary: libxine video output plugin using synchroniced framebuffer (Matrox cards)
-Summary(cs): Videovýstupní modul libxine používající framebuffer (karty Matrox)
-Summary(de): libxine Videoausgabeplugin per synchronisiertem Framebuffer (Matrox Karten)
-Summary(fi): libxine-Videolisdke Matrox-ndyttvkorttien synkronisoitua ndyttvmuistia varten.
-Group: Development/Libraries
-Obsoletes: libxine0-syncfb
-Requires: %{libname} = %{version}-%{release}
-
-%description syncfb
-libxine video output plugin using synchroniced framebuffer (Matrox cards)
-
-%description syncfb -l cs
-Videovýstupní modul libxine, který používá synchronizovaný framebuffer (karty
-Matrox).
-
-%description syncfb -l de
-libxine Videoausgabeplugin per synchronisiertem Framebuffer (Matrox Karten)
-
-%description syncfb -l fi
-libxine-Videolisdke Matrox-ndyttvkorttien synkronisoitua ndyttvmuistia varten.
-%endif
-
%if %BUILD_DVD
%package dvd
Summary: libxine input plugin for playing video-dvd's with dvd-navigation
@@ -762,14 +735,6 @@ grep -v -E "xineplug_vo_out_opengl\.|README.opengl" ${RPM_BUILD_DIR}/filelist_li
rm ${RPM_BUILD_DIR}/filelist_libxine2_old
%endif
-%if %BUILD_SYNCFB
-echo "%defattr(-,root,root)" > ${RPM_BUILD_DIR}/filelist_libxine2_syncfb
-mv ${RPM_BUILD_DIR}/filelist_libxine2 ${RPM_BUILD_DIR}/filelist_libxine2_old
-grep -E "xineplug_vo_out_syncfb\.|README\.syncfb" ${RPM_BUILD_DIR}/filelist_libxine2_old | cat - >> ${RPM_BUILD_DIR}/filelist_libxine2_syncfb
-grep -v -E "xineplug_vo_out_syncfb\.|README\.syncfb" ${RPM_BUILD_DIR}/filelist_libxine2_old | cat - > ${RPM_BUILD_DIR}/filelist_libxine2
-rm ${RPM_BUILD_DIR}/filelist_libxine2_old
-%endif
-
%if %BUILD_DIRECTFB
echo "%defattr(-,root,root)" > ${RPM_BUILD_DIR}/filelist_libxine2_directfb
mv ${RPM_BUILD_DIR}/filelist_libxine2 ${RPM_BUILD_DIR}/filelist_libxine2_old
@@ -896,10 +861,6 @@ rm ${RPM_BUILD_DIR}/filelist_libxine2_old
%files opengl -f ../filelist_libxine2_opengl
%endif
-%if %BUILD_SYNCFB
-%files syncfb -f ../filelist_libxine2_syncfb
-%endif
-
%if %BUILD_DIRECTFB
%files directfb -f ../filelist_libxine2_directfb
%endif
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6247b521d..b067431df 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -109,7 +109,6 @@ src/video_out/video_out_pgx32.c
src/video_out/video_out_pgx64.c
src/video_out/video_out_sdl.c
src/video_out/video_out_stk.c
-src/video_out/video_out_syncfb.c
src/video_out/video_out_vidix.c
src/video_out/video_out_xcbshm.c
src/video_out/video_out_xcbxv.c
diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am
index b7e24d088..3b5703792 100644
--- a/src/video_out/Makefile.am
+++ b/src/video_out/Makefile.am
@@ -12,7 +12,7 @@ endif
EXTRA_DIST = video_out_directx.c video_out_macosx.m
-noinst_HEADERS = video_out_syncfb.h yuv2rgb.h x11osd.h xcbosd.h
+noinst_HEADERS = yuv2rgb.h x11osd.h xcbosd.h
if HAVE_X11
X11OSD = x11osd.c
@@ -29,9 +29,6 @@ endif
if ENABLE_OPENGL
opengl_module = xineplug_vo_out_opengl.la
endif
-if ENABLE_SYNCFB
-syncfb_module = xineplug_vo_out_syncfb.la
-endif
if ENABLE_SUNFB
if ENABLE_SUNDGA
pgx64_module = xineplug_vo_out_pgx64.la
@@ -93,7 +90,6 @@ endif
xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \
$(opengl_module) \
- $(syncfb_module) \
$(pgx64_module) $(pgx32_module)\
$(vidix_module) \
$(aa_module) \
@@ -140,10 +136,6 @@ xineplug_vo_out_opengl_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \
$(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) $(LTLIBINTL)
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 = $(XINE_LIB) $(X_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
-xineplug_vo_out_syncfb_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
-
xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c
xineplug_vo_out_pgx64_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
xineplug_vo_out_pgx64_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c
deleted file mode 100644
index 49c0d371a..000000000
--- a/src/video_out/video_out_syncfb.c
+++ /dev/null
@@ -1,1120 +0,0 @@
-/*
- * Copyright (C) 2000-2003 the xine project
- *
- * This file is part of xine, a free video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine
- *
- * based on video_out_xv.c by (see file for original authors)
- *
- * with lot's of code from:
- * video_out_syncfb.c by Joachim Koenig <joachim.koenig@gmx.net>
- * and by Matthias Oelmann <mao@well.com>
- * video_out_mga by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
- *
- * glued together for xine by Matthias Dahl <matthew2k@web.de>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef __sun
-#include <sys/ioccom.h>
-#endif
-
-#include <sys/ioctl.h>
-#if defined (__FreeBSD__)
-#include <sys/types.h>
-#endif
-#include <sys/mman.h>
-#include <math.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-#include "video_out_syncfb.h"
-
-#include "xine.h"
-#include <xine/video_out.h>
-#include <xine/xine_internal.h>
-#include <xine/xineutils.h>
-#include <xine/vo_scale.h>
-
-/*#define DEBUG_OUTPUT*/
-
-typedef struct syncfb_driver_s syncfb_driver_t;
-
-typedef struct {
- int value;
- int min;
- int max;
-} syncfb_property_t;
-
-typedef struct {
- vo_frame_t vo_frame;
-/* uint8_t* data_mem[3];*/
- int width, height, format;
- double ratio;
-} syncfb_frame_t;
-
-struct syncfb_driver_s {
-
- vo_driver_t vo_driver;
-
- config_values_t *config;
-
- /* X11 related stuff */
- Display *display;
- int screen;
- Drawable drawable;
- XVisualInfo vinfo;
- GC gc;
- XColor black;
-
- vo_scale_t sc;
-
- int virtual_screen_width;
- int virtual_screen_height;
- int screen_depth;
-
- syncfb_property_t props[VO_NUM_PROPERTIES];
-
- syncfb_frame_t* cur_frame;
- vo_overlay_t* overlay;
-
- /* syncfb module related stuff */
- int fd; /* file descriptor of the syncfb device */
- int yuv_format; /* either YUV420P3, YUV420P2 or YUV422 */
- int overlay_state; /* 0 = off, 1 = on */
- uint8_t* video_mem; /* mmapped video memory */
- int default_repeat; /* how many times a frame will be repeatedly displayed */
- uint32_t supported_capabilities;
-
- syncfb_config_t syncfb_config;
- syncfb_capability_t capabilities;
- syncfb_buffer_info_t bufinfo;
- syncfb_param_t params;
-
- int video_win_visibility;
- xine_t *xine;
-
- alphablend_t alphablend_extra_data;
-};
-
-typedef struct {
- video_driver_class_t driver_class;
-
- config_values_t *config;
- char *device_name;
- xine_t *xine;
-} syncfb_class_t;
-
-/*
- * internal video_out_syncfb functions
- */
-
-/* returns boolean value (1 success, 0 failure) */
-static int syncfb_overlay_on(syncfb_driver_t* this)
-{
- if(ioctl(this->fd, SYNCFB_ON)) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (on ioctl failed)\n");
- return 0;
- } else {
- this->overlay_state = 1;
- return 1;
- }
-}
-
-/* returns boolean value (1 success, 0 failure) */
-static int syncfb_overlay_off(syncfb_driver_t* this)
-{
- if(ioctl(this->fd, SYNCFB_OFF)) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (off ioctl failed)\n");
- return 0;
- } else {
- this->overlay_state = 0;
- return 1;
- }
-}
-
-static void write_frame_YUV422(syncfb_driver_t* this, syncfb_frame_t* frame)
-{
- uint8_t* y = (uint_8 *)frame->vo_frame.base[0];
- uint8_t* cb = (uint_8 *)frame->vo_frame.base[1];
- uint8_t* cr = (uint_8 *)frame->vo_frame.base[2];
- uint8_t* crp;
- uint8_t* cbp;
- uint32_t* dst32 = (uint32_t *)(this->video_mem + this->bufinfo.offset);
- int h,w;
-
- for(h = 0; h < (frame->height / 2); h++) {
- cbp = cb;
- crp = cr;
-
- for(w = 0; w < (frame->width / 2); w++) {
- *dst32++ = (*y) + ((*cb)<<8) + ((*(y+1))<<16) + ((*cr)<<24);
- y++; y++; cb++; cr++;
- }
-
- dst32 += (this->syncfb_config.src_pitch - frame->width) / 2;
-
- for(w=0; w < (frame->width / 2); w++) {
- *dst32++ = (*y) + ((*cbp)<<8) + ((*(y+1))<<16) + ((*crp)<<24);
- y++; y++; cbp++; crp++;
- }
-
- dst32 += (this->syncfb_config.src_pitch - frame->width) / 2;
- }
-}
-
-static void write_frame_YUV420P2(syncfb_driver_t* this, syncfb_frame_t* frame)
-{
- uint8_t* y = (uint8_t *)frame->vo_frame.base[0];
- uint8_t* cb = (uint8_t *)frame->vo_frame.base[1];
- uint8_t* cr = (uint8_t *)frame->vo_frame.base[2];
- uint8_t* dst8 = this->video_mem + this->bufinfo.offset_p2;
- int h, w;
-
- register uint32_t* tmp32;
- register uint8_t* rcr;
- register uint8_t* rcb;
-
- rcr = cr;
- rcb = cb;
-
- for(h = 0; h < (frame->height / 2); h++) {
- tmp32 = (uint32_t *)dst8;
- w = (frame->width / 8) * 2;
-
- while(w--) {
- register uint32_t temp;
-
- temp = (*rcb) | (*rcr << 8);
- rcr++;
- rcb++;
- temp |= (*rcb << 16) | (*rcr << 24);
- rcr++;
- rcb++;
- *tmp32 = temp;
- tmp32++;
- }
-
- dst8 += this->syncfb_config.src_pitch;
- }
-
- dst8 = this->video_mem + this->bufinfo.offset;
- for(h = 0; h < frame->height; h++) {
- xine_fast_memcpy(dst8, y, frame->width);
- y += frame->width;
- dst8 += this->syncfb_config.src_pitch;
- }
-}
-
-static void write_frame_YUV420P3(syncfb_driver_t* this, syncfb_frame_t* frame)
-{
- uint8_t* y = (uint8_t *)frame->vo_frame.base[0];
- uint8_t* cb = (uint8_t *)frame->vo_frame.base[1];
- uint8_t* cr = (uint8_t *)frame->vo_frame.base[2];
- uint8_t* dst8 = this->video_mem + this->bufinfo.offset;
- int h, half_width = (frame->width/2);
-
- for(h = 0; h < frame->height; h++) {
- xine_fast_memcpy(dst8, y, frame->width);
- y += frame->width;
- dst8 += this->syncfb_config.src_pitch;
- }
-
- dst8 = this->video_mem;
- for(h = 0; h < (frame->height / 2); h++) {
- xine_fast_memcpy((dst8 + this->bufinfo.offset_p2), cb, half_width);
- xine_fast_memcpy((dst8 + this->bufinfo.offset_p3), cr, half_width);
-
- cb += half_width;
- cr += half_width;
-
- dst8 += (this->syncfb_config.src_pitch / 2);
- }
-}
-
-static void write_frame_YUY2(syncfb_driver_t* this, syncfb_frame_t* frame)
-{
- uint8_t* src8 = (uint8_t *)frame->vo_frame.base[0];
- uint8_t* dst8 = (uint8_t *)(this->video_mem + this->bufinfo.offset);
- int h, double_width = (frame->width * 2);
-
- for(h = 0; h < frame->height; h++) {
- xine_fast_memcpy(dst8, src8, double_width);
-
- dst8 += (this->syncfb_config.src_pitch * 2);
- src8 += double_width;
- }
-}
-
-static void write_frame_sfb(syncfb_driver_t* this, syncfb_frame_t* frame)
-{
- switch(frame->format) {
- case XINE_IMGFMT_YUY2:
- if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV422))
- write_frame_YUY2(this, frame);
- else
- xprintf(this->xine, XINE_VERBOSITY_LOG,
- _("video_out_syncfb: error. (YUY2 not supported by your graphic card)\n"));
- break;
-
- case XINE_IMGFMT_YV12:
- switch(this->yuv_format) {
- case VIDEO_PALETTE_YUV422:
- write_frame_YUV422(this, frame);
- break;
- case VIDEO_PALETTE_YUV420P2:
- write_frame_YUV420P2(this, frame);
- break;
- case VIDEO_PALETTE_YUV420P3:
- write_frame_YUV420P3(this, frame);
- break;
- default:
- xprintf(this->xine, XINE_VERBOSITY_LOG,
- _("video_out_syncfb: error. (YV12 not supported by your graphic card)\n"));
- }
- break;
-
- default:
- xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_syncfb: error. (unknown frame format)\n");
- break;
- }
-
- frame->vo_frame.free(&frame->vo_frame);
-}
-
-static void free_framedata(syncfb_frame_t* frame)
-{
-/* if(frame->data_mem[0]) {
- free(frame->data_mem[0]);
- frame->data_mem[0] = NULL;
- }
-
- if(frame->data_mem[1]) {
- free(frame->data_mem[1]);
- frame->data_mem[1] = NULL;
- }
-
- if(frame->data_mem[2]) {
- free(frame->data_mem[2]);
- frame->data_mem[2] = NULL;
- }*/
-
- if(frame->vo_frame.base[0]) {
- free(frame->vo_frame.base[0]);
- frame->vo_frame.base[0] = NULL;
- }
-
- if(frame->vo_frame.base[1]) {
- free(frame->vo_frame.base[1]);
- frame->vo_frame.base[1] = NULL;
- }
-
- if(frame->vo_frame.base[2]) {
- free(frame->vo_frame.base[2]);
- frame->vo_frame.base[2] = NULL;
- }
-}
-
-static void syncfb_clean_output_area(syncfb_driver_t* this)
-{
- XLockDisplay (this->display);
-
- XSetForeground (this->display, this->gc, this->black.pixel);
-
- XFillRectangle(this->display, this->drawable, this->gc,
- this->sc.gui_x, this->sc.gui_y, this->sc.gui_width, this->sc.gui_height);
-
- XUnlockDisplay (this->display);
-}
-
-
-static void syncfb_compute_ideal_size (syncfb_driver_t *this)
-{
- _x_vo_scale_compute_ideal_size( &this->sc );
-}
-
-/* make ideal width/height "fit" into the gui */
-static void syncfb_compute_output_size(syncfb_driver_t *this)
-{
- _x_vo_scale_compute_output_size( &this->sc );
-
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (frame source %d x %d, screen output %d x %d)\n",
- this->sc.delivered_width, this->sc.delivered_height,
- this->sc.output_width, this->sc.output_height);
-#endif
-
- /*
- * configuring SyncFB module from this point on.
- */
- syncfb_overlay_off(this);
-
- /* sanity checking - certain situations *may* crash the SyncFB module, so
- * take care that we always have valid numbers.
- */
- if(this->sc.output_xoffset >= 0 && this->sc.output_yoffset >= 0 &&
- this->cur_frame->width > 0 && this->cur_frame->height > 0 &&
- this->sc.output_width > 0 && this->sc.output_height > 0 &&
- this->cur_frame->format > 0 && this->video_win_visibility) {
-
- if(ioctl(this->fd, SYNCFB_GET_CONFIG, &this->syncfb_config))
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (get_config ioctl failed)\n");
-
- this->syncfb_config.syncfb_mode = SYNCFB_FEATURE_SCALE | SYNCFB_FEATURE_CROP;
-
- if(this->props[VO_PROP_INTERLACED].value)
- this->syncfb_config.syncfb_mode |= SYNCFB_FEATURE_DEINTERLACE;
-
- switch(this->cur_frame->format) {
- case XINE_IMGFMT_YV12:
- this->syncfb_config.src_palette = this->yuv_format;
- break;
- case XINE_IMGFMT_YUY2:
- this->syncfb_config.src_palette = VIDEO_PALETTE_YUV422;
- break;
- default:
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (unknown frame format)\n");
- this->syncfb_config.src_palette = 0;
- break;
- }
-
- this->syncfb_config.fb_screen_size = this->virtual_screen_width * this->virtual_screen_height * (this->screen_depth / 8) * 2;
- this->syncfb_config.src_width = this->cur_frame->width;
- this->syncfb_config.src_height = this->cur_frame->height;
-
- this->syncfb_config.image_width = this->sc.output_width;
- this->syncfb_config.image_height = this->sc.output_height;
-
- this->syncfb_config.image_xorg = this->sc.output_xoffset + this->sc.gui_win_x;
- this->syncfb_config.image_yorg = this->sc.output_yoffset + this->sc.gui_win_y;
-
- this->syncfb_config.src_crop_top = this->sc.displayed_yoffset;
- this->syncfb_config.src_crop_bot = (this->props[VO_PROP_INTERLACED].value && this->sc.displayed_yoffset == 0) ? 1 : this->sc.displayed_yoffset;
- this->syncfb_config.src_crop_left = this->sc.displayed_xoffset;
- this->syncfb_config.src_crop_right = this->sc.displayed_xoffset;
-
- this->syncfb_config.default_repeat = (this->props[VO_PROP_INTERLACED].value) ? 1 : this->default_repeat;
-
- if(this->capabilities.palettes & (1<<this->syncfb_config.src_palette)) {
- if(ioctl(this->fd,SYNCFB_SET_CONFIG,&this->syncfb_config))
- xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_syncfb: error. (set_config ioctl failed)\n");
-
- syncfb_overlay_on(this);
- }
- }
-}
-
-/*
- * public functions defined and used by the xine interface
- */
-
-static int syncfb_redraw_needed(vo_driver_t* this_gen)
-{
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
-
- int ret = 0;
-
- if( _x_vo_scale_redraw_needed( &this->sc ) ) {
-
- syncfb_compute_output_size (this);
-
- syncfb_clean_output_area (this);
-
- ret = 1;
- }
-
- return ret;
-}
-
-static uint32_t syncfb_get_capabilities (vo_driver_t *this_gen)
-{
- syncfb_driver_t *this = (syncfb_driver_t *) this_gen;
-
- return this->supported_capabilities;
-}
-
-static void syncfb_frame_field (vo_frame_t *vo_img, int which_field)
-{
- /* not needed for SyncFB */
-}
-
-static void syncfb_frame_dispose(vo_frame_t* vo_img)
-{
- syncfb_frame_t* frame = (syncfb_frame_t *) vo_img;
-
- if(frame) {
- free_framedata(frame);
- free(frame);
- }
-}
-
-static vo_frame_t* syncfb_alloc_frame(vo_driver_t* this_gen)
-{
- /* syncfb_driver_t *this = (syncfb_driver_t *) this_gen; */
- syncfb_frame_t *frame;
-
- frame = (syncfb_frame_t *) xine_xmalloc(sizeof(syncfb_frame_t));
- if(!frame)
- return NULL;
-
- pthread_mutex_init(&frame->vo_frame.mutex, NULL);
-
- frame->vo_frame.base[0] = NULL;
- frame->vo_frame.base[1] = NULL;
- frame->vo_frame.base[2] = NULL;
-
- /*
- * supply required functions
- */
- frame->vo_frame.proc_slice = NULL;
- frame->vo_frame.proc_frame = NULL;
- frame->vo_frame.field = syncfb_frame_field;
- frame->vo_frame.dispose = syncfb_frame_dispose;
-
- frame->vo_frame.driver = this_gen;
-
- return (vo_frame_t *) frame;
-}
-
-static void syncfb_update_frame_format(vo_driver_t* this_gen,
- vo_frame_t* frame_gen,
- uint32_t width, uint32_t height,
- double ratio, int format, int flags)
-{
- syncfb_driver_t *this = (syncfb_driver_t *) this_gen;
- syncfb_frame_t *frame = (syncfb_frame_t *) frame_gen;
- /* uint32_t frame_size = width*height; */
-
- if((frame->width != width)
- || (frame->height != height)
- || (frame->format != format)) {
-
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (update frame format: old values [width=%d, height=%d, format=%04x], new values [width=%d, height=%d, format=%04x])\n", frame->width, frame->height, frame->format, width, height, format);
-#endif
- free_framedata(frame);
-
- frame->width = width;
- frame->height = height;
- frame->format = format;
-
- switch(format) {
- case XINE_IMGFMT_YV12:
-/* frame->vo_frame.base[0] = xine_xmalloc_aligned(16, frame_size, (void **)&frame->data_mem[0]);
- frame->vo_frame.base[1] = xine_xmalloc_aligned(16, frame_size/4, (void **)&frame->data_mem[1]);
- frame->vo_frame.base[2] = xine_xmalloc_aligned(16, frame_size/4, (void **)&frame->data_mem[2]);*/
- frame->vo_frame.pitches[0] = 8*((width + 7) / 8);
- frame->vo_frame.pitches[1] = 8*((width + 15) / 16);
- frame->vo_frame.pitches[2] = 8*((width + 15) / 16);
- frame->vo_frame.base[0] = malloc(frame->vo_frame.pitches[0] * height);
- frame->vo_frame.base[1] = malloc(frame->vo_frame.pitches[1] * ((height+1)/2));
- frame->vo_frame.base[2] = malloc(frame->vo_frame.pitches[2] * ((height+1)/2));
- break;
- case XINE_IMGFMT_YUY2:
-/* frame->vo_frame.base[0] = xine_xmalloc_aligned(16, (frame_size*2), (void **)&frame->data_mem[0]);*/
- frame->vo_frame.pitches[0] = 8*((width + 3) / 4);
- frame->vo_frame.base[0] = malloc(frame->vo_frame.pitches[0] * height);
- frame->vo_frame.base[1] = NULL;
- frame->vo_frame.base[2] = NULL;
- break;
- default:
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (unable to allocate "
- "framedata because of unknown frame format: %04x)\n", format);
- }
-
-/* if((format == IMGFMT_YV12 && (frame->data_mem[0] == NULL || frame->data_mem[1] == NULL || frame->data_mem[2] == NULL))
- || (format == IMGFMT_YUY2 && frame->data_mem[0] == NULL)) {*/
- if((format == XINE_IMGFMT_YV12 && (frame->vo_frame.base[0] == NULL || frame->vo_frame.base[1] == NULL || frame->vo_frame.base[2] == NULL))
- || (format == XINE_IMGFMT_YUY2 && frame->vo_frame.base[0] == NULL)) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (framedata allocation failed: out of memory)\n");
-
- free_framedata(frame);
- }
- }
-
- frame->ratio = ratio;
-}
-
-static void syncfb_overlay_blend(vo_driver_t* this_gen, vo_frame_t* frame_gen, vo_overlay_t* overlay)
-{
- syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen;
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
-
- this->alphablend_extra_data.offset_x = frame_gen->overlay_offset_x;
- this->alphablend_extra_data.offset_y = frame_gen->overlay_offset_y;
-
- /* alpha blend here */
- if (overlay->rle) {
- if (frame->format == XINE_IMGFMT_YV12)
- _x_blend_yuv(frame->vo_frame.base, overlay, frame->width, frame->height, frame->vo_frame.pitches, &this->alphablend_extra_data);
- else
- _x_blend_yuy2(frame->vo_frame.base[0], overlay, frame->width, frame->height, frame->vo_frame.pitches[0], &this->alphablend_extra_data);
- }
-}
-
-static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen)
-{
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
- syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen;
-
- this->cur_frame = frame;
-
- /*
- * let's see if this frame is different in size / aspect
- * ratio from the previous one
- */
- if((frame->width != this->sc.delivered_width)
- || (frame->height != this->sc.delivered_height)
- || (frame->ratio != this->sc.delivered_ratio)) {
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (frame format changed)\n");
-#endif
-
- this->sc.delivered_width = frame->width;
- this->sc.delivered_height = frame->height;
- this->sc.delivered_ratio = frame->ratio;
-
- this->sc.crop_left = frame->vo_frame.crop_left;
- this->sc.crop_right = frame->vo_frame.crop_right;
- this->sc.crop_top = frame->vo_frame.crop_top;
- this->sc.crop_bottom = frame->vo_frame.crop_bottom;
-
- syncfb_compute_ideal_size(this);
-
- this->sc.force_redraw = 1;
- }
-
- /*
- * tell gui that we are about to display a frame,
- * ask for offset and output size
- */
- syncfb_redraw_needed(this_gen);
-
- /* the rest is only successful and safe, if the overlay is really on */
- if(this->overlay_state) {
- if(this->bufinfo.id != -1) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (invalid syncfb image buffer state)\n");
- frame->vo_frame.free(&frame->vo_frame);
-
- return;
- }
-
- if(ioctl(this->fd, SYNCFB_REQUEST_BUFFER, &this->bufinfo))
- xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_syncfb: error. (request ioctl failed)\n");
-
- if(this->bufinfo.id == -1) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (syncfb module couldn't allocate image buffer)\n");
- frame->vo_frame.free(&frame->vo_frame);
-
- /*
- * there are several "fixable" situations when this request will fail.
- * for example when the screen resolution changes, the kernel module
- * will get confused - reinitializing everything will fix things for
- * the next frame in that case.
- */
- syncfb_compute_ideal_size(this);
- syncfb_compute_output_size(this);
- syncfb_clean_output_area(this);
-
- return;
- }
-
- write_frame_sfb(this, frame);
-
- if(ioctl(this->fd, SYNCFB_COMMIT_BUFFER, &this->bufinfo))
- xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_syncfb: error. (commit ioctl failed)\n");
- }
- else
- frame->vo_frame.free(&frame->vo_frame);
-
- this->bufinfo.id = -1;
-}
-
-static int syncfb_get_property(vo_driver_t* this_gen, int property)
-{
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
-
- switch (property) {
- case VO_PROP_WINDOW_WIDTH:
- this->props[property].value = this->sc.gui_width;
- break;
- case VO_PROP_WINDOW_HEIGHT:
- this->props[property].value = this->sc.gui_height;
- break;
- case VO_PROP_OUTPUT_WIDTH:
- this->props[property].value = this->sc.output_width;
- break;
- case VO_PROP_OUTPUT_HEIGHT:
- this->props[property].value = this->sc.output_height;
- break;
- case VO_PROP_OUTPUT_XOFFSET:
- this->props[property].value = this->sc.output_xoffset;
- break;
- case VO_PROP_OUTPUT_YOFFSET:
- this->props[property].value = this->sc.output_yoffset;
- break;
- }
-
- return this->props[property].value;
-}
-
-static int syncfb_set_property(vo_driver_t* this_gen, int property, int value)
-{
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
-
- switch (property) {
- case VO_PROP_INTERLACED:
- this->props[property].value = value;
-
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (VO_PROP_INTERLACED(%d))\n",
- this->props[property].value);
-#endif
-
- syncfb_compute_ideal_size(this);
- syncfb_compute_output_size(this);
- syncfb_clean_output_area(this);
- break;
-
- case VO_PROP_ASPECT_RATIO:
- if(value >= XINE_VO_ASPECT_NUM_RATIOS)
- value = XINE_VO_ASPECT_AUTO;
-
- this->props[property].value = value;
- this->sc.user_ratio = value;
-
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (VO_PROP_ASPECT_RATIO(%d))\n",
- this->props[property].value);
-#endif
-
- syncfb_compute_ideal_size(this);
- syncfb_compute_output_size(this);
- syncfb_clean_output_area(this);
- break;
-
- case VO_PROP_ZOOM_X:
- if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) {
- this->props[property].value = value;
- this->sc.zoom_factor_x = (double)value / (double)XINE_VO_ZOOM_STEP;
-
- syncfb_compute_ideal_size (this);
-
- this->sc.force_redraw = 1;
- }
-/*
- printf("video_out_syncfb: info. (the zooming feature is not supported at the moment because of a bug with the SyncFB kernel driver, please refer to README.syncfb)\n");
-*/
- break;
-
- case VO_PROP_ZOOM_Y:
- if ((value >= XINE_VO_ZOOM_MIN) && (value <= XINE_VO_ZOOM_MAX)) {
- this->props[property].value = value;
- this->sc.zoom_factor_y = (double)value / (double)XINE_VO_ZOOM_STEP;
-
- syncfb_compute_ideal_size (this);
-
- this->sc.force_redraw = 1;
- }
-/*
- printf("video_out_syncfb: info. (the zooming feature is not supported at the moment because of a bug with the SyncFB kernel driver, please refer to README.syncfb)\n");
-*/
- break;
-
- case VO_PROP_CONTRAST:
- this->props[property].value = value;
-
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (VO_PROP_CONTRAST(%d))\n",
- this->props[property].value);
-#endif
-
- this->params.contrast = value;
- this->params.brightness = this->props[VO_PROP_BRIGHTNESS].value;
- this->params.image_width = this->syncfb_config.image_width; /* FIXME */
- this->params.image_height = this->syncfb_config.image_height;
- this->params.image_xorg = this->syncfb_config.image_xorg;
- this->params.image_yorg = this->syncfb_config.image_yorg;
-
- if(ioctl(this->fd,SYNCFB_SET_PARAMS,&this->params))
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (setting of contrast value failed)\n");
-
- break;
-
- case VO_PROP_BRIGHTNESS:
- this->props[property].value = value;
-
-#ifdef DEBUG_OUTPUT
- printf("video_out_syncfb: debug. (VO_PROP_BRIGHTNESS(%d))\n",
- this->props[property].value);
-#endif
-
- this->params.brightness = value;
- this->params.contrast = this->props[VO_PROP_CONTRAST].value;
- this->params.image_width = this->syncfb_config.image_width; /* FIXME */
- this->params.image_height = this->syncfb_config.image_height;
- this->params.image_xorg = this->syncfb_config.image_xorg;
- this->params.image_yorg = this->syncfb_config.image_yorg;
-
- if(ioctl(this->fd,SYNCFB_SET_PARAMS,&this->params))
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: error. (setting of brightness value failed)\n");
-
- break;
- }
-
- return value;
-}
-
-static void syncfb_get_property_min_max(vo_driver_t *this_gen,
- int property, int *min, int *max)
-{
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
-
- *min = this->props[property].min;
- *max = this->props[property].max;
-}
-
-static int syncfb_gui_data_exchange(vo_driver_t* this_gen, int data_type,
- void *data)
-{
- syncfb_driver_t* this = (syncfb_driver_t *) this_gen;
-
- switch (data_type) {
- case XINE_GUI_SEND_DRAWABLE_CHANGED:
- this->drawable = (Drawable) data;
-
- XLockDisplay (this->display);
- XFreeGC(this->display, this->gc);
- this->gc = XCreateGC (this->display, this->drawable, 0, NULL);
- XUnlockDisplay (this->display);
- break;
- case XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO:
- {
- int x1, y1, x2, y2;
- x11_rectangle_t *rect = data;
-
- _x_vo_scale_translate_gui2video(&this->sc, rect->x, rect->y,
- &x1, &y1);
- _x_vo_scale_translate_gui2video(&this->sc, rect->x + rect->w, rect->y + rect->h,
- &x2, &y2);
- rect->x = x1;
- rect->y = y1;
- rect->w = x2-x1;
- rect->h = y2-y1;
- }
- break;
- /*
- case XINE_GUI_DATA_EX_VIDEOWIN_VISIBLE:
- this->video_win_visibility = (int)(int *)data;
- syncfb_compute_output_size(this);
- break;
- */
-
- default:
- return -1;
- }
-
- return 0;
-}
-
-static void syncfb_dispose(vo_driver_t *this_gen)
-{
- syncfb_driver_t *this = (syncfb_driver_t *) this_gen;
-
- /* get it off the screen - I wanna see my desktop again :-) */
- syncfb_overlay_off(this);
-
- /* don't know if it is necessary are even right, but anyway...?! */
- munmap(0, this->capabilities.memory_size);
-
- close(this->fd);
-
- XLockDisplay (this->display);
- XFreeGC(this->display, this->gc);
- XUnlockDisplay (this->display);
-
- _x_alphablend_free(&this->alphablend_extra_data);
-
- free(this);
-}
-
-static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *visual_gen) {
-
- syncfb_class_t *class = (syncfb_class_t *) class_gen;
- config_values_t *config = class->config;
- syncfb_driver_t* this;
- Display* display = NULL;
- unsigned int i;
- x11_visual_t* visual = (x11_visual_t *) visual_gen;
- XColor dummy;
- XWindowAttributes attr;
-
- display = visual->display;
-
- if(!(this = xine_xmalloc(sizeof (syncfb_driver_t))))
- return NULL;
-
- _x_alphablend_init(&this->alphablend_extra_data, class->xine);
-
- /* check for syncfb device */
- if((this->fd = open(class->device_name, O_RDWR)) < 0) {
- xprintf(class->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: aborting. (unable to open syncfb device \"%s\")\n", class->device_name);
- free(this);
- return NULL;
- }
-
- this->xine = class->xine;
-
- /* get capabilities from the syncfb module */
- if(ioctl(this->fd, SYNCFB_GET_CAPS, &this->capabilities)) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: aborting. (syncfb_get_caps ioctl failed)\n");
-
- close(this->fd);
- free(this);
-
- return NULL;
- }
-
- /* mmap whole video memory */
- this->video_mem = (uint8_t *) mmap(0, this->capabilities.memory_size, PROT_WRITE, MAP_SHARED, this->fd, 0);
-
- if(this->video_mem == MAP_FAILED) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: aborting. (mmap of video memory failed)\n");
-
- close(this->fd);
- free(this);
-
- return NULL;
- }
-
- /*
- * init properties and capabilities
- */
- for (i = 0; i<VO_NUM_PROPERTIES; i++) {
- this->props[i].value = 0;
- this->props[i].min = 0;
- this->props[i].max = 0;
- }
-
- this->props[VO_PROP_INTERLACED].value = 0;
- this->sc.user_ratio = this->props[VO_PROP_ASPECT_RATIO].value = XINE_VO_ASPECT_AUTO;
- this->props[VO_PROP_ZOOM_X].value = 100;
- this->props[VO_PROP_ZOOM_Y].value = 100;
-
- /* check for formats we need... */
- this->supported_capabilities = VO_CAP_CROP;
- this->yuv_format = 0;
-
- /*
- * simple fallback mechanism - we want YUV 4:2:0 (3 plane) but we can also
- * convert YV12 material to YUV 4:2:0 (2 plane) and YUV 4:2:2 ...
- */
- if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV420P3)) {
- this->supported_capabilities |= VO_CAP_YV12;
- this->yuv_format = VIDEO_PALETTE_YUV420P3;
- xprintf(this->xine, XINE_VERBOSITY_LOG,
- _("video_out_syncfb: info. (SyncFB module supports YUV 4:2:0 (3 plane))\n"));
- } else if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV420P2)) {
- this->supported_capabilities |= VO_CAP_YV12;
- this->yuv_format = VIDEO_PALETTE_YUV420P2;
- xprintf(this->xine, XINE_VERBOSITY_LOG,
- _("video_out_syncfb: info. (SyncFB module supports YUV 4:2:0 (2 plane))\n"));
- } else if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV422)) {
- this->supported_capabilities |= VO_CAP_YV12;
- this->yuv_format = VIDEO_PALETTE_YUV422;
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- _("video_out_syncfb: info. (SyncFB module supports YUV 4:2:2)\n"));
- }
-
- if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV422)) {
- this->supported_capabilities |= VO_CAP_YUY2;
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- _("video_out_syncfb: info. (SyncFB module supports YUY2)\n"));
- }
- if(this->capabilities.palettes & (1<<VIDEO_PALETTE_RGB565)) {
- /* FIXME: no RGB support yet
- * this->supported_capabilities |= VO_CAP_RGB;
- */
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- _("video_out_syncfb: info. (SyncFB module supports RGB565)\n"));
- }
-
- if(!this->supported_capabilities) {
- xprintf(this->xine, XINE_VERBOSITY_DEBUG,
- _("video_out_syncfb: aborting. (SyncFB module does not support YV12, YUY2 nor RGB565)\n"));
-
- munmap(0, this->capabilities.memory_size);
- close(this->fd);
- free(this);
-
- return NULL;
- }
-
- if(ioctl(this->fd,SYNCFB_GET_PARAMS,&this->params) == 0) {
- this->props[VO_PROP_CONTRAST].value = this->params.contrast;
- this->props[VO_PROP_CONTRAST].min = 0;
- this->props[VO_PROP_CONTRAST].max = 255;
-
- this->props[VO_PROP_BRIGHTNESS].value = this->params.brightness;
- this->props[VO_PROP_BRIGHTNESS].min = -128;
- this->props[VO_PROP_BRIGHTNESS].max = 127;
- } else {
- xprintf(this->xine, XINE_VERBOSITY_LOG,
- _("video_out_syncfb: info. (brightness/contrast control won\'t be available because "
- "your SyncFB kernel module seems to be outdated. Please refer to README."
- "syncfb for informations on how to update it.)\n"));
- }
-
- /* check for virtual screen size and screen depth - this is rather important
- because that data is later used for free memory calculation */
- XGetWindowAttributes(visual->display, DefaultRootWindow(visual->display), &attr);
-
- this->virtual_screen_height = attr.height;
- this->virtual_screen_width = attr.width;
- this->screen_depth = attr.depth;
-
- /* initialize the rest of the variables now with default values */
- this->bufinfo.id = -1;
- this->config = config;
- this->cur_frame = NULL;
-
- /* FIXME: setting the default_repeat to anything higher than 1 will result
- in a distorted video, so for now, set this manually to 0 until
- the kernel driver is fixed... */
-#if 0
- this->default_repeat = config->register_range(config,
- "video.device.syncfb_default_repeat", 3, 1, 4,
- _("default number of frame repetitions"),
- _("This specifies how many times a single video "
- "frame will be displayed consecutively."),
- 10, NULL, NULL);
-#endif
- this->default_repeat = 0;
-
- this->display = visual->display;
- this->drawable = visual->d;
- this->gc = XCreateGC (this->display, this->drawable, 0, NULL);
-
- _x_vo_scale_init (&this->sc, 1, 0, config );
- this->sc.frame_output_cb = visual->frame_output_cb;
- this->sc.user_data = visual->user_data;
-
- this->overlay = NULL;
- this->screen = visual->screen;
- this->video_win_visibility = 1;
-
- XAllocNamedColor(this->display,
- DefaultColormap(this->display, this->screen),
- "black", &this->black, &dummy);
-
- this->vo_driver.get_capabilities = syncfb_get_capabilities;
- this->vo_driver.alloc_frame = syncfb_alloc_frame;
- this->vo_driver.update_frame_format = syncfb_update_frame_format;
- this->vo_driver.overlay_begin = NULL; /* not used */
- this->vo_driver.overlay_blend = syncfb_overlay_blend;
- this->vo_driver.overlay_end = NULL; /* not used */
- this->vo_driver.display_frame = syncfb_display_frame;
- this->vo_driver.get_property = syncfb_get_property;
- this->vo_driver.set_property = syncfb_set_property;
- this->vo_driver.get_property_min_max = syncfb_get_property_min_max;
- this->vo_driver.gui_data_exchange = syncfb_gui_data_exchange;
- this->vo_driver.dispose = syncfb_dispose;
- this->vo_driver.redraw_needed = syncfb_redraw_needed;
-
- return &this->vo_driver;
-}
-
-/*
- * class functions
- */
-static void *init_class (xine_t *xine, void *visual_gen) {
-
- syncfb_class_t *this;
- char* device_name;
- int fd;
-
- device_name = xine->config->register_filename(xine->config, "video.device.syncfb_device", "/dev/syncfb",
- XINE_CONFIG_STRING_IS_DEVICE_NAME,
- _("SyncFB device name"),
- _("Specifies the file name for the SyncFB (TeleTux) device "
- "to be used.\nThis setting is security critical, "
- "because when changed to a different file, xine "
- "can be used to fill this file with arbitrary content. "
- "So you should be careful that the value you enter "
- "really is a proper framebuffer device."),
- XINE_CONFIG_SECURITY, NULL, NULL);
-
- /* check for syncfb device */
- if((fd = open(device_name, O_RDWR)) < 0) {
- xprintf(xine, XINE_VERBOSITY_DEBUG,
- "video_out_syncfb: aborting. (unable to open syncfb device \"%s\")\n", device_name);
- return NULL;
- }
- close(fd);
-
- /*
- * from this point on, nothing should go wrong anymore
- */
- this = (syncfb_class_t *) xine_xmalloc (sizeof (syncfb_class_t));
-
- this->driver_class.open_plugin = open_plugin;
- this->driver_class.identifier = "SyncFB";
- this->driver_class.description = N_("xine video output plugin using the SyncFB module for Matrox G200/G400 cards");
- this->driver_class.dispose = default_video_driver_class_dispose;
-
- this->config = xine->config;
- this->xine = xine;
- this->device_name = device_name;
-
- return this;
-}
-
-static const vo_info_t vo_info_syncfb = {
- 7, /* priority */
- XINE_VISUAL_TYPE_X11 /* visual type */
-};
-
-/*
- * exported plugin catalog entry
- */
-
-const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_OUT, 22, "SyncFB", XINE_VERSION_CODE, &vo_info_syncfb, init_class },
- { PLUGIN_NONE, 0, "", 0, NULL, NULL }
-};
-
diff --git a/src/video_out/video_out_syncfb.h b/src/video_out/video_out_syncfb.h
deleted file mode 100644
index 1fc3df83a..000000000
--- a/src/video_out/video_out_syncfb.h
+++ /dev/null
@@ -1,236 +0,0 @@
-#ifndef __LINUX_SYNCFB_H
-#define __LINUX_SYNCFB_H
-
-#ifdef __KERNEL__
-#include <linux/version.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/errno.h>
-#include <linux/malloc.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-#include <linux/videodev.h>
-
-#include <asm/mtrr.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/io.h>
-
-#define TRUE 1
-#define FALSE 0
-
-#define SFB_STATUS_FREE 0
-#define SFB_STATUS_OFFS 1
-#define SFB_STATUS_WAIT 2
-#define SFB_STATUS_LIVE 3
-
-#endif /* KERNEL */
-
-
-#ifndef AARONS_TYPES
-typedef unsigned long uint_32;
-typedef unsigned char uint_8;
-#endif
-
-#define SYNCFB_MAJOR 178
-
-#define SYNCFB_ERROR_NO_ERROR 0;
-#define SYNCFB_ERROR_NO_BUFFER_AVAILABLE 1;
-#define SYNCFB_ERROR_PALETTE_NOT_SUPPORTED 2;
-#define SYNCFB_ERROR_NOT_ENOUGH_MEMORY 3;
-
-
-
-#ifndef __LINUX_VIDEODEV_H
-#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
-#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
-#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
-#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
-#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
-#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
-#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
-#define VIDEO_PALETTE_YUYV 8
-#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
-#define VIDEO_PALETTE_YUV420 10
-#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
-#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
-#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
-#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
-#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
-#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
-#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
-#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
-#endif
-
-
-#define VIDEO_PALETTE_YUV422P3 13 /* YUV 4:2:2 Planar (3 Plane, same as YUV422P) */
-#define VIDEO_PALETTE_YUV422P2 17 /* YUV 4:2:2 Planar (2 Plane) */
-
-#define VIDEO_PALETTE_YUV411P3 14 /* YUV 4:1:1 Planar (3 Plane, same as YUV411P) */
-#define VIDEO_PALETTE_YUV411P2 18 /* YUV 4:1:1 Planar (2 Plane) */
-
-#define VIDEO_PALETTE_YUV420P3 15 /* YUV 4:2:0 Planar (3 Plane, same as YUV420P) */
-#define VIDEO_PALETTE_YUV420P2 19 /* YUV 4:2:0 Planar (2 Plane) */
-
-#define VIDEO_PALETTE_YUV410P3 16 /* YUV 4:1:0 Planar (3 Plane, same as YUV410P) */
-#define VIDEO_PALETTE_YUV410P2 20 /* YUV 4:1:0 Planar (2 Plane) */
-
-
-
-#define SYNCFB_FEATURE_SCALE_H 1
-#define SYNCFB_FEATURE_SCALE_V 2
-#define SYNCFB_FEATURE_SCALE 3
-#define SYNCFB_FEATURE_CROP 4
-#define SYNCFB_FEATURE_OFFSET 8
-#define SYNCFB_FEATURE_DEINTERLACE 16
-#define SYNCFB_FEATURE_PROCAMP 32
-#define SYNCFB_FEATURE_TRANSITIONS 64
-#define SYNCFB_FEATURE_COLKEY 128
-#define SYNCFB_FEATURE_MIRROR_H 256
-#define SYNCFB_FEATURE_MIRROR_V 512
-#define SYNCFB_FEATURE_BLOCK_REQUEST 1024
-#define SYNCFB_FEATURE_FREQDIV2 2048
-
-
-typedef struct syncfb_config_s
-{
- uint_32 syncfb_mode; /* bitfield: turn on/off the available features */
- uint_32 error_code; /* RO: returns 0 on successful config calls, error code otherwise */
-
- uint_32 fb_screen_size; /* WO, size in bytes of video memory reserved for fbdev */
- uint_32 fb_screen_width; /* WO, visible screen width in pixel */
- uint_32 fb_screen_height; /* WO, visible screen height in pixel */
-
- uint_32 buffers; /* RO, number of available buffers */
- uint_32 buffer_size; /* RO, filled in by syncfb */
-
- uint_32 default_repeat; /* default repeat time for a single frame, can be overridden in syncfb_buffer_info_t */
-
- uint_32 src_width; /* source image width in pixel */
- uint_32 src_height; /* source image height in pixel */
- uint_32 src_palette; /* set palette mode, see videodev.h for palettes */
- uint_32 src_pitch; /* RO: filled in by ioctl: actual line length in pixel */
-
- uint_32 image_xorg; /* x position of the image on the screen */
- uint_32 image_yorg; /* y position of the image on the screen */
-
- /* if syncfb has FEATURE_SCALE */
- uint_32 scale_filters; /* 0: no filtering, 255: all filters on */
- uint_32 image_width; /* onscreen image width */
- uint_32 image_height; /* onscreen image height */
-
- /* if syncfb has FEATURE_CROP */
- uint_32 src_crop_left; /* */
- uint_32 src_crop_right; /* */
- uint_32 src_crop_top; /* */
- uint_32 src_crop_bot; /* */
-
- /* if syncfb has FEATURE_OFFSET */
- uint_32 image_offset_left; /* */
- uint_32 image_offset_right; /* */
- uint_32 image_offset_top; /* */
- uint_32 image_offset_bot; /* */
-
- /* if syncfb has FEATURE_COLKEY */
- uint_8 colkey_red;
- uint_8 colkey_green;
- uint_8 colkey_blue;
-
-} syncfb_config_t;
-
-
-/*
- picture parameters,
-*/
-typedef struct syncfb_param_s
-{
- /* the idea is to enable smooth transitions between eg. image sizes (not yet implemented) */
- /* if syncfb has FEATURE_TRANSITIONS */
- uint_32 transition_time;
-
- /* if syncfb has FEATURE_PROCAMP */
- uint_32 contrast; /* 0: least contrast, 1000: normal contrast, */
- uint_32 brightness;
- uint_32 color; /* for syncfb_matrox: color=0: b/w else: full color */
-
- /* if syncfb has FEATURE_SCALE , currently only supported in CONFIG call */
- uint_8 scale_filters; /* 0: no filtering, 255: all filters on */
- uint_32 image_xorg; /* x position of the image on the screen */
- uint_32 image_yorg; /* y position of the image on the screen */
- uint_32 image_width; /* onscreen image width */
- uint_32 image_height; /* onscreen image height */
-
-} syncfb_param_t;
-
-
-
-typedef struct syncfb_status_info_s
-{
- uint_32 field_cnt; /* basically all vbi's since the start of syncfb */
- uint_32 frame_cnt; /* number of frames comitted & output */
-
- uint_32 hold_field_cnt; /* number of repeated fields becaus no new data was available */
- uint_32 skip_field_cnt; /* skipped fields when fifo was about to fill up */
-
- uint_32 request_frames; /* number of request_buffer calls */
- uint_32 commit_frames; /* number of commit_buffer calls */
-
- uint_32 failed_requests; /* number of calls to request_buffer that failed */
-
- uint_32 buffers_waiting;
- uint_32 buffers_free;
-
-} syncfb_status_info_t;
-
-
-
-
-typedef struct syncfb_capability_s
-{
- char name[64]; /* A name for the syncfb ... */
- uint_32 palettes; /* supported palettes - see videodev.h for palettes, test the corresponding bit here */
- uint_32 features; /* supported features - see SYNCFB_FEATURE_* */
- uint_32 memory_size; /* total size of mappable video memory */
-
-} syncfb_capability_t;
-
-
-
-typedef struct syncfb_buffer_info_s
-{
- int id; /* buffer id: a return value of -1 means no buffer available */
- uint_32 repeat; /* the buffer will be shown <repeat> times */
- uint_32 offset; /* buffer offset from start of video memory */
- uint_32 offset_p2; /* yuv plane 2 buffer offset from start of video memory */
- uint_32 offset_p3; /* yuv plane 3 buffer offset from start of video memory */
-
-} syncfb_buffer_info_t;
-
-
-
-
-
-
-
-/* get syncfb capabilities */
-#define SYNCFB_GET_CAPS _IOR('J', 1, syncfb_config_t)
-
-#define SYNCFB_GET_CONFIG _IOR('J', 2, syncfb_config_t)
-#define SYNCFB_SET_CONFIG _IOR('J', 3, syncfb_config_t)
-#define SYNCFB_ON _IO ('J', 4)
-#define SYNCFB_OFF _IO ('J', 5)
-#define SYNCFB_REQUEST_BUFFER _IOR ('J', 6, syncfb_buffer_info_t)
-#define SYNCFB_COMMIT_BUFFER _IOR ('J', 7, syncfb_buffer_info_t)
-#define SYNCFB_STATUS _IOR ('J', 8, syncfb_status_info_t)
-#define SYNCFB_VBI _IO ('J', 9) /* simulate interrupt - debugging only */
-#define SYNCFB_SET_PARAMS _IOR('J', 10, syncfb_param_t)
-#define SYNCFB_GET_PARAMS _IOR('J', 11, syncfb_param_t)
-
-
-
-
-#endif /* __LINUX_SYNCFB_H */
-
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 3e3c0f7b5..2934b7fef 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -182,8 +182,6 @@ static const xine_config_entry_translation_t config_entry_translation[] = {
{ "video.pgx64_overlay_mode", "" },
{ "video.pgx64_saturation", "video.output.pgx64_saturation" },
{ "video.sdl_hw_accel", "video.device.sdl_hw_accel" },
- { "video.syncfb_default_repeat", "video.device.syncfb_default_repeat" },
- { "video.syncfb_device", "video.device.syncfb_device" },
{ "video.unichrome_cpu_save", "video.device.unichrome_cpu_save" },
{ "video.vertical_position", "video.output.vertical_position" },
{ "video.vidix_blue_intensity", "video.output.vidix_blue_intensity" },