aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Uoti Urpala <uau@symbol.nonexistent.invalid>2008-06-04 08:10:48 +0300
committerGravatar Uoti Urpala <uau@symbol.nonexistent.invalid>2008-06-04 08:10:48 +0300
commitd5c868325cefcd5fad53361d1dfdc9757674eb70 (patch)
treea838e509fdc2468220466e6337097b3ef590b00c
parent0cb5123c8f65b3d7715deb22ce8430eccc21996e (diff)
parent5b3834c5d1033f05d798278c33782c5563247062 (diff)
Merge svn changes up to r26979
Most of the conflicts are trivial. Conflicts: Makefile cfg-mplayer.h input/input.c libmenu/vf_menu.c libmpcodecs/dec_video.c libmpcodecs/vf_expand.c libmpcodecs/vf_vo.c libmpdemux/demux_mkv.c libmpdemux/demuxer.c libmpdemux/demuxer.h libvo/vo_directfb2.c libvo/vo_gl.c libvo/vo_winvidix.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c libvo/x11_common.c mplayer.c osdep/timer-linux.c stream/cache2.c
-rw-r--r--AUTHORS7
-rw-r--r--Changelog1
-rw-r--r--Copyright9
-rw-r--r--DOCS/man/en/mplayer.158
-rw-r--r--DOCS/man/fr/mplayer.19
-rw-r--r--DOCS/man/hu/mplayer.1118
-rw-r--r--DOCS/tech/MAINTAINERS2
-rw-r--r--DOCS/tech/dvdnav-howto.txt7
-rw-r--r--DOCS/tech/encoding-guide.txt2
-rw-r--r--DOCS/tech/encoding-tips.txt2
-rw-r--r--DOCS/tech/slave.txt3
-rw-r--r--DOCS/tech/svn-howto.txt8
-rw-r--r--DOCS/xml/en/encoding-guide.xml4
-rw-r--r--DOCS/xml/en/ports.xml6
-rw-r--r--DOCS/xml/en/video.xml14
-rw-r--r--DOCS/xml/fr/codecs.xml6
-rw-r--r--DOCS/xml/fr/encoding-guide.xml79
-rw-r--r--DOCS/xml/fr/install.xml6
-rw-r--r--DOCS/xml/fr/mencoder.xml2
-rw-r--r--DOCS/xml/fr/ports.xml262
-rw-r--r--DOCS/xml/fr/usage.xml18
-rw-r--r--DOCS/xml/hu/encoding-guide.xml4
-rw-r--r--DOCS/xml/hu/ports.xml12
-rw-r--r--DOCS/xml/hu/video.xml16
-rw-r--r--DOCS/xml/it/encoding-guide.xml182
-rw-r--r--DOCS/xml/ru/codecs.xml12
-rw-r--r--DOCS/xml/ru/encoding-guide.xml46
-rw-r--r--DOCS/xml/ru/mencoder.xml2
-rw-r--r--Makefile247
-rw-r--r--TOOLS/fastmemcpybench.c4
-rw-r--r--TOOLS/movinfo.c42
-rw-r--r--cfg-mplayer.h2
-rw-r--r--codec-cfg.c6
-rw-r--r--command.c7
-rwxr-xr-xconfigure339
-rw-r--r--cpudetect.c2
-rw-r--r--defaultopts.c6
-rw-r--r--drivers/Makefile34
-rw-r--r--drivers/mga_vid.c32
-rw-r--r--drivers/mga_vid.h53
-rw-r--r--drivers/radeon_vid.c96
-rw-r--r--drivers/tdfx_vid.c66
-rw-r--r--etc/codecs.conf10
-rw-r--r--etc/input.conf9
-rwxr-xr-xhelp/help_create.sh62
-rwxr-xr-xhelp/help_diff.sh26
-rw-r--r--help/help_mp-bg.h4
-rw-r--r--help/help_mp-cs.h2
-rw-r--r--help/help_mp-de.h2
-rw-r--r--help/help_mp-dk.h2
-rw-r--r--help/help_mp-el.h2
-rw-r--r--help/help_mp-en.h9
-rw-r--r--help/help_mp-es.h7
-rw-r--r--help/help_mp-fr.h265
-rw-r--r--help/help_mp-hu.h12
-rw-r--r--help/help_mp-it.h2
-rw-r--r--help/help_mp-ja.h2
-rw-r--r--help/help_mp-ko.h2
-rw-r--r--help/help_mp-mk.h2
-rw-r--r--help/help_mp-nb.h2
-rw-r--r--help/help_mp-nl.h3
-rw-r--r--help/help_mp-pl.h4
-rw-r--r--help/help_mp-pt_BR.h2
-rw-r--r--help/help_mp-ro.h2
-rw-r--r--help/help_mp-ru.h11
-rw-r--r--help/help_mp-sk.h3
-rw-r--r--help/help_mp-sv.h3
-rw-r--r--help/help_mp-tr.h2
-rw-r--r--help/help_mp-uk.h2
-rw-r--r--help/help_mp-zh_CN.h100
-rw-r--r--help/help_mp-zh_TW.h7
-rw-r--r--input/appleir.c152
-rw-r--r--input/ar.h5
-rw-r--r--input/input.c14
-rw-r--r--input/input.h1
-rw-r--r--input/joystick.c4
-rw-r--r--liba52/imdct.c6
-rw-r--r--liba52/liba52_changes.diff6
-rw-r--r--libaf/window.c2
-rw-r--r--libao2/ao_alsa.c30
-rw-r--r--libao2/ao_alsa5.c40
-rw-r--r--libao2/ao_arts.c2
-rw-r--r--libao2/ao_sdl.c2
-rw-r--r--libass/ass.c20
-rw-r--r--libass/ass_cache.c2
-rw-r--r--libass/ass_fontconfig.c52
-rw-r--r--libmenu/menu_filesel.c2
-rw-r--r--libmenu/vf_menu.c2
-rw-r--r--libmpcodecs/ad_hwac3.c3
-rw-r--r--libmpcodecs/ad_liba52.c1
-rw-r--r--libmpcodecs/ad_twin.c6
-rw-r--r--libmpcodecs/ae_lame.c2
-rw-r--r--libmpcodecs/dec_video.c6
-rw-r--r--libmpcodecs/img_format.c120
-rw-r--r--libmpcodecs/native/rtjpegn.h6
-rw-r--r--libmpcodecs/vd_ffmpeg.c2
-rw-r--r--libmpcodecs/vd_qtvideo.c4
-rw-r--r--libmpcodecs/vd_realvid.c2
-rw-r--r--libmpcodecs/vd_xanim.c36
-rw-r--r--libmpcodecs/vd_xvid4.c22
-rw-r--r--libmpcodecs/ve_lavc.c2
-rw-r--r--libmpcodecs/ve_qtvideo.c2
-rw-r--r--libmpcodecs/ve_x264.c2
-rw-r--r--libmpcodecs/ve_xvid4.c72
-rw-r--r--libmpcodecs/vf_expand.c2
-rw-r--r--libmpcodecs/vf_framestep.c4
-rw-r--r--libmpcodecs/vf_lavc.c2
-rw-r--r--libmpcodecs/vf_palette.c2
-rw-r--r--libmpcodecs/vf_tile.c10
-rw-r--r--libmpdemux/demux_audio.c3
-rw-r--r--libmpdemux/demux_avs.h8
-rw-r--r--libmpdemux/demux_demuxers.c5
-rw-r--r--libmpdemux/demux_film.c4
-rw-r--r--libmpdemux/demux_fli.c2
-rw-r--r--libmpdemux/demux_mpg.c8
-rw-r--r--libmpdemux/demux_ts.c7
-rw-r--r--libmpdemux/demux_xmms.c4
-rw-r--r--libmpdemux/demuxer.c49
-rw-r--r--libmpdemux/demuxer.h1
-rw-r--r--libmpdemux/mp_taglists.c2
-rw-r--r--libmpdemux/muxer_lavf.c59
-rw-r--r--libmpdemux/muxer_mpeg.c17
-rw-r--r--libmpeg2/idct_altivec.c6
-rw-r--r--libmpeg2/libmpeg-0.4.1.diff14
-rw-r--r--libswscale/rgb2rgb.c20
-rw-r--r--libswscale/rgb2rgb_template.c31
-rw-r--r--libswscale/swscale.c10
-rw-r--r--libswscale/swscale_template.c4
-rw-r--r--libvo/gl_common.c215
-rw-r--r--libvo/gl_common.h21
-rw-r--r--libvo/mga_common.c19
-rw-r--r--libvo/vo_cvidix.c2
-rw-r--r--libvo/vo_dfbmga.c4
-rw-r--r--libvo/vo_dga.c10
-rw-r--r--libvo/vo_fbdev.c10
-rw-r--r--libvo/vo_ggi.c30
-rw-r--r--libvo/vo_gl.c146
-rw-r--r--libvo/vo_gl2.c12
-rw-r--r--libvo/vo_macosx.m4
-rw-r--r--libvo/vo_quartz.c4
-rw-r--r--libvo/vo_svga.c10
-rw-r--r--libvo/vo_tga.c2
-rw-r--r--libvo/vo_vesa.c2
-rw-r--r--libvo/vo_winvidix.c12
-rw-r--r--libvo/vo_x11.c8
-rw-r--r--libvo/vo_xover.c2
-rw-r--r--libvo/vo_xvidix.c14
-rw-r--r--libvo/vosub_vidix.c6
-rw-r--r--libvo/x11_common.c12
-rw-r--r--loader/driver.c6
-rw-r--r--loader/dshow/mediatype.c4
-rw-r--r--loader/qtx/qtxload.c2
-rw-r--r--loader/win32.c12
-rw-r--r--loader/wine/heap.h2
-rw-r--r--mp3lib/dct64_altivec.c6
-rw-r--r--mp_core.h1
-rw-r--r--mplayer.c11
-rw-r--r--options.h1
-rw-r--r--osdep/getch2-win.c2
-rw-r--r--osdep/shmem.c2
-rw-r--r--osdep/timer-linux.c4
-rw-r--r--spudec.c2
-rw-r--r--stream/asf_mmst_streaming.c2
-rw-r--r--stream/cache2.c98
-rw-r--r--stream/cache2.h1
-rw-r--r--stream/rtp.c4
-rw-r--r--stream/stream.c2
-rw-r--r--stream/stream_cddb.c2
-rw-r--r--stream/stream_cue.c4
-rw-r--r--stream/stream_dvd.c7
-rw-r--r--stream/stream_dvd.h8
-rw-r--r--stream/stream_dvd_common.c5
-rw-r--r--stream/stream_dvd_common.h4
-rw-r--r--stream/stream_ftp.c2
-rw-r--r--stream/tv.c26
-rw-r--r--stream/tvi_bsdbt848.c112
-rw-r--r--stream/tvi_def.h6
-rw-r--r--stream/tvi_dshow.c36
-rw-r--r--stream/tvi_dummy.c38
-rw-r--r--stream/tvi_v4l.c160
-rw-r--r--stream/tvi_v4l2.c4
-rw-r--r--subreader.c7
-rw-r--r--tremor/os_types.h67
-rw-r--r--tremor/tremor.diff90
-rw-r--r--vidix/cyberblade_vid.c4
-rw-r--r--vidix/dha.c2
-rw-r--r--vidix/dhahelper/dhahelper.c (renamed from vidix/kernelhelper/dhahelper.c)42
-rw-r--r--vidix/dhahelper/dhahelper.h (renamed from vidix/kernelhelper/dhahelper.h)0
-rw-r--r--vidix/dhahelper/test.c (renamed from vidix/kernelhelper/test.c)2
-rw-r--r--vidix/dhahelperwin/Makefile39
-rw-r--r--vidix/ivtv_vid.c34
-rw-r--r--vidix/kernelhelper/Makefile21
-rw-r--r--vidix/mach64_vid.c4
-rw-r--r--vidix/mga_vid.c46
-rw-r--r--vidix/nvidia_vid.c2
-rw-r--r--vidix/pci.c10
-rw-r--r--vidix/radeon_vid.c6
-rw-r--r--vidix/sis_bridge.c2
-rw-r--r--vidix/sis_vid.c10
-rw-r--r--vidix/sysdep/AsmMacros_arm32.h12
-rw-r--r--vidix/sysdep/AsmMacros_powerpc.h6
-rw-r--r--vidix/sysdep/AsmMacros_x86.h2
-rw-r--r--vidix/sysdep/libdha_win32.c2
-rw-r--r--vidix/sysdep/pci_386bsd.c10
-rw-r--r--vidix/sysdep/pci_bsdi.c10
-rw-r--r--vidix/sysdep/pci_freebsd.c10
-rw-r--r--vidix/sysdep/pci_isc.c4
-rw-r--r--vidix/sysdep/pci_linux.c12
-rw-r--r--vidix/sysdep/pci_lynx.c2
-rw-r--r--vidix/sysdep/pci_mach386.c6
-rw-r--r--vidix/sysdep/pci_netbsd.c10
-rw-r--r--vidix/sysdep/pci_openbsd.c6
-rw-r--r--vidix/sysdep/pci_os2.c8
-rw-r--r--vidix/sysdep/pci_sco.c4
-rw-r--r--vidix/sysdep/pci_svr4.c4
-rw-r--r--vidix/sysdep/pci_win32.c8
-rw-r--r--vidix/unichrome_vid.c4
217 files changed, 2790 insertions, 2137 deletions
diff --git a/AUTHORS b/AUTHORS
index e8fb06b08f..e3a873ef63 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -335,7 +335,7 @@ Gritsenko, Andriy N. (AG_LS) <andrej@lucky.net>
Guyomarch, Rémi (rguyom) <rguyom@pobox.com>
* various fixes
* unsharp video filter
- * XviD encoding support
+ * Xvid encoding support
Hall, Julian <jules@meridiandigital.co.uk>
* black frame detection filter (vf_blackframe)
@@ -642,7 +642,7 @@ Poettering, Lennart <mzzcynlre@0pointer.de>
Poirier, Guillaume (poirierg) <poirierg@gmail.com>
* French documentation translation and synchronization
- * XviD documentation
+ * Xvid documentation
* libavcodec turbo mode
* lots of updates of MEncoder's documentation
* code fixes to support GCC-4.0
@@ -751,7 +751,7 @@ Svoboda, Jiří (zar) <Jiri.Svoboda@seznam.cz>
Swain, Robert <robert.swain@gmail.com>
* CQM support and turbo multipass mode in x264 interface
- * Profile support in XviD interface
+ * Profile support in Xvid interface
Syrjälä, Ville <syrjala@sci.fi>
* -vo dfbmga driver (G400 DVDMax-like feature using dfb 0.9.14)
@@ -846,6 +846,7 @@ Zores, Benjamin (ben) <ben@geexbox.org>
* IVTV h/w MPEG decoder ao/vo driver.
* split of stream layer from libmpdemux to stream.
* VIDIX core and drivers.
+ * Linux AppleIR remote support.
________________
The codecs, libs
diff --git a/Changelog b/Changelog
index 926ef10195..85e8109840 100644
--- a/Changelog
+++ b/Changelog
@@ -46,6 +46,7 @@ MPlayer (1.0)
common API
* grayscale decoding/encoding with FFmpeg disabled where it slowed down
the color case
+ * Linux AppleIR remote support.
Ports:
* small crash with vo_macosx fixed
diff --git a/Copyright b/Copyright
index 5736c7f5d0..6a89fdb00d 100644
--- a/Copyright
+++ b/Copyright
@@ -150,3 +150,12 @@ Directory: libmpdemux/yuv4mpeg*
Copyright: 2001 Matthew J. Marjanovic <maddog@mir.com>
2001 Andrew Stevens <andrew.stevens@philips.com>
License: GNU General Public License
+
+Name: NuppelVideo / RTJPEG
+Version: 0.52a + patches
+Homepage: http://web.archive.org/web/20050305195413/http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/
+Directory: libmpcodecs/native/rtjpegn.[ch] libmpdemux/nuppelvideo.h
+Copyright: 1998 Justin Schoeman (justin@suntiger.ee.up.ac.za)
+ 1998, 1999 Joerg Walter <trouble@moes.pmnet.uni-oldenburg.de>
+ 1999 Wim Taymans <wim.taymans@tvd.be>
+License: GNU General Public License version 2
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 7a672c8016..a5ae7c902d 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -232,6 +232,8 @@ Pressing once will pause movie, every consecutive press will play one frame
and then go into pause mode again (any other key unpauses).
.IPs "q / ESC"
Stop playing and quit.
+.IPs "U\ \ \ \ "
+Stop playing (and quit if \-idle is not used).
.IPs "+ and \-"
Adjust audio delay by +/\- 0.1 seconds.
.IPs "/ and *"
@@ -823,7 +825,7 @@ xover, xv (see \-vo xv:ck), xvmc (see \-vo xv:ck) and directx video output
drivers.
.
.TP
-.B \-correct\-pts (experimental)
+.B \-correct\-pts (EXPERIMENTAL)
Switches MPlayer to an experimental mode where timestamps for video frames
are calculated differently and video filters which add new frames or
modify timestamps of existing ones are supported.
@@ -903,14 +905,14 @@ to ensure it does not cause security problems (e.g.\& make sure to use full
paths if "." is in your path like on Windows).
.sp 1
This can be "misused" to disable screensavers that do not support the proper
-X API for this.
-If you think this is too complicated ask the author of the screensaver program
-to support the proper X APIs for this.
+X API.
+If you think this is too complicated, ask the author of the screensaver
+program to support the proper X APIs.
.sp 1
.I EXAMPLE for xscreensaver:
mplayer \-heartbeat\-cmd "xscreensaver\-command \-deactivate" file
.sp 1
-.I EXAMPLE for gnome screensaver:
+.I EXAMPLE for GNOME screensaver:
mplayer \-heartbeat\-cmd "gnome\-screensaver\-command \-p" file
.RE
.PD 1
@@ -950,6 +952,8 @@ Available commands are:
Specify input configuration file other than the default
~/\:.mplayer/\:input.conf.
~/\:.mplayer/\:<filename> is assumed if no full path is given.
+.IPs ar-dev=<device>
+Device to be used for Apple IR Remote (default is autodetected, Linux only).
.IPs ar-delay
Delay in milliseconds before we start to autorepeat a key (0 to disable).
.IPs ar-rate
@@ -1052,6 +1056,10 @@ Turns off joystick support.
Turns off LIRC support.
.
.TP
+.B \-noar
+Turns off AppleIR remote support.
+.
+.TP
.B \-nomouseinput
Disable mouse button press/\:release input (mozplayerxp's context menu relies
on this option).
@@ -3594,16 +3602,25 @@ the maximum texture size of your OpenGL implementation.
Intended to work even with the most basic OpenGL implementations,
but also makes use of newer extensions, which allow support for more
colorspaces and direct rendering.
-Please use \-dr if it works with your OpenGL implementation,
-since for higher resolutions this provides a
-.B big
-speedup.
+For optimal speed try something similar to
+.br
+\-vo gl:yuv=2:force\-pbo:ati\-hack \-dr \-noslices
+.br
The code performs very few checks, so if a feature does not work, this
might be because it is not supported by your card/OpenGL implementation
even if you do not get any error message.
Use glxinfo or a similar tool to display the supported OpenGL extensions.
.PD 0
.RSs
+.IPs (no)ati\-hack
+ATI drivers may give a corrupted image when PBOs are used (when using \-dr
+or force\-pbo).
+This option fixes this, at the expense of using a bit more memory.
+.IPs (no)force\-pbo
+Always uses PBOs to transfer textures even if this involves an extra copy.
+Currently this gives a little extra speed with NVidia drivers and a lot more
+speed with ATI drivers.
+May need \-noslices and the ati\-hack suboption to work correctly.
.IPs (no)scaled-osd
Changes the way the OSD behaves when the size of the
window changes (default: disabled).
@@ -5362,7 +5379,7 @@ Scales pitch without altering tempo.
Add \'[ speed_mult 0.9438743126816935\' and \'] speed_mult 1.059463094352953\'
to your input.conf to step by musical semi-tones.
.I WARNING:
-Looses synch with video.
+Loses sync with video.
.IPs both
Scale both tempo and pitch
.IPs none
@@ -10120,6 +10137,27 @@ Use a different quantizer for chroma as compared to luma.
Useful values are in the range <\-2\-2> (default: 0).
.
.TP
+.B aq_mode=<0\-2>
+Defines how adaptive quantization (AQ) distributes bits:
+.PD 0
+.RSs
+.IPs 0
+disabled
+.IPs 1
+Avoid moving bits between frames.
+.IPs 2
+Move bits between frames (by default).
+.RE
+.PD 1
+.
+.TP
+.B aq_strength=<positive float value>
+Controls how much adaptive quantization (AQ) reduces blocking and blurring
+in flat and textured areas (default: 1.0).
+A value of 0.5 will lead to weak AQ and less details, when a value of 1.5
+will lead to strong AQ and more details.
+.
+.TP
.B cqm=<flat|jvt|<filename>>
Either uses a predefined custom quantization matrix or loads a JM format
matrix file.
diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1
index 46a46ab86f..7a045b35f3 100644
--- a/DOCS/man/fr/mplayer.1
+++ b/DOCS/man/fr/mplayer.1
@@ -246,6 +246,8 @@ juste une trame et remettra le film en pause (toute autre touche arrête la
pause).
.IPs "q / ESC"
Stoppe la lecture et quitte.
+.IPs "U\ \ \ \ "
+Stoppe la lecture (et quitte si \-idle n'est pas utilisé).
.IPs "+ et \-"
Ajuste le décalage audio de +/\- 0.1 secondes.
.IPs "/ et *"
@@ -998,6 +1000,9 @@ Défini le fichier de configuration pour les évènements d'entrée (input) au
lieu de ~/\:.mplayer/\:input.conf par défaut.
Si vous ne donnez pas le chemin absolu, il sera cherché à
~/\:.mplayer/\:<nom_fichier>.
+.IPs ar-dev=<peripherique>
+Périphérique à utiliser pour contrôler la télécommande Apple IR
+(auto-détecté par défaut, Linux uniquement).
.IPs ar-delay
Temps en milli-secondes avant de démarrer la répétition automatique
d'une touche
@@ -1113,6 +1118,10 @@ Activé par défaut, si il a été compilé pour.
Désactive la gestion de LIRC.
.
.TP
+.B \-noar
+Désactive la gestion de la télécommande AppleIR.
+.
+.TP
.B \-nomouseinput
Désactive l'interprétation des boutons de la souris (le menu contextuel
de mozplayerxp dépend de cette option).
diff --git a/DOCS/man/hu/mplayer.1 b/DOCS/man/hu/mplayer.1
index 95b4bb86fa..ff3535d828 100644
--- a/DOCS/man/hu/mplayer.1
+++ b/DOCS/man/hu/mplayer.1
@@ -1,4 +1,4 @@
-.\" Synced with r26674
+.\" Synced with r26909
.\" MPlayer (C) 2000-2008 MPlayer Team
.\" Ezt a man oldalt Gabucino, Diego Biurrun és Jonas Jermann készíti/készítette
.\" Karbantartó: Gabrov
@@ -33,7 +33,7 @@
.\" Név
.\" --------------------------------------------------------------------------
.
-.TH MPlayer 1 "2008. 05. 11." "MPlayer Project" "A film lejátszó"
+.TH MPlayer 1 "2008. 06. 02." "MPlayer Project" "A film lejátszó"
.
.SH NÉV
mplayer \- film lejátszó
@@ -233,6 +233,8 @@ Egyszer megnyomva megállítja a filmet, majd minden egyes megnyomásra egy
képkockát lejátszik és újra megáll (bármelyik másik gombbal elindul újra).
.IPs "q / ESC"
Lejátszás megállítása és kilépés.
+.IPs "U\ \ \ \ "
+Lejátszás megállítása (és kilépés, ha a \-idle nincs megadva).
.IPs "+ és \-"
Audió késleltetés állítása +/\- 0.1 másodperccel.
.IPs "/ and *"
@@ -948,6 +950,8 @@ A rendelkezésre álló parancsok listája:
Az alapértelmezett ~/\:.mplayer/\:input.conf -tól eltérõ bemeneti
konfigurációs fájl megadása.
Ha nincs elérési út megadva, a ~/\:.mplayer/\:<fájlnév> a feltételezett.
+.IPs ar-dev=<eszköz>
+Az Apple IR távirányítóhoz használt eszköz (alapértelmezetten automatikus detektálás, csak Linux-on).
.IPs ar-delay
Egy gomb automatikus ismétlése elõtti késleltetés miliszekundumban (0: kikapcsolás).
.IPs ar-rate
@@ -1053,6 +1057,10 @@ Joystick támogatás kikapcsolása.
LIRC támogatás kikapcsolása.
.
.TP
+.B \-noar
+Kikapcsolja az AppleIR távirányító támogatását.
+.
+.TP
.B \-nomouseinput
Kikapcsolja az egérgomb nyomás/\:felengedés input-ot (a mozplayerxp
helyzetérzékeny menüje igényli ezt a kapcsolót).
@@ -1565,10 +1573,10 @@ Automatikusan visszavált IPv4-ra, amennyiben szükséges.
.
.TP
.B \-psprobe <bájt pozíció>
-MPEG-PS folyam lejátszásakor ezzel az opcióval megadhatod, hogy az
-MPlayer hány bájtot vizsgáljon át a használt videó codec azonosításához.
-Ez az opció a H264 folyamokat tartalmazó EVO fájlok lejátszásához
-szükséges.
+MPEG-PS vagy MPEG-PES folyam lejátszásakor ezzel az opcióval megadhatod,
+hogy az MPlayer hány bájtot vizsgáljon át a használt videó codec
+azonosításához.
+Ez az opció a H264 folyamokat tartalmazó EVO vagy VDR fájlok lejátszásához szükséges.
.
.TP
.B \-pvr <opció1:opció2:...> (csak PVR)
@@ -3356,6 +3364,8 @@ A használt színkulcsról és annak megjelenítésérõl a \-v opcióval ad
információkat az MPlayer, keresd az [xv common] tag-gel kezdõdõ sorokat.
.PD 0
.RSs
+.IPs adaptor=<szám>
+Kiválasztja a megadott XVideo adaptort (lásd az xvinfo ereményét).
.IPs port=<szám>
Adott XVideo port kiválasztása.
.IPs ck=<cur|use|set>
@@ -3404,6 +3414,8 @@ Videó kimeneti vezérlõ ami az XFree86 4.x XvMC (X Video Motion Compensation)
kiterjesztését használja az MPEG-1/2 és VCR2 dekódolás gyorsításához.
.PD 0
.RSs
+.IPs adaptor=<szám>
+Kiválasztja a megadott XVideo adaptort (lásd az xvinfo eredményét).
.IPs port=<szám>
Adott XVideo port kiválasztása.
.IPs (no)benchmark
@@ -3605,11 +3617,11 @@ A videó méretének kisebbnek kell lennie, mint az OpenGL implementációd maximum
textúra mérete.
A szándékok szerint a legegyszerûbb OpenGL implementációkkal is mûködik, de
használhat újabb kiterjesztéseket is, melyek engedélyezik több színtér és a
-DirectRendering támogatását.
-Kérjük használd a \-dr kapcsolót, ha mûködik az OpenGL implementációddal, mivel
-nagyobb felbontásoknál ez
-.B sokkal
-gyorsabb.
+direct rendering támogatását.
+Az optimális sebességhez próbálj ki valami ehhez hasonlót
+.br
+\-vo gl:yuv=2:force\-pbo:ati\-hack \-dr \-noslices
+.br
A kód nagyon kevés ellenõrzést végez, így ha egy tulajdonság nem elérhetõ, az
azért lehet, mert a kártyád/OpenGL implementációd nem támogatja, akkor sem, ha
hibaüzenetet nem kapsz.
@@ -3617,6 +3629,16 @@ Használd a glxinfo-t vagy valami hasonló eszközt a támogatott OpenGL
kiterjesztések megtekintéséhez.
.PD 0
.RSs
+.IPs (no)ati\-hack
+Az ATI vezérlõk hibás képet adhatnak ha PBO-kat használsz (\-dr vagy
+force\-pbo használata).
+Ez az opció javítja ezt, egy kicsivel nagyobb memória használat mellett.
+.IPs (no)force\-pbo
+Mindig PBO-kat használ a textúrák átviteléhez, akkor is, ha ez egy plusz
+másolást igényel.
+Jelenleg ez egy kis extra sebességet ad az NVidia vezérlõkkel és sokkal
+gyorsabb az ATI vezérlõkkel.
+Szükség lehet a \-noslices és az ati\-hack alopciókra a megfelelõ mûködéshez.
.IPs (no)scaled-osd
Az OSD viselkedésének megváltoztatása, amikor az ablakméret módosul
(alapértelmezett: letiltva).
@@ -4476,6 +4498,8 @@ Ez nem hiba, hanem a nem teljes felbontású dekódolás mellékhatásai.
Ha a <w> is meg van adva, a lowres dekódolás csak akkor lesz használva, ha a
videó szélessége nagyobb vagy egyenlõ mint <w>.
.RE
+.IPs "o\ \ \ \ "
+FIXME: nem dokumentált
.IPs "sb=<szám> (csak MPEG-2)"
Kihagyja a megadott számú makroblokk sort a tetején.
.IPs "st=<szám> (csak MPEG-2)"
@@ -7739,7 +7763,7 @@ Windows Media Video, 2-es verzió (WMV8)
.
.TP
.B vqmin=<1\-31>
-minimális kvantáló (pass 1/2)
+minimális kvantáló
.RSs
.IPs 1
Nem javasolt (sokkal nagyobb fájl, csekély minõségbeli különbség és ijesztõ
@@ -7798,7 +7822,7 @@ Az 1 nem javasolt (lásd a vqmin-t a részletekért).
.
.TP
.B vqmax=<1\-31>
-Maximális kvantáló (1/2. lépés), 10\-31 közötti ésszerû érték (alapértelmezett: 31).
+Maximális kvantáló, 10\-31 közötti ésszerû érték (alapértelmezett: 31).
.
.TP
.B mbqmin=<1\-31>
@@ -7810,7 +7834,7 @@ idejétmúlt, használd a vqmax-ot
.
.TP
.B vqdiff=<1\-31>
-maximális kvantáló különbség az egymást követõ I- vagy P-kockáknál (1/2. lépés)
+maximális kvantáló különbség az egymást követõ I- vagy P-kockáknál
(alapértelmezett: 3)
.
.TP
@@ -8078,7 +8102,7 @@ Nem okoz teljesítménybeli romlást, így nyugodtan bekapcsolva maradhat.
.
.TP
.B vbitrate=<érték>
-Bitráta megadása (1/2. lépés) (alapértelmezett: 800).
+Bitráta megadása (alapértelmezett: 800).
.br
.I FIGYELMEZTETÉS:
1kbit = 1000 bit
@@ -8104,17 +8128,17 @@ problémák lehetnek, ha vrc_(min|max)rate is használva van.
.
.TP
.B vrc_maxrate=<érték>
-maximális bitráta kbit/\:sec-ben (1/2. lépés)
+maximális bitráta kbit/\:sec-ben
(alapértelmezett: 0, határtalan)
.
.TP
.B vrc_minrate=<érték>
-minimális bitráta kbit/\:sec-ben (1/2. lépés)
+minimális bitráta kbit/\:sec-ben
(alapértelmezett: 0, határtalan)
.
.TP
.B vrc_buf_size=<érték>
-buffer méret kbit-ben (1/2. lépés).
+buffer méret kbit-ben
MPEG-1/2-nél ez a vbv buffer méretét is beállítja, használj 327-et
a VCD-hez, 917-et az SVCD-hez és 1835-at a DVD-hez.
.
@@ -8139,19 +8163,19 @@ támogatásával fordított MEncoder kell hozzá).
.
.TP
.B vb_qfactor=<\-31.0\-31.0>
-kvantálási faktor a B- és nem-B-kockák között (1/2. lépés) (alapértelmezett: 1.25)
+kvantálási faktor a B- és nem-B-kockák között (alapértelmezett: 1.25)
.
.TP
.B vi_qfactor=<\-31.0\-31.0>
-kvantálási faktor az I- és nem-I-kockák között (1/2. lépés) (alapértelmezett: 0.8)
+kvantálási faktor az I- és nem-I-kockák között (alapértelmezett: 0.8)
.
.TP
.B vb_qoffset=<\-31.0\-31.0>
-kvantálási lépés B- és nem-B-kockák között (1/2. lépés) (alapértelmezett: 1.25)
+kvantálási lépés B- és nem-B-kockák között (alapértelmezett: 1.25)
.
.TP
.B vi_qoffset=<\-31.0\-31.0>
-(1/2. lépés) (alapértelmezett: 0.0)
+(alapértelmezett: 0.0)
.br
ha v{b|i}_qfactor > 0
.br
@@ -8187,7 +8211,7 @@ idõt ad a kvantálónak (lassabb váltás).
.
.TP
.B vqcomp=<0.0\-1.0>
-Kvantálási tömörítés, a vrc_eq függ ettõl (1/2. lépés) (alapértelmezett: 0.5).
+Kvantálási tömörítés, a vrc_eq függ ettõl (alapértelmezett: 0.5).
Például feltéve, hogy az alapértelmezett rate control egyenletet használjuk,
ha a vqcomp=1.0, a ratecontrol minden kockához annyi számú bitet foglal le,
amennyi szükséges az azonos QP melletti kódolásukhoz.
@@ -8199,7 +8223,7 @@ A látható minõség valahol ezen két szélsõséges eset között lesz optimális.
.
.TP
.B vrc_eq=<egyenlet>
-fõ ratecontrol egyenlet (1/2. lépés)
+fõ ratecontrol egyenlet
.RE
.RSs
.IPs "1\ \ \ \ "
@@ -8272,7 +8296,7 @@ maximum / minimum
.
.TP
.B vrc_override=<opciók>
-Felhasználó által megadott minõség a megadott részekhez (befejezés, feliratok, ...) (1/2. lépés).
+Felhasználó által megadott minõség a megadott részekhez (befejezés, feliratok, ...).
Az opciók <kezdõ-kocka>, <záró-kocka>, <minõség>[/<kezdõ-kocka>,
<záró-kocka>, <minõség>[/...]]:
.PD 0
@@ -8294,7 +8318,7 @@ kezdeti buffer feltöltés, a vrc_buf_size egy részeként (alapértelmezett: 0.9)
.
.TP
.B vqsquish=<0|1>
-Itt adható meg hogy hogyan maradjon a kvantáló a qmin és qmax között (1/2. lépés).
+Itt adható meg hogy hogyan maradjon a kvantáló a qmin és qmax között.
.PD 0
.RSs
.IPs 0
@@ -9057,6 +9081,10 @@ FIXME: Ezt még dokumentálni kell.
.B skip_threshold=<0\-1000000>
FIXME: Ezt még dokumentálni kell.
.
+.TP
+.B "o\ \ \ \ \ \ "
+FIXME: nem dokumentált
+.
.
.SS nuv (\-nuvopts)
.
@@ -10130,6 +10158,27 @@ Különbözõ kvantálót használ a színtelítettséghez és a fényerõhöz.
A használható értékek <\-2\-2> (alapértelmezett: 0).
.
.TP
+.B aq_mode=<0\-2>
+Definiálja, hogy az adaptív kvantálás (AQ) hogyan ossza el a biteket:
+.PD 0
+.RSs
+.IPs 0
+letiltva
+.IPs 1
+Nem mozgatja a biteket a kockák között.
+.IPs 2
+Mozgatja a biteket a kockák között (alapértelmezett).
+.RE
+.PD 1
+.
+.TP
+.B aq_strength=<pozitív lebegõpontos szám>
+Megadja, hogy az adaptív kvantálás (AQ) mennyire csökkentse a blokkosodást
+és az elmosódást a sík és textúrázott területeken (alapértelmezett: 1.0).
+A 0.5-ös érték gyenge AQ-t eredményez és kevesebb részlethez, míg az 1.5-ös
+erõs AQ-t és nagyobb részletességet.
+.
+.TP
.B cqm=<flat|jvt|<fájlnév>>
Vagy egy elõre definiált saját kvantálást használ vagy betölt egy JM formátumú
mátrix fájlt.
@@ -10432,8 +10481,12 @@ A folyam tulajdonságainak megállapításához maximálisan analizálndó hossz másodpe
Kényszeríti a megadott libavformat demuxer-t.
.
.TP
+.B "o\ \ \ \ \ \ "
+FIXME: nem dokumentált
+.
+.TP
.B probesize=<érték>
-A detektálási folyamatban használt adat maximális mennyisége.
+A detektálási folyamatban a próbálkozáshoz használt adat maximális mennyisége.
MPEG-TS esetén ez az érték az átvizsgálandó TS csomagok számát
adja meg.
.
@@ -10501,9 +10554,14 @@ MPEG[12] implementációkba történõ muxálásánál az alapértelmezett értékek:
.
.TP
.B preload=<különbség>
-Jelenleg csak az MPEG[12]-nél van értelme: Kezdeti különbség másodpercben
-a kimenet referencia idõzítõje (SCR) és a dekódolási idõbélyeg (DTS) között
-bármelyik jelenlévõ folyamnál (késleltetés demux-ból dekódolásba).
+Jelenleg csak az MPEG[12]-nél van értelme: Kezdeti különbség
+másodpercben a kimenet referencia idõzítõje (SCR) és a dekódolási
+idõbélyeg (DTS) között bármelyik jelenlévõ folyamnál
+(késleltetés demux-ból dekódolásba).
+.
+.TP
+.B "o\ \ \ \ \ \ "
+FIXME: nem dokumentált
.
.
.
diff --git a/DOCS/tech/MAINTAINERS b/DOCS/tech/MAINTAINERS
index 65e5c2f76f..96e58a60b2 100644
--- a/DOCS/tech/MAINTAINERS
+++ b/DOCS/tech/MAINTAINERS
@@ -134,7 +134,7 @@ streams:
codec support:
* FFmpeg: Michael Niedermayer
- * XviD: Ivan Kalvachev
+ * Xvid: Ivan Kalvachev
* x264: Loren Merritt
* musepack, speex: Reimar Döffinger
diff --git a/DOCS/tech/dvdnav-howto.txt b/DOCS/tech/dvdnav-howto.txt
index 005a85cd00..ef92110325 100644
--- a/DOCS/tech/dvdnav-howto.txt
+++ b/DOCS/tech/dvdnav-howto.txt
@@ -21,13 +21,14 @@ $ make install
From within the MPlayer source tree run
$ ./configure --disable-dvdread-internal
followed by your preferred parameters.
+Be warned that you *MUST* disable MPlayer's internal copy of dvdread or something
+- most likely - won't work as expected (if at all).
After configure is run it should say that support for dvdnav and dvdread was
enabled. If not, investigate the dvdnav and dvdread sections in configure.log
and try to understand what went wrong. If you can't solve the problem yourself
post the two sections to mplayer-users.
-Notice: Animated menus are working, but still menus and still scenes are not
-yet supported. Also, audio and subtitle language selection by means of menus
-doesn't work yet. Nonetheless they can be switched as usual at any time during
+Notice: Audio and subtitle language selection by means of menus doesn't work yet.
+Nonetheless they can be switched as usual at any time during
playback by pressing '#' and 'j' (or the keys you chose to override those two
bindings).
diff --git a/DOCS/tech/encoding-guide.txt b/DOCS/tech/encoding-guide.txt
index 5073c7c89b..0393bcbb5f 100644
--- a/DOCS/tech/encoding-guide.txt
+++ b/DOCS/tech/encoding-guide.txt
@@ -122,7 +122,7 @@ during the first pass. However, sometimes it is beneficial to watch
the first-pass file before beginning the second pass to make sure
nothing went wrong in the encoding.
-Next, an example using XviD instead of libavcodec:
+Next, an example using Xvid instead of libavcodec:
Encoding from an existing AVI file
500 kbit/sec MPEG-4 video
diff --git a/DOCS/tech/encoding-tips.txt b/DOCS/tech/encoding-tips.txt
index 9c9e5ddd87..9096f1f84e 100644
--- a/DOCS/tech/encoding-tips.txt
+++ b/DOCS/tech/encoding-tips.txt
@@ -304,7 +304,7 @@ This way it apeared that the minimum bits per block is ~40, very
good results are with ~50, and everything above 60 is a waste of bandwidth.
And what's actually funny is that it was independent of codec used. The
results were exactly the same, whether I used DIV3 (with tricky nandub's
-magick), ffmpeg odivx, DivX5 on Windows or XviD.
+magick), ffmpeg odivx, DivX5 on Windows or Xvid.
Surprisingly there is one advantage of using nandub-DIV3 for bitrate
starved encoding: ringing almost never apears this way.
diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt
index 5664ef1066..080f7fa880 100644
--- a/DOCS/tech/slave.txt
+++ b/DOCS/tech/slave.txt
@@ -267,6 +267,9 @@ step_property <property> [value] [direction]
not given or zero. The direction is reversed if direction is less
than zero.
+stop
+ Stop playback.
+
sub_alignment [value]
Toggle/set subtitle alignment.
0 top alignment
diff --git a/DOCS/tech/svn-howto.txt b/DOCS/tech/svn-howto.txt
index b31f46367a..9fdaa7853f 100644
--- a/DOCS/tech/svn-howto.txt
+++ b/DOCS/tech/svn-howto.txt
@@ -36,8 +36,8 @@ I. BASICS:
0. Get Subversion:
- The MPlayer project server runs Subversion 1.2.3. For optimal compatibility
- you should use version 1.2.3 or later.
+ The MPlayer project server runs Subversion 1.4. For optimal compatibility
+ you should use version 1.4 or later.
1. Checking out the source tree:
@@ -305,6 +305,10 @@ II. POLICY / RULES:
- verbosity changes from default (info) level
- changes to "historical" parts of docs and web pages
- use of internal or external libraries
+ - reverting commits from other developers
+ - mixing functional and cosmetic changes
+ - making the spelling of words consistent without actually correcting
+ any spelling errors.
13. Try to keep important discussions and requests (also) on the mplayer-dev-eng
diff --git a/DOCS/xml/en/encoding-guide.xml b/DOCS/xml/en/encoding-guide.xml
index 8f7460a02e..2072cdfc6f 100644
--- a/DOCS/xml/en/encoding-guide.xml
+++ b/DOCS/xml/en/encoding-guide.xml
@@ -2158,7 +2158,7 @@ corresponding lines for each field (this has drawbacks - see method 3).
these filters available to choose from, each with its own advantages
and disadvantages. Consult <option>mplayer -pphelp</option> and
<option>mplayer -vf help</option> to see what is available
- (grep for "deint"), read Michael's Niedermayer
+ (grep for "deint"), read Michael Niedermayer's
<ulink url="http://guru.multimedia.cx/deinterlacing-filters/">Deinterlacing filters comparison</ulink>,
and search the
<ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html">
@@ -2250,7 +2250,7 @@ mencoder dvd://1 -oac copy -vf pullup,softskip
fields to form a complete frame. <option>filmdint</option> will
deinterlace individual fields that it cannot match, however, whereas
<option>pullup</option> will simply drop them. Also, the two filters
- have separate detection code, and filmdint may tend to match fields a
+ have separate detection code, and <option>filmdint</option> may tend to match fields a
bit less often. Which filter works better may depend on the input
video and personal taste; feel free to experiment with fine-tuning
the filters' options if you encounter problems with either one (see
diff --git a/DOCS/xml/en/ports.xml b/DOCS/xml/en/ports.xml
index 78ca89cd6c..0c8d23aebe 100644
--- a/DOCS/xml/en/ports.xml
+++ b/DOCS/xml/en/ports.xml
@@ -603,10 +603,8 @@ and needs a bit of manual setup. Download
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/withmtrr/dhahelper.sys">dhahelper.sys (with MTRR support)</ulink>
and copy it to the <filename class="directory">vidix/dhahelperwin</filename>
directory in your <application>MPlayer</application> source tree.
-Open a console and change to that directory. Then type
-<screen>gcc -o dhasetup.exe dhasetup.c</screen>
-and execute
-<screen>dhasetup.exe install</screen>
+Open a console and type
+<screen>make install-dhahelperwin</screen>
as Administrator. After that you will have to reboot.
</para>
diff --git a/DOCS/xml/en/video.xml b/DOCS/xml/en/video.xml
index 2c1d3b8c28..a60a894a72 100644
--- a/DOCS/xml/en/video.xml
+++ b/DOCS/xml/en/video.xml
@@ -854,15 +854,14 @@ For a Linux 2.6.x version of this driver check out
<procedure>
<title>Installation:</title>
<step><para>
- To use it, you first have to compile <filename>mga_vid.o</filename>:
+ To use it, you first have to compile <filename>drivers/mga_vid.o</filename>:
<screen>
-cd drivers
-make<!--
+make drivers<!--
--></screen>
</para></step>
<step><para>
Then run (as <systemitem class="username">root</systemitem>)
- <screen>make install</screen>
+ <screen>make install-drivers</screen>
which should install the module and create the device node for you.
Load the driver with
<screen>insmod mga_vid.o</screen>
@@ -941,14 +940,13 @@ the following instructions.
<procedure>
<title>Installing the tdfx_vid.o kernel module:</title>
<step><para>
- Compile <filename>tdfx_vid.o</filename>:
+ Compile <filename>drivers/tdfx_vid.o</filename>:
<screen>
-cd drivers
-make</screen>
+make drivers</screen>
</para></step>
<step><para>
Then run (as <systemitem class="username">root</systemitem>)
- <screen>make install</screen>
+ <screen>make install-drivers</screen>
which should install the module and create the device node for you.
Load the driver with
<screen>insmod tdfx_vid.o</screen>
diff --git a/DOCS/xml/fr/codecs.xml b/DOCS/xml/fr/codecs.xml
index 01c0820d1b..262aa5b9a1 100644
--- a/DOCS/xml/fr/codecs.xml
+++ b/DOCS/xml/fr/codecs.xml
@@ -262,7 +262,7 @@ Overview and Introduction to the Fidelity Range Extensions</ulink>.
<application>MPlayer</application> utilise le décodeur H264 de
<systemitem class="library">libavcodec</systemitem>.
<systemitem class="library">libavcodec</systemitem> a eu
- un décodeur H.264 un minimum utilisable environ juillet 2004,
+ un décodeur H.264 un minimum utilisable aux environs de juillet 2004,
cependant des changements et améliorations majeurs ont été implémentés depuis cette date,
à la fois en terme de fonctionalités supportées et d'utilisation du processeur.
Pour être sûr de soi, c'est toujours une bonne idée d'utiliser une version récente extraite
@@ -302,7 +302,7 @@ Overview and Introduction to the Fidelity Range Extensions</ulink>.
Ceci installe libx264.a dans /usr/local/lib et x264.h est placé dans
/usr/local/include.
- Avec la bibliothèqye <systemitem class="library">x264</systemitem> et l'en-tête
+ Avec la bibliothèque <systemitem class="library">x264</systemitem> et l'en-tête
aux emplacements standards, construire
<application>MPlayer</application> avec le support
<systemitem class="library">x264</systemitem> est facile.
@@ -490,7 +490,7 @@ RedHat sur <ulink url="http://greysector.rangers.eu.org/">Grey Sector</ulink>.
<sect2 id="amr">
<title>codecs AMR</title>
<para>
-Le dodec de voix Adaptive Multi-Rate est utilisé dans les téléphones mobiles de
+Le codec de voix Adaptive Multi-Rate est utilisé dans les téléphones mobiles de
troisième génération (3G).
L'implémentation de référence est disponible depuis
<ulink url="http://www.3gpp.org">Projet d'Association sur la 3ème Génération</ulink>
diff --git a/DOCS/xml/fr/encoding-guide.xml b/DOCS/xml/fr/encoding-guide.xml
index 1bce79f5cf..c69abfeb80 100644
--- a/DOCS/xml/fr/encoding-guide.xml
+++ b/DOCS/xml/fr/encoding-guide.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r25308 -->
+<!-- synced with r26920 -->
<chapter id="encoding-guide">
<title>L'encodage avec <application>MEncoder</application></title>
@@ -143,7 +143,7 @@
</para></listitem>
<listitem><para>
<emphasis role="bold">pulldown PAL 2:2:2:2:2:2:2:2:2:2:2:3</emphasis>:
- Toutes les 12 images sont affichées pour la durée de 3 trames au lieu de deux. Cela
+ Toutes les 12 images, une image est affichées pour la durée de 3 trames au lieu de deux. Cela
permet d'éviter le problème de l'accélération de 4% mais rend le processus bien plus
difficile à inverser. Cette technique est généralement utilisée dans les productions
musicales où l'accélération de 4% endommagerait sérieusement la qualité musicale.
@@ -156,7 +156,7 @@
trames par seconde pour maintenir la vitesse d'affichage NTSC.
</para></listitem>
<listitem><para>
- <emphasis role="bold">Pulldown NTSC 2:2</emphasis>: Utilisé pour montré
+ <emphasis role="bold">Pulldown NTSC 2:2</emphasis>: Utilisé pour montrer
du 30 images par secondes sur du NTSC. Joli, comme le pulldown PAL 2:2.
</para></listitem>
</itemizedlist>
@@ -890,7 +890,7 @@
conserver l'entrelacement, vous devrez vous abstenir de redimensionner.
Sans redimensionner, pour utiliser des dimensions multiples de 16,
il vous faudra recadrer plus petit que l'image. Ne pas recadrer plus grand que l'image
- parce que car les bandes noires sont nuisibles à la compression.
+ parce que les bandes noires sont nuisibles à la compression.
</para>
<para>
@@ -938,7 +938,7 @@
devez sélectionner un débit.
Le concept de débit (bitrate) est assez simple.
C'est un nombre (moyen) de bits par seconde qui sera utilisé pour stocker votre film.
- Normalement, le débit est mesuré en kilobits (1000 bits) par seconde.
+ Normalement, le débit est mesuré en kilobits (1000bits) par seconde.
La taille de votre film sur le disque dur correspond au débit multiplié par sa
durée plus une petite quantité pour l'"en-tête" (surcoût, voir par exemple la section sur
<link linkend="menc-feat-dvd-mpeg4-muxing-avi-limitations">les conteneurs AVI</link>).
@@ -1118,7 +1118,7 @@
l'encodage le plus proche possible du DVD source. Le recadrage est souvent
nécessaire (comme expliqué plus haut), mais évitez de redimensionner l'image.
Bien qu'il soit parfois préférable de réduire la taille de l'image plutôt que d'utiliser
- un quantificateur plus élevé, nous voulons éviter tout ceci:souvenez-vous que
+ un quantificateur plus élevé, nous voulons éviter tout ceci. Souvenez-vous que
nous avons décidé au départ d'échanger des bits pour de la qualité.
</para>
@@ -1330,7 +1330,7 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
<para>
Néanmoins, les nouveaux codecs qui sont en développement peuvent souffrir
de bugs qui n'ont pas encore été repérés et qui peuvent saboter un encodage.
- Ce malheureusement parfois le prix à payer pour l'utilisation de
+ Ceci est malheureusement parfois le prix à payer pour l'utilisation de
technologies de pointe.
</para>
<para>
@@ -1402,8 +1402,8 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
Prenez quelques échantillons de sources brutes et comparez les
différentes options et codecs pour en trouver un qui vous convienne
le mieux.
- Le meilleur codec est celui que vous maîtrisez et celui qui vous semble
- le plus joli à vous yeux
+ Le meilleur codec est celui que vous maîtrisez et qui vous semble
+ le plus joli à vos yeux
<footnote id='fn-menc-feat-dvd-mpeg4-codec-playback'>
<para>Le même encodage peut apparaître différement sur le moniteur de
quelqu'un d'autre ou lorsqu'il est lu par un autre décodeur, donc armez
@@ -1689,7 +1689,7 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
<formalpara>
<title>Une note à propos des nombres</title>
<para>
- Beaucoup de documents renvoient à un
+ Beaucoup de documents, incluant l'article pointé par le lien précédent, renvoient à un
nombre de trames par secondes pour la vidéo NTSC de 59.94 ce qui correspond à
29.97 images complètes par secondes (pour le télécine et l'entrelacé) et à 23.976 (pour
le progressif). Pour simplifier, certains documents arrondissent même à 60, 30 et 24.
@@ -1732,7 +1732,7 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
Sur un DVD, la vidéo n'est jamais vraiment stockée à 60000/1001 trames par seconde.
Si la vidéo est d'origine en 60000/1001, chaque paire de trames est alors combinée
pour former une image, ce qui donne 30000/1001 images par seconde. Les lecteurs de
- DVD de salon lisent alors les fanions incorporé au flux vidéo pour déterminer
+ DVD de salon lisent alors les drapeaux incorporés au flux vidéo pour déterminer
si la première ligne à afficher doit être paire ou impaire.
</para>
@@ -1767,7 +1767,9 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
Elles représentent juste le minimum requis pour encoder la vidéo qui s'y rapportent.
La meilleure méthode pour faire un bon encodage de DVD ou procéder à des réglages avancés de
<systemitem class="library">libavcodec</systemitem> pour atteindre une qualité optimum sont des
- questions en dehors des propos de ce guide.
+ questions en dehors des propos de cette section.
+ Référez-vous aux autres sections contenues dans
+ <link linkend="encoding-guide">L'encodage avec <application>MPlayer</application></link>.
</para></listitem>
<listitem><para>
Il y a quelques notes en bas de page spécifiques à ce guide, elles sont liées comme ceci :
@@ -1991,7 +1993,7 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
Encodez la vidéo sous forme entrelacée. Normalement, l'entrelacement
ruine la capacité de compression de l'encodeur, mais <systemitem class="library">libavcodec</systemitem>
possède deux paramètres spécialement définis pour gérer le stockage de la vidéo entrelacée de manière
- plus satisfaisante: <option> ildct</option> et <option>ilme</option>. Aussi,
+ plus satisfaisante: <option>ildct</option> et <option>ilme</option>. Aussi,
l'utilisation de <option>mbd=2</option> est-elle fortement recommandée <link linkend="menc-feat-telecine-footnotes">[2] </link>
car cela encodera les macroblocs non-entrelacés à des endroits où il n'y
a pas de mouvements. Notez que <option>-ofps</option> n'est <emphasis>pas</emphasis> nécessaire ici.
@@ -2017,7 +2019,7 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
<screen>mencoder dvd://1 -oac copy -vf pp=lb -ovc lavc</screen>
</para></listitem>
<listitem><para>
- Malheureusement, cette option est un boguée dans
+ Malheureusement, cette option est boguée dans
<application>MEncoder</application> ; cela devrait bien marcher avec
<application>MEncoder G2</application>, mais on n'en est pas encore là. Vous
risquez de subir des plantages. Peu importe, l'option <option>-vf tfields</option>
@@ -2079,10 +2081,28 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
disponible pour encoder le téléciné et le &quot;Mélange de progressive et télécinée&quot;.
<screen>mencoder dvd://1 -oac copy -vf pullup,softskip -ovc lavc -ofps 24000/1001</screen>
- </para>
-
-
- </listitem>
+ </para></listitem>
+ <listitem><para>
+ <option>-vf filmdint</option> est similaire à
+ <option>-vf pullup</option> : les deux filtres tentent d'appairer deux
+ demi-trames pour construire une trame complète.
+ Néanmoins, <option>filmdint</option> desentrelacera les demi-trames
+ orphelines tandis que <option>pullup</option> les éliminera.
+ De plus, les deux filtres ont des codes de détection différents et
+ <option>filmdint</option> peut avoir tendence à faire correspondre les
+ demi-trames un peu moins souvent.
+ Le contenu video à traiter et votre sensibilité personnelle fera qu'un
+ filtre fonctionnera mieux qu'un autre.
+ Sentez-vous libre d'ajuster les options des filtres si vous rencontrez
+ des problèmes avec l'un d'eux (consultez le manuel pour plus de
+ détails).
+ Pour la plupart des supports vidéo de qualité, les deux filtres
+ fonctionnent plutôt bien : débuter avec l'un ou l'autre ne fera pas
+ grande différence.
+ <screen>
+ mencoder dvd://1 -oac copy -vf filmdint -ovc lavc -ofps 24000/1001<!--
+ --></screen>
+</para></listitem>
<listitem><para>
Une méthode plus ancienne consiste à, au lieu de téléciner-inverse les passages télécinés,
téléciner les parties non-télécinées
@@ -2096,17 +2116,6 @@ Notez l'usage des options <option>ilme</option> et <option>ildct</option>.
</para>
</listitem>
-<listitem><para>
- Je n'ai pas moi-même utilisé <option>-vf filmdint</option>, mais voilà ce que
- D Richard Felker III en dit:
-
- <blockquote><para>Il est correct, mais à mon avis, il essaie de désentrelacer plutôt
- que de téléciner-inverse trop souvent (tout comme les lecteurs DVD de salon
- &amp; les TVs progressive) ce qui donne des clignotements affreux et d'autre
- artefacts. Si vous prévoyer l'utiliser, vous aurez au minimum besoin de passer
- du temps à affiner les options et à regarder le résultat en sortie pour vous assurer
- que cela n'esquinte pas tout.</para></blockquote>
- </para></listitem>
</itemizedlist>
</sect3>
@@ -4923,9 +4932,9 @@ me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
</sect3>
<sect3 id="menc-feat-vcd-dvd-a-v-sync">
-<title>Maintaining A/V sync</title>
+<title>Maintient de la synchronisation A/V</title>
<para>
- Afin de maintenir la synchronization audio/video lors de l'encodage,
+ Afin de maintenir la synchronisation audio/video lors de l'encodage,
<application>MEncoder</application> doit dupliquer ou effacer des images.
Cela marche plutôt bien lor du multiplexage dans un fichier AVI
mais il est pratiquement garanti d'échouer à maintenir la synchronisation A/V
@@ -5241,7 +5250,7 @@ me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
- vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
+ vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \
-o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
</screen>
</para>
@@ -5254,7 +5263,7 @@ me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
- vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
+ vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \
-o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
</screen>
</para>
@@ -5267,7 +5276,7 @@ me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:\
- vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
+ vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \
-o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
</screen>
</para>
@@ -5280,7 +5289,7 @@ me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:\
- vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \
+ vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \
-o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
</screen>
</para>
diff --git a/DOCS/xml/fr/install.xml b/DOCS/xml/fr/install.xml
index a614db981d..de4bd501e0 100644
--- a/DOCS/xml/fr/install.xml
+++ b/DOCS/xml/fr/install.xml
@@ -10,7 +10,7 @@ Veuillez le lire d'abord et revenir ensuite ici pour le reste des détails.
</para>
<para>
-Dans ce chapitre je vous serez guidé à travers étapes de configuration et de
+Dans ce chapitre, vous serez guidé à travers étapes de configuration et de
compilation de <application>MPlayer</application>.
Ce n'est pas facile, mais pas vraiment difficile non plus.
Si vous observez un comportement différent de celui de ces explications,
@@ -270,7 +270,7 @@ supportant plusieurs encodages.
Décompressez le fichier que vous avez téléchargé dans le répertoire
<filename class="directory">~/.mplayer</filename> ou dans
<filename class="directory">$PREFIX/share/mplayer</filename>.
-Ensuite, renommez ou créez un mien symbolique de l'un des répertoires ainsi créés vers
+Ensuite, renommez ou créez un lien symbolique de l'un des répertoires ainsi créés vers
le sous-repertoire
<filename class="directory">font</filename>. Exemple :
<screen>ln -s <replaceable>~/.mplayer/arial-24</replaceable> ~/.mplayer/font</screen>
@@ -371,7 +371,7 @@ Vous pouvez rendre ce réglagle permanant en ajoutant la seconde commande au fic
le secteur avant de le démarrer semble régler le problème dans la plupart des cas.
Avec certaines configurations matérielles (confirmé par l'utilisation de lecteurs DVD ne supportant pas
le DMA avec une carte-mère basée sur le chipset ALi1541), l'utilisation du timer RTC rend la lecture
- irrégulière (NdT: skippy). Il est recommandé d'utiliser la troisième méthode dans ce cas.
+ saccadée (NdT: skippy). Il est recommandé d'utiliser la troisième méthode dans ce cas.
</para></listitem>
<listitem><para>
<emphasis role="bold">La troisième méthode de synchro</emphasis> est activée par l'option
diff --git a/DOCS/xml/fr/mencoder.xml b/DOCS/xml/fr/mencoder.xml
index 5644b54c17..aa53ea2c90 100644
--- a/DOCS/xml/fr/mencoder.xml
+++ b/DOCS/xml/fr/mencoder.xml
@@ -340,7 +340,7 @@ Le nom vient du fait que cette méthode encode le fichier
Le premier encodage (du mode deux passes) crée quelques
fichiers temporaires (<filename>*.log</filename>) avec
une taille de quelques méga-octets, ne les détruisez pas
-tout de suite (vous pouvez effacer l'AVI ou redirigez le
+tout de suite (vous pouvez effacer l'AVI ou rediriger le
flux vidéo vers <filename>/dev/null</filename>).
Lors de la seconde passe, le fichier de sortie est créé, en
utilisant les données bitrate des fichiers temporaires.
diff --git a/DOCS/xml/fr/ports.xml b/DOCS/xml/fr/ports.xml
index 53a2a706a9..003715afe9 100644
--- a/DOCS/xml/fr/ports.xml
+++ b/DOCS/xml/fr/ports.xml
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r20417 -->
+<!-- synced with r26936 -->
<chapter id="ports" xreflabel="Ports">
<title>Ports</title>
<sect1 id="linux">
<title>Linux</title>
+
<para>
La plateforme principale de développement est Linux sur x86, bien que
<application>MPlayer</application> fonctionne sur de nombreux autres ports
Linux.
Des binaires de <application>MPlayer</application> sont disponibles depuis
-de nombreuses sources.
-Par contre, <emphasis role="bold">aucun de ces paquets n'est supporté</emphasis>.
+de nombreuses sources. Par contre, <emphasis role="bold">aucun de ces paquets n'est supporté</emphasis>.
Rapportez les problèmes à leurs auteurs, pas à nous.
</para>
+<!-- ********** -->
+
<sect2 id="debian">
<title>Paquets Debian</title>
+
<para>
Pour construire le paquet Debian, lancez la commande suivante dans le
répertoire source de <application>MPlayer</application>:
@@ -51,13 +54,15 @@ depuis sa <ulink url="http://www.debian-multimedia.org/">page web</ulink>.
</para>
</sect2>
+<!-- ********** -->
+
<sect2 id="rpm">
<title>Paquets RPM</title>
+
<para>
-Dominik Mierzejewski a créé et maintient des paquets RPM officiels de
-<application>MPlayer</application> pour Red Hat et Fedora Core.
-Ils sont disponibles sur son
-<ulink url="http://rpm.greysector.net/mplayer/">repository</ulink>.
+Dominik Mierzejewski maintient les paquets RPM officiels de
+<application>MPlayer</application> pour Fedora Core.
+Ils sont disponibles sur le <ulink url="http://rpm.greysector.net/mplayer/">dépôt Livna</ulink>.
</para>
<para>
@@ -71,8 +76,11 @@ Vous pouvez obtenir des RPMs fonctionnels sur
</para>
</sect2>
+<!-- ********** -->
+
<sect2 id="arm">
<title>ARM</title>
+
<para>
<application>MPlayer</application> fonctionne sur les PDAs Linux avec un
CPU ARM c-a-d Sharp Zaurus, Compaq Ipaq. La manière
@@ -91,8 +99,13 @@ Si vous avez besoin d'une GUI, vous pouvez utiliser xmms-embedded.
</sect2>
</sect1>
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+
<sect1 id="bsd">
<title>*BSD</title>
+
<para>
<application>MPlayer</application> fonctionne sur toutes les variations
de BSD connues.
@@ -120,9 +133,11 @@ vous devrez recompiler le noyau avec "<envar>option USER_LDT</envar>"
(à moins d'utiliser FreeBSD-CURRENT, où c'est le cas par défaut).
</para>
+<!-- ********** -->
<sect2 id="freebsd">
<title>FreeBSD</title>
+
<para>
Si votre CPU à SSE, recompilez votre noyau avec
"<envar>options CPU_ENABLE_SSE</envar>" (FreeBSD-STABLE ou patches noyau
@@ -132,6 +147,7 @@ requis).
<sect2 id="openbsd">
<title>OpenBSD</title>
+
<para>
À cause des limitations dans les différentes versions de gas (relocation
contre MMX), vous aurez besoin de compiler en deux étapes:
@@ -140,19 +156,27 @@ D'abord assurez-vous que le non-natif est en premier dans votre
assurez-vous que la version native est utilisée et faites
<command>gmake</command>.
</para>
+
<para>
Depuis OpenBSD 3.4 le hack ci-dessus n'est plus nécessaire.
</para>
</sect2>
+<!-- ********** -->
+
<sect2 id="darwin">
<title>Darwin</title>
+
<para>
Voir la section <link linkend="macos">Mac OS</link>.
</para>
</sect2>
</sect1>
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+
<sect1 id="unix">
<title>Unix Commercial</title>
@@ -164,8 +188,11 @@ ont tendances à être différent de ceux trouvé sur les Unix libres, vous devr
peut-être faire quelques ajustements manuels pour que le build fonctionne.
</para>
+<!-- ********** -->
+
<sect2 id="solaris">
<title>Solaris</title>
+
<para>
<application>MPlayer</application> devrait fonctionner sous Solaris 2.6
ou supérieur.
@@ -188,18 +215,17 @@ installé.
<para><emphasis role="bold">Attention :</emphasis></para>
<itemizedlist>
- <listitem><para><emphasis role="bold">mediaLib</emphasis> est
- <emphasis role="bold">actuellement désactivé</emphasis> par défaut dans
- <application>MPlayer</application>. Les utilisateurs SPARC
+ <listitem><para>
+ <emphasis role="bold">mediaLib</emphasis> est
+ <emphasis role="bold">actuellement désactivé</emphasis> par défaut dans
+ <application>MPlayer</application> pour cause d'inconsistance. Les utilisateurs SPARC
qui ont construit MPlayer avec le support mediaLib ont reporté une
forte coloration verte sur les vidéo encodées et décodées avec
libavcodec.
- Si vous le désirez, vous pouver activer mediaLib avec:
- <screen>
- $ ./configure --enable-mlib
- </screen>
+ Si vous le désirez, vous pouvez activer mediaLib avec:
+ <screen>./configure --enable-mlib</screen>
Ceci est à vos risques et périls. Les utilisateurs x86 ne doivent
- <emphasis role="bold">pas</emphasis> utiliser mediaLib, cela
+ <emphasis role="bold">jamais</emphasis> utiliser mediaLib, puisque cela
déteriorerait les performances de MPlayer de manière importante.
</para></listitem>
</itemizedlist>
@@ -211,8 +237,8 @@ make natif de Solaris ne fonctionnera pas.
Message d'erreur typique si vous utilisez le make de Solaris au lieu de
celui de GNU:
<screen>
- % /usr/ccs/bin/make
- make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen
+% /usr/ccs/bin/make
+make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen
</screen>
</para>
@@ -288,14 +314,11 @@ antérieures à Solaris Nevada b31. Ceci a été réparé par Sun pour
Solaris Nevada b32 mais pas encore pour Solaris 10. Le Projet MPlayer
a averti Sun de ce problème. Un patch pour Solaris 10 est actuellement en
développement. Plus d'information sont disponibles à l'adresse
-suivante :
-<ulink
-url="http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6308413"/>.
- </para>
-</listitem>
+suivante : <ulink url="http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6308413"/>.
+ </para></listitem>
<listitem><para>
-A cause de bogues dans Solaris 8, il se peut que vous ne pouviez pas lire
+A cause de bogues dans Solaris 8, il se peut que vous ne puissiez pas lire
de disques DVD plus gros que 4 Go:
</para>
@@ -324,39 +347,41 @@ Le problème hsfs peut être résolu en installant le patch 109764-04 (sparc)
</itemizedlist>
</sect2>
+<!-- ********** -->
+
<sect2 id="irix">
<title>IRIX</title>
+
<para>
Vous pouvez soit essayer d'installer le programme d'installation GNU, et
(si vous ne l'avez pas mis dans votre chemin par défaut) précisez ensuite
l'endroit où il est:
-<screen>./configure --with-install=<replaceable>/chemin/et/nom/de/l'installation</replaceable></screen>
+<screen>
+ ./configure --with-install=<replaceable>/chemin/et/nom/de/l'installation</replaceable>
+</screen>
</para>
<para>
Soit vous pouvez utilisez l'installation par défaut livrée avec IRIX 6.5,
auquel cas vous devrez éditer le <filename>Makefile</filename>
manuellement.
-Changez les deux lignes suivantes:
+Changez la ligne suivante :
<programlisting>
$(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
-
- $(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf
</programlisting>
par:
<programlisting>
$(INSTALL) -m 644 mplayer.1 $(MANDIR)/man1/
-
- $(INSTALL) -m 644 codecs.conf $(CONFDIR)/
</programlisting>
-Et ensuite faites (depuis le rép. source de <application>MPlayer</application>):
-<screen>cp DOCS/mplayer.1 . ; cp etc/codecs.conf .</screen>
-finalement lancez la construction et l'installation.
+Finalement, lancez la construction et l'installation.
</para>
</sect2>
+<!-- ********** -->
+
<sect2 id="hp-ux">
<title>HP UX</title>
+
<para>
Joe Page héberge un
<ulink url="http://users.rcn.com/joepage/mplayer_on_hpux11.htm">HOWTO</ulink>
@@ -373,13 +398,12 @@ GCC sont boguées.
Pour la fonctionnalité OpenGL vous aurez besoin d'installer Mesa et les
pilotes de sortie vidéo gl et gl2 devraient marcher, la vitesse pouvant en
être très affecté, dépendamment de la vitesse du CPU.
-Un bon substitut au pauvre système son natif de HP-UX est GNU esound.
+Une bonne alternative au pauvre système son natif de HP-UX est GNU esound.
</para>
<para>
Créer le périphérique DVD
scanne le bus SCSI avec:
-</para>
<screen>
# ioscan -fn
@@ -397,29 +421,19 @@ ctl <emphasis role="bold">1</emphasis> 8/16/5.7.0 sctl CLAIMED DEVICE
...
</screen>
-<para>
La sortie d'écran montre un lecteur DVD-ROM Pioneer à l'adresse SCSI 2.
L'instance de la carte pour le chemin hardware 8/16 est 1.
</para>
<para>
Créer un lien depuis le prériphérique brut vers le périphérique DVD.
-</para>
-
<screen>
-# ln -s /dev/rdsk/c<replaceable>&lt;SCSI bus instance&gt;</replaceable>t
-<replaceable>&lt;SCSI target ID&gt;</replaceable>d<replaceable>&lt;LUN&gt;</replaceable>
-/dev/<replaceable>&lt;device&gt;</replaceable>
+ln -s /dev/rdsk/c<replaceable>&lt;SCSI bus instance&gt;</replaceable>t<replaceable>&lt;SCSI target ID&gt;</replaceable>d<replaceable>&lt;LUN&gt;</replaceable> /dev/<replaceable>&lt;device&gt;</replaceable>
</screen>
-
-<para>
Exemple:
+<screen>ln -s /dev/rdsk/c1t2d0 /dev/dvd</screen>
</para>
-<screen>
-# ln -s /dev/rdsk/c1t2d0 /dev/dvd
-</screen>
-
<para>
Ci-dessous sont exposées les solutions pour certains problèmes communs:
</para>
@@ -484,8 +498,11 @@ suffisante ou non.)
</sect2>
+<!-- ********** -->
+
<sect2 id="aix">
<title>AIX</title>
+
<para>
<application>MPlayer</application> se compile parfaitement sous AIX 5.1,
5.2 et 5.3, en utilisant GCC 3.3 ou plus.
@@ -516,12 +533,12 @@ Les architectures suivantes ont été testé:
<para>
Les architectures suivantes n'ont pas été testé, mais devraient quand
même marcher:
-</para>
<itemizedlist>
<listitem><para>POWER</para></listitem>
<listitem><para>POWER2</para></listitem>
<listitem><para>POWER5</para></listitem>
</itemizedlist>
+</para>
<para>
Le son à travers les Services Ultimedia n'est pas supporté, comme Ultimedia a
@@ -537,10 +554,9 @@ role="bold">MPlayer ne produit pas de son sous AIX 5.2 et 5.3.</emphasis>
<itemizedlist>
<listitem>
<para>
-Si vous rencontrez ce message d'erreur de
-<filename>configure</filename> :
+Si vous rencontrez ce message d'erreur de <filename>configure</filename> :
<screen>
-$./configure
+$ ./configure
...
Checking for iconv program ... no
No working iconv program found, use
@@ -560,6 +576,10 @@ $ ./configure --charset=noconv
</sect2>
</sect1>
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+
<sect1 id="windows">
<title>Windows</title>
@@ -598,63 +618,41 @@ Ajoutez <option>-fs</option> pour le mode plein écran.
pour compiler le pilote de sortie vidéo DirectX. De plus vous devez
avoir DirectX 7 ou supérieur pour que ce pilote fonctionne.</para>
-<para><link linkend="vidix">VIDIX</link> fonctionne maintenant sous Windows
- avec <option>-vo winvidix</option>, bien que ce soit toujours expérimental
- et que cela requiert une configuration manuelle. Téléchargez
+<para>
+<link linkend="vidix">VIDIX</link> fonctionne maintenant sous Windows avec
+<option>-vo winvidix</option>, bien que ce soit toujours expérimental
+et que cela requiert une configuration manuelle. Téléchargez
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/dhahelper.sys">dhahelper.sys</ulink> ou
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/withmtrr/dhahelper.sys">dhahelper.sys (avec support des MTRR)</ulink>
et copiez le dans le répertoire
<filename class="directory">libdha/dhahelperwin</filename> de votre arborescence
<application>MPlayer</application>.
- Ouvrez une console et placez-vous dans ce répertoire. Ensuite tapez
-
- <screen>gcc -o dhasetup.exe dhasetup.c</screen>
-
- et exécutez
-
- <screen>dhasetup.exe install</screen>
-
- en tant qu'Administrateur. Ensuite vous devez rebooter. Lorsque c'est
- fait, copiez les fichiers <systemitem class="library">.so</systemitem>
- de <filename class="directory">vidix/drivers</filename> dans le répertoire
- <filename class="directory">mplayer/vidix</filename> relatif à votre
- <filename>mplayer.exe</filename>.</para>
+ Ouvrez une console et tapez
+ <screen>make install-dhahelperwin</screen>
+ en tant qu'Administrateur. Ensuite vous devez rebooter.
+</para>
<para>Pour de meilleurs résultats <application>MPlayer</application> devrait
- utiliser une palette que votre carte graphique supporte de façon matérielle.
- Malheureusement, de nombreux pilotes graphiques Windows renvoient certaines
- palettes alors que la carte ne le supporte pas. Pour le vérifier, essayez
-
- <screen>mplayer -benchmark -nosound -frames 100 -vf format=<replaceable>palette</replaceable> <replaceable>film</replaceable></screen>
+utiliser une palette que votre carte graphique supporte de façon matérielle.
+Malheureusement, de nombreux pilotes graphiques Windows renvoient certaines palettes alors que la carte ne le supporte pas. Pour le vérifier, essayez
+<screen>
+mplayer -benchmark -nosound -frames 100 -vf format=<replaceable>palette</replaceable> <replaceable>film</replaceable>
+</screen>
où <replaceable>palette</replaceable> peut être n'importe quelle palette
affichée par l'option <option>-vf format=fmt=help</option>. Si vous
trouvez une palette que votre carte gère particulièrement mal,
<option>-vf noformat=<replaceable>palette</replaceable></option>
l'empèchera d'être utilisée. Ajouter cela à votre fichier de conf pour
- ne plus l'utiliser de façon permanente.</para>
-
-
- <para>
- There are special codec packages for Windows available on our
- <ulink url="http://www.mplayerhq.hu/design7/codecs.html">codecs page</ulink>
- to allow playing formats for which there is no native support yet.
- Put the codecs somewhere in your path or pass
- <option>--codecsdir=<replaceable>c:/path/to/your/codecs</replaceable></option>
- (alternatively
- <option>--codecsdir=<replaceable>/path/to/your/codecs</replaceable></option>
- only on <application>Cygwin</application>) to <filename>configure</filename>.
- We have had some reports that Real DLLs need to be writable by the user
- running <application>MPlayer</application>, but only on some systems (NT4).
- Try making them writable if you have problems.</para>
-
+ ne plus l'utiliser de façon permanente.
+</para>
<para>
Il y a des paquetages de codec spécial pour Windows disponible sur notre
<ulink url="http://www.mplayerhq.hu/design7/codecs.html">page de codecs</ulink>
pour permettre de jouer les formats qui ne sont pas encore nativement
supportés.
-Placez les codecs quelque part dans votre patch ou passez
+Placez les codecs quelque part dans votre path ou passez
<option>--codecsdir=<replaceable>c:/chemin/de/vos/codecs</replaceable></option>
(éventuellement
<option>--codecsdir=<replaceable>/chemin/de/vos/codecs</replaceable></option>
@@ -666,40 +664,31 @@ accessibles en écriture pour l'utilisateur ayant lancé
Essayez de les rendre accessibles en écriture si vous avez des problèmes.
</para>
-<para>Vous pouvez lire des VCDs en jouant les fichiers
+<para>
+ Vous pouvez lire des VCDs en jouant les fichiers
<filename>.DAT</filename> ou <filename>.MPG</filename> que Windows affiche
sur les VCDs. Cela fonctionne tout simplement comme cela (changez la lettre
- de votre lecteur de CD-ROM):</para>
-
+ de votre lecteur de CD-ROM):
<screen>mplayer <replaceable>d:/mpegav/avseq01.dat</replaceable></screen>
-
-<para>Les DVDs fonctionnent également, ajustez <option>-dvd-device</option>
- à la lettre de votre lecteur DVD-ROM:</para>
-
+Vous pouvez aussi lire une piste VCD directement en utilisant :
+<screen> mplayer vcd://<replaceable>&lt;track&gt;</replaceable> -cdrom-device <replaceable>d:</replaceable></screen>
+Les DVDs fonctionnent également, ajustez <option>-dvd-device</option> à la lettre de votre lecteur DVD-ROM :
<screen>mplayer dvd://<replaceable>&lt;titre&gt;</replaceable> -dvd-device <replaceable>d</replaceable>:</screen>
-
-<para>La console <application>Cygwin</application>/<application>MinGW</application>
- est plutôt lente. Il semble que rediriger la sortie
- ou utiliser l'option <option>-quiet</option> améliore les performances. Le
- rendu direct (<option>-dr</option>) peut également aider.
- Si la lecture est erratique, essayez
- <option>-autosync 100</option>. Si certaines de ces options vous sont utiles,
- vous pouvez les placer dans votre fichier de config.</para>
-
-<note>
-
-<para>Sous Windows la détection CPU en cours d'execution (runtime CPU detection)
-désactive le support SSE en raison de plantages récurrent et dur à tracer liés au SSE.
-Si vous souhaitez avoir le support SSE sous Windows, vous devrez compiler sans
-runtime CPU detection.
+La console <application>Cygwin</application>/<application>MinGW</application>
+est plutôt lente. Il semble que rediriger la sortie ou utiliser l'option
+<option>-quiet</option> améliore les performances. Le rendu direct
+(<option>-dr</option>) peut également aider. Si la lecture est erratique,
+essayez <option>-autosync 100</option>. Si certaines de ces options vous sont
+utiles, vous pouvez les placer dans votre fichier de config.
</para>
+<note>
<para>Si vous avez un Pentium 4 et que vous expériencez un plantage lors de l'utilisation
des codecs RealPlayer vous pourriez vouloir désactiver le support hyperthreading.
</para>
-
</note>
+<!-- ********** -->
<sect2 id="cygwin">
<title><application>Cygwin</application></title>
@@ -722,6 +711,7 @@ peuvent être trouvés sur le
</sect2>
+<!-- ********** -->
<sect2 id="mingw">
<title><application>MinGW</application></title>
@@ -747,9 +737,11 @@ et les librairies nécessaires sont disponibles sur
MinGW HOWTO</ulink>.</para>
</sect2>
+</sect1>
-</sect1>
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
<sect1 id="macos">
<title>Mac OS</title>
@@ -809,8 +801,12 @@ Vous pouvez ensuite lancer le script
avec MacPorts):
<screen>PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ PATH=$PATH:/opt/local/bin/ ./configure</screen>
</para>
+
+<!-- ********** -->
+
<sect2 id="osx_gui">
<title>MPlayer OS X GUI</title>
+
<para>
Vous pouvez obtenir un GUI natif et un binaire pré-compilé de
<application>MPlayer</application> pour Mac OS X depuis le projet
@@ -852,37 +848,33 @@ mettre en place quelque chose comme ceci:
<screen>
MPlayer_repertoire_source
|
- |---&gt;main (source SVN de MPlayer)
+ |--->main (source SVN de MPlayer)
|
- |---&gt;main_noaltivec (source SVN de MPlayer configuré avec --disable-altivec)
+ |--->main_noaltivec (source SVN de MPlayer configuré avec --disable-altivec)
|
- |---&gt;mplayerosx (source SVN MPlayerOSX)
+ \--->mplayerosx (source SVN MPlayerOSX)
</screen>
-
Premièrement vous avez besoin de compiler main et main_noaltivec.
</para>
<para>
-Ensuite, réglez une variable globale:
-
+ Pour assurer une rétro compatibilité maximum, commencez par créer la variable d'environnement suivante :
<screen>export MACOSX_DEPLOYMENT_TARGET=10.3</screen>
</para>
<para>
-Et, configure:
+Et, configurez:
</para>
<para>
-Si vous configurez pour un CPU G4 ou au-dessus avec le support AltiVec,
-faire comme suit:
+Si vous configurez pour un CPU G4 (ou plus récent) avec le support AltiVec,
+faites comme suit :
<screen>
-./configure --with-termcaplib=ncurses.5 --disable-gl --disable-x11
+./configure --disable-gl --disable-x11
</screen>
-Si vous configurez pour un G3, faire comme suit:
-
+Si vous configurez pour un G3 sans le support AltiVec, faites comme suit :
<screen>
-./configure --with-termcaplib=ncurses.5 --disable-gl --disable-x11
---disable-altivec
+./configure --disable-gl --disable-x11 --disable-altivec
</screen>
Vous pourriez avoir besoin d'éditer <filename>config.mak</filename> et
changer le
@@ -892,14 +884,9 @@ changer le
<para>
Continuez avec
-<screen>
-make
-</screen>
+<screen>make</screen>
ensuite placez vous dans le répertoire mplayerosx et tapez
-
-<screen>
-make dist
-</screen>
+<screen>make dist</screen>
Cela créera une archive compressée <systemitem>.dmg</systemitem> avec le binaire
prêt à l'emploi.
</para>
@@ -912,6 +899,10 @@ du tout en fonction.
</sect2>
</sect1>
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+
<sect1 id="exotic_platforms">
<title>Plateformes Exotiques</title>
@@ -923,8 +914,11 @@ Pour les instructions de build vous devriez vous référer à la documentation
spécifique du système.
</para>
+<!-- ********** -->
+
<sect2 id="qnx">
<title>QNX</title>
+
<para>
Vous aurez besoin de télécharger et installer SDL pour QNX. Puis de lancer
<application>MPlayer</application> avec les options <option>-vo sdl:driver=photon</option> et
@@ -938,6 +932,8 @@ très lente.
</para>
</sect2>
+<!-- ********** -->
+
<sect2 id="amiga">
<title>Amiga/MorphOS (GeekGadgets)</title>
<para>
diff --git a/DOCS/xml/fr/usage.xml b/DOCS/xml/fr/usage.xml
index 56596e9939..10e3293681 100644
--- a/DOCS/xml/fr/usage.xml
+++ b/DOCS/xml/fr/usage.xml
@@ -8,11 +8,11 @@
<para>
<application>MPlayer</application> utilise un ordre de lecture complexe.
-Il consiste en les options globales écrites en premier, par exemple
+Les options globales sont écrites en premier, par exemple
<screen>mplayer -vfm 5</screen>
-et les options écrites après les noms de fichier, qui s'appliquent
+et les options écrites après les noms de fichier s'appliquent
uniquement au nom de fichier/URL/autre donné, par exemple
<screen>mplayer -vfm 5 <replaceable>film1.avi</replaceable> <replaceable>film2.avi</replaceable> -vfm 4</screen>
@@ -386,8 +386,8 @@ depuis le réseau:
<sect2 id="streaming-save">
<title>Sauvegarder du contenu flux</title>
<para>
-Une fois que vous avez réussi à faire <application>MPlayer</application> lire
-votre flux internet favorit, vous pouvez utiliser l'option
+Une fois que vous avez réussi à faire lire
+votre flux internet favorit par <application>MPlayer</application>, vous pouvez utiliser l'option
<option>-dumpstream</option> pour sauvegarder le flux dans un fichier.
Par exemple:
<screen>
@@ -579,15 +579,15 @@ explication.
Les DVDs ont habituellement l'audio surround encodé en format AC-3 (Dolby Digital) ou DTS
(Digital Theater System). Certains équipements audio moderne sont capables de
décoder ces formats de façon interne. <application>MPlayer</application> peut être
-configuré pour relayer les données audio sans le décodé. Cela ne marchera que si
-vous avez you have une connectique S/PDIF (Sony/Philips Digital Interface) sur
+configuré pour relayer les données audio sans les décoder. Cela ne marchera que si
+vous avez une connectique S/PDIF (Sony/Philips Digital Interface) sur
votre carte son.
</para>
<para>
Si votre équipement audio peux décoder AC-3 et DTS, vous pouvez sans risque activer
le passthrough pour les deux formats. Autrement, activez le passthrough pour le seul format
-votre équipement supporte.
+que votre équipement supporte.
</para>
<itemizedlist>
@@ -853,11 +853,11 @@ trouver la bonne valeur. Par exemple:
<sect3 id="advaudio-channels-copying">
-<title>Copié/Déplacé le canal</title>
+<title>Copier/Déplacer le canal</title>
<para>
Le filtre <option>channels</option> peut déplacer n'importe lequel ou tous les canaux.
-Parametré toutes les sous-options pour le filtre <option>channels</option>
+Parametrer toutes les sous-options pour le filtre <option>channels</option>
peut être compliqué et prend peu d'attention.
<orderedlist spacing="compact">
diff --git a/DOCS/xml/hu/encoding-guide.xml b/DOCS/xml/hu/encoding-guide.xml
index 3e7eabe55d..155f33b233 100644
--- a/DOCS/xml/hu/encoding-guide.xml
+++ b/DOCS/xml/hu/encoding-guide.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r26711 -->
+<!-- synced with r26925 -->
<chapter id="encoding-guide">
<title>Kódolás a <application>MEncoder</application>rel</title>
@@ -2134,7 +2134,7 @@ felépítéséhez (ennek vannak hátrányai - lásd a 3. módszert).
választhatsz, mindegyiknek megvan a maga előnye és hátránya.
Lásd az <option>mplayer -pphelp</option> és az
<option>mplayer -vf help</option> kimenetét, hogy megtudd, mit
- használhatsz (grep-pelj a "deint"-re), olvasd el Michael's Niedermayer
+ használhatsz (grep-pelj a "deint"-re), olvasd el Michael Niedermayer
<ulink url="http://guru.multimedia.cx/deinterlacing-filters/">Deinterlacing szűrő összehasonlítását</ulink>,
és keress az
<ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html">
diff --git a/DOCS/xml/hu/ports.xml b/DOCS/xml/hu/ports.xml
index 5ddb08166c..ff51315007 100644
--- a/DOCS/xml/hu/ports.xml
+++ b/DOCS/xml/hu/ports.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r25771 -->
+<!-- synced with r26936 -->
<chapter id="ports" xreflabel="Ports">
<title>Portok</title>
@@ -602,12 +602,10 @@ van és egy kis kézi állítgatás kell hozzá. Töltsd le a
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/dhahelper.sys">dhahelper.sys</ulink> vagy
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/withmtrr/dhahelper.sys">dhahelper.sys (MTRR támogatással)</ulink>
fájlt és másold be a <filename class="directory">vidix/dhahelperwin</filename> könyvtárba
-az <application>MPlayer</application> forrás fádban. Nyisd meg a konzolt
-és válts át erre a könyvtárra, majd írd be
-<screen>gcc -o dhasetup.exe dhasetup.c</screen>
-és futtasd
-<screen>dhasetup.exe install</screen>
-Adminisztrátorként. Ezután újra kell indítanod a gépet.
+az <application>MPlayer</application> forrás fádban.
+Nyisd meg a konzolt és írd be:
+<screen>make install-dhahelperwin</screen>
+adminisztrátorként. Ezután újra kell indítanod a gépet.
</para>
<para>
diff --git a/DOCS/xml/hu/video.xml b/DOCS/xml/hu/video.xml
index 7958ce5737..682a5fdf9f 100644
--- a/DOCS/xml/hu/video.xml
+++ b/DOCS/xml/hu/video.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r26073 -->
+<!-- synced with r26914 -->
<chapter id="video">
<title>Videó kimeneti eszközök</title>
@@ -862,15 +862,14 @@ Ezen vezérlő Linux 2.6.x alatti verziója itt található:
<procedure>
<title>Telepítés:</title>
<step><para>
- A használatához először <filename>mga_vid.o</filename>-t kell forgatnod:
+ A használatához először le kell fordítanod a <filename>drivers/mga_vid.o</filename> fájt:
<screen>
-cd drivers
-make<!--
+make drivers<!--
--></screen>
</para></step>
<step><para>
Ezután futtasd (<systemitem class="username">root</systemitem>-ként) a
- <screen>make install</screen>
+ <screen>make install-drivers</screen>
parancsot, ami telepíti a modult és létrehozza az eszköz node-ját neked.
Töltsd be a vezérlőt
<screen>insmod mga_vid.o</screen>
@@ -950,14 +949,13 @@ az alábbi utasítások alapján.
<procedure>
<title>A tdfx_vid.o kernel modul telepítése:</title>
<step><para>
- Fordítsd le a <filename>tdfx_vid.o</filename> fájlt:
+ Fordítsd le a <filename>drivers/tdfx_vid.o</filename> fájlt:
<screen>
-cd drivers
-make</screen>
+make drivers</screen>
</para></step>
<step><para>
Ezután futtasd (<systemitem class="username">root</systemitem>-ként) a
- <screen>make install</screen>
+ <screen>make install-drivers</screen>
parancsot, ami telepíti a modult és létrehozza az eszköz node-ját neked.
Töltsd be a vezérlőt
<screen>insmod tdfx_vid.o</screen>
diff --git a/DOCS/xml/it/encoding-guide.xml b/DOCS/xml/it/encoding-guide.xml
index 55477e945e..de757b4b51 100644
--- a/DOCS/xml/it/encoding-guide.xml
+++ b/DOCS/xml/it/encoding-guide.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- 38% synced with r22753 (row 2069) -->
+<!-- 41% synced with r22753 (row 2212) -->
<chapter id="encoding-guide">
<title>La codifica con <application>MEncoder</application></title>
@@ -978,9 +978,6 @@ perciò potresti voler comunque effettuare il ridimensionamento.
<title>Scegliere la risoluzione e il bitrate</title>
<para>
-Other parameters such as scaling, cropping, etc. will
-<emphasis role="bold">not</emphasis> alter the file size unless you
-change the bitrate as well!.
A meno che tu non stia per codificare con quantizzazione costante devi
impostare un bitrate.
La logica del bitrate è abbastanza semplice.
@@ -2067,21 +2064,22 @@ il pattern del telecine.
<!-- ********** -->
<sect2 id="menc-feat-telecine-encode">
-<title>How to encode each category</title>
+<title>Come codificare ciascuna categoria</title>
<para>
-As I mentioned in the beginning, example <application>MEncoder</application>
-lines below are <emphasis role="bold">not</emphasis> meant to actually be used;
-they only demonstrate the minimum parameters to properly encode each category.
+Come menzionato all'inizio, le linee di esempio qui sotto per
+<application>MEncoder</application> <emphasis role="bold">non</emphasis> sono
+pensate per essere usate davvero; dimostrano solamente i parametri minimi per
+codificare correttamente ciascuna categoria.
</para>
<sect3 id="menc-feat-telecine-encode-progressive">
-<title>Progressive</title>
+<title>Progressivo</title>
<para>
-Progressive video requires no special filtering to encode. The only
-parameter you need to be sure to use is <option>-ofps 24000/1001</option>.
-Otherwise, <application>MEncoder</application>
-will try to encode at 30000/1001 fps and will duplicate frames.
+Il video progressivo non richiede particolari filtri per la codifica. L'unico
+parametrioche devi assicurarti di usare è <option>-ofps 24000/1001</option>.
+Se non lo usi, <application>MEncoder</application> cercherà di codificare a
+30000/1001 fps e duplicherà i fotogrammi.
</para>
<para>
@@ -2089,108 +2087,105 @@ will try to encode at 30000/1001 fps and will duplicate frames.
</para>
<para>
-It is often the case, however, that a video that looks progressive
-actually has very short parts of telecine mixed in. Unless you are
-sure, it is safest to treat the video as
-<link linkend="menc-feat-telecine-encode-mixedpt">mixed progressive and telecine</link>.
-The performance loss is small
+Spesso e volentieri capita che un video che sembra progressivo contenga anche
+alcune brevi parti di telecine miscelate. A meno che tu non sia sicuro,
+conviene trattare il video come
+<link linkend="menc-feat-telecine-encode-mixedpt">progressivo e telecine miscelati</link>.
+Il calo di prestazioni è piccolo
<link linkend="menc-feat-telecine-footnotes">[3]</link>.
</para>
</sect3>
<sect3 id="menc-feat-telecine-encode-telecined">
-<title>Telecined</title>
+<title>Telecine</title>
<para>
-Telecine can be reversed to retrieve the original 24000/1001 content,
-using a process called inverse-telecine.
-<application>MPlayer</application> contains several filters to
-accomplish this; the best filter, <option>pullup</option>, is described
-in the <link linkend="menc-feat-telecine-encode-mixedpt">mixed
-progressive and telecine</link> section.
+Il telecine può essere invertito per ricavare il contenuto originario a
+24000/1001 usando un processo conosciuto come telecine-inverso.
+<application>MPlayer</application> include vari filtri per ottenere ciò;
+il filtro migliore, <option>pullup</option>, è descritto nella sezione
+<link linkend="menc-feat-telecine-encode-mixedpt">progressivo e telecine
+miscelati</link>.
</para>
</sect3>
<sect3 id="menc-feat-telecine-encode-interlaced">
-<title>Interlaced</title>
+<title>Interlacciato</title>
<para>
-For most practical cases it is not possible to retrieve a complete
-progressive video from interlaced content. The only way to do so
-without losing half of the vertical resolution is to double the
-framerate and try to "guess" what ought to make up the
-corresponding lines for each field (this has drawbacks - see method 3).
+Nella maggior parte dei casi reali non è possibile ricavare un video
+progressivo completo da contenuto interlacciato. L'unico modo di farlo senza
+perdere metà della risoluzione verticale è raddoppiare il framerate e provare
+ad "indovinare" quello che forma le linee corrispondenti per ogni campo
+(questo ha delle controindicazioni - vedi il metodo 3).
</para>
<orderedlist>
<listitem><para>
- Encode the video in interlaced form. Normally, interlacing wreaks
- havoc with the encoder's ability to compress well, but
- <systemitem class="library">libavcodec</systemitem> has two
- parameters specifically for dealing with storing interlaced video a
- bit better: <option> ildct</option> and <option>ilme</option>. Also,
- using <option>mbd=2</option> is strongly recommended
- <link linkend="menc-feat-telecine-footnotes">[2] </link> because it
- will encode macroblocks as non-interlaced in places where there is
- no motion. Note that <option>-ofps</option> is NOT needed here.
+ Codifica il video in forma interlacciata. Normalmente l'interlacciatura fa a
+ pugni con l'abilità del codificatore di comprimere bene, ma
+ <systemitem class="library">libavcodec</systemitem> ha due parametri
+ appositamente per gestire un pochino meglio il video interlacciato:
+ <option>ildct</option> e <option>ilme</option>. Inoltre viene caldamente
+ consigliato l'utilizzo di <option>mbd=2</option>
+ <link linkend="menc-feat-telecine-footnotes">[2] </link> poiché
+ codificherà i macroblocchi come non interlacciati in posti dove non c'è
+ movimento. Nota che <option>-ofps</option> qui NON serve.
<screen>mencoder dvd://1 -oac copy -ovc lavc -lavcopts ildct:ilme:mbd=2</screen>
</para></listitem>
<listitem><para>
- Use a deinterlacing filter before encoding. There are several of
- these filters available to choose from, each with its own advantages
- and disadvantages. Consult <option>mplayer -pphelp</option> and
- <option>mplayer -vf help</option> to see what is available
- (grep for "deint"), read Michael's Niedermayer
- <ulink url="http://guru.multimedia.cx/deinterlacing-filters/">Deinterlacing filters comparison</ulink>,
- and search the
- <ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html">
- MPlayer mailing lists</ulink> to find many discussions about the
- various filters.
- Again, the framerate is not changing, so no
- <option>-ofps</option>. Also, deinterlacing should be done after
- cropping <link linkend="menc-feat-telecine-footnotes">[1]</link> and
- before scaling.
+ Usa un filtro di de-interlacciatura prima della codifica. Ci sono vari filtri
+ disponibili tra cui scegliere, ognuno dei quali con i suoi pro e i suoi
+ contro. Controlla <option>mplayer -pphelp</option> e
+ <option>mplayer -vf help</option> per vedere cosa c'è disponibile
+ (fa in grep per "deint"), leggi il <ulink url="http://guru.multimedia.cx/deinterlacing-filters/">confronto tra filtri di deinterlacciatura
+ (Deinterlacing filters comparison)</ulink> di Michael Niedermayer, e cerca
+ nelle <ulink url="http://www.mplayerhq.hu/design7/mailing_lists.html">
+ mailing list di MPlayer</ulink> per trovare discussioni riguardanti i vari
+ filtri.
+ Di nuovo il framerate non cambia, indi niente <option>-ofps</option>.
+ Inoltre, la deinterlacciatura dovrebbe essere eseguita dopo il ritaglio
+ <link linkend="menc-feat-telecine-footnotes">[1]</link> e prima del
+ ridimensionamento.
<screen>mencoder dvd://1 -oac copy -vf yadif -ovc lavc</screen>
</para></listitem>
<listitem><para>
- Unfortunately, this option is buggy with
- <application>MEncoder</application>; it ought to work well with
- <application>MEncoder G2</application>, but that is not here yet. You
- might experience crahes. Anyway, the purpose of <option> -vf
- tfields</option> is to create a full frame out of each field, which
- makes the framerate 60000/1001. The advantage of this approach is that no
- data is ever lost; however, since each frame comes from only one
- field, the missing lines have to be interpolated somehow. There are
- no very good methods of generating the missing data, and so the
- result will look a bit similar to when using some deinterlacing
- filters. Generating the missing lines creates other issues, as well,
- simply because the amount of data doubles. So, higher encoding
- bitrates are required to maintain quality, and more CPU power is
- used for both encoding and decoding. tfields has several different
- options for how to create the missing lines of each frame. If you
- use this method, then Reference the manual, and chose whichever
- option looks best for your material. Note that when using
- <option>tfields</option> you
- <emphasis role="bold">have to</emphasis> specify both
- <option>-fps</option> and <option>-ofps</option> to be twice the
- framerate of your original source.
+ Sfortunatamente, quest'opzione non funziona bene con
+ <application>MEncoder</application>; dovrebbe funzionar bene con
+ <application>MEncoder G2</application>, ma ancora non esiste. Puoi subire
+ dei crash. Tuttavia l'obiettivo di <option>-vf tfields</option> è di
+ generare un fotogramma completo da ogni campo, portando il framerate a
+ 60000/1001. Il vantaggio di questo approccio è che non viene mai perso alcun
+ dato; d'altro canto, dato che ogni fotogramma deriva da un solo campo, le
+ righe mancanti devono essere interpolate in qualche modo. Non ci sono metodi
+ veramente validi per ricreare i dati mancanti, quindi il risultato apparirà
+ molto simile a quando vengono usati dei filtri di deinterlacciatura.
+ La generazione delle righe che mancano è foriera di altri problemi,
+ solamente per il fatto che i dati sono raddoppiati. Conseguentemente per
+ mantenere la qualità si rendono necessari bitrate più elevati e viene usata
+ una maggior potenza di CPU sia per la codifica che la decodifica.
+ tfields ha varie opzioni su come generare le righe mancanti di ogni
+ fotogramma. Se usi questo metodo, fai riferimento al manuale, e scegli
+ l'opzione che può andar meglio per il tuo materiale sorgente. Fai attenzione
+ che usando <option>tfields</option> <emphasis role="bold">devi</emphasis>
+ specificare sia <option>-fps</option> che <option>-ofps</option> pari al
+ doppio della sorgente originaria.
<screen>
mencoder dvd://1 -oac copy -vf tfields=2 -ovc lavc \
-fps 60000/1001 -ofps 60000/1001<!--
--></screen>
</para></listitem>
<listitem><para>
- If you plan on downscaling dramatically, you can extract and encode
- only one of the two fields. Of course, you will lose half the vertical
- resolution, but if you plan on downscaling to at most 1/2 of the
- original, the loss will not matter much. The result will be a
- progressive 30000/1001 frames per second file. The procedure is to use
- <option>-vf field</option>, then crop
- <link linkend="menc-feat-telecine-footnotes">[1]</link> and scale
- appropriately. Remember that you will have to adjust the scale to
- compensate for the vertical resolution being halved.
+ Se conti di ridurre drasticamente le dimensioni puoi estrarre e decodificare
+ sono uno dei due campi. Perderai di sicuro metà della risoluzione verticale,
+ ma se pensi di ridurla almeno a 1/2 dell'originale, la perdità non sarà poi
+ molta. Il risultato sarà un file progressivo a 30000/1001 fotogrammi per
+ secondo. La procedura è utilizzare <option>-vf field</option>, poi crop
+ <link linkend="menc-feat-telecine-footnotes">[1]</link> e scale in modo
+ corretto. Ricorda che dovrai correggere scale per compensare la risoluzione
+ verticale dimezzata.
<screen>mencoder dvd://1 -oac copy -vf field=0 -ovc lavc</screen>
</para></listitem>
</orderedlist>
@@ -2198,19 +2193,18 @@ mencoder dvd://1 -oac copy -vf tfields=2 -ovc lavc \
<sect3 id="menc-feat-telecine-encode-mixedpt">
-<title>Mixed progressive and telecine</title>
+<title>Progressivo e telecine miscelati</title>
<para>
-In order to turn mixed progressive and telecine video into entirely
-progressive video, the telecined parts have to be
-inverse-telecined. There are three ways to accomplish this,
-described below. Note that you should
-<emphasis role="bold">always</emphasis> inverse-telecine before any
-rescaling; unless you really know what you are doing,
-inverse-telecine before cropping, too
+Per poter portare un video progressivo e telecine miscelati in un video
+completamente progressivo, le parti in telecine devono essere passate in
+telecine inverso. Ci son tre modi per ottenere ciò, e sono descritti qui sotto.
+Nota che dovresti <emphasis role="bold">sempre</emphasis> effettuare il
+telecine inverso prima di ogni ridimensionamento; a meno che tu non sappia
+davvero cosa tu stia facendo, applica il telecine inverso anche prima del ritaglio (crop)
<link linkend="menc-feat-telecine-footnotes">[1]</link>.
-<option>-ofps 24000/1001</option> is needed here because the output video
-will be 24000/1001 frames per second.
+In questo caso serve <option>-ofps 24000/1001</option> perché il video in
+uscita sarà a 24000/1001 fotogrammi al secondo.
</para>
<itemizedlist>
diff --git a/DOCS/xml/ru/codecs.xml b/DOCS/xml/ru/codecs.xml
index 1118d0ea6a..c8f6b1e627 100644
--- a/DOCS/xml/ru/codecs.xml
+++ b/DOCS/xml/ru/codecs.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r26146 -->
+<!-- synced with r26729 -->
<chapter id="codecs">
<title>Поддерживаемые кодеки</title>
@@ -190,8 +190,8 @@
<para>
<ulink url="http://developers.videolan.org/x264.html"><systemitem class="library">x264</systemitem></ulink> -
Ñто библиотека Ð´Ð»Ñ ÑозданиÑ
-видеопотоков H.264. Она не завершена на 100%, но, по крайней мере, имеет
-поддержку большинÑтва возможноÑтей H.264, влиÑющих на качеÑтво.
+видеопотоков H.264. Она не завершена на 100%, но,
+поддерживает большинÑтва возможноÑтей H.264, влиÑющих на качеÑтво.
Ð’ Ñпецификации H.264 приÑутÑтвует множеÑтво дополнительных возможноÑтей,
которые Ñами по Ñебе никак не влиÑÑŽÑ‚ на качеÑтво видео и до Ñих в
<systemitem class="library">x264</systemitem> не реализованы.
@@ -296,9 +296,9 @@ DVD-разрешением требует около 10% CPU. Это означÐ
<sect3 id="codec-x264-encode">
<title>Как кодировать видео, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ <application>MEncoder</application> и <systemitem class="library">x264</systemitem>?</title>
<para>
-ЕÑли у Ð²Ð°Ñ ÑƒÑтановлен клиент subversion, поÑледнюю верÑию x264
+ЕÑли у Ð²Ð°Ñ ÑƒÑтановлен клиент GIT, поÑледнюю верÑию x264
можно загрузить Ñледующей командой:
-<screen>svn co svn://svn.videolan.org/x264/trunk x264</screen>
+<screen>git clone git://git.videolan.org/x264.git</screen>
ИÑходный код <application>MPlayer</application> обновлÑетÑÑ
вÑÑкий раз при изменении API <systemitem class="library">x264</systemitem>,
так что предлагаетÑÑ Ð¸Ñпользовать Subversion верÑию
@@ -306,7 +306,7 @@ DVD-разрешением требует около 10% CPU. Это означÐ
возможно, ÑÐ¸Ñ‚ÑƒÐ°Ñ†Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ñ‚ÑÑ Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð¾Ð¼ "релиза"
<systemitem class="library">x264</systemitem> (еÑли он будет).
Ð’ данный момент <systemitem class="library">x264</systemitem> Ñледует
-раÑÑматривать как очень неÑтабильный, в Ñвете поÑтоÑнного изменениÑ
+раÑÑматривать как не ÑовÑем Ñтабильный, в Ñвете поÑтоÑнного изменениÑ
интерфейÑа программированиÑ.
</para>
<para>
diff --git a/DOCS/xml/ru/encoding-guide.xml b/DOCS/xml/ru/encoding-guide.xml
index 39ac48a555..3bbe16a418 100644
--- a/DOCS/xml/ru/encoding-guide.xml
+++ b/DOCS/xml/ru/encoding-guide.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r25308 -->
+<!-- synced with r26711 -->
<chapter id="encoding-guide">
<title>Кодирование Ñ <application>MEncoder</application></title>
@@ -1943,7 +1943,7 @@ mkvmerge -o <replaceable>выходной_файл.mkv</replaceable> <replaceabl
<formalpara>
<title>Замечание о чиÑлах.</title>
<para>
-Многие документы, Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ðµ выше руководÑтво, ÑÑылаютÑÑ
+Многие документы, Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½ÑƒÑŽ выше Ñтатью, ÑÑылаютÑÑ
на количеÑтво полей в Ñекунду 59.94 Ð´Ð»Ñ NTSC видео и
ÑоответÑтвующие кадровые чаÑтоты 29.97 (Ð´Ð»Ñ Ð¿Ð¾Ð´Ð²ÐµÑ€Ð¶ÐµÐ½Ð½Ð¾Ð³Ð¾
телеÑину и череÑÑтрочного видео) и 23.976 (Ð´Ð»Ñ Ð¿Ð¾Ñтрочного).
@@ -2034,7 +2034,9 @@ DVD плееры читают флаг, включенный в видеопот
рипы или тонко наÑтроить
<systemitem class="library">libavcodec</systemitem> длÑ
доÑÑ‚Ð¸Ð¶ÐµÐ½Ð¸Ñ Ð¼Ð°ÐºÑимального качеÑтва, не входит в рамки данного
-раздела.
+раздела; обратитеÑÑŒ к другим разделам
+<link linkend="encoding-guide">РуководÑтва по кодированию
+Ñ MEncoder</link>.
</para></listitem>
<listitem><para>
ЕÑÑ‚ÑŒ неÑколько ÑноÑок, Ñпецифичных Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ руководÑтва,
@@ -2392,6 +2394,24 @@ mencoder dvd://1 -oac copy -vf pullup,softskip \
--></screen>
</para></listitem>
<listitem><para>
+ <option>-vf filmdint</option> похожа на
+ <option>-vf pullup</option>: оба фильтра пытаютÑÑ ÑопоÑтавить пару полей
+ Ð´Ð»Ñ Ñ„Ð¾Ñ€Ð¼Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾Ð»Ð½Ð¾Ð³Ð¾ кадра. Однако <option>filmdint</option> будет
+ производить деинтерлейÑинг одиночных полей, которым не может найти пару,
+ в то Ð²Ñ€ÐµÐ¼Ñ ÐºÐ°Ðº <option>pullup</option> попроÑту их отброÑит.
+ Вдобавок фильтры имеют различные алгоритмы анализа, и filmdint
+ имеет тенденцию к более чаÑтому нахождению ÑоответÑтвий.
+ Какой фильтр будет лучше работать завиÑит от иÑходного видео и
+ личного вкуÑа; не бойтеÑÑŒ ÑкÑпериментировать Ñ Ñ‚Ð¾Ð½ÐºÐ¾Ð¹ наÑтройкой
+ опций фильтров, еÑли у Ð²Ð°Ñ Ð²Ð¾Ð·Ð½Ð¸ÐºÐ»Ð¸ проблемы Ñ Ð»ÑŽÐ±Ñ‹Ð¼ из них (подробноÑти
+ Ñмотрите на Ñтранице руководÑтва man). Ð”Ð»Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð½Ñтва качеÑтвенного
+ иÑходного видео, однако, оба фильтра работают доÑтаточно хорошо,
+ так что начинать работать можно Ñ Ð»ÑŽÐ±Ñ‹Ð¼ из них.
+ <screen>
+mencoder dvd://1 -oac copy -vf filmdint -ovc lavc -ofps 24000/1001<!--
+ --></screen>
+</para></listitem>
+<listitem><para>
Более Ñтарый метод заключаетÑÑ Ð½Ðµ в применении обратного телеÑина к
телеÑиненным чаÑÑ‚Ñм, а, наоборот, в телеÑине не подверженных телеÑину чаÑтей и
поÑледующем применении обратного телеÑина ко вÑему видео. Звучит запутанно?
@@ -2403,18 +2423,6 @@ mencoder dvd://1 -oac copy -vf pullup,softskip \
mencoder dvd://1 -oac copy -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001
</screen>
</para></listitem>
-<listitem><para>
- Лично Ñ Ð½Ðµ иÑпользовал <option>-vf filmdint</option>, но вот что Ñказал
- Д Ричарт Фелкер III (D Richard Felker III):
-
- <blockquote><para>С ним вÑе в порÑдке, но имхо он Ñлишком чаÑто пытаетÑÑ
- Ñделать Ð´ÐµÐ¸Ð½Ñ‚ÐµÑ€Ð»ÐµÐ¹Ñ iвмеÑто обратного телеÑина (в точноÑти как аппаратные
- DVD проигрыватели &amp; поÑтрочное TV), что в результате дает мерзкое
- мерцание и другие артефакты. ЕÑли ÑобираетеÑÑŒ его иÑпользовать, потребуетÑÑ
- как минимум потратить немного времени Ð´Ð»Ñ Ñ‚Ð¾Ð½ÐºÐ¾Ð¹ наÑтройки опций и
- проÑмотра результата, чтобы убедитьÑÑ, что он не иÑпорчен.
- </para></blockquote>
-</para></listitem>
</itemizedlist>
</sect3>
@@ -5649,7 +5657,7 @@ mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine \
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
-vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
+vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \
-o <replaceable>фильм.mpg</replaceable> <replaceable>фильм.avi</replaceable>
</screen>
</para>
@@ -5664,7 +5672,7 @@ vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
-vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
+vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \
-o <replaceable>фильм.mpg</replaceable> <replaceable>фильм.avi</replaceable>
</screen>
</para>
@@ -5678,7 +5686,7 @@ vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:\
-vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
+vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 25 \
-o <replaceable>фильм.mpg</replaceable> <replaceable>фильм.avi</replaceable>
</screen>
</para>
@@ -5692,7 +5700,7 @@ vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:\
-vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \
+vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224:aspect=16/9 -ofps 30000/1001 \
-o <replaceable>фильм.mpg</replaceable> <replaceable>фильм.avi</replaceable>
</screen>
</para>
diff --git a/DOCS/xml/ru/mencoder.xml b/DOCS/xml/ru/mencoder.xml
index e62a9c2af0..7140e63413 100644
--- a/DOCS/xml/ru/mencoder.xml
+++ b/DOCS/xml/ru/mencoder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r24342 -->
+<!-- synced with r26258 -->
<chapter id="mencoder">
<title>ОÑновы иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ <application>MEncoder</application></title>
diff --git a/Makefile b/Makefile
index e90b705119..ee41d78348 100644
--- a/Makefile
+++ b/Makefile
@@ -512,9 +512,10 @@ SRCS_MPLAYER = mplayer.c \
libvo/vo_yuv4mpeg.c \
$(addprefix libvo/,$(VO_SRCS)) \
+SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
+SRCS_MPLAYER-$(GUI) += gui/bitmap.c
SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \
- gui/bitmap.c \
gui/cfg.c \
gui/interface.c \
gui/mplayer/gui_common.c \
@@ -540,8 +541,7 @@ SRCS_MPLAYER-$(GUI_GTK) += gui/app.c \
gui/wm/ws.c \
gui/wm/wsxdnd.c \
-SRCS_MPLAYER-$(GUI_WIN32) += gui/bitmap.c \
- gui/win32/dialogs.c \
+SRCS_MPLAYER-$(GUI_WIN32) += gui/win32/dialogs.c \
gui/win32/gui.c \
gui/win32/interface.c \
gui/win32/playlist.c \
@@ -637,12 +637,10 @@ MENCODER_DEPS = $(OBJS_MENCODER) $(OBJS_COMMON) $(COMMON_LIBS)
ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
-ALL_PRG += $(ALL_PRG-yes)
INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man
-INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mplayer-man
-INSTALL_TARGETS-$(GUI_GTK) += install-gui
-INSTALL_TARGETS += $(INSTALL_TARGETS-yes)
+INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mencoder-man
+INSTALL_TARGETS-$(GUI) += install-gui
DIRS = . \
dvdread \
@@ -701,7 +699,7 @@ PARTS = ffmpeg/libavcodec \
###### generic rules #######
-all: $(ALL_PRG)
+all: $(ALL_PRG-yes)
%.d: %.c
$(MPDEPEND_CMD) > $@
@@ -724,12 +722,10 @@ checkheaders: $(ALLHEADERS:.h=.ho)
dep depend: $(DEPS)
for part in $(PARTS); do $(MAKE) -C $$part depend; done
-define RECURSIVE_RULE
-$(part)/$(notdir $(part)).a: recurse
- $(MAKE) -C $(part)
-endef
+ALLPARTLIBS = $(foreach part, $(PARTS), $(part)/$(notdir $(part)).a)
-$(foreach part,$(PARTS),$(eval $(RECURSIVE_RULE)))
+$(ALLPARTLIBS): recurse
+ $(MAKE) -C $(@D)
mplayer$(EXESUF): $(MPLAYER_DEPS)
$(CC) -o $@ $^ $(LDFLAGS_MPLAYER)
@@ -738,26 +734,20 @@ mencoder$(EXESUF): $(MENCODER_DEPS)
$(CC) -o $@ $^ $(LDFLAGS_MENCODER)
codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
- $(HOST_CC) -O -I. -Iffmpeg -DCODECS2HTML $< -o $@
+ $(HOST_CC) -O -I. -Iffmpeg -DCODECS2HTML -o $@ $<
codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
./codec-cfg$(EXESUF) ./etc/codecs.conf > $@
-codecs2html$(EXESUF): mp_msg.o
- $(CC) -DCODECS2HTML codec-cfg.c $^ -o $@
-
-codec-cfg-test$(EXESUF): codecs.conf.h codec-cfg.h mp_msg.o osdep/getch2.o
- $(CC) -I. -DTESTING codec-cfg.c mp_msg.o osdep/getch2.o -ltermcap -o $@
-
-osdep/mplayer-rc.o: osdep/mplayer.rc version.h
- $(WINDRES) -I. -o $@ $<
-
# ./configure must be rerun if it changed
config.mak: configure
@echo "############################################################"
@echo "####### Please run ./configure again - it's changed! #######"
@echo "############################################################"
+help_mp.h: help/help_mp-en.h $(HELP_FILE)
+ help/help_create.sh $(HELP_FILE) $(CHARSET)
+
# rebuild version.h each time the working copy is updated
ifeq ($(wildcard .svn/entries),.svn/entries)
version.h: .svn/entries
@@ -765,22 +755,8 @@ endif
version.h:
./version.sh `$(CC) -dumpversion`
-help_mp.h: help/help_mp-en.h $(HELP_FILE)
- @echo '// WARNING! This is a generated file. Do NOT edit.' > help_mp.h
- @echo '// See the help/ subdir for the editable files.' >> help_mp.h
- @echo '#ifndef MPLAYER_HELP_MP_H' >> help_mp.h
- @echo '#define MPLAYER_HELP_MP_H' >> help_mp.h
-ifeq ($(CHARSET),)
- @echo '#include "$(HELP_FILE)"' >> help_mp.h
-else
- iconv -f UTF-8 -t $(CHARSET) "$(HELP_FILE)" >> help_mp.h
-endif
- @echo '#endif /* MPLAYER_HELP_MP_H */' >> help_mp.h
-
-ifneq ($(HELP_FILE),help/help_mp-en.h)
- @echo '// untranslated messages from the English master file:' >> help_mp.h
- @help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h
-endif
+osdep/mplayer-rc.o: osdep/mplayer.rc version.h
+ $(WINDRES) -I. -o $@ $<
@@ -814,83 +790,69 @@ $(VIDIX_DEPS) $(VIDIX_OBJS): $(VIDIX_PCI_FILES)
-###### installation rules #######
+###### installation / clean / generic rules #######
-install: install-dirs $(INSTALL_TARGETS)
+install: $(INSTALL_TARGETS-yes)
install-dirs:
- $(INSTALL) -d $(BINDIR)
- $(INSTALL) -d $(DATADIR)
+ $(INSTALL) -d $(BINDIR) $(CONFDIR)
+
+install-%: %$(EXESUF) install-dirs
+ $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
+
+install-mplayer-man: $(foreach lang,$(MAN_LANG_ALL),install-mplayer-man-$(lang))
+install-mencoder-man: $(foreach lang,$(MAN_LANG_ALL),install-mencoder-man-$(lang))
+
+install-mplayer-man-en:
$(INSTALL) -d $(MANDIR)/man1
- $(INSTALL) -d $(CONFDIR)
- if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
-
-install-mplayer: mplayer$(EXESUF)
- $(INSTALL) -m 755 $(INSTALLSTRIP) mplayer$(EXESUF) $(BINDIR)
-
-install-mplayer-man:
- for lang in $(MAN_LANG); do \
- if test "$$lang" = en ; then \
- $(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/ ; \
- else \
- $(INSTALL) -d $(MANDIR)/$$lang/man1 ; \
- $(INSTALL) -c -m 644 DOCS/man/$$lang/mplayer.1 $(MANDIR)/$$lang/man1/ ; \
- fi ; \
- done
-
-install-mencoder: mencoder$(EXESUF)
- $(INSTALL) -m 755 $(INSTALLSTRIP) mencoder$(EXESUF) $(BINDIR)
- for lang in $(MAN_LANG); do \
- if test "$$lang" = en ; then \
- cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1 ; \
- else \
- cd $(MANDIR)/$$lang/man1 && ln -sf mplayer.1 mencoder.1 ; \
- fi ; \
- done
-
-install-gui:
+ $(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
+
+install-mencoder-man-en: install-mplayer-man-en
+ cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1
+
+define MPLAYER_MAN_RULE
+install-mplayer-man-$(lang):
+ $(INSTALL) -d $(MANDIR)/$(lang)/man1
+ $(INSTALL) -c -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
+endef
+
+define MENCODER_MAN_RULE
+install-mencoder-man-$(lang): install-mplayer-man-$(lang)
+ cd $(MANDIR)/$(lang)/man1 && ln -sf mplayer.1 mencoder.1
+endef
+
+$(foreach lang,$(MAN_LANG),$(eval $(MPLAYER_MAN_RULE)))
+$(foreach lang,$(MAN_LANG),$(eval $(MENCODER_MAN_RULE)))
+
+install-gui: install-mplayer
-ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
- $(INSTALL) -d $(DATADIR)/skins
- @echo "*** Download skin(s) at http://www.mplayerhq.hu/design7/dload.html"
- @echo "*** for GUI, and extract to $(DATADIR)/skins/"
- $(INSTALL) -d $(prefix)/share/pixmaps
+ $(INSTALL) -d $(DATADIR)/skins $(prefix)/share/pixmaps $(prefix)/share/applications
$(INSTALL) -m 644 etc/mplayer.xpm $(prefix)/share/pixmaps/
- $(INSTALL) -d $(prefix)/share/applications
$(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/
uninstall:
- -rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
- -rm -f $(BINDIR)/mencoder$(EXESUF)
- -rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1
- -rm -f $(prefix)/share/pixmaps/mplayer.xpm
- -rm -f $(prefix)/share/applications/mplayer.desktop
- for lang in $(MAN_LANG); do \
- if test "$$lang" != "en"; then \
- rm -f $(MANDIR)/$$lang/man1/mplayer.1 \
- $(MANDIR)/$$lang/man1/mencoder.1 \
- $(MANDIR)/$$lang/man1/gmplayer.1 ; \
- fi ; \
- done
+ rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
+ rm -f $(BINDIR)/mencoder$(EXESUF)
+ rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1
+ rm -f $(prefix)/share/pixmaps/mplayer.xpm
+ rm -f $(prefix)/share/applications/mplayer.desktop
+ rm -f $(MANDIR)/man1/mplayer.1 $(MANDIR)/man1/mencoder.1
+ rm -f $(foreach lang,$(MAN_LANG),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man)))
clean:
rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.o /*.a /*.ho /*~, $(addsuffix $(suffix),$(dir))))
rm -f mplayer$(EXESUF) mencoder$(EXESUF)
-distclean: clean doxygen_clean testsclean toolsclean
+distclean: clean testsclean toolsclean driversclean
+ rm -rf DOCS/tech/doxygen
rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
rm -f configure.log config.mak config.h codecs.conf.h help_mp.h \
version.h $(VIDIX_PCI_FILES) \
- codec-cfg$(EXESUF) codecs2html$(EXESUF) codec-cfg-test$(EXESUF) \
- cpuinfo$(EXESUF) TAGS tags
+ codec-cfg$(EXESUF) cpuinfo$(EXESUF) TAGS tags
doxygen:
doxygen DOCS/tech/Doxyfile
-doxygen_clean:
- -rm -rf DOCS/tech/doxygen
-strip:
- strip -s $(ALL_PRG)
-
TAGS:
rm -f $@; ( find -name '*.[chS]' -print ) | xargs etags -a
@@ -903,6 +865,12 @@ tags:
TEST_OBJS = mp_msg-mencoder.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
+codecs2html$(EXESUF): codec-cfg.c $(TEST_OBJS)
+ $(CC) -I. -DCODECS2HTML -o $@ $^
+
+codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h codec-cfg.h $(TEST_OBJS)
+ $(CC) -I. -DTESTING -o $@ $^
+
liba52/test$(EXESUF): liba52/test.c cpudetect.o $(filter liba52/%,$(SRCS_COMMON:.c=.o))
libvo/aspecttest$(EXESUF): libvo/aspecttest.c libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
@@ -916,7 +884,8 @@ loader/qtx/qtxload$(EXESUF): loader/qtx/qtxload.c $(LOADER_TEST_OBJS)
mp3lib/test$(EXESUF): mp3lib/test.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS)
mp3lib/test2$(EXESUF): mp3lib/test2.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS)
-TESTS = liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \
+TESTS = codecs2html$(EXESUF) codec-cfg-test$(EXESUF) \
+ liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF) \
mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF)
@@ -947,6 +916,9 @@ ALLTOOLS = $(TOOLS) \
tools: $(TOOLS)
alltools: $(ALLTOOLS)
+toolsclean:
+ rm -f $(ALLTOOLS) TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
+
TOOLS/bmovl-test$(EXESUF): TOOLS/bmovl-test.c -lSDL_image
TOOLS/subrip$(EXESUF): TOOLS/subrip.c vobsub.o spudec.o unrar_exec.o \
@@ -988,10 +960,87 @@ NETSTREAM_DEPS = libavutil/libavutil.a \
TOOLS/netstream$(EXESUF): TOOLS/netstream.o $(NETSTREAM_DEPS)
$(CC) $(CFLAGS) -o $@ $^
-toolsclean:
- rm -f $(ALLTOOLS) TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
+
+
+###### drivers #######
+
+KERNEL_INC = /lib/modules/`uname -r`/build/include
+KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
+KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h
+KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o)
+MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc
+
+drivers: $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test
+
+$(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test: CFLAGS = $(KERNEL_CFLAGS)
+drivers/mga_vid.o: drivers/mga_vid.c drivers/mga_vid.h
+drivers/tdfx_vid.o: drivers/tdfx_vid.c drivers/3dfx.h
+drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
+drivers/radeon_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
+drivers/rage128_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
+ $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
+
+install-drivers: drivers
+ -mkdir -p $(MODULES_DIR)
+ install -m 644 $(KERNEL_OBJS) $(MODULES_DIR)
+ depmod -a
+ -mknod /dev/mga_vid c 178 0
+ -mknod /dev/tdfx_vid c 178 0
+ -mknod /dev/radeon_vid c 178 0
+ -ln -s /dev/radeon_vid /dev/rage128_vid
+
+driversclean:
+ rm -f drivers/*.o drivers/*~ drivers/mga_vid_test drivers/tdfx_vid_test
+
+dhahelper: vidix/dhahelper/dhahelper.o vidix/dhahelper/test
+
+vidix/dhahelper/dhahelper.o vidix/dhahelper/test: CFLAGS = $(KERNEL_CFLAGS)
+vidix/dhahelper/dhahelper.o: vidix/dhahelper/dhahelper.c vidix/dhahelper/dhahelper.h
+
+install-dhahelper: vidix/dhahelper/dhahelper.o
+ -mkdir -p $(MODULES_DIR)
+ install -m 644 $< $(MODULES_DIR)
+ depmod -a
+
+dhahelperclean:
+ rm -f vidix/dhahelper/*.o vidix/dhahelper/*~ vidix/dhahelper/test
+
+dhahelperwin: vidix/dhahelperwin/dhasetup.exe vidix/dhahelperwin/dhahelper.sys
+
+vidix/dhahelperwin/dhasetup.exe: vidix/dhahelperwin/dhasetup.c
+ $(CC) -o $@ $<
+
+vidix/dhahelperwin/dhahelper.o: vidix/dhahelperwin/dhahelper.c vidix/dhahelperwin/dhahelper.h
+ $(CC) -Wall -Os -c $< -o $@
+
+vidix/dhahelperwin/dhahelper-rc.o: vidix/dhahelperwin/dhahelper.rc vidix/dhahelperwin/common.ver vidix/dhahelperwin/ntverp.h
+ $(WINDRES) -I. $< $@
+
+vidix/dhahelperwin/base.tmp: vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o
+ $(CC) -Wl,--base-file,$@ -Wl,--entry,_DriverEntry@8 -nostartfiles \
+ -nostdlib -o vidix/dhahelperwin/junk.tmp $^ -lntoskrnl
+ -rm -f vidix/dhahelperwin/junk.tmp
+
+vidix/dhahelperwin/temp.exp: vidix/dhahelperwin/base.tmp
+ dlltool --dllname vidix/dhahelperwin/dhahelper.sys --base-file $< --output-exp $@
+
+vidix/dhahelperwin/dhahelper.sys: vidix/dhahelperwin/temp.exp vidix/dhahelperwin/dhahelper.o vidix/dhahelperwin/dhahelper-rc.o
+ $(CC) -Wl,--subsystem,native -Wl,--image-base,0x10000 \
+ -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 \
+ -Wl,--entry,_DriverEntry@8 -Wl,$< -mdll -nostartfiles -nostdlib \
+ -o $@ vidix/dhahelperwin/dhahelper.o \
+ vidix/dhahelperwin/dhahelper-rc.o -lntoskrnl
+ strip $@
+
+install-dhahelperwin:
+ vidix/dhahelperwin/dhasetup.exe install
+
+dhahelperwinclean:
+ rm -f $(addprefix vidix/dhahelperwin/,*.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp)
+
+
-include $(DEPS)
-.PHONY: all doxygen *install* recurse strip *tools
+.PHONY: all doxygen *install* recurse *tools drivers dhahelper*
.PHONY: checkheaders *clean dep depend tests
diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c
index b4b2bb6ff9..9a2e34a850 100644
--- a/TOOLS/fastmemcpybench.c
+++ b/TOOLS/fastmemcpybench.c
@@ -34,7 +34,7 @@ static int mga_init(){
if(f == -1)
{
fprintf(stderr,"Couldn't open /dev/mga_vid\n");
- return(-1);
+ return -1;
}
mga_vid_config.num_frames=1;
@@ -80,7 +80,7 @@ static unsigned int GetTimer(){
// float s;
gettimeofday(&tv,&tz);
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
- return (tv.tv_sec*1000000+tv.tv_usec);
+ return tv.tv_sec * 1000000 + tv.tv_usec;
}
static inline unsigned long long int read_tsc( void )
diff --git a/TOOLS/movinfo.c b/TOOLS/movinfo.c
index 73849b24a7..a021dc78bb 100644
--- a/TOOLS/movinfo.c
+++ b/TOOLS/movinfo.c
@@ -26,28 +26,28 @@ static char *atom2human_type(int type)
{
switch (type)
{
- case 0x766F6F6D: return ("Information sections"); /* moov */
- case 0x6468766D: return ("Movie header"); /* mvhd */
- case 0x6169646D: return ("Media stream"); /* mdia */
- case 0x64686D76: return ("Video media header"); /* vmhd */
- case 0x64686D73: return ("Sound media header"); /* smhd */
- case 0x6468646D: return ("Media header"); /* mdhd */
- case 0x666E696D: return ("Media information"); /* minf */
- case 0x726C6468: return ("Handler reference"); /* hdlr */
- case 0x6B617274: return ("New track (stream)"); /* trak */
- case 0x75716D72: return ("rmqu");
- case 0x65657266: return ("free");
- case 0x64686B74: return ("Track header"); /* tkhd */
- case 0x61746475: return ("User data"); /* udta */
- case 0x7461646D: return ("Movie data"); /* mdat */
- case 0x6C627473: return ("Sample information table"); /* stbl */
- case 0x64737473: return ("Sample description"); /* stsd */
- case 0x6F637473: return ("Chunk offset table"); /* stco */
- case 0x73747473: return ("Sample time table"); /* stts */
- case 0x63737473: return ("Sample->Chunk mapping table"); /* stsc */
- case 0x7A737473: return ("Sample size table"); /* stsz */
+ case 0x766F6F6D: return "Information sections"; /* moov */
+ case 0x6468766D: return "Movie header"; /* mvhd */
+ case 0x6169646D: return "Media stream"; /* mdia */
+ case 0x64686D76: return "Video media header"; /* vmhd */
+ case 0x64686D73: return "Sound media header"; /* smhd */
+ case 0x6468646D: return "Media header"; /* mdhd */
+ case 0x666E696D: return "Media information"; /* minf */
+ case 0x726C6468: return "Handler reference"; /* hdlr */
+ case 0x6B617274: return "New track (stream)"; /* trak */
+ case 0x75716D72: return "rmqu";
+ case 0x65657266: return "free";
+ case 0x64686B74: return "Track header"; /* tkhd */
+ case 0x61746475: return "User data"; /* udta */
+ case 0x7461646D: return "Movie data"; /* mdat */
+ case 0x6C627473: return "Sample information table"; /* stbl */
+ case 0x64737473: return "Sample description"; /* stsd */
+ case 0x6F637473: return "Chunk offset table"; /* stco */
+ case 0x73747473: return "Sample time table"; /* stts */
+ case 0x63737473: return "Sample->Chunk mapping table"; /* stsc */
+ case 0x7A737473: return "Sample size table"; /* stsz */
}
- return("unknown");
+ return "unknown";
}
#define S_NONE 0
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 411416dfa7..e1806ca1e0 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -310,7 +310,7 @@ const m_option_t mplayer_opts[]={
// a-v sync stuff:
OPT_FLAG_ON("correct-pts", user_correct_pts, 0),
- OPT_FLAG_OFF("no-correct-pts", user_correct_pts, 0),
+ OPT_FLAG_OFF("nocorrect-pts", user_correct_pts, 0),
{"noautosync", &autosync, CONF_TYPE_FLAG, 0, 0, -1, NULL},
{"autosync", &autosync, CONF_TYPE_INT, CONF_RANGE, 0, 10000, NULL},
// {"dapsync", &dapsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
diff --git a/codec-cfg.c b/codec-cfg.c
index 1ffd22c2f7..e293fb85dc 100644
--- a/codec-cfg.c
+++ b/codec-cfg.c
@@ -1177,8 +1177,10 @@ next:
printf("info='%s'\n",c->info);
printf("comment='%s'\n",c->comment);
printf("dll='%s'\n",c->dll);
- printf("flags=%X driver=%d status=%d cpuflags=%d\n",
- c->flags, c->driver, c->status, c->cpuflags);
+ /* printf("flags=%X driver=%d status=%d cpuflags=%d\n",
+ c->flags, c->driver, c->status, c->cpuflags); */
+ printf("flags=%X status=%d cpuflags=%d\n",
+ c->flags, c->status, c->cpuflags);
for(j=0;j<CODECS_MAX_FOURCC;j++){
if(c->fourcc[j]!=0xFFFFFFFF){
diff --git a/command.c b/command.c
index 90df10ac4b..d34c8db39e 100644
--- a/command.c
+++ b/command.c
@@ -1908,7 +1908,7 @@ static int mp_property_teletext_common(m_option_t *prop, int action, void *arg,
return M_PROPERTY_NOT_IMPLEMENTED;
}
- return (result==TVI_CONTROL_TRUE?M_PROPERTY_OK:M_PROPERTY_ERROR);
+ return result == TVI_CONTROL_TRUE ? M_PROPERTY_OK : M_PROPERTY_ERROR;
}
static int mp_property_teletext_mode(m_option_t *prop, int action, void *arg,
@@ -2629,6 +2629,11 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
}
break;
+ case MP_CMD_STOP:
+ mpctx->eof = PT_STOP;
+ brk_cmd = 1;
+ break;
+
#ifdef USE_RADIO
case MP_CMD_RADIO_STEP_CHANNEL:
if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
diff --git a/configure b/configure
index e07cb92900..35380bdc5a 100755
--- a/configure
+++ b/configure
@@ -229,6 +229,7 @@ Optional features:
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
--enable-joystick enable joystick support [disable]
--enable-apple-remote enable Apple Remote input (Mac OS X only) [autodetect]
+ --enable-apple-ir enable Apple IR Remote input (Linux only) [autodetect]
--disable-vm disable X video mode extensions [autodetect]
--disable-xf86keysym disable support for multimedia keys [autodetect]
--enable-radio enable radio interface [disable]
@@ -285,8 +286,8 @@ Codecs:
--disable-qtx disable QuickTime codecs support [enabled]
--disable-xanim disable XAnim codecs support [enabled]
--disable-real disable RealPlayer codecs support [enabled]
- --disable-xvid disable XviD [autodetect]
- --disable-xvid-lavc disable XviD in libavcodec [autodetect]
+ --disable-xvid disable Xvid [autodetect]
+ --disable-xvid-lavc disable Xvid in libavcodec [autodetect]
--disable-x264 disable x264 [autodetect]
--disable-x264-lavc disable x264 in libavcodec [autodetect]
--disable-libnut disable libnut [autodetect]
@@ -630,6 +631,7 @@ _libnut=auto
_lirc=auto
_lircc=auto
_apple_remote=auto
+_apple_ir=auto
_gui=no
_gtk1=no
_termcap=auto
@@ -1073,6 +1075,8 @@ for ac_option do
--disable-lircc) _lircc=no ;;
--enable-apple-remote) _apple_remote=yes ;;
--disable-apple-remote) _apple_remote=no ;;
+ --enable-apple-ir) _apple_ir=yes ;;
+ --disable-apple-ir) _apple_ir=no ;;
--enable-gui) _gui=yes ;;
--disable-gui) _gui=no ;;
--enable-gtk1) _gtk1=yes ;;
@@ -1565,7 +1569,7 @@ if x86 && test "$_runtime_cpudetection" = no ; then
void catch() { exit(1); }
int main(void) {
signal(SIGILL, catch);
- __asm__ __volatile__ ("$3":::"memory");return(0);
+ __asm__ __volatile__ ("$3":::"memory"); return 0;
}
EOF
@@ -2411,30 +2415,46 @@ echores $_asmalign_pot
#FIXME: This should happen before the check for CFLAGS..
-if test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ; then
+if ppc && ( test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ) ; then
# check if AltiVec is supported by the compiler, and how to enable it
echocheck "GCC AltiVec flags"
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
- cc_check -maltivec -mabi=altivec \
- && _altivec_gcc_flags="-maltivec -mabi=altivec" \
- || cc_check -faltivec && _altivec_gcc_flags=-faltivec \
- || _altivec=no
- echores "$_altivec_gcc_flags"
-
+ if $(cc_check -maltivec -mabi=altivec) ; then
+ _altivec_gcc_flags="-maltivec -mabi=altivec"
# check if <altivec.h> should be included
- echocheck "altivec.h"
_def_altivec_h='#undef HAVE_ALTIVEC_H'
- _have_altivec_h=no
cat > $TMPC << EOF
#include <altivec.h>
int main(void) { return 0; }
EOF
- cc_check $_altivec_gcc_flags && _have_altivec_h=yes \
- && _def_altivec_h='#define HAVE_ALTIVEC_H 1'
- echores "$_have_altivec_h"
+ if $(cc_check $_altivec_gcc_flags) ; then
+ _def_altivec_h='#define HAVE_ALTIVEC_H 1'
+ inc_altivec_h='#include <altivec.h>'
+ else
+ cat > $TMPC << EOF
+int main(void) { return 0; }
+EOF
+ if $(cc_check -faltivec) ; then
+ _altivec_gcc_flags="-faltivec"
+ else
+ _altivec=no
+ _altivec_gcc_flags="none, AltiVec disabled"
+ fi
+ fi
+ fi
+ echores "$_altivec_gcc_flags"
+
+ # check if the compiler supports braces for vector declarations
+ cat > $TMPC << EOF
+$inc_altivec_h
+#define AVV(x...) {x}
+int main (void) { (vector int) AVV(1); return 0; }
+EOF
+ cc_check $_altivec_gcc_flags &&
+ _def_altivec_vector_braces='#define HAVE_ALTIVEC_VECTOR_BRACES 1'
# Disable runtime cpudetection if we cannot generate AltiVec code or
# AltiVec is disabled by the user.
@@ -2589,12 +2609,13 @@ _mp_help="help/help_mp-${_language}.h"
test -f $_mp_help || die "$_mp_help not found"
for lang in $LANGUAGES ; do
if test -f "DOCS/man/$lang/mplayer.1" ; then
- MAN_LANG="$lang $MAN_LANG"
+ MAN_LANG_ALL="$lang $MAN_LANG_ALL"
fi
done
+MAN_LANG="$(echo $MAN_LANG_ALL | sed 's/en//')"
_doc_lang=$_language
test -d DOCS/xml/$_doc_lang || _doc_lang=en
-echores "using $_language (man pages: $MAN_LANG)"
+echores "using $_language (man pages: $MAN_LANG_ALL)"
echocheck "enable sighandler"
@@ -3604,6 +3625,28 @@ echores "$_apple_remote"
fi #if darwin
+if linux; then
+
+echocheck "Apple IR"
+if test "$_apple_ir" = auto ; then
+ _apple_ir=no
+ cat > $TMPC <<EOF
+#include <linux/types.h>
+#include <linux/input.h>
+int main(void) {
+ struct input_event ev;
+ return 0;
+}
+EOF
+ cc_check && tmp_run && _apple_ir=yes
+fi
+if test "$_apple_ir" = yes ; then
+ _def_apple_ir='#define HAVE_APPLE_IR 1'
+else
+ _def_apple_ir='#undef HAVE_APPLE_IR'
+fi
+echores "$_apple_ir"
+fi #if linux
echocheck "pkg-config"
_pkg_config=pkg-config
@@ -4512,7 +4555,7 @@ cat > $TMPC << EOF
int main(void) {
printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
printf("libpng: %s\n", png_libpng_ver);
- return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
+ return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
}
EOF
if cc_check -lpng -lz $_ld_lm ; then
@@ -5324,26 +5367,22 @@ elif test "$_dvdread" = auto ; then
if test "$_dl" = yes; then
cat > $TMPC << EOF
#include <inttypes.h>
-#include <dvdread/dvd_reader.h>
-#include <dvdread/ifo_types.h>
-#include <dvdread/ifo_read.h>
-#include <dvdread/nav_read.h>
+#include <libdvdread/dvd_reader.h>
+#include <libdvdread/ifo_types.h>
+#include <libdvdread/ifo_read.h>
+#include <libdvdread/nav_read.h>
int main(void) { return 0; }
EOF
- cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
- -ldvdread $_ld_dl && _dvdread=yes && _res_comment="external"
fi
- if test "$_dvdread" = no ; then
- _dvdreadconfig="dvdread-config"
- _dvdreadcflags=`$_dvdreadconfig --cflags`
- _dvdreadlibs=`$_dvdreadconfig --libs`
- if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
- $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
- _dvdread=yes
- _inc_extra="$_inc_extra $_dvdreadcflags"
- _ld_extra="$_ld_extra $_dvdreadlibs"
- _res_comment="external"
- fi
+ _dvdreadconfig="dvdread-config"
+ _dvdreadcflags=`$_dvdreadconfig --cflags`
+ _dvdreadlibs=`$_dvdreadconfig --libs`
+ if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
+ $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
+ _dvdread=yes
+ _inc_extra="$_inc_extra $_dvdreadcflags"
+ _ld_extra="$_ld_extra $_dvdreadlibs"
+ _res_comment="external"
fi
fi
@@ -6506,7 +6545,7 @@ fi
echores "$_libdv"
-echocheck "XviD"
+echocheck "Xvid"
if test "$_xvid" = auto ; then
_xvid=no
cat > $TMPC << EOF
@@ -6527,7 +6566,7 @@ else
fi
echores "$_xvid"
-echocheck "XviD two pass plugin"
+echocheck "Xvid two pass plugin"
if test "$_xvid" = yes && test "$_xvid_lavc" = auto ; then
cat > $TMPC << EOF
#include <xvid.h>
@@ -7304,12 +7343,7 @@ else
_def_charset="#undef MSG_CHARSET"
fi
-if test "$_charset" = "UTF-8" ; then
- # hack to disable conversion in the Makefile
- _charset=""
-fi
-
-if test "$_charset" ; then
+if test "$_charset" != "UTF-8" ; then
echocheck "iconv program"
iconv -f UTF-8 -t $_charset ${_mp_help} > /dev/null 2>> "$TMPLOG"
if test "$?" -ne 0 ; then
@@ -7510,7 +7544,12 @@ cc_check -mno-omit-leaf-frame-pointer && CFLAG_NO_OMIT_LEAF_FRAME_POINTER="-mno-
# to use its own copy of the library)
echocheck "DVD support (libdvdnav)"
if test "$_dvdnav" = auto ; then
- $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
+ if test "$_dvdread_internal" = yes ; then
+ _dvdnav=no
+ echores "disabled due to the usage of the internal copy of dvdread. Append --disable-dvdread-internal"
+ else
+ $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
+ fi
fi
if test "$_dvdnav" = auto ; then
cat > $TMPC <<EOF
@@ -7540,9 +7579,12 @@ echo "Creating config.mak"
cat > config.mak << EOF
# -------- Generated by configure -----------
-LANG = C
+# Ensure that locale settings do not interfere with shell commands.
+LC_ALL = C
+
MAN_LANG = $MAN_LANG
-TARGET_OS = $system_name
+MAN_LANG_ALL = $MAN_LANG_ALL
+
DESTDIR =
prefix = \$(DESTDIR)$_prefix
BINDIR = \$(DESTDIR)$_bindir
@@ -7550,8 +7592,7 @@ DATADIR = \$(DESTDIR)$_datadir
MANDIR = \$(DESTDIR)$_mandir
CONFDIR = \$(DESTDIR)$_confdir
LIBDIR = \$(DESTDIR)$_libdir
-# FFmpeg uses libdir instead of LIBDIR
-libdir = \$(LIBDIR)
+
AR = $_ar
CC = $_cc
CXX = $_cc
@@ -7559,6 +7600,8 @@ HOST_CC = $_host_cc
RANLIB = $_ranlib
WINDRES = $_windres
INSTALL = $_install
+INSTALLSTRIP = $_install_strip
+
EXTRA_INC = $_inc_extra
EXTRAXX_INC = $_inc_extra $_inc_extraxx
CFLAGS = $CFLAGS \$(EXTRA_INC)
@@ -7567,49 +7610,38 @@ FFMPEG_OFLAGS = $CFLAGS_FFMPEG \$(EXTRA_INC)
CFLAG_NO_OMIT_LEAF_FRAME_POINTER = $CFLAG_NO_OMIT_LEAF_FRAME_POINTER
CXXFLAGS = $CXXFLAGS \$(EXTRAXX_INC)
CFLAG_STACKREALIGN = $_stackrealign
+LIBDVDCSS_DVDREAD_FLAGS = $_libdvdcss_dvdread_flags
ASFLAGS = $ASFLAGS
-INSTALLSTRIP = $_install_strip
+
+EXTRALIBS = $_extra_libs
+EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
+EXTRALIBS_MPLAYER = $_libs_mplayer
+EXTRALIBS_MENCODER = $_libs_mencoder
+
CHARSET = $_charset
HELP_FILE = $_mp_help
EXESUF = $_exesuf
-MPLAYER_NETWORK = $_network
-FTP = $_ftp
-STREAMING_LIVE555 = $_live
-LIBNEMESI = $_nemesi
-NATIVE_RTSP = $_native_rtsp
-VSTREAM = $_vstream
-STREAM_CACHE = $_stream_cache
-DVBIN = $_dvbin
-VIDIX = $_vidix
-VIDIX_INTERNAL = $_vidix_internal
-VIDIX_EXTERNAL = $_vidix_external
-VIDIX_PCIDB = $_vidix_pcidb_val
-CONFIG_POSTPROC = yes
-MP3LAME = $_mp3lame
-LIBMENU = $_menu
-LIBMENU_DVBIN = $_menu_dvbin
+$_target_arch
+$_target_arch_x86
+`echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/'`
-MP3LIB = $_mp3lib
+GETCH = $_getch
+TIMER = $_timer
+
+AO_SRCS = $_aosrc
+VO_SRCS = $_vosrc
+
+MENCODER = $_mencoder
+MPLAYER = $_mplayer
+
+#internal libraries
LIBA52 = $_liba52
LIBMPEG2 = $_libmpeg2
+MP3LIB = $_mp3lib
TREMOR_INTERNAL = $_tremor_internal
TREMOR_LOW = $_tremor_low
-FAAD = $_faad
-
-SPEEX = $_speex
-MUSEPACK = $_musepack
-
-UNRAR_EXEC = $_unrar_exec
-PNG = $_png
-JPEG = $_jpeg
-GIF = $_gif
-
-EXTRALIBS = $_extra_libs
-EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
-EXTRALIBS_MPLAYER = $_libs_mplayer
-EXTRALIBS_MENCODER = $_libs_mencoder
HAVE_SYS_MMAN_H = $_mman
HAVE_POSIX_SELECT = $_posix_select
@@ -7623,76 +7655,84 @@ NEED_STRSEP = $_need_strsep
NEED_SWAB = $_need_swab
NEED_VSSCANF = $_need_vsscanf
-GETCH = $_getch
-TIMER = $_timer
-
-PE_EXECUTABLE = $_pe_executable
-
# audio output
OSS = $_ossaudio
-ALSA = $_alsa
-ALSA5 = $_alsa5
ALSA9 = $_alsa9
ALSA1X = $_alsa1x
-LADSPA = $_ladspa
-
-# input/demuxer/codecs
-JOYSTICK = $_joystick
-LIRC = $_lirc
+# features
+APPLE_IR = $_apple_ir
APPLE_REMOTE = $_apple_remote
-TV = $_tv
-TV_V4L = $_tv_v4l
-TV_V4L1 = $_tv_v4l1
-TV_V4L2 = $_tv_v4l2
-TV_DSHOW = $_tv_dshow
-TV_BSDBT848 = $_tv_bsdbt848
-TV_TELETEXT = $_tv_teletext
AUDIO_INPUT = $_audio_input
-PVR = $_pvr
-VCD = $_vcd
-DVDREAD = $_dvdread
-DVDREAD_INTERNAL = $_dvdread_internal
-LIBDVDCSS_INTERNAL = $_libdvdcss_internal
-LIBDVDCSS_DVDREAD_FLAGS = $_libdvdcss_dvdread_flags
-DVDNAV = $_dvdnav
-WIN32DLL = $_win32dll
-WIN32_EMULATION = $_win32_emulation
-QTX_CODECS = $_qtx
-QTX_CODECS_WIN32 = $_qtx_codecs_win32
-QTX_EMULATION = $_qtx_emulation
-REAL_CODECS = $_real
-XANIM_CODECS = $_xanim
-ZORAN = $_zr
-LIBLZO = $_liblzo
-LIBDV = $_libdv
-XVID4 = $_xvid
-X264 = $_x264
-LIBNUT = $_libnut
-LIBDCA = $_libdca
-MPLAYER = $_mplayer
-MENCODER = $_mencoder
+BITMAP_FONT = $_bitmap_font
CDDA = $_cdda
CDDB = $_cddb
-BITMAP_FONT = $_bitmap_font
+COREAUDIO = $_coreaudio
+COREVIDEO = $_corevideo
+DVBIN = $_dvbin
+DVDNAV = $_dvdnav
+DVDREAD = $_dvdread
+DVDREAD_INTERNAL = $_dvdread_internal
+FAAC=$_faac
+FAAD = $_faad
+FAAD_INTERNAL = $_faad_internal
FREETYPE = $_freetype
+FTP = $_ftp
+GIF = $_gif
+GUI = $_gui
+GUI_GTK = $_gui_gtk
+GUI_WIN32 = $_gui_win32
+JOYSTICK = $_joystick
+JPEG = $_jpeg
+LADSPA = $_ladspa
LIBASS = $_ass
+LIBDCA = $_libdca
+LIBDV = $_libdv
+LIBDVDCSS_INTERNAL = $_libdvdcss_internal
+LIBLZO = $_liblzo
LIBMAD = $_mad
-LIBVORBIS = $_vorbis
-LIBTHEORA = $_theora
-FAAD_INTERNAL = $_faad_internal
+LIBMENU = $_menu
+LIBMENU_DVBIN = $_menu_dvbin
+LIBNEMESI = $_nemesi
+LIBNUT = $_libnut
LIBSMBCLIENT = $_smbsupport
-XMMS_PLUGINS = $_xmms
-MACOSX_FINDER_SUPPORT = $_macosx_finder_support
+LIBTHEORA = $_theora
+LIBVORBIS = $_vorbis
+LIRC = $_lirc
MACOSX_BUNDLE = $_macosx_bundle
-COREAUDIO = $_coreaudio
-COREVIDEO = $_corevideo
+MACOSX_FINDER_SUPPORT = $_macosx_finder_support
+MP3LAME = $_mp3lame
+MPLAYER_NETWORK = $_network
+MUSEPACK = $_musepack
+NATIVE_RTSP = $_native_rtsp
+PE_EXECUTABLE = $_pe_executable
+PNG = $_png
+PVR = $_pvr
+QTX_CODECS = $_qtx
+QTX_CODECS_WIN32 = $_qtx_codecs_win32
+QTX_EMULATION = $_qtx_emulation
QUARTZ = $_quartz
-TOOLAME=$_toolame
-TWOLAME=$_twolame
-FAAC=$_faac
RADIO=$_radio
RADIO_CAPTURE=$_radio_capture
+REAL_CODECS = $_real
+SPEEX = $_speex
+STREAMING_LIVE555 = $_live
+STREAM_CACHE = $_stream_cache
+TOOLAME=$_toolame
+TV = $_tv
+TV_BSDBT848 = $_tv_bsdbt848
+TV_DSHOW = $_tv_dshow
+TV_TELETEXT = $_tv_teletext
+TV_V4L = $_tv_v4l
+TV_V4L1 = $_tv_v4l1
+TV_V4L2 = $_tv_v4l2
+TWOLAME=$_twolame
+UNRAR_EXEC = $_unrar_exec
+VCD = $_vcd
+VIDIX = $_vidix
+VIDIX_EXTERNAL = $_vidix_external
+VIDIX_INTERNAL = $_vidix_internal
+VIDIX_PCIDB = $_vidix_pcidb_val
VIDIX_CYBERBLADE=$_vidix_drv_cyberblade
VIDIX_IVTV=$_vidix_drv_ivtv
VIDIX_MACH64=$_vidix_drv_mach64
@@ -7706,22 +7746,14 @@ VIDIX_RAGE128=$_vidix_drv_rage128
VIDIX_S3=$_vidix_drv_s3
VIDIX_SIS=$_vidix_drv_sis
VIDIX_UNICHROME=$_vidix_drv_unichrome
-
-# --- Some stuff for autoconfigure ----
-$_target_arch
-$_target_arch_x86
-TARGET_CPU=$iproc
-`echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/'`
-
-# --- GUI stuff ---
-GUI_GTK = $_gui_gtk
-GUI_WIN32 = $_gui_win32
-
-# --- libvo stuff ---
-VO_SRCS = $_vosrc
-
-# --- libao2 stuff ---
-AO_SRCS = $_aosrc
+VSTREAM = $_vstream
+WIN32DLL = $_win32dll
+WIN32_EMULATION = $_win32_emulation
+X264 = $_x264
+XANIM_CODECS = $_xanim
+XMMS_PLUGINS = $_xmms
+XVID4 = $_xvid
+ZORAN = $_zr
# FFmpeg
LIBAVUTIL = $_libavutil
@@ -7756,6 +7788,7 @@ CONFIG_LIBVORBIS=$_libvorbis
CONFIG_LIBX264=$_x264_lavc
CONFIG_LIBXVID=$_xvid_lavc
CONFIG_MLIB = $_mlib
+CONFIG_POSTPROC = yes
# Prevent building libavcodec/imgresample.c with conflicting symbols
CONFIG_SWSCALE=yes
CONFIG_ZLIB=$_zlib
@@ -7912,7 +7945,7 @@ $_def_hpux_scsi_h
-cache <kilobytes> */
$_def_stream_cache
-/* Define if you are using XviD library */
+/* Define if you are using Xvid library */
$_def_xvid
/* Define if you are using the X.264 library */
@@ -8051,6 +8084,9 @@ $_def_lirc
/* Apple Remote (remote control, see http://docs.info.apple.com/article.html?artnum=302504) support: */
$_def_apple_remote
+/* Apple IR Remote (Linux remote control driver) */
+$_def_apple_ir
+
/* Support for maemo (http://www.maemo.org) */
$_def_maemo
@@ -8461,6 +8497,7 @@ $_def_gethostbyname2
`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
$_def_altivec_h // enables usage of altivec.h
+$_def_altivec_vector_braces
/* libvo options */
#define SCREEN_SIZE_X 1
@@ -8544,7 +8581,7 @@ Config files successfully generated by ./configure $_configuration !
Messages/GUI: $_language
EOF
-echo ${_echo_n} " Manual pages: $MAN_LANG ${_echo_c}"
+echo ${_echo_n} " Manual pages: $MAN_LANG_ALL ${_echo_c}"
test "$LANGUAGES" = en && echo ${_echo_n} " (no localization selected, use --language=all)${_echo_c}"
echo
diff --git a/cpudetect.c b/cpudetect.c
index 933f394d49..06287cd525 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -79,7 +79,7 @@ static int has_cpuid(void)
: "cc"
);
- return (a!=c);
+ return a != c;
}
#endif
diff --git a/defaultopts.c b/defaultopts.c
index c1822b6a14..5c9f9effcf 100644
--- a/defaultopts.c
+++ b/defaultopts.c
@@ -1,4 +1,6 @@
#include <stddef.h>
+
+#include "config.h"
#include "defaultopts.h"
#include "options.h"
@@ -39,7 +41,11 @@ void set_default_mplayer_options(struct MPOpts *opts)
.use_joystick = 1,
.use_lirc = 1,
.use_lircc = 1,
+#ifdef HAVE_APPLE_REMOTE
.use_ar = 1,
+#else
+ .use_ar = 0,
+#endif
}
};
}
diff --git a/drivers/Makefile b/drivers/Makefile
deleted file mode 100644
index 39c8a5a5f0..0000000000
--- a/drivers/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-KERNEL_INC = /lib/modules/`uname -r`/build/include
-VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
-MDIR = /lib/modules/$(VERSION)/misc
-
-CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) \
- -include $(KERNEL_INC)/linux/modversions.h
-
-OBJS = mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o
-
-all: $(OBJS) mga_vid_test tdfx_vid_test
-
-mga_vid.o: mga_vid.c mga_vid.h
-tdfx_vid.o: tdfx_vid.c 3dfx.h
-radeon_vid.o: radeon_vid.c radeon.h radeon_vid.h
-rage128_vid.o: radeon_vid.c radeon.h radeon_vid.h
- $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
-radeon_vid.o rage128_vid.o:
- CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
-
-install:
- -mkdir -p $(MDIR)
- install -m 644 $(OBJS) $(MDIR)
- depmod -a
- -mknod /dev/mga_vid c 178 0
- -mknod /dev/tdfx_vid c 178 0
- -mknod /dev/radeon_vid c 178 0
- -ln -s /dev/radeon_vid /dev/rage128_vid
-
-dep depend:
-
-clean distclean:
- rm -f *.o *~ mga_vid_test tdfx_vid_test
-
-.PHONY: all install dep depend *clean
diff --git a/drivers/mga_vid.c b/drivers/mga_vid.c
index d6b8cd8d28..eb790f2060 100644
--- a/drivers/mga_vid.c
+++ b/drivers/mga_vid.c
@@ -1207,27 +1207,27 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
if(copy_from_user(&card->config,(mga_vid_config_t*) arg,sizeof(mga_vid_config_t)))
{
printk(KERN_ERR "mga_vid: failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
if(card->config.version != MGA_VID_VERSION){
printk(KERN_ERR "mga_vid: incompatible version! driver: %X requested: %X\n",MGA_VID_VERSION,card->config.version);
- return(-EFAULT);
+ return -EFAULT;
}
if(card->config.frame_size==0 || card->config.frame_size>1024*768*2){
printk(KERN_ERR "mga_vid: illegal frame_size: %d\n",card->config.frame_size);
- return(-EFAULT);
+ return -EFAULT;
}
if(card->config.num_frames<1 || card->config.num_frames>4){
printk(KERN_ERR "mga_vid: illegal num_frames: %d\n",card->config.num_frames);
- return(-EFAULT);
+ return -EFAULT;
}
card->src_base = (card->ram_size * 0x100000 - card->config.num_frames * card->config.frame_size - card->top_reserved);
if(card->src_base<0){
printk(KERN_ERR "mga_vid: not enough memory for frames!\n");
- return(-EFAULT);
+ return -EFAULT;
}
card->src_base &= (~0xFFFF); // 64k boundary
#ifdef MP_DEBUG
@@ -1244,7 +1244,7 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
if (copy_to_user((mga_vid_config_t *) arg, &card->config, sizeof(mga_vid_config_t)))
{
printk(KERN_ERR "mga_vid: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
result = mga_vid_set_config(card);
@@ -1285,7 +1285,7 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
if(copy_from_user(&frame,(int *) arg,sizeof(int)))
{
printk(KERN_ERR "mga_vid: FSEL failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
mga_vid_frame_sel(card, frame);
@@ -1300,7 +1300,7 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
{
printk(KERN_ERR "mga_vid: failed copy %p to userspace %p\n",
&tmp, (uint32_t *) arg);
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -1314,7 +1314,7 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
default:
printk(KERN_ERR "mga_vid: Invalid ioctl\n");
- return (-EINVAL);
+ return -EINVAL;
}
return 0;
@@ -1464,17 +1464,17 @@ static int mga_vid_mmap(struct file *file, struct vm_area_struct *vma)
if(!card->configured)
{
printk(KERN_ERR "mga_vid: card is not configured, cannot mmap\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
if(remap_page_range(vma->vm_start, card->mem_base + card->src_base,
vma->vm_end - vma->vm_start, vma->vm_page_prot))
{
printk(KERN_ERR "mga_vid: error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
- return(0);
+ return 0;
}
static int mga_vid_release(struct inode *inode, struct file *file)
@@ -1517,7 +1517,7 @@ static int mga_vid_open(struct inode *inode, struct file *file)
// we don't have that many cards
if(minor >= mga_cards_num)
- return(-ENXIO);
+ return -ENXIO;
file->private_data = mga_cards[minor];
#ifdef MP_DEBUG
@@ -1533,11 +1533,11 @@ static int mga_vid_open(struct inode *inode, struct file *file)
card = (mga_card_t *) file->private_data;
if(card->vid_in_use == 1)
- return(-EBUSY);
+ return -EBUSY;
card->vid_in_use = 1;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE >= 0x020400
@@ -1735,7 +1735,7 @@ static int mga_vid_initialize(void)
}
#endif
- return(0);
+ return 0;
}
int init_module(void)
diff --git a/drivers/mga_vid.h b/drivers/mga_vid.h
index 0ae31486a6..48ae522463 100644
--- a/drivers/mga_vid.h
+++ b/drivers/mga_vid.h
@@ -1,28 +1,19 @@
/*
- * Matrox MGA G200/G400 YUV Video Interface module Version 0.1.0
- * BES == Back End Scaler
- *
- * Copyright (C) 1999 Aaron Holtzman
- *
- * This file is part of MPlayer.
*
- * MPlayer 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.
+ * mga_vid.h
*
- * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Copyright (C) 1999 Aaron Holtzman
+ *
+ * Matrox MGA G200/G400 YUV Video Interface module Version 0.1.0
+ *
+ * BES == Back End Scaler
+ *
+ * This software has been released under the terms of the GNU Public
+ * license. See http://www.gnu.org/copyleft/gpl.html for details.
*/
-#ifndef MPLAYER_MGA_VID_H
-#define MPLAYER_MGA_VID_H
+#ifndef MGA_VID_H
+#define MGA_VID_H
typedef struct mga_vid_config_s
{
@@ -42,27 +33,33 @@ uint8_t colkey_blue;
uint32_t format;
uint32_t frame_size;
uint32_t num_frames;
+uint32_t capabilities;
} mga_vid_config_t;
+/* supported FOURCCs */
#define MGA_VID_FORMAT_YV12 0x32315659
#define MGA_VID_FORMAT_IYUV (('I'<<24)|('Y'<<16)|('U'<<8)|'V')
#define MGA_VID_FORMAT_I420 (('I'<<24)|('4'<<16)|('2'<<8)|'0')
#define MGA_VID_FORMAT_YUY2 (('Y'<<24)|('U'<<16)|('Y'<<8)|'2')
#define MGA_VID_FORMAT_UYVY (('U'<<24)|('Y'<<16)|('V'<<8)|'Y')
-#define MGA_VID_CONFIG _IOR('J', 1, mga_vid_config_t)
-#define MGA_VID_ON _IO ('J', 2)
-#define MGA_VID_OFF _IO ('J', 3)
-#define MGA_VID_FSEL _IOR('J', 4, int)
-#define MGA_VID_GET_LUMA _IOR('J', 5, int)
-#define MGA_VID_SET_LUMA _IOR('J', 6, int)
+/* ioctl commands */
+#define MGA_VID_GET_VERSION _IOR ('J', 1, uint32_t)
+#define MGA_VID_CONFIG _IOWR('J', 2, mga_vid_config_t)
+#define MGA_VID_ON _IO ('J', 3)
+#define MGA_VID_OFF _IO ('J', 4)
+#define MGA_VID_FSEL _IOW ('J', 5, uint32_t)
+#define MGA_VID_GET_LUMA _IOR ('J', 6, uint32_t)
+#define MGA_VID_SET_LUMA _IOW ('J', 7, uint32_t)
+/* card identifiers */
#define MGA_G200 0x1234
#define MGA_G400 0x5678
// currently unused, G450 are mapped to MGA_G400
// #define MGA_G450 0x9ABC
#define MGA_G550 0xDEF0
-#define MGA_VID_VERSION 0x0201
+/* version of the mga_vid_config struct */
+#define MGA_VID_VERSION 0x0202
-#endif /* MPLAYER_MGA_VID_H */
+#endif /* MGA_VID_H */
diff --git a/drivers/radeon_vid.c b/drivers/radeon_vid.c
index 27f935c5d7..5a6bafd7dc 100644
--- a/drivers/radeon_vid.c
+++ b/drivers/radeon_vid.c
@@ -336,47 +336,47 @@ static char *fourcc_format_name(int format)
{
switch(format)
{
- case IMGFMT_RGB8: return("RGB 8-bit");
- case IMGFMT_RGB15: return("RGB 15-bit");
- case IMGFMT_RGB16: return("RGB 16-bit");
- case IMGFMT_RGB24: return("RGB 24-bit");
- case IMGFMT_RGB32: return("RGB 32-bit");
- case IMGFMT_BGR8: return("BGR 8-bit");
- case IMGFMT_BGR15: return("BGR 15-bit");
- case IMGFMT_BGR16: return("BGR 16-bit");
- case IMGFMT_BGR24: return("BGR 24-bit");
- case IMGFMT_BGR32: return("BGR 32-bit");
- case IMGFMT_YVU9: return("Planar YVU9");
- case IMGFMT_IF09: return("Planar IF09");
- case IMGFMT_YV12: return("Planar YV12");
- case IMGFMT_I420: return("Planar I420");
- case IMGFMT_IYUV: return("Planar IYUV");
- case IMGFMT_CLPL: return("Planar CLPL");
- case IMGFMT_Y800: return("Planar Y800");
- case IMGFMT_Y8: return("Planar Y8");
- case IMGFMT_IUYV: return("Packed IUYV");
- case IMGFMT_IY41: return("Packed IY41");
- case IMGFMT_IYU1: return("Packed IYU1");
- case IMGFMT_IYU2: return("Packed IYU2");
- case IMGFMT_UYNV: return("Packed UYNV");
- case IMGFMT_cyuv: return("Packed CYUV");
- case IMGFMT_Y422: return("Packed Y422");
- case IMGFMT_YUY2: return("Packed YUY2");
- case IMGFMT_YUNV: return("Packed YUNV");
- case IMGFMT_UYVY: return("Packed UYVY");
-// case IMGFMT_YVYU: return("Packed YVYU");
- case IMGFMT_Y41P: return("Packed Y41P");
- case IMGFMT_Y211: return("Packed Y211");
- case IMGFMT_Y41T: return("Packed Y41T");
- case IMGFMT_Y42T: return("Packed Y42T");
- case IMGFMT_V422: return("Packed V422");
- case IMGFMT_V655: return("Packed V655");
- case IMGFMT_CLJR: return("Packed CLJR");
- case IMGFMT_YUVP: return("Packed YUVP");
- case IMGFMT_UYVP: return("Packed UYVP");
- case IMGFMT_MPEGPES: return("Mpeg PES");
+ case IMGFMT_RGB8: return "RGB 8-bit";
+ case IMGFMT_RGB15: return "RGB 15-bit";
+ case IMGFMT_RGB16: return "RGB 16-bit";
+ case IMGFMT_RGB24: return "RGB 24-bit";
+ case IMGFMT_RGB32: return "RGB 32-bit";
+ case IMGFMT_BGR8: return "BGR 8-bit";
+ case IMGFMT_BGR15: return "BGR 15-bit";
+ case IMGFMT_BGR16: return "BGR 16-bit";
+ case IMGFMT_BGR24: return "BGR 24-bit";
+ case IMGFMT_BGR32: return "BGR 32-bit";
+ case IMGFMT_YVU9: return "Planar YVU9";
+ case IMGFMT_IF09: return "Planar IF09";
+ case IMGFMT_YV12: return "Planar YV12";
+ case IMGFMT_I420: return "Planar I420";
+ case IMGFMT_IYUV: return "Planar IYUV";
+ case IMGFMT_CLPL: return "Planar CLPL";
+ case IMGFMT_Y800: return "Planar Y800";
+ case IMGFMT_Y8: return "Planar Y8";
+ case IMGFMT_IUYV: return "Packed IUYV";
+ case IMGFMT_IY41: return "Packed IY41";
+ case IMGFMT_IYU1: return "Packed IYU1";
+ case IMGFMT_IYU2: return "Packed IYU2";
+ case IMGFMT_UYNV: return "Packed UYNV";
+ case IMGFMT_cyuv: return "Packed CYUV";
+ case IMGFMT_Y422: return "Packed Y422";
+ case IMGFMT_YUY2: return "Packed YUY2";
+ case IMGFMT_YUNV: return "Packed YUNV";
+ case IMGFMT_UYVY: return "Packed UYVY";
+// case IMGFMT_YVYU: return "Packed YVYU";
+ case IMGFMT_Y41P: return "Packed Y41P";
+ case IMGFMT_Y211: return "Packed Y211";
+ case IMGFMT_Y41T: return "Packed Y41T";
+ case IMGFMT_Y42T: return "Packed Y42T";
+ case IMGFMT_V422: return "Packed V422";
+ case IMGFMT_V655: return "Packed V655";
+ case IMGFMT_CLJR: return "Packed CLJR";
+ case IMGFMT_YUVP: return "Packed YUVP";
+ case IMGFMT_UYVP: return "Packed UYVP";
+ case IMGFMT_MPEGPES: return "Mpeg PES";
}
- return("Unknown");
+ return "Unknown";
}
@@ -1110,14 +1110,14 @@ static int radeon_vid_ioctl(struct inode *inode, struct file *file, unsigned int
if(copy_from_user(&frame,(int *) arg,sizeof(int)))
{
printk(RVID_MSG"FSEL failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
radeon_vid_frame_sel(frame);
break;
default:
printk(RVID_MSG"Invalid ioctl\n");
- return (-EINVAL);
+ return -EINVAL;
}
return 0;
@@ -1405,10 +1405,10 @@ static int radeon_vid_mmap(struct file *file, struct vm_area_struct *vma)
vma->vm_end - vma->vm_start, vma->vm_page_prot))
{
printk(RVID_MSG"error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
- return(0);
+ return 0;
}
static int radeon_vid_release(struct inode *inode, struct file *file)
@@ -1430,14 +1430,14 @@ static int radeon_vid_open(struct inode *inode, struct file *file)
int minor = MINOR(inode->i_rdev);
if(minor != 0)
- return(-ENXIO);
+ return -ENXIO;
if(radeon_vid_in_use == 1)
- return(-EBUSY);
+ return -EBUSY;
radeon_vid_in_use = 1;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE >= 0x020400
@@ -1523,7 +1523,7 @@ static int __init radeon_vid_initialize(void)
printk(RVID_MSG"MTRR set to ON\n");
}
#endif /* CONFIG_MTRR */
- return(0);
+ return 0;
}
int __init init_module(void)
diff --git a/drivers/tdfx_vid.c b/drivers/tdfx_vid.c
index 18451ab6ff..6c38d2cf11 100644
--- a/drivers/tdfx_vid.c
+++ b/drivers/tdfx_vid.c
@@ -258,12 +258,12 @@ static int agp_move(tdfx_vid_agp_move_t* m) {
u32 src_h,src_l;
if(!(agp_mem||map_start))
- return (-EAGAIN);
+ return -EAGAIN;
if(m->move2 > 3) {
printk(KERN_DEBUG "tdfx_vid: AGP move invalid destination %d\n",
m->move2);
- return (-EAGAIN);
+ return -EAGAIN;
}
if(map_start)
@@ -289,6 +289,7 @@ static int agp_move(tdfx_vid_agp_move_t* m) {
return 0;
}
+#if 0
static void setup_fifo(u32 offset,ssize_t pages) {
long addr = agp_info.aper_base + offset;
u32 size = pages | 0x700; // fifo on, in agp mem, disable hole cnt
@@ -307,6 +308,7 @@ static void setup_fifo(u32 offset,ssize_t pages) {
banshee_wait_idle();
}
+#endif
static int bump_fifo(u16 size) {
@@ -511,7 +513,7 @@ static int tdfx_vid_set_yuv(unsigned long arg) {
if(copy_from_user(&yuv,(tdfx_vid_yuv_t*)arg,sizeof(tdfx_vid_yuv_t))) {
printk(KERN_DEBUG "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
banshee_make_room(2);
tdfx_outl(YUVBASEADDRESS,yuv.base & 0x01FFFFFF);
@@ -530,7 +532,7 @@ static int tdfx_vid_get_yuv(unsigned long arg) {
if(copy_to_user((tdfx_vid_yuv_t*)arg,&yuv,sizeof(tdfx_vid_yuv_t))) {
printk(KERN_INFO "tdfx_vid:failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return 0;
@@ -544,14 +546,14 @@ static int tdfx_vid_set_overlay(unsigned long arg) {
if(copy_from_user(&ov,(tdfx_vid_overlay_t*)arg,sizeof(tdfx_vid_overlay_t))) {
printk(KERN_DEBUG "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
if(ov.dst_y < 0) {
int shift;
if(-ov.dst_y >= ov.src_height) {
printk(KERN_DEBUG "tdfx_vid: Overlay outside of the screen ????\n");
- return(-EFAULT);
+ return -EFAULT;
}
shift = (-ov.dst_y)/(double)ov.dst_height*ov.src_height;
ov.src[0] += shift*ov.src_stride;
@@ -564,7 +566,7 @@ static int tdfx_vid_set_overlay(unsigned long arg) {
int shift;
if(-ov.dst_x >= ov.src_width) {
printk(KERN_DEBUG "tdfx_vid: Overlay outside of the screen ????\n");
- return(-EFAULT);
+ return -EFAULT;
}
shift = (-ov.dst_x)/(double)ov.dst_width*ov.src_width;
shift = ((shift+3)/2)*2;
@@ -592,7 +594,7 @@ static int tdfx_vid_set_overlay(unsigned long arg) {
break;
default:
printk(KERN_DEBUG "tdfx_vid: Invalid overlay fmt 0x%x\n",ov.format);
- return (-EFAULT);
+ return -EFAULT;
}
// YUV422 need 4 bytes aligned stride and address
@@ -600,11 +602,11 @@ static int tdfx_vid_set_overlay(unsigned long arg) {
ov.format == TDFX_VID_FORMAT_UYVY)) {
if((ov.src_stride & ~0x3) != ov.src_stride) {
printk(KERN_DEBUG "tdfx_vid: YUV need a 4 bytes aligned stride %d\n",ov.src_stride);
- return(-EFAULT);
+ return -EFAULT;
}
if((ov.src[0] & ~0x3) != ov.src[0] || (ov.src[1] & ~0x3) != ov.src[1]){
printk(KERN_DEBUG "tdfx_vid: YUV need a 4 bytes aligned address 0x%x 0x%x\n",ov.src[0],ov.src[1]);
- return(-EFAULT);
+ return -EFAULT;
}
}
@@ -622,7 +624,7 @@ static int tdfx_vid_set_overlay(unsigned long arg) {
if(ov.dst_x >= screen_w || ov.dst_y >= screen_h ||
disp_h <= 0 || disp_h > screen_h || disp_w <= 0 || disp_w > screen_w) {
printk(KERN_DEBUG "tdfx_vid: Invalid overlay dimension and/or position\n");
- return (-EFAULT);
+ return -EFAULT;
}
// Setup the vidproc
// H scaling
@@ -702,7 +704,7 @@ static int tdfx_vid_overlay_on(void) {
//return 0;
if(vidcfg & (1<<8)) { // Overlay is already on
//printk(KERN_DEBUG "tdfx_vid: Overlay is already on.\n");
- return (-EFAULT);
+ return -EFAULT;
}
vidcfg |= (1<<8);
tdfx_outl(VIDPROCCFG,vidcfg);
@@ -719,7 +721,7 @@ static int tdfx_vid_overlay_off(void) {
}
printk(KERN_DEBUG "tdfx_vid: Overlay is already off.\n");
- return (-EFAULT);
+ return -EFAULT;
}
@@ -734,34 +736,34 @@ static int tdfx_vid_ioctl(struct inode *inode, struct file *file, unsigned int c
case TDFX_VID_AGP_MOVE:
if(copy_from_user(&move,(tdfx_vid_agp_move_t*)arg,sizeof(tdfx_vid_agp_move_t))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return agp_move(&move);
case TDFX_VID_BUMP0:
if(copy_from_user(&int16,(u16*)arg,sizeof(u16))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return bump_fifo(int16);
case TDFX_VID_BLIT:
if(copy_from_user(&blit,(tdfx_vid_blit_t*)arg,sizeof(tdfx_vid_blit_t))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
if(!tdfx_vid_blit(&blit)) {
printk(KERN_INFO "tdfx_vid: Blit failed\n");
- return(-EFAULT);
+ return -EFAULT;
}
return 0;
case TDFX_VID_GET_CONFIG:
if(copy_from_user(&cfg,(tdfx_vid_config_t*)arg,sizeof(tdfx_vid_config_t))) {
printk(KERN_INFO "tdfx_vid:failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
tdfx_vid_get_config(&cfg);
if(copy_to_user((tdfx_vid_config_t*)arg,&cfg,sizeof(tdfx_vid_config_t))) {
printk(KERN_INFO "tdfx_vid:failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
return 0;
case TDFX_VID_SET_YUV:
@@ -776,7 +778,7 @@ static int tdfx_vid_ioctl(struct inode *inode, struct file *file, unsigned int c
return tdfx_vid_overlay_off();
default:
printk(KERN_ERR "tdfx_vid: Invalid ioctl %d\n",cmd);
- return (-EINVAL);
+ return -EINVAL;
}
return 0;
}
@@ -846,13 +848,13 @@ static struct page *tdfx_vid_nopage(struct vm_area_struct *vma,
if(n >= agp_mem->page_count) {
printk(KERN_DEBUG "tdfx_vid: Too far away\n");
- return ((struct page *)0UL);
+ return (struct page *)0UL;
}
phys = agp_mem->memory[n] & ~(0x00000fff);
page = virt_to_page(phys_to_virt(phys));
if(!page) {
printk(KERN_DEBUG "tdfx_vid: Can't get the page\n");
- return ((struct page *)0UL);
+ return (struct page *)0UL;
}
return page;
}
@@ -877,7 +879,7 @@ static int tdfx_vid_mmap(struct file *file, struct vm_area_struct *vma)
if(map_start) { // Ok we map directly in the physcal ram
if(size*PAGE_SIZE > map_max) {
printk(KERN_ERR "tdfx_vid: Not enouth mem\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)
if(remap_page_range(vma, vma->vm_start,map_start,
@@ -888,26 +890,26 @@ static int tdfx_vid_mmap(struct file *file, struct vm_area_struct *vma)
#endif
{
printk(KERN_ERR "tdfx_vid: error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
printk(KERN_INFO "Physical mem 0x%lx mapped in userspace\n",map_start);
return 0;
}
if(agp_mem)
- return(-EAGAIN);
+ return -EAGAIN;
agp_mem = drm_agp->allocate_memory(size,AGP_NORMAL_MEMORY);
if(!agp_mem) {
printk(KERN_ERR "Failed to allocate AGP memory\n");
- return(-ENOMEM);
+ return -ENOMEM;
}
if(drm_agp->bind_memory(agp_mem,0)) {
printk(KERN_ERR "Failed to bind the AGP memory\n");
drm_agp->free_memory(agp_mem);
agp_mem = NULL;
- return(-ENOMEM);
+ return -ENOMEM;
}
printk(KERN_INFO "%d pages of AGP mem allocated (%ld/%ld bytes) :)))\n",
@@ -924,7 +926,7 @@ static int tdfx_vid_mmap(struct file *file, struct vm_area_struct *vma)
#endif
{
printk(KERN_ERR "tdfx_vid: error mapping video memory\n");
- return(-EAGAIN);
+ return -EAGAIN;
}
} else {
// Never swap it out
@@ -971,14 +973,14 @@ static int tdfx_vid_open(struct inode *inode, struct file *file)
#endif
if(minor != 0)
- return(-ENXIO);
+ return -ENXIO;
if(tdfx_vid_in_use == 1)
- return(-EBUSY);
+ return -EBUSY;
tdfx_vid_in_use = 1;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE >= 0x020400
@@ -1033,7 +1035,7 @@ int init_module(void)
- return (0);
+ return 0;
}
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 6a4239b1a4..fe41f3353c 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -700,7 +700,7 @@ videocodec ffwv1f
out YV12,I420,IYUV flip
videocodec xvid
- info "XviD (MPEG-4)"
+ info "Xvid (MPEG-4)"
status working
fourcc FMP4,fmp4
fourcc DIVX,divx
@@ -2265,6 +2265,7 @@ videocodec rawbgr16flip
status working
driver raw
format 0x0
+ format 0x10424752 0x0
out BGR16 flip
videocodec rawbgr16
@@ -2787,6 +2788,13 @@ audiocodec ffadpcmea
driver ffmpeg
dll adpcm_ea
+audiocodec ffadpcmeamaxis
+ info "FFmpeg EA MAXIS XA ADPCM audio"
+ status working
+ fourcc ADXA ; internal MPlayer FourCC
+ driver ffmpeg
+ dll adpcm_ea_maxis_xa
+
audiocodec ffxandpcm
info "FFmpeg XAN DPCM audio"
comment "only works with libavformat demuxer"
diff --git a/etc/input.conf b/etc/input.conf
index 8445e273e2..8fff120b8d 100644
--- a/etc/input.conf
+++ b/etc/input.conf
@@ -117,7 +117,7 @@ AR_NEXT seek 30
AR_NEXT_HOLD seek 120
AR_PREV seek -10
AR_PREV_HOLD seek -120
-AR_MENU osd
+AR_MENU menu up
#AR_MENU menu cancel
AR_MENU_HOLD mute
AR_VUP volume 1
@@ -157,5 +157,12 @@ ESC {dvdnav} dvdnav 5 # DVDNav MENU
ENTER {dvdnav} dvdnav 6 # DVDNav SELECT (ok)
BS {dvdnav} dvdnav 7 # DVDNav PREVIOUS menu (in the order chapter->title->root)
+AR_VUP {dvdnav} dvdnav 1 # DVDNav UP
+AR_VDOWN {dvdnav} dvdnav 2 # DVDNav DOWN
+AR_PREV {dvdnav} dvdnav 3 # DVDNav LEFT
+AR_NEXT {dvdnav} dvdnav 4 # DVDNav RIGHT
+AR_MENU {dvdnav} dvdnav 5 # DVDNav MENU
+AR_PLAY {dvdnav} dvdnav 6 # DVDNav SELECT (ok)
+
#? seek_chapter -1 # skip to previous dvd chapter
#? seek_chapter +1 # next
diff --git a/help/help_create.sh b/help/help_create.sh
new file mode 100755
index 0000000000..ccb756d6b9
--- /dev/null
+++ b/help/help_create.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Create the messages header file from the master source file or a translation.
+# Missing messages are filled in from the master message file and, if
+# requested, character set conversion is performed.
+
+MASTER=help/help_mp-en.h
+TARGET=help_mp.h
+
+TRANSLATION=$1
+CHARSET=$2
+
+missing_messages(){
+curr=""
+
+while read -r line; do
+ if echo "$line" | grep -q '^#define' ; then
+ curr=`printf "%s\n" "$line" | cut -d ' ' -f 2`
+ if grep -q "^#define $curr[ ]" "$TRANSLATION" ; then
+ curr=""
+ fi
+ else
+ if [ -z "$line" ]; then
+ curr=""
+ fi
+ fi
+
+ if [ -n "$curr" ]; then
+ printf "%s\n" "$line"
+ fi
+done
+}
+
+cat <<EOF > "$TARGET"
+/* WARNING! This is a generated file, do NOT edit.
+ * See the help/ subdirectory for the editable files. */
+
+#ifndef MPLAYER_HELP_MP_H
+#define MPLAYER_HELP_MP_H
+
+EOF
+
+cat "$TRANSLATION" >> "$TARGET"
+
+cat <<EOF >> "$TARGET"
+
+/* untranslated messages from the English master file */
+
+EOF
+
+if test "$MASTER" != "$TRANSLATION" ; then
+ missing_messages < "$MASTER" >> "$TARGET"
+fi
+
+cat <<EOF >> "$TARGET"
+
+#endif /* MPLAYER_HELP_MP_H */
+EOF
+
+if test $CHARSET != UTF-8 ; then
+ iconv -f UTF-8 -t "$CHARSET" "$TARGET" > "${TARGET}.tmp"
+ mv "${TARGET}.tmp" "$TARGET"
+fi
diff --git a/help/help_diff.sh b/help/help_diff.sh
deleted file mode 100755
index 2e12951a15..0000000000
--- a/help/help_diff.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# This script walks through the master (stdin) help/message file, and
-# prints (stdout) only those messages which are missing from the help
-# file given as parameter ($1).
-#
-# Example: help_diff.sh help_mp-hu.h < help_mp-en.h > missing.h
-
-curr=""
-
-while read -r line; do
- if echo "$line" | grep '^#define' > /dev/null 2>&1; then
- curr=`printf "%s\n" "$line" | cut -d ' ' -f 2`
- if grep "^#define $curr[ ]" $1 > /dev/null 2>&1; then
- curr=""
- fi
- else
- if [ -z "$line" ]; then
- curr=""
- fi
- fi
-
- if [ -n "$curr" ]; then
- printf "%s\n" "$line"
- fi
-done
diff --git a/help/help_mp-bg.h b/help/help_mp-bg.h
index 4d391b57f0..ce58588585 100644
--- a/help/help_mp-bg.h
+++ b/help/help_mp-bg.h
@@ -155,8 +155,6 @@ static char help_text[]=
#define MSGTR_MenuInitialized "Менюто е инициализирано: %s\n"
#define MSGTR_MenuInitFailed "Менюто не може да бъде инициализирано.\n"
#define MSGTR_Getch2InitializedTwice "Внимание: ФункциÑта getch2_init е извикана двукратно!\n"
-#define MSGTR_DumpstreamFdUnavailable "Потока не може да бъде извлечен - нÑма наличен 'fd'.\n"
-#define MSGTR_FallingBackOnPlaylist "Повторен опит за обработка на playlist %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Видео филтъра libmenu не може да бъде отворен без root меню %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Грешка при предварителна Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð½Ð° аудио филтрите!\n"
#define MSGTR_LinuxRTCReadError "Linux RTC грешка при четене: %s\n"
@@ -445,7 +443,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "'%s' не може да бъде отворен през LAN\n"
#define MSGTR_SMBNotCompiled "MPlayer не е компилиран ÑÑŠÑ Ð¿Ð¾Ð´Ð´Ñ€ÑŠÐ¶ÐºÐ° на четене от SMB.\n"
-#define MSGTR_CantOpenDVD "Ðе може да бъде отворено DVD уÑтройÑтво: %s\n"
+#define MSGTR_CantOpenDVD "Ðе може да бъде отворено DVD уÑтройÑтво: %s (%s)\n"
#define MSGTR_DVDnumTitles "Има %d Ð·Ð°Ð³Ð»Ð°Ð²Ð¸Ñ Ð½Ð° това DVD.\n"
#define MSGTR_DVDinvalidTitle "Ðевалиден номер на DVD заглавие: %d\n"
#define MSGTR_DVDnumChapters "Има %d раздела в това DVD заглавие.\n"
diff --git a/help/help_mp-cs.h b/help/help_mp-cs.h
index 6bb906d625..cafec9fa05 100644
--- a/help/help_mp-cs.h
+++ b/help/help_mp-cs.h
@@ -529,7 +529,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Nemohu otevřít soubor ze sítě: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer nebyl pÅ™eložen s podporou Ätení SMB.\n"
-#define MSGTR_CantOpenDVD "Nelze otevřít DVD zařízení: %s\n"
+#define MSGTR_CantOpenDVD "Nelze otevřít DVD zařízení: %s (%s)\n"
// stream_dvd.c
#define MSGTR_DVDspeedCantOpen "Nemohu otevřít DVD zařízení pro zápis, změna DVD rychlosti vyžaduje právo zápisu.\n"
diff --git a/help/help_mp-de.h b/help/help_mp-de.h
index 723662bd47..879c569927 100644
--- a/help/help_mp-de.h
+++ b/help/help_mp-de.h
@@ -547,7 +547,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Konnte '%s' nicht über das Netzwerk öffnen.\n"
#define MSGTR_SMBNotCompiled "MPlayer wurde ohne SMB-Unterstützung kompiliert.\n"
-#define MSGTR_CantOpenDVD "Kann DVD-Laufwerk nicht öffnen: %s\n"
+#define MSGTR_CantOpenDVD "Kann DVD-Laufwerk nicht öffnen: %s (%s)\n"
// stream_dvd.c
#define MSGTR_DVDspeedCantOpen "Kann DVD-Laufwerk nicht zum Schreiben öffnen, setzen der DVD-Geschwindigkeit\nbenötigt Schreibzugriff.\n"
diff --git a/help/help_mp-dk.h b/help/help_mp-dk.h
index eb5ba5092e..30718b2fed 100644
--- a/help/help_mp-dk.h
+++ b/help/help_mp-dk.h
@@ -223,7 +223,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Kunne ikke åbne netværksadressen '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer er ikke blevet kompileret med SMB læse-understøttelse\n"
-#define MSGTR_CantOpenDVD "Kunne ikke åbne DVD drev: %s\n"
+#define MSGTR_CantOpenDVD "Kunne ikke åbne DVD drev: %s (%s)\n"
#define MSGTR_DVDnumTitles "Der er %d titler på denne DVD.\n"
#define MSGTR_DVDinvalidTitle "Ugyldig DVD-titel: %d\n"
#define MSGTR_DVDnumChapters "Der er %d kapitler i denne DVD-titel.\n"
diff --git a/help/help_mp-el.h b/help/help_mp-el.h
index 48655e411a..8bc1db51f1 100644
--- a/help/help_mp-el.h
+++ b/help/help_mp-el.h
@@ -222,7 +222,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Δεν μπόÏεσα να ανοίξω από το τοπικό δίκτυο: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer δεν μεταφÏάστηκε με υποστήÏιξη ανάγνωσης SMB\n"
-#define MSGTR_CantOpenDVD "Δεν μπόÏεσα να ανοίξω την συσκευή DVD: %s\n"
+#define MSGTR_CantOpenDVD "Δεν μπόÏεσα να ανοίξω την συσκευή DVD: %s (%s)\n"
#define MSGTR_DVDnumTitles "ΥπάÏχουν %d τίτλοι στο DVD.\n"
#define MSGTR_DVDinvalidTitle "ΆκυÏος αÏιθμός για τον τίτλο του DVD: %d\n"
#define MSGTR_DVDnumChapters "ΥπάÏχουν %d κεφάλαια σε αυτόν τον τίτλο του DVD.\n"
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index fbd39ef7b4..83ac637472 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -1296,6 +1296,12 @@ static char help_text[]=
#define MSGTR_INPUT_JOYSTICK_WarnLostSync "Joystick: warning init event, we have lost sync with driver.\n"
#define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Joystick warning unknown event type %d\n"
+// appleir.c
+
+#define MSGTR_INPUT_APPLE_IR_Init "Initializing Apple IR on %s\n"
+#define MSGTR_INPUT_APPLE_IR_Detect "Detected Apple IR on %s\n"
+#define MSGTR_INPUT_APPLE_IR_CantOpen "Can't open Apple IR device: %s\n"
+
// input.c
#define MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds "Too many command file descriptors, cannot register file descriptor %d.\n"
@@ -1705,7 +1711,8 @@ static char help_text[]=
#define MSGTR_LIBVO_MGA_InvalidOutputFormat "[MGA] invalid output format %0X\n"
#define MSGTR_LIBVO_MGA_IncompatibleDriverVersion "[MGA] Your mga_vid driver version is incompatible with this MPlayer version!\n"
#define MSGTR_LIBVO_MGA_CouldntOpen "[MGA] Couldn't open: %s\n"
-#define MGSTR_LIBVO_MGA_ResolutionTooHigh "[MGA] Source resolution is in at least one dimension larger than 1023x1023. Please rescale in software or use -lavdopts lowres=1\n"
+#define MGSTR_LIBVO_MGA_ResolutionTooHigh "[MGA] Source resolution exceeds 1023x1023 in at least one dimension.\n[MGA] Rescale in software or use -lavdopts lowres=1.\n"
+#define MGSTR_LIBVO_MGA_mgavidVersionMismatch "[MGA] mismatch between kernel (%u) and MPlayer (%u) mga_vid driver versions\n"
// libvo/vesa_lvo.c
diff --git a/help/help_mp-es.h b/help/help_mp-es.h
index ee3ffce8ec..7df9de08b1 100644
--- a/help/help_mp-es.h
+++ b/help/help_mp-es.h
@@ -174,7 +174,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "Fallo en inicialización del menú.\n"
#define MSGTR_Getch2InitializedTwice "ADVERTENCIA: getch2_init llamada dos veces!\n"
#define MSGTR_DumpstreamFdUnavailable "No puedo volcar este stream - no está disponible 'fd'.\n"
-#define MSGTR_FallingBackOnPlaylist "No pude procesar el playlist %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "No puedo abrir filtro de video libmenu con el menú principal %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Error en pre-inicialización de cadena de filtros de audio!\n"
#define MSGTR_LinuxRTCReadError "Error de lectura de Linux RTC: %s\n"
@@ -546,7 +545,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "No se puede abrir desde la RED: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer no fue compilado con soporte de lectura de SMB.\n"
-#define MSGTR_CantOpenDVD "No se puede abrir el dispositivo de DVD: %s\n"
+#define MSGTR_CantOpenDVD "No se puede abrir el dispositivo de DVD: %s (%s)\n"
// stream_dvd.c
#define MSGTR_DVDspeedCantOpen "No se ha podido abrir el dispositivo de DVD para escritura, cambiar la velocidad del DVD requiere acceso de escritura\n"
@@ -1184,8 +1183,6 @@ static char help_text[]=
"[AO_ALSA] device=<nombre-dispositivo>\n"\
"[AO_ALSA] Establece el dispositivo (cambiar , por . y : por =)\n"
#define MSGTR_AO_ALSA_ChannelsNotSupported "[AO_ALSA] %d canales no están soportados.\n"
-#define MSGTR_AO_ALSA_CannotReadAlsaConfiguration "[AO_ALSA] No se puede leer la configuración de ALSA: %s\n"
-#define MSGTR_AO_ALSA_CannotCopyConfiguration "[AO_ALSA] No se puede copiar la configuración: %s\n"
#define MSGTR_AO_ALSA_OpenInNonblockModeFailed "[AO_ALSA] La apertura en modo sin bloqueo ha fallado, intentando abrir en modo bloqueo.\n"
#define MSGTR_AO_ALSA_PlaybackOpenError "[AO_ALSA] Error de apertura en la reproducción: %s\n"
#define MSGTR_AO_ALSA_ErrorSetBlockMode "[AL_ALSA] Error estableciendo el modo bloqueo %s.\n"
@@ -1967,7 +1964,6 @@ static char help_text[]=
#define MSGTR_RADIO_CaptureStarting "[radio] Empezando con la captura.\n"
#define MSGTR_RADIO_ClearBufferFailed "[radio] Fallo al limpiar el buffer: %s\n"
#define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Llamada fallida a stream_enable_cache: %s\n"
-#define MSGTR_RADIO_DriverUnknownId "[radio] Id de driver desconocido: %d\n"
#define MSGTR_RADIO_DriverUnknownStr "[radio] Nombre de driver desconocido: %s\n"
#define MSGTR_RADIO_DriverV4L2 "[radio] Utilizando interfaz de radio V4Lv2.\n"
#define MSGTR_RADIO_DriverV4L "[radio] Utilizando interfaz de radio V4Lv1.\n"
@@ -2030,7 +2026,6 @@ static char help_text[]=
#define MSGTR_LIBASS_EmptyEvent "[ass] Evento vacío!\n"
#define MSGTR_LIBASS_MAX_GLYPHS_Reached "[ass] MAX_GLYPHS alcanzado: evento %d, comienzo = %llu, duración = %llu\n Texto = %s\n"
#define MSGTR_LIBASS_EventHeightHasChanged "[ass] ¡Aviso! ¡El tamaño del evento ha cambiado! \n"
-#define MSGTR_LIBASS_TooManySimultaneousEvents "[ass] Demasiados eventos simultáneos!\n"
// ass_font.c
#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] Glifo 0x%X no encontrado, seleccionando la fuente para (%s, %d, %d)\n"
diff --git a/help/help_mp-fr.h b/help/help_mp-fr.h
index fece8a23cb..896d676e14 100644
--- a/help/help_mp-fr.h
+++ b/help/help_mp-fr.h
@@ -1,6 +1,7 @@
// Last sync on 2006-11-09 with help_mp-en.h 20191
-// Additionnal updates, fixes and translations by P Lombard <p_l@gmx.fr>
+// Additionnal updates, fixes and translations by P Lombard <p_l@gmx.fr>
// G Pelletier <pellgill@gmail.com> & A Coutherez <newt@neopulsar.org>
+// C Dumez-Viou <viou@obs-nancay.fr>
// Updates & fixes by pl <p_l@gmx.fr> & n.le gaillart <n@tourmentine.com>
// Original translation by Firebird <firebird@chez.com>
@@ -146,6 +147,8 @@ static char help_text[]=
" et suivre les instructions. Nous pourrons et voudrons vous aider si vous\n"\
" fournissiez ces informations en rapportant un bogue possible.\n"
#define MSGTR_LoadingConfig "Chargement du fichier de configuration '%s'\n"
+#define MSGTR_LoadingProtocolProfile "Chargement du profil de protocol '%s'\n"
+#define MSGTR_LoadingExtensionProfile "Chargement du profil d'extension '%s'\n"
#define MSGTR_AddedSubtitleFile "SUB : fichier sous-titres ajouté (%d): %s\n"
#define MSGTR_RemovedSubtitleFile "SUB : fichier sous-titres enlevé (%d): %s\n"
#define MSGTR_ErrorOpeningOutputFile "Erreur d'ouverture du fichier [%s] en écriture !\n"
@@ -160,7 +163,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "Échec d'initialisation du menu.\n"
#define MSGTR_Getch2InitializedTwice "ATTENTION : getch2_init appelé deux fois !\n"
#define MSGTR_DumpstreamFdUnavailable "Impossible de vider ce flux - Aucun descripteur de fichier disponible.\n"
-#define MSGTR_FallingBackOnPlaylist "Replie sur essaie d'analyse de liste de lecture (playlist) %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Impossible d'ouvrir filtre vidéo libmenu avec menu root %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Erreur de pré-initialisation de la chaîne de filtres audio !\n"
#define MSGTR_LinuxRTCReadError "Erreur de lecture horloge temps réel (RTC) Linux : %s\n"
@@ -202,12 +204,14 @@ static char help_text[]=
#define MSGTR_OSDenabled "activé"
#define MSGTR_OSDdisabled "désactivé"
+#define MSGTR_OSDAudio "Audio : %s"
+#define MSGTR_OSDVideo "Vidéo : %s"
#define MSGTR_OSDChannel "Canal : %s"
#define MSGTR_OSDSubDelay "Décalage : %d ms"
#define MSGTR_OSDSpeed "Vitesse : x %6.2f"
#define MSGTR_OSDosd "OSD : %s"
-#define MSGTR_OSDAudio "Audio : %s"
#define MSGTR_OSDChapter "Chapitre : (%d) %s"
+#define MSGTR_OSDAngle "Angle: %d/%d"
// property values
#define MSGTR_Enabled "activé"
@@ -218,6 +222,9 @@ static char help_text[]=
#define MSGTR_Bottom "bas"
#define MSGTR_Center "centre"
#define MSGTR_Top "haut"
+#define MSGTR_SubSourceFile "fichier"
+#define MSGTR_SubSourceVobsub "vobsub"
+#define MSGTR_SubSourceDemux "inclus"
// osd bar names
#define MSGTR_Volume "Volume"
@@ -227,25 +234,27 @@ static char help_text[]=
#define MSGTR_Contrast "Contraste"
#define MSGTR_Saturation "Saturation"
#define MSGTR_Hue "Tonalité"
+#define MSGTR_Balance "Balance"
// property state
+#define MSGTR_LoopStatus "Boucle: %s"
#define MSGTR_MuteStatus "Silence : %s"
-#define MSGTR_AVDelayStatus "delai A-V : %s"
+#define MSGTR_AVDelayStatus "Delai A-V : %s"
#define MSGTR_OnTopStatus "Reste au dessus : %s"
#define MSGTR_RootwinStatus "Fenêtre racine : %s"
#define MSGTR_BorderStatus "Bordure : %s"
#define MSGTR_FramedroppingStatus "Saut d'images : %s"
#define MSGTR_VSyncStatus "Sync verticale : %s"
#define MSGTR_SubSelectStatus "Sous-titres : %s"
-#define MSGTR_SubPosStatus "Sous position : %s/100"
-#define MSGTR_SubAlignStatus "Sous alignment : %s"
-#define MSGTR_SubDelayStatus "Décalage : %s"
+#define MSGTR_SubSourceStatus "Source des sous-titres : %s"
+#define MSGTR_SubPosStatus "Position des sous-titres : %s/100"
+#define MSGTR_SubAlignStatus "Alignement des sous-titres : %s"
+#define MSGTR_SubDelayStatus "Décalage des sous-titres : %s"
+#define MSGTR_SubScale "Échelle des sous-titres : %s"
#define MSGTR_SubVisibleStatus "Sous-titres : %s"
-#define MSGTR_SubForcedOnlyStatus "Sub forcé seulement : %s"
// mencoder.c
-#define MSGTR_UsingPass3ControllFile "Utilisation du fichier de contrôle de la passe 3 : %s\n"
#define MSGTR_MissingFilename "\nNom de fichier manquant.\n\n"
#define MSGTR_CannotOpenFile_Device "Impossible d'ouvrir le fichier/périph.\n"
#define MSGTR_CannotOpenDemuxer "Impossible d'ouvrir le démuxeur.\n"
@@ -267,9 +276,12 @@ static char help_text[]=
#define MSGTR_NoSpeedWithFrameCopy "ATTENTION : -speed peut ne pas fonctionner correctement avec -oac copy !\n"\
"Votre encodage pourrait être brisé!\n"
#define MSGTR_ErrorWritingFile "%s : Erreur durant l'écriture du fichier.\n"
+#define MSGTR_FlushingVideoFrames "\nAbandonne des trames vidéo.\n"
+#define MSGTR_FiltersHaveNotBeenConfiguredEmptyFile "Les filtres n'ont pas été configurés! Fichier vide?\n"
#define MSGTR_RecommendedVideoBitrate "Débit binaire (bitrate) vidéo recommandé pour le CD %s : %d\n"
#define MSGTR_VideoStreamResult "\nFlux vidéo : %8.3f kbit/s (%d B/s) taille : %"PRIu64" octets %5.3f secs %d images\n"
#define MSGTR_AudioStreamResult "\nFlux audio : %8.3f kbit/s (%d B/s) taille : %"PRIu64" octets %5.3f secs\n"
+#define MSGTR_EdlSkipStartEndCurrent "Saut EDL : Début: %.2f Fin: %.2f Courant: V: %.2f A: %.2f \r"
#define MSGTR_OpenedStream "succès : format : %d data : 0x%X - 0x%x\n"
#define MSGTR_VCodecFramecopy "codec vidéo : copie de trame (%dx%d %dbpp fourcc=%x)\n"
#define MSGTR_ACodecFramecopy "codec audio : copie img (format=%x canaux=%d taux=%d bits=%d B/s=%d échant-%d)\n"
@@ -390,7 +402,7 @@ static char help_text[]=
#define MSGTR_LameCantInit "Ne peux pas régler les options de LAME, vérifiez dans bitrate/samplerate,"\
"certains bitrates très bas (<32) requièrent des taux d'échantillonages plus bas (i.e. -srate 8000)."\
"Si rien ne marche, essayez un pré-réglage (preset)."
-#define MSGTR_ConfigfileError "Erreur du fichier de configuration"
+#define MSGTR_ConfigFileError "Erreur du fichier de configuration"
#define MSGTR_ErrorParsingCommandLine "Erreur en analysant la ligne de commande"
#define MSGTR_VideoStreamRequired "La présence d'un flux vidéo est obligatoire !\n"
#define MSGTR_ForcingInputFPS "Le fps d'entrée sera plutôt interprété comme %5.3f\n"
@@ -483,15 +495,18 @@ static char help_text[]=
#define MSGTR_CodecDefinitionIncorrect "Le codec n'est pas défini correctement."
#define MSGTR_OutdatedCodecsConf "Ce fichier codecs.conf est trop vieux et est incompatible avec cette version de MPlayer !"
-// divx4_vbr.c:
-#define MSGTR_OutOfMemory "plus de mémoire libre"
-#define MSGTR_OverridingTooLowBitrate "Le débit binaire demandé est trop bas pour ce clip.\n"\
-"Le débit binaire minimum pour ce clip est %.0f kbps.\n"\
-"Les valeurs demandées par l'utilisateur vont être ignorées.\n"
-
// fifo.c
#define MSGTR_CannotMakePipe "Ne peux créer de canal de communication (pipe) !\n"
+// parser-mecmd.c, parser-mpcmd.c
+#define MSGTR_NoFileGivenOnCommandLine "'--' indique la fin des options, mais aucun nom de fichier fourni dans la commande.\n"
+#define MSGTR_TheLoopOptionMustBeAnInteger "L'option loop doit être un entier : %s\n"
+#define MSGTR_UnknownOptionOnCommandLine "Option non reconnue dans la ligne de commande : -%s\n"
+#define MSGTR_ErrorParsingOptionOnCommandLine "Erreur lors de l'analyse des options de la ligne de commande : -%s\n"
+
+#define MSGTR_NotAnMEncoderOption "-%s n'est pas une option de MEncoder\n"
+#define MSGTR_NoFileGiven "Pas de fichier fourni\n"
+
// m_config.c
#define MSGTR_SaveSlotTooOld "Case de sauvegarde trouvée est trop ancienne lvl %d : %d !!!\n"
#define MSGTR_InvalidCfgfileOption "L'option '%s' ne peut être utilisée dans un fichier de configuration.\n"
@@ -501,7 +516,6 @@ static char help_text[]=
#define MSGTR_MissingOptionParameter "Erreur : l'option '%s' doit avoir un paramètre !\n"
#define MSGTR_OptionListHeader "\n Nom Type Min Max Global CL Cfg\n\n"
#define MSGTR_TotalOptions "\nTotal : %d options\n"
-#define MSGTR_TooDeepProfileInclusion "ATTENTION : inclusion de profils trop imbriquée.\n"
#define MSGTR_NoProfileDefined "Aucun profil n'a été défini.\n"
#define MSGTR_AvailableProfiles "Profils disponibles :\n"
#define MSGTR_UnknownProfile "Profil inconnu '%s'.\n"
@@ -522,9 +536,14 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Impossible d'ouvrir depuis le réseau local : '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer n'a pas été compilé avec le support de lecture SMB\n"
-#define MSGTR_CantOpenDVD "Impossible d'ouvrir le lecteur DVD : %s\n"
+#define MSGTR_CantOpenDVD "Impossible d'ouvrir le lecteur DVD : %s (%s)\n"
// stream_dvd.c
+#define MSGTR_DVDspeedCantOpen "Impossible d'ouvrir le lecteur DVD en écriture. Changer la vitesse du DVD requière un accès en écriture.\n"
+#define MSGTR_DVDrestoreSpeed "Remise en l'état de la vitesse du DVD... "
+#define MSGTR_DVDlimitSpeed "Limite la vitesse du DVD à %dKo/s... "
+#define MSGTR_DVDlimitFail "échoue\n"
+#define MSGTR_DVDlimitOk "réussi\n"
#define MSGTR_NoDVDSupport "MPlayer a été compilé sans support pour les DVD - terminaison\n"
#define MSGTR_DVDnumTitles "Il y a %d titres sur ce DVD.\n"
#define MSGTR_DVDinvalidTitle "Numéro de titre DVD invalide : %d\n"
@@ -576,6 +595,9 @@ static char help_text[]=
#define MSGTR_InvalidMPEGES "Flux MPEG-ES invalide ??? Contactez l'auteur, c'est peut-être un bogue :(\n"
#define MSGTR_FormatNotRecognized "========== Désolé, ce format de fichier n'est pas reconnu/supporté ============\n"\
"== Si ce fichier est un flux AVI, ASF ou MPEG, merci de contacter l'auteur ! ==\n"
+#define MSGTR_SettingProcessPriority "Réglage de la priorité du process: %s\n"
+#define MSGTR_FilefmtFourccSizeFpsFtime "[V] filefmt:%d fourcc:0x%X taille:%dx%d fps:%5.3f ftime:=%6.4f\n"
+#define MSGTR_CannotInitializeMuxer "Impossible d'initialiser le muxeur."
#define MSGTR_MissingVideoStream "Aucun flux vidéo trouvé.\n"
#define MSGTR_MissingAudioStream "Aucun flux audio trouvé -> pas de son\n"
#define MSGTR_MissingVideoStreamBug "Flux vidéo manquant !? Contactez l'auteur, c'est peut-être un bogue :(\n"
@@ -590,7 +612,6 @@ static char help_text[]=
#define MSGTR_CouldntDetFNo "Impossible de déterminer le nombre d'images (pour recherche absolue)\n"
#define MSGTR_CantSeekRawAVI "Impossible de chercher dans un flux AVI brut ! (Index requis, essayez l'option -idx.)\n"
#define MSGTR_CantSeekFile "Impossible de chercher dans ce fichier.\n"
-#define MSGTR_EncryptedVOB "Fichier VOB chiffré ! Veuillez lire DOCS/HTML/fr/cd-dvd.html.\n"
#define MSGTR_MOVcomprhdr "MOV : Le support d'entêtes compressées nécessite ZLIB !\n"
#define MSGTR_MOVvariableFourCC "MOV : ATTENTION : FOURCC Variable détecté !?\n"
@@ -598,7 +619,7 @@ static char help_text[]=
#define MSGTR_FoundAudioStream "==> Flux audio trouvé : %d\n"
#define MSGTR_FoundVideoStream "==> Flux vidéo trouvé : %d\n"
#define MSGTR_DetectedTV "TV détectée ! ;-)\n"
-#define MSGTR_ErrorOpeningOGGDemuxer "Impossible d'ouvrir le demuxer ogg\n"
+#define MSGTR_ErrorOpeningOGGDemuxer "Impossible d'ouvrir le demuxer Ogg\n"
#define MSGTR_ASFSearchingForAudioStream "ASF : recherche du flux audio (id:%d)\n"
#define MSGTR_CannotOpenAudioStream "Impossible d'ouvrir le flux audio : %s\n"
#define MSGTR_CannotOpenSubtitlesStream "Impossible d'ouvrir le flux des sous-titres : %s\n"
@@ -606,7 +627,6 @@ static char help_text[]=
#define MSGTR_OpeningSubtitlesDemuxerFailed "Echec à l'ouverture du demuxer de sous-titres : %s\n"
#define MSGTR_TVInputNotSeekable "Impossible de rechercher sur l'entrée TV ! (cette opération correspondra sûrement à un changement de chaines ;)\n"
#define MSGTR_DemuxerInfoChanged "Info demuxer %s changé à %s\n"
-#define MSGTR_DemuxerInfoAlreadyPresent "Info du demuxer %s déjà présente !\n"
#define MSGTR_ClipInfo "Information sur le clip : \n"
#define MSGTR_LeaveTelecineMode "\ndemux_mpg : contenu NTSC 30000/1001fps détecté, ajustement du débit.\n"
@@ -615,6 +635,10 @@ static char help_text[]=
#define MSGTR_NoBindFound "Aucune action attachée à la touche '%s'"
#define MSGTR_FailedToOpen "Échec à l'ouverture de '%s'\n"
+#define MSGTR_VideoID "[%s] Flux vidéo trouvé, -vid %d\n"
+#define MSGTR_AudioID "[%s] Flux audio trouvé, -aid %d\n"
+#define MSGTR_SubtitleID "[%s] Subtitle stream found, -sid %d\n"
+
// dec_video.c & dec_audio.c:
#define MSGTR_CantOpenCodec "Impossible d'ouvrir le codec.\n"
#define MSGTR_CantCloseCodec "Impossible de fermer le codec.\n"
@@ -654,7 +678,6 @@ static char help_text[]=
// LIRC:
#define MSGTR_SettingUpLIRC "Mise en place du support LIRC...\n"
-#define MSGTR_LIRCdisabled "Vous ne pourrez pas utiliser votre télécommande\n"
#define MSGTR_LIRCopenfailed "Impossible d'activer le support LIRC.\n"
#define MSGTR_LIRCcfgerr "Impossible de lire le fichier de config de LIRC %s.\n"
@@ -682,6 +705,7 @@ static char help_text[]=
#define MSGTR_InsertingAfVolume "[Mixer] Pas de support matériel pour le mixage, insertion du filtre logiciel de volume.\n"
#define MSGTR_NoVolume "[Mixer] Aucun contrôle de volume disponible.\n"
+#define MSGTR_NoBalance "[Mixer] Aucun contrôle de balance disponible.\n"
// ====================== messages/boutons GUI ========================
@@ -722,7 +746,6 @@ static char help_text[]=
#define MSGTR_NEMFMR "Désolé, pas assez de mémoire pour le rendu des menus."
#define MSGTR_IDFGCVD "Désolé, aucun pilote de sortie vidéo compatible avec la GUI."
#define MSGTR_NEEDLAVC "Désolé, vous ne pouvez pas lire de fichiers non-MPEG avec le périphérique DXR3/H+ sans réencoder.\nActivez plutôt lavc dans la boîte de configuration DXR3/H+."
-#define MSGTR_NEEDLAVCFAME "Désolé, vous ne pouvez pas jouer de fichier non-MPEG avec votre périphérique DXR3/H+ sans réencodage.\nVeuillez activer lavc ou fame dans la boîte de configuration DXR3/H+."
#define MSGTR_UNKNOWNWINDOWTYPE "Genre de fenêtre inconnue trouvé ..."
// --- messages d'erreurs du chargement de peau ---
@@ -740,7 +763,6 @@ static char help_text[]=
#define MSGTR_SKIN_BITMAP_RLENotSupported "tga compacté en RLE non supporté (%s)\n"
#define MSGTR_SKIN_BITMAP_UnknownFileType "format de fichier inconnu (%s)\n"
#define MSGTR_SKIN_BITMAP_ConversionError "Erreur de conversion 24 bit vers 32 bit (%s)\n"
-#define MSGTR_SKIN_BITMAP_ConvertError "erreur de conversion de 24 bit en 32 bit (%s)\n"
#define MSGTR_SKIN_BITMAP_UnknownMessage "message inconnu : %s\n"
#define MSGTR_SKIN_FONT_NotEnoughtMemory "pas assez de mémoire\n"
#define MSGTR_SKIN_FONT_TooManyFontsDeclared "trop de polices déclarées.\n"
@@ -837,7 +859,6 @@ static char help_text[]=
#define MSGTR_PREFERENCES_DoNotPlaySound "Ne pas jouer le son"
#define MSGTR_PREFERENCES_NormalizeSound "Normaliser le son"
#define MSGTR_PREFERENCES_EnableEqualizer "Egaliseur (Equalizer) activé"
-#define MSGTR_PREFERENCES_EnEqualizer "Activer l'équaliseur"
#define MSGTR_PREFERENCES_SoftwareMixer "Activer mixeur logiciel"
#define MSGTR_PREFERENCES_ExtraStereo "Activer stéréo supplémentaire"
#define MSGTR_PREFERENCES_Coefficient "Coefficient :"
@@ -885,7 +906,6 @@ static char help_text[]=
#define MSGTR_PREFERENCES_Message "ATTENTION : certaines options requièrent un redémarrage de la lecture !"
#define MSGTR_PREFERENCES_DXR3_VENC "Encodeur vidéo :"
#define MSGTR_PREFERENCES_DXR3_LAVC "Utiliser LAVC (FFmpeg)"
-#define MSGTR_PREFERENCES_DXR3_FAME "Utiliser FAME"
#define MSGTR_PREFERENCES_FontEncoding1 "Unicode"
#define MSGTR_PREFERENCES_FontEncoding2 "Langues Européennes Occidentales (ISO-8859-1)"
#define MSGTR_PREFERENCES_FontEncoding3 "Langues Européeenes Occidentales avec Euro (ISO-8859-15)"
@@ -908,6 +928,7 @@ static char help_text[]=
#define MSGTR_PREFERENCES_FontEncoding20 "Thaïlandais (CP874)"
#define MSGTR_PREFERENCES_FontEncoding21 "Cyrillique Windows (CP1251)"
#define MSGTR_PREFERENCES_FontEncoding22 "Slave/Europe Centrale Windows (CP1250)"
+#define MSGTR_PREFERENCES_FontEncoding23 "Arabe Windows (CP1256)"
#define MSGTR_PREFERENCES_FontNoAutoScale "Pas d'agrandissement auto"
#define MSGTR_PREFERENCES_FontPropWidth "Proportionnel à la largeur du film"
#define MSGTR_PREFERENCES_FontPropHeight "Proportionnel à la hauteur du film"
@@ -1051,6 +1072,7 @@ static char help_text[]=
#define MSGTR_VO_SUB_Volume "Volume"
#define MSGTR_VO_SUB_Brightness "Luminosité"
#define MSGTR_VO_SUB_Hue "Tonalité"
+#define MSGTR_VO_SUB_Balance "Balance"
// vo_xv.c
#define MSGTR_VO_XV_ImagedimTooHigh "Dimensions d'image source trop élevées: %ux%u (maximum %ux%u)\n"
@@ -1180,8 +1202,6 @@ static char help_text[]=
"[AO_ALSA] device=<device-name>\n"\
"[AO_ALSA] met le périphérique (change , vers . et : vers =)\n"
#define MSGTR_AO_ALSA_ChannelsNotSupported "[AO_ALSA] canaux %d non supportés.\n"
-#define MSGTR_AO_ALSA_CannotReadAlsaConfiguration "[AO_ALSA] Ne peux lire la configuration ALSA : %s\n"
-#define MSGTR_AO_ALSA_CannotCopyConfiguration "[AO_ALSA] Ne peux copier la configuration : %s\n"
#define MSGTR_AO_ALSA_OpenInNonblockModeFailed "[AO_ALSA] Echec ouverture en mode non-bloqué, essaie ouverture en mode bloqué.\n"
#define MSGTR_AO_ALSA_PlaybackOpenError "[AO_ALSA] Erreur ouverture de lecture : %s\n"
#define MSGTR_AO_ALSA_ErrorSetBlockMode "[AL_ALSA] Erreur mise en mode bloqué %s.\n"
@@ -1226,6 +1246,7 @@ static char help_text[]=
// ======================= AF Filtres Audio ================================
// libaf
+#define MSGTR_AF_ValueOutOfRange MSGTR_VO_ValueOutOfRange
// af_ladspa.c
@@ -1259,6 +1280,12 @@ static char help_text[]=
#define MSGTR_INPUT_JOYSTICK_WarnLostSync "Manette de jeux : alerte événement init, perte de sync avec pilote\n"
#define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Alerte manette de jeux événement inconnu de type %d\n"
+// appleir.c
+
+#define MSGTR_INPUT_APPLE_IR_Init "Initialisation de l'interface IR Apple sur %s\n"
+#define MSGTR_INPUT_APPLE_IR_Detect "Interface IR Apple détectée sur %s\n"
+#define MSGTR_INPUT_APPLE_IR_CantOpen "Impossible d'ouvrir l'interface IR Apple : %s\n"
+
// input.c
#define MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds "Trop de descripteurs de fichiers de commande. Impossible d'enregister descripteur fichier %d.\n"
@@ -1338,6 +1365,8 @@ static char help_text[]=
#define MSGTR_MPDEMUX_ASFHDR_NoDataChunkAfterHeader "Nul morceau données suit entête !\n"
#define MSGTR_MPDEMUX_ASFHDR_AudioVideoHeaderNotFound "ASF : nul entête audio ou vidéo trouvé - fichier brisé ?\n"
#define MSGTR_MPDEMUX_ASFHDR_InvalidLengthInASFHeader "Longueur entête ASF invalide !\n"
+#define MSGTR_MPDEMUX_ASFHDR_DRMLicenseURL "URL de la license DRM : %s\n"
+#define MSGTR_MPDEMUX_ASFHDR_DRMProtected "Ce fichier est entaché d'une chiffrage DRM. Il n'est pas lisible avec MPlayer!\n"
// asf_mmst_streaming.c
@@ -1540,6 +1569,7 @@ static char help_text[]=
#define MSGTR_MPDEMUX_XMMS_FoundPlugin "Plugin trouvé : %s (%s).\n"
#define MSGTR_MPDEMUX_XMMS_ClosingPlugin "Fermeture du plugin : %s.\n"
+#define MSGTR_MPDEMUX_XMMS_WaitForStart "Attente de fermeture du greffon XMMS pour démarrer la lecture de '%s'...\n"
// ========================== LIBMPMENU ===================================
@@ -1581,6 +1611,7 @@ static char help_text[]=
// libmenu/menu_param.c
#define MSGTR_LIBMENU_SubmenuDefinitionNeedAMenuAttribut "[MENU] Définition sous-menu exige attribut 'menu'.\n"
+#define MSGTR_LIBMENU_InvalidProperty "[MENU] Propriété invalide '%s' dans l'entrée menu pref. (line %d).\n"
#define MSGTR_LIBMENU_PrefMenuEntryDefinitionsNeed "[MENU] Définition entrée menu pref exige attribut 'propriété' valide (ligne %d).\n"
#define MSGTR_LIBMENU_PrefMenuNeedsAnArgument "[MENU] Menu pref exige argument.\n"
@@ -1650,9 +1681,6 @@ static char help_text[]=
#define MSGTR_MPCODECS_WarnNextFilterDoesntSupportSlices "Alerte ! Filtre suivant ne supporte pas TRANCHES, gare au sig11...\n"
#define MSGTR_MPCODECS_FunWhydowegetNULL "Pourquoi ce NULL ??\n"
-// libmpcodecs/vf_fame.c
-#define MSGTR_MPCODECS_FatalCantOpenlibFAME "FATAL : ne peux ouvrir libFAME !\n"
-
// libmpcodecs/vf_test.c, vf_yuy2.c, vf_yvu9.c
#define MSGTR_MPCODECS_WarnNextFilterDoesntSupport "%s non supporté par filtre suivant/vo :(\n"
@@ -1668,6 +1696,7 @@ static char help_text[]=
#define MSGTR_LIBVO_MGA_IncompatibleDriverVersion "[MGA] La version de votre pilote mga_vid est incompatible avec cette version de MPlayer !\n"
#define MSGTR_LIBVO_MGA_CouldntOpen "[MGA] Impossible d'ouvrir : %s\n"
#define MGSTR_LIBVO_MGA_ResolutionTooHigh "[MGA] La resolution à sa source est au moins dans une dimension plus large que 1023x1023. Veuillez remettre à l'échelle dans le logiciel ou utiliser -lavdopts lowres=1\n"
+#define MGSTR_LIBVO_MGA_mgavidVersionMismatch "[MGA] La version du driver mga_vid (%u) ne correspond pas à celle utilisée lors de la compilation de MPlayer (%u)\n"
// libvo/vesa_lvo.c
@@ -1738,6 +1767,17 @@ static char help_text[]=
#define MSGTR_LIBVO_DXR3_XCorrection "[VO_DXR3] Correction X : %d.\n"
#define MSGTR_LIBVO_DXR3_FailedSetSignalMix "[VO_DXR3] Echec réglage du mix signal !\n"
+// libvo/font_load_ft.c
+
+#define MSGTR_LIBVO_FONT_LOAD_FT_NewFaceFailed "New_Face a échoué. Le chemin vers les fonts est peut-être faux.\nSpécifiez un fichier de police, svp. (~/.mplayer/subfont.ttf).\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_NewMemoryFaceFailed "New_Memory_Face a échoué.\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_SubFaceFailed "Police de sous-titres : load_sub_face a échoué.\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_SubFontCharsetFailed "Police de sous-titres : prepare_charset a échoué.\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_CannotPrepareSubtitleFont "Impossible de préparer la police de sous-titres.\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_CannotPrepareOSDFont "Impossible de prparer la police OSD.\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_CannotGenerateTables "Impossible de générer les tables.\n"
+#define MSGTR_LIBVO_FONT_LOAD_FT_DoneFreeTypeFailed "FT_Done_FreeType a échoué.\n"
+
// libvo/vo_mga.c
#define MSGTR_LIBVO_MGA_AspectResized "[VO_MGA] aspect() : redimensionné à %dx%d.\n"
@@ -1905,6 +1945,12 @@ static char help_text[]=
"[VO_XV] DOCS/HTML/en/video.html#xv!\n"\
"[VO_XV] Voir 'mplayer -vo help' pour autres pilotes sortie vidéo (non xv).\n"\
"[VO_XV] Essayez -vo x11.\n"
+#define MSGTR_LIBVO_XV_Adaptor "[VO_XV] Utilise l'adaptateur Xv #%d (%s)\n"
+
+
+// loader/ldt_keeper.c
+
+#define MSGTR_LOADER_DYLD_Warning "AVERTISSEMENT : Tentative d'utilisation de codecs DLL alors que la variable d'environment\n DYLD_BIND_AT_LAUNCH n'est pas assignée. Plantage très probable.\n"
// stream/stream_radio.c
@@ -1945,10 +1991,165 @@ static char help_text[]=
#define MSGTR_RADIO_CaptureStarting "[radio] Début de la capture.\n"
#define MSGTR_RADIO_ClearBufferFailed "[radio] Echec effacement du tampon : %s\n"
#define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Echec appel stream_enable_cache : %s\n"
-#define MSGTR_RADIO_DriverUnknownId "[radio] ID du pilote inconnue : %d\n"
#define MSGTR_RADIO_DriverUnknownStr "[radio] Nom de pilote inconnu : %s\n"
#define MSGTR_RADIO_DriverV4L2 "[radio] Utilise interface radio V4Lv2.\n"
#define MSGTR_RADIO_DriverV4L "[radio] Utilise interface radio V4Lv1.\n"
+#define MSGTR_RADIO_DriverBSDBT848 "[radio] Utilisation de l'interface radio *BSD BT848.\n"
+#define MSGTR_RADIO_AvailableDrivers "[radio] Drivers disponibles : "
+
+// ================================== LIBASS ====================================
+
+// ass_bitmap.c
+#define MSGTR_LIBASS_FT_Glyph_To_BitmapError "[ass] Erreur FT_Glyph_To_Bitmap %d \n"
+#define MSGTR_LIBASS_UnsupportedPixelMode "[ass] Mode pixel non supporté : %d\n"
+#define MSGTR_LIBASS_GlyphBBoxTooLarge "[ass] Cadre du caractère trop grand: %dx%dpx\n"
+
+// ass.c
+#define MSGTR_LIBASS_NoStyleNamedXFoundUsingY "[ass] [%p] Avertissement: aucun style nommé '%s' trouvé, utilise '%s'\n"
+#define MSGTR_LIBASS_BadTimestamp "[ass] mauvais marqueur de temps\n"
+
+
+#define MSGTR_LIBASS_ErrorOpeningIconvDescriptor "[ass] erreur lors de l'ouverture du descripteur de conversion.\n"
+#define MSGTR_LIBASS_ErrorRecodingFile "[ass] erreur lors de l'enregistrement du fichier.\n"
+#define MSGTR_LIBASS_FopenFailed "[ass] ass_read_file(%s) : fopen a échoué\n"
+#define MSGTR_LIBASS_FseekFailed "[ass] ass_read_file(%s) : fseek à échoué\n"
+#define MSGTR_LIBASS_RefusingToLoadSubtitlesLargerThan10M "[ass] ass_read_file(%s) : Chargement des fichiers plus grands que 10Mo refusé\n"
+#define MSGTR_LIBASS_ReadFailed "Lecture impossible, %d: %s\n"
+#define MSGTR_LIBASS_AddedSubtitleFileMemory "[ass] Ajout d'un fichier de sous-titres : <memory> (%d styles, %d évènements)\n"
+#define MSGTR_LIBASS_AddedSubtitleFileFname "[ass] Ajout d'un fichier de sous-titres : %s (%d styles, %d events)\n"
+#define MSGTR_LIBASS_FailedToCreateDirectory "[ass] Impossible de créer le répertoire %s\n"
+#define MSGTR_LIBASS_NotADirectory "[ass] Pas un répertoire : %s\n"
+
+// ass_cache.c
+#define MSGTR_LIBASS_TooManyFonts "[ass] Trop de polices de caractères\n"
+#define MSGTR_LIBASS_ErrorOpeningFont "[ass] Erreur à l'ouverture de la police de caractère : %s, %d\n"
+
+// ass_fontconfig.c
+#define MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne "[ass] fontconfig : La police sélectionnée n'est pas celle demandée : '%s' != '%s'\n"
+#define MSGTR_LIBASS_UsingDefaultFontFamily "[ass] fontconfig_select : Utilise la famille de police par defaut: (%s, %d, %d) -> %s, %d\n"
+#define MSGTR_LIBASS_UsingDefaultFont "[ass] fontconfig_select : Utilise la police par defaut : (%s, %d, %d) -> %s, %d\n"
+#define MSGTR_LIBASS_UsingArialFontFamily "[ass] fontconfig_select : Utilise la famille de fonte 'Arial' : (%s, %d, %d) -> %s, %d\n"
+#define MSGTR_LIBASS_FcInitLoadConfigAndFontsFailed "[ass] FcInitLoadConfigAndFonts a échoué.\n"
+#define MSGTR_LIBASS_UpdatingFontCache "[ass] Mise à jour du cache des polices.\n"
+#define MSGTR_LIBASS_BetaVersionsOfFontconfigAreNotSupported "[ass] Les versions Beta de fontconfig ne sont pas supportées.\n[ass] Effectuez une mise à jours avant de soumettre un rapport de bug.\n"
+#define MSGTR_LIBASS_FcStrSetAddFailed "[ass] FcStrSetAdd a échoué.\n"
+#define MSGTR_LIBASS_FcDirScanFailed "[ass] FcDirScan a échoué.\n"
+#define MSGTR_LIBASS_FcDirSave "[ass] FcDirSave a échoué.\n"
+#define MSGTR_LIBASS_FcConfigAppFontAddDirFailed "[ass] FcConfigAppFontAddDir a échoué\n"
+#define MSGTR_LIBASS_FontconfigDisabledDefaultFontWillBeUsed "[ass] Fontconfig desactivé, seule la police par defaut sera utilisée.\n"
+#define MSGTR_LIBASS_FunctionCallFailed "[ass] %s a échoué\n"
+
+// ass_render.c
+#define MSGTR_LIBASS_NeitherPlayResXNorPlayResYDefined "[ass] Ni PlayResX, ni PlayResY ne sont définis. Suppose 384x288.\n"
+#define MSGTR_LIBASS_PlayResYUndefinedSettingY "[ass] PlayResY non défini, ajuste à %d.\n"
+#define MSGTR_LIBASS_PlayResXUndefinedSettingX "[ass] PlayResX non défini, ajuste à %d.\n"
+#define MSGTR_LIBASS_FT_Init_FreeTypeFailed "[ass] FT_Init_FreeType a échoué.\n"
+#define MSGTR_LIBASS_Init "[ass] Initialisation\n"
+#define MSGTR_LIBASS_InitFailed "[ass] L'initialisation a échoué.\n"
+#define MSGTR_LIBASS_BadCommand "[ass] Mauvaise commande: %c%c\n"
+#define MSGTR_LIBASS_ErrorLoadingGlyph "[ass] Erreur au chargement du caractère.\n"
+#define MSGTR_LIBASS_FT_Glyph_Stroke_Error "[ass] Erreur FT_Glyph_Stroke %d \n"
+#define MSGTR_LIBASS_UnknownEffectType_InternalError "[ass] Type d'erreur inconnu (erreur interne)\n"
+#define MSGTR_LIBASS_NoStyleFound "[ass] Aucun style trouvé !\n"
+#define MSGTR_LIBASS_EmptyEvent "[ass] Évènement vide !\n"
+#define MSGTR_LIBASS_MAX_GLYPHS_Reached "[ass] MAX_GLYPHS atteint: évènement %d, début = %llu, durée = %llu\n Texte = %s\n"
+#define MSGTR_LIBASS_EventHeightHasChanged "[ass] Avertissement! La hauteur de l'évènement a changé !\n"
+
+// ass_font.c
+#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] Caractère 0x%X introuvable. Sélectionne une police supplémentaire pour (%s, %d, %d)\n"
+#define MSGTR_LIBASS_GlyphNotFound "[ass] Caractère 0x%X introuvable dans la police pour (%s, %d, %d)\n"
+#define MSGTR_LIBASS_NoCharmaps "[ass] Famille de police sans description de table de caractères\n"
+#define MSGTR_LIBASS_NoCharmapAutodetected "[ass] Pas de description de table de caractères détectée automatiquement. Essai de la première\n"
+
+//tv.c
+#define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s) : paramètre de norme bogué. Ajuste à %s.\n"
+#define MSGTR_TV_NoVideoInputPresent "Erreur: Pas d'entrée vidéo présente!\n"
+#define MSGTR_TV_UnknownImageFormat ""\
+"==================================================================\n"\
+" AVERTISSEMENT: FORMAT D'IMAGE DE SORTIE NON-TESTÉ OU INCONNU (0x%x)\n"\
+" Ceci peut causer une lecture erronée ou un plantage ! Les rapports \n"\
+" de bugs seront ignorés ! Vous devriez réessayer avec YV12 (l'espace \n"\
+" de couleur par défaut) et lire la documentation !\n"\
+"==================================================================\n"
+#define MSGTR_TV_SelectedNormId "Identifiant de norme sélectionné: %d\n"
+#define MSGTR_TV_SelectedNorm "Norme sélectionnée : %s\n"
+#define MSGTR_TV_CannotSetNorm "Erreur : La norme ne peut pas être appliquée !\n"
+#define MSGTR_TV_MJP_WidthHeight " MJP: largeur %d hauteur %d\n"
+#define MSGTR_TV_UnableToSetWidth "Impossible d'appliquer la largeur requise : %d\n"
+#define MSGTR_TV_UnableToSetHeight "Impossible d'appliquer la hauteur requise : %d\n"
+#define MSGTR_TV_NoTuner "L'entrée sélectionnée n'a pas de tuner !\n"
+#define MSGTR_TV_UnableFindChanlist "Impossible de trouver la liste des canaux sélectionnés ! (%s)\n"
+#define MSGTR_TV_SelectedChanlist "Liste des canaux sélectionnés: %s (contenant %d canaux)\n"
+#define MSGTR_TV_ChannelFreqParamConflict "Il n'est pas possible de régler la fréquence et le canal simultanément !\n"
+#define MSGTR_TV_ChannelNamesDetected "Noms des chaînes TV détectées.\n"
+#define MSGTR_TV_NoFreqForChannel "Imposible de trouver la fréquence du canal %s (%s)\n"
+#define MSGTR_TV_SelectedChannel3 "Canal sélectionné : %s - %s (fréq: %.3f)\n"
+#define MSGTR_TV_SelectedChannel2 "Canal sélectionné : %s (fréq: %.3f)\n"
+#define MSGTR_TV_SelectedFrequency "Fréquence sélectionnée : %lu (%.3f)\n"
+#define MSGTR_TV_RequestedChannel "Canal choisi: %s\n"
+#define MSGTR_TV_UnsupportedAudioType "Format audio '%s (%x)' non-supporté !\n"
+#define MSGTR_TV_AudioFormat " TV audio: %d canaux, %d bits, %d Hz\n"
+#define MSGTR_TV_AvailableDrivers "Drivers disponibles:\n"
+#define MSGTR_TV_DriverInfo "Driver sélectionné: %s\n nom : %s\n auteur : %s\n commentaire : %s\n"
+#define MSGTR_TV_NoSuchDriver "Driver inexistant : %s\n"
+#define MSGTR_TV_DriverAutoDetectionFailed "La détection auto du driver TV a échouée.\n"
+#define MSGTR_TV_UnknownColorOption "Option couleur choisie inconnue (%d) !\n"
+#define MSGTR_TV_CurrentFrequency "Fréquence actuelle : %lu (%.3f)\n"
+#define MSGTR_TV_NoTeletext "Télétexte absent"
+#define MSGTR_TV_Bt848IoctlFailed "tvi_bsdbt848: L'appel à %s ioctl a échoué. Erreur : %s\n"
+#define MSGTR_TV_Bt848InvalidAudioRate "tvi_bsdbt848: Taux d'échantillonage audio invalide. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorOpeningBktrDev "tvi_bsdbt848: Impossible d'ouvrir le périphérique bktr. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorOpeningTunerDev "tvi_bsdbt848: Impossible d'ouvrir le périphérique tuner. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorOpeningDspDev "tvi_bsdbt848: Impossible d'ouvrir le périphérique dsp. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorConfiguringDsp "tvi_bsdbt848: La configuration du périphérique dsp a échoué. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorReadingAudio "tvi_bsdbt848: Erreur de lecture des données audio. Erreur : %s\n"
+#define MSGTR_TV_Bt848MmapFailed "tvi_bsdbt848: mmap a échoué. Erreur : %s\n"
+#define MSGTR_TV_Bt848FrameBufAllocFailed "tvi_bsdbt848: L'allocation du buffer de trame a échoué. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorSettingWidth "tvi_bsdbt848: Erreur du réglage de la largeur de l'image. Erreur : %s\n"
+#define MSGTR_TV_Bt848ErrorSettingHeight "tvi_bsdbt848: Erreur du réglage de la hauteur de l'image. Erreur : %s\n"
+#define MSGTR_TV_Bt848UnableToStopCapture "tvi_bsdbt848: Impossible d'arréter la capture. Erreur : %s\n"
+#define MSGTR_TV_TTSupportedLanguages "Langues supportées par le télétexte:\n"
+#define MSGTR_TV_TTSelectedLanguage "Langue sélectionnée par defaut pour le télétexte : %s\n"
+#define MSGTR_TV_ScannerNotAvailableWithoutTuner "Le scanner de canaux est indisponible sans le tuner\n"
+
+//tvi_dshow.c
+#define MSGTR_TVI_DS_UnableConnectInputVideoDecoder "Impossible de connecter l'entrée spécifiée au décodeur vidéo. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_UnableConnectInputAudioDecoder "Impossible de connecter l'entrée spécifiée au décodeur audio. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_UnableSelectVideoFormat "tvi_dshow: Impossible de sélectionner le format vidéo. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_UnableSelectAudioFormat "tvi_dshow: Impossible de sélectionner le format audio. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_UnableGetMediaControlInterface "tvi_dshow: Impossible de se connecter à une interface IMediaControl. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Périphérique #%d non trouvé\n"
+#define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Impossible de trouver un nom pour le périphérique #%d\n"
+#define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Utilise le périphérique #%d: %s\n"
+#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Périphérique #%d: %s\n"
+#define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Impossible d'obtenir la fréquence directement. La table des canaux incluse à l'OS sera utilisée.\n"
+#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Impossible de fixer la fréquence directement. La table des canaux incluse à l'OS sera utilisée.\n"
+#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: normes supportées :"
+#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: Entrées vidéo disponibles :"
+#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: Entrées audio disponibles :"
+//following phrase will be printed near the selected audio/video input
+#define MSGTR_TVI_DS_InputSelected "(sélectionnée)"
+#define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Impossible de lire la table des fréquence depuis kstvtune.ax\n"
+#define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Mauvais paramêtre de périphérique : %s\n"
+#define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Mauvais index de périphérique: %d\n"
+#define MSGTR_TVI_DS_WrongADeviceParam "tvi_dshow: Wrong adevice parameter: %s\n"
+#define MSGTR_TVI_DS_WrongADeviceIndex "tvi_dshow: Wrong adevice index: %d\n"
+
+#define MSGTR_TVI_DS_SamplerateNotsupported "tvi_dshow: Le taux d'échantillonage %d n'est pas supporté par le périphérique. Retour au premier taux disponible.\n"
+#define MSGTR_TVI_DS_VideoAdjustigNotSupported "tvi_dshow: Ajustement de la brillance/teinte/saturation/contraste non supportée par le périphérique\n"
+
+#define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: L'ajustement de la hauteur/largeur de la vidéo n'est pas supportée par le périphérique.\n"
+#define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: La sélection de la source de capture n'est pas supportée par le périphérique\n"
+#define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Impossible d'analyser la structure du format audio.\n"
+#define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Impossible d'analyser la structure du format vidéo.\n"
+#define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Impossible d'utiliser le mode audio %d. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_UnsupportedMediaType "tvi_dshow: Type de média non supporté passé vers %s\n"
+#define MSGTR_TVI_DS_UnableFindNearestChannel "tvi_dshow: Impossible de trouver le canal le plus proche dans la table des fréquences du système\n"
+#define MSGTR_TVI_DS_UnableToSetChannel "tvi_dshow: Impossible de basculer sur le canal le plus proche depuis la table des fréquences du système. Erreur :0x%x\n"
+#define MSGTR_TVI_DS_NoVideoCaptureDevice "tvi_dshow: Impossible de trouver un périphérique de capture vidéo\n"
+#define MSGTR_TVI_DS_NoAudioCaptureDevice "tvi_dshow: Impossible de trouver un périphérique de capture audio\n"
+#define MSGTR_TVI_DS_GetActualMediatypeFailed "tvi_dshow: Impossible d'obtenir le type de média réel (Erreur:0x%x). Suppose qu'il s'agit de celui requis.\n"
+
/* Messages to be moved to the section where they belong in the English version */
diff --git a/help/help_mp-hu.h b/help/help_mp-hu.h
index feafe55343..fd4e25025e 100644
--- a/help/help_mp-hu.h
+++ b/help/help_mp-hu.h
@@ -3,7 +3,7 @@
//... Okay enough of the hw, now send the other two!
//
// Updated by: Gabrov <gabrov@freemail.hu>
-// Sync'ed with help_mp-en.h r26649 (2008. 05. 11.)
+// Sync'ed with help_mp-en.h r26911 (2008. 06. 02.)
// ========================= MPlayer help ===========================
@@ -1295,6 +1295,12 @@ static char help_text[]=
#define MSGTR_INPUT_JOYSTICK_WarnLostSync "Botkormány: figyelmeztető init esemény, elvesztettük a szinkront a vezérlővel.\n"
#define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "Botkormány ismeretlen figyelmeztető esemény típus: %d\n"
+// appleir.c
+
+#define MSGTR_INPUT_APPLE_IR_Init "Apple IR inicializálása %s eszközön.\n"
+#define MSGTR_INPUT_APPLE_IR_Detect "Apple IR megtalálva %s eszközön.\n"
+#define MSGTR_INPUT_APPLE_IR_CantOpen "Nem nyitható meg az Apple IR eszköz: %s\n"
+
// input.c
#define MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds "Túl sok parancs fájl leíró, nem sikerült a(z) %d fájl leíró regisztálása.\n"
@@ -1704,7 +1710,8 @@ static char help_text[]=
#define MSGTR_LIBVO_MGA_InvalidOutputFormat "[MGA] Hibás kimeneti formátum %0X\n"
#define MSGTR_LIBVO_MGA_IncompatibleDriverVersion "[MGA] Az mga_vid vezérlőd verziója nem kompatibilis ezzel az MPlayer verzióval!\n"
#define MSGTR_LIBVO_MGA_CouldntOpen "[MGA] Nem nyitható meg: %s\n"
-#define MGSTR_LIBVO_MGA_ResolutionTooHigh "[MGA] A forrás felbontás legalább egy dimenzióban nagyobb, mint 1023x1023. Kérlek méretezd át szoftveresen vagy használd a -lavdopts lowres=1-t\n"
+#define MGSTR_LIBVO_MGA_ResolutionTooHigh "[MGA] A forrás felbontása legalább egy dimenzióban nagyobb, mint 1023x1023. Méretezd át szoftveresen vagy használd a -lavdopts lowres=1-t\n"
+#define MGSTR_LIBVO_MGA_mgavidVersionMismatch "[MGA] különbség a kernel (%u) és az MPlayer (%u) mga_vid verziói között\n"
// libvo/vesa_lvo.c
@@ -1953,6 +1960,7 @@ static char help_text[]=
"[VO_XV] majd olvasd el a DOCS/HTML/hu/video.html#xv fájlt!\n"\
"[VO_XV] Lásd az 'mplayer -vo help'-et más (nem-xv) videó kimeneti vezérlőkért.\n"\
"[VO_XV] Próbáld ki a -vo x11 -et.\n"
+#define MSGTR_LIBVO_XV_Adaptor "[VO_XV] Xv Adaptor #%d (%s) használata\n"
// loader/ldt_keeper.c
diff --git a/help/help_mp-it.h b/help/help_mp-it.h
index 087b2e484f..41b5b628a3 100644
--- a/help/help_mp-it.h
+++ b/help/help_mp-it.h
@@ -546,7 +546,7 @@ static char help_text[]=
#define MSGTR_DVDlimitSpeed "Limitazione della velocità del DVD a %dKB/s... "
#define MSGTR_DVDlimitFail "non riuscita\n"
#define MSGTR_DVDlimitOk "riuscita\n"
-#define MSGTR_CantOpenDVD "Impossibile aprire il dispositivo DVD: %s\n"
+#define MSGTR_CantOpenDVD "Impossibile aprire il dispositivo DVD: %s (%s)\n"
#define MSGTR_NoDVDSupport "MPlayer è stato compilato senza il supporto per DVD, esco\n"
#define MSGTR_DVDnumTitles "Ci sono %d titolo/i su questo DVD.\n"
#define MSGTR_DVDinvalidTitle "Numero del titolo del DVD non valido: %d\n"
diff --git a/help/help_mp-ja.h b/help/help_mp-ja.h
index 8265562b00..c491e02378 100644
--- a/help/help_mp-ja.h
+++ b/help/help_mp-ja.h
@@ -168,7 +168,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "ローカルエリアãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—ãŸ: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer ã¯SMB reading support を無効ã«ã—ã¦ã‚³ãƒ³ãƒ‘イルã•ã‚Œã¦ã„ã¾ã™\n"
-#define MSGTR_CantOpenDVD "DVDデãƒã‚¤ã‚¹ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—ãŸ: %s\n"
+#define MSGTR_CantOpenDVD "DVDデãƒã‚¤ã‚¹ã‚’é–‹ãã“ã¨ãŒå‡ºæ¥ã¾ã›ã‚“ã§ã—ãŸ: %s (%s)\n"
#define MSGTR_DVDnumTitles "ã“ã®DVDã«ã¯ %d タイトル記録ã•ã‚Œã¦ã„ã¾ã™.\n"
#define MSGTR_DVDinvalidTitle "ä¸æ­£ãª DVD タイトル番å·ã§ã™: %d\n"
#define MSGTR_DVDnumChapters "ã“ã®DVD㯠%d キャプターã‚ã‚Šã¾ã™.\n"
diff --git a/help/help_mp-ko.h b/help/help_mp-ko.h
index e3cdaabacf..d5cc7d615b 100644
--- a/help/help_mp-ko.h
+++ b/help/help_mp-ko.h
@@ -221,7 +221,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "lan으로 부터 열 수 없습니다.: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayerê°€ SMBì½ê¸°ë¥¼ í•  수 있ë„ë¡ ì»´íŒŒì¼ë˜ì§€ 않았습니다.\n"
-#define MSGTR_CantOpenDVD "DVD 장치를 열 수 없습니다.: %s\n"
+#define MSGTR_CantOpenDVD "DVD 장치를 열 수 없습니다.: %s (%s)\n"
#define MSGTR_DVDnumTitles "ì´ DVDì—는 %dê°œì˜ íƒ€ì´í‹€ì´ 있습니다.\n"
#define MSGTR_DVDinvalidTitle "유효하지 ì•Šì€ DVD 타ì´í‹€ 번호입니다.: %d\n"
#define MSGTR_DVDnumChapters "ì´ DVD 타ì´í‹€ì—는 %dê°œì˜ ì±•í„°ê°€ 있습니다.\n"
diff --git a/help/help_mp-mk.h b/help/help_mp-mk.h
index a092aa6574..218d01aae3 100644
--- a/help/help_mp-mk.h
+++ b/help/help_mp-mk.h
@@ -222,7 +222,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Ðе може да отвори од локалната мрежа: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer не е компајлиран Ñо подршка за SMB читање\n"
-#define MSGTR_CantOpenDVD "Ðе можеше да Ñе отвори DVD уредот: %s\n"
+#define MSGTR_CantOpenDVD "Ðе можеше да Ñе отвори DVD уредот: %s (%s)\n"
#define MSGTR_DVDnumTitles "Има %d наÑлови на ова DVD.\n"
#define MSGTR_DVDinvalidTitle "Ðевалиден DVD број на наÑловот: %d\n"
#define MSGTR_DVDnumChapters "Има %d поглавја на овој DVD наÑлов.\n"
diff --git a/help/help_mp-nb.h b/help/help_mp-nb.h
index 6eb2e440ce..b914c6566f 100644
--- a/help/help_mp-nb.h
+++ b/help/help_mp-nb.h
@@ -98,7 +98,7 @@ static char help_text[]=
#define MSGTR_ConnToServer "Koblet til server: %s\n"
#define MSGTR_FileNotFound "Finner ikke filen: '%s'\n"
-#define MSGTR_CantOpenDVD "Kan ikke åpne DVD enhet: %s\n"
+#define MSGTR_CantOpenDVD "Kan ikke åpne DVD enhet: %s (%s)\n"
#define MSGTR_DVDnumTitles "Det er %d titler på denne DVD.\n"
#define MSGTR_DVDinvalidTitle "Ugyldig DVD tittelnummer: %d\n"
#define MSGTR_DVDnumChapters "Det er %d kapitler i denne DVD tittelen.\n"
diff --git a/help/help_mp-nl.h b/help/help_mp-nl.h
index e6b68fc048..746cca644a 100644
--- a/help/help_mp-nl.h
+++ b/help/help_mp-nl.h
@@ -153,7 +153,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "Menu initialisatie mislukt.\n"
#define MSGTR_Getch2InitializedTwice "WAARSCHUWING: getch2_init is twee maal opgeroepen!\n"
#define MSGTR_DumpstreamFdUnavailable "Deze stream can niet opgeslagen worde - geen bestandsomschrijving (file descriptor) beschikbaar.\n"
-#define MSGTR_FallingBackOnPlaylist "De afspeellijst %s wordt opnieuw ingelezen ...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Kan de libmenu video filter niet openen met het root menu %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Er is een fout opgetreden bijde pre-initialisatie van de audio filter!\n"
#define MSGTR_LinuxRTCReadError "Linux RTC leesfout: %s\n"
@@ -429,7 +428,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Kon netwerkbestand '%s' niet openen\n"
#define MSGTR_SMBNotCompiled "MPlayer werd niet gecompileerd met SMB leesondersteuning\n"
-#define MSGTR_CantOpenDVD "Kon DVD device niet openen: %s\n"
+#define MSGTR_CantOpenDVD "Kon DVD device niet openen: %s (%s)\n"
#define MSGTR_DVDnumTitles "Er zijn %d titels op deze DVD.\n"
#define MSGTR_DVDinvalidTitle "Foutieve DVD titelnummer: %d\n"
#define MSGTR_DVDnumChapters "Er zijn %d hoofdstukken in deze DVD titel.\n"
diff --git a/help/help_mp-pl.h b/help/help_mp-pl.h
index 1c615241d7..bbf6ef9218 100644
--- a/help/help_mp-pl.h
+++ b/help/help_mp-pl.h
@@ -158,7 +158,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "Nie mogę zainicjować menu.\n"
#define MSGTR_Getch2InitializedTwice "UWAGA: getch2_init wywołany dwukrotnie!\n"
#define MSGTR_DumpstreamFdUnavailable "Nie mogę zrzucić strumienia - brak deskryptora pliku\n"
-#define MSGTR_FallingBackOnPlaylist "Próbuję zinterpretować listę odtwarzania %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Nie mogę otworzyć filtru video libmenu z głownym menu %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Błąd preinicjalizacji łańcucha filtru audio!\n"
#define MSGTR_LinuxRTCReadError "BÅ‚Ä…d odczytu RTC Linuxa : %s\n"
@@ -513,7 +512,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Nie mogę otworzyć z sieci lokalnej (LAN): '%s'\n"
#define MSGTR_SMBNotCompiled "Brak wkompilowanej obsługi zasobów SMB.\n"
-#define MSGTR_CantOpenDVD "Nie znaleziono DVD: %s\n"
+#define MSGTR_CantOpenDVD "Nie znaleziono DVD: %s (%s)\n"
// stream_dvd.c
#define MSGTR_NoDVDSupport "MPlayer został skompilowany bez obsługi DVD support, wychodzę.\n"
@@ -1839,7 +1838,6 @@ static char help_text[]=
#define MSGTR_RADIO_CaptureStarting "[radio] Zaczynam nagrywanie.\n"
#define MSGTR_RADIO_ClearBufferFailed "[radio] Czyszczenie bufora nie powiodło się: %s\n"
#define MSGTR_RADIO_StreamEnableCacheFailed "[radio] Wywołanie stream_enable_cache nie powiodło się: %s\n"
-#define MSGTR_RADIO_DriverUnknownId "[radio] Nieznany id sterownika: %d\n"
#define MSGTR_RADIO_DriverUnknownStr "[radio] Nieznana nazwa sterownika: %s\n"
#define MSGTR_RADIO_DriverV4L2 "[radio] Używam interfejsu radiowego V4Lv2.\n"
#define MSGTR_RADIO_DriverV4L "[radio] Używam interfejsu radiowego V4Lv1.\n"
diff --git a/help/help_mp-pt_BR.h b/help/help_mp-pt_BR.h
index 624b4c7454..bb1cc5de47 100644
--- a/help/help_mp-pt_BR.h
+++ b/help/help_mp-pt_BR.h
@@ -228,7 +228,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Impossível abrir da \"lan\": '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer não foi compilado com suporte a leitura de SMB\n"
-#define MSGTR_CantOpenDVD "Impossível abrir dispositivo de DVD: %s\n"
+#define MSGTR_CantOpenDVD "Impossível abrir dispositivo de DVD: %s (%s)\n"
#define MSGTR_DVDnumTitles "Existem %d títulos neste DVD.\n"
#define MSGTR_DVDinvalidTitle "Número do título do DVD inválido: %d\n"
#define MSGTR_DVDnumChapters "Existem %d capítulos neste título de DVD.\n"
diff --git a/help/help_mp-ro.h b/help/help_mp-ro.h
index 2e90923edc..4bd439eb49 100644
--- a/help/help_mp-ro.h
+++ b/help/help_mp-ro.h
@@ -211,7 +211,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Nu pot deschide de pe LAN: '%s'\n"
-#define MSGTR_CantOpenDVD "Nu pot deschide DVD-ul: %s\n"
+#define MSGTR_CantOpenDVD "Nu pot deschide DVD-ul: %s (%s)\n"
#define MSGTR_DVDnumTitles "Sunt %d titluri pe acest DVD.\n"
#define MSGTR_DVDinvalidTitle "Numãrul titlului DVD greºit: %d\n"
#define MSGTR_DVDnumChapters "Sunt %d capitole în acest titlu.\n"
diff --git a/help/help_mp-ru.h b/help/help_mp-ru.h
index 09d13d20b5..038a2e1e34 100644
--- a/help/help_mp-ru.h
+++ b/help/help_mp-ru.h
@@ -2,7 +2,7 @@
// Dmitry Baryshkov <mitya@school.ioffe.ru>
// Reworked by: Andrew Savchenko aka Bircoph <Bircoph[at]list[dot]ru>
-// Synced with help_mp-en.h: r26067
+// Synced with help_mp-en.h: r26795
// ========================= MPlayer help ===========================
@@ -1387,7 +1387,7 @@ static char help_text[]=
#define MSGTR_LIBASS_EventHeightHasChanged "[ass] Внимание! Ð’Ñ‹Ñота ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ð»Ð°ÑÑŒ! \n"
// ass_font.c
-#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] Глиф 0x%X не найден, выбираю шрифт заново Ð´Ð»Ñ (%s, %d, %d)\n"
+#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] Глиф 0x%X не найден, выбираю еще один шрифт Ð´Ð»Ñ (%s, %d, %d)\n"
#define MSGTR_LIBASS_GlyphNotFound "[ass] Ð’ шрифте не найден глиф 0x%X Ð´Ð»Ñ (%s, %d, %d)\n"
#define MSGTR_LIBASS_ErrorOpeningMemoryFont "[ass] Ошибка Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ ÑˆÑ€Ð¸Ñ„Ñ‚Ð° в памÑти: %s\n"
#define MSGTR_LIBASS_NoCharmaps "[ass] шрифт без таблиц Ñимволов\n"
@@ -1408,6 +1408,12 @@ static char help_text[]=
#define MSGTR_INPUT_JOYSTICK_WarnLostSync "ДжойÑтик: предупреждение о Ñобытии инициализации,\nотерÑна ÑÐ¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ñ Ð´Ñ€Ð°Ð¹Ð²ÐµÑ€Ð¾Ð¼.\n"
#define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "ДжойÑтик: предупреждение о неизвеÑтном типе ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ %d\n"
+// appleir.c
+
+#define MSGTR_INPUT_APPLE_IR_Init "Ð˜Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Apple IR на %s\n"
+#define MSGTR_INPUT_APPLE_IR_Detect "Обнаружен Apple IR на %s\n"
+#define MSGTR_INPUT_APPLE_IR_CantOpen "Ðевозможно открыть уÑтройÑтво Apple IR: %s\n"
+
// input.c
#define MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds "Слишком много опиÑателей файлов команд,\nне могу зарегиÑтрировать файловый опиÑатель %d.\n"
@@ -2066,6 +2072,7 @@ static char help_text[]=
"[VO_XV] DOCS/HTML/ru/video.html#xv!\n"\
"[VO_XV] Другие (не-xv) драйверы ищите в выводе 'mplayer -vo help'.\n"\
"[VO_XV] Попробуйте -vo x11.\n"
+#define MSGTR_LIBVO_XV_Adaptor "[VO_XV] ИÑпользую Xv Ðдаптер #%d (%s)\n"
//tv.c
#define MSGTR_TV_BogusNormParameter "tv.c: norm_from_string(%s): ÐеизвеÑтный параметр norm, уÑтанавливаетÑÑ %s.\n"
diff --git a/help/help_mp-sk.h b/help/help_mp-sk.h
index da5a980034..e09e21201a 100644
--- a/help/help_mp-sk.h
+++ b/help/help_mp-sk.h
@@ -158,7 +158,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "Zlyhala inicializácia menu.\n"
#define MSGTR_Getch2InitializedTwice "VAROVANIE: getch2_init je volaná dvakrát!\n"
#define MSGTR_DumpstreamFdUnavailable "Nemôžem uložiť (dump) tento prúd - nie je dostupný žiaden deskriptor súboru.\n"
-#define MSGTR_FallingBackOnPlaylist "Ustupujem od pokusu o spracovanie playlistu %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Nemôžem otvoriť video filter libmenu s koreňovým menu %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Chyba pri predinicializácii reťazca audio filtrov!\n"
#define MSGTR_LinuxRTCReadError "Chyba pri Äítaní z Linuxových RTC: %s\n"
@@ -506,7 +505,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Nemôžem otvoriť z LAN: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer mebol skompilovaný s podporou Äítania z SMB\n"
-#define MSGTR_CantOpenDVD "Nejde otvoriť DVD zariadenie: %s\n"
+#define MSGTR_CantOpenDVD "Nejde otvoriť DVD zariadenie: %s (%s)\n"
#define MSGTR_NoDVDSupport "MPlayer bol skompilovaný bez podpory DVD, koniec\n"
#define MSGTR_DVDnumTitles "Na tomto DVD je %d titulov.\n"
#define MSGTR_DVDinvalidTitle "Neplatné Äíslo DVD titulu: %d\n"
diff --git a/help/help_mp-sv.h b/help/help_mp-sv.h
index ef0f2d7fbe..31faeccfc2 100644
--- a/help/help_mp-sv.h
+++ b/help/help_mp-sv.h
@@ -156,7 +156,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "Menyinitiering misslyckades.\n"
#define MSGTR_Getch2InitializedTwice "VARNING: getch2_init anropad dubbelt!\n"
#define MSGTR_DumpstreamFdUnavailable "Kan inte dumpa denna ström - ingen 'fd' tillgänglig.\n"
-#define MSGTR_FallingBackOnPlaylist "Faller tillbaka med att försöka tolka spellista %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "Kan inte öppna 'libmenu video filter' med rotmeny %s.\n"
#define MSGTR_AudioFilterChainPreinitError "Fel vid förinitiering av audiofilter!\n"
#define MSGTR_LinuxRTCReadError "'Linux RTC' läsfel: %s\n"
@@ -441,7 +440,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Kunde inte öppna från LAN: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer var inte kompilerad med SMB-lässtöd.\n"
-#define MSGTR_CantOpenDVD "Kunde inte öppna DVD-enhet: %s\n"
+#define MSGTR_CantOpenDVD "Kunde inte öppna DVD-enhet: %s (%s)\n"
#define MSGTR_DVDnumTitles "Det är %d titlar på denna DVD.\n"
#define MSGTR_DVDinvalidTitle "Icke godkänt DVD-titelnummer: %d\n"
#define MSGTR_DVDnumChapters "Der är %d kapitel på denna DVD-titel.\n"
diff --git a/help/help_mp-tr.h b/help/help_mp-tr.h
index 1e9bbb60fe..d131573503 100644
--- a/help/help_mp-tr.h
+++ b/help/help_mp-tr.h
@@ -603,7 +603,7 @@ static char help_text[]=
#define MSGTR_FormatNotRecognized "============ Üzgünüm, bu dosya biçimi desteklenmiyor ===========\n"\
"=== Dosya bir AVI,ASF veya MPEG yayın biçimi ise, lütfen geliştiricilere bildiriniz. ===\n"
#define MSGTR_SettingProcessPriority "İşlem önceliği ayarlanıyor: %s\n"
-#define MSGTR_FilefmtFourccSizeFpsFtime "[V] filefmt:%d fourcc:0x%X boyut:%dx%d fps:%5.2f ftime:=%6.4f\n"
+#define MSGTR_FilefmtFourccSizeFpsFtime "[V] filefmt:%d fourcc:0x%X boyut:%dx%d fps:%5.3f ftime:=%6.4f\n"
#define MSGTR_CannotInitializeMuxer "Cannot initialize muxer."
#define MSGTR_MissingVideoStream "Video yayını bulunamadı!\n"
#define MSGTR_MissingAudioStream "Ses yayını bulunamadı... -> ses yok\n"
diff --git a/help/help_mp-uk.h b/help/help_mp-uk.h
index 65be48a3f9..d19cc9c69b 100644
--- a/help/help_mp-uk.h
+++ b/help/help_mp-uk.h
@@ -215,7 +215,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "Помилка Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð· мережі: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer не має вкомпільованої підтримки SMB\n"
-#define MSGTR_CantOpenDVD "Ðе зміг відкрити DVD: %s\n"
+#define MSGTR_CantOpenDVD "Ðе зміг відкрити DVD: %s (%s)\n"
#define MSGTR_DVDnumTitles "Є %d доріжок з титрами на цьому DVD.\n"
#define MSGTR_DVDinvalidTitle "ÐеприпуÑтимий номер доріжки титрів на DVD: %d\n"
#define MSGTR_DVDnumChapters "Є %d розділів на цій доріжці з DVD титрами.\n"
diff --git a/help/help_mp-zh_CN.h b/help/help_mp-zh_CN.h
index d471c893da..cc8e4669ea 100644
--- a/help/help_mp-zh_CN.h
+++ b/help/help_mp-zh_CN.h
@@ -1,4 +1,4 @@
-//Synced with help_mp-en.h r26067 (MSGTR_Exit_SIGILL_RTCpuSel)
+// Synced with help_mp-en.h r26863 (MSGTR_EdlOutOfMem)
// Reminder of hard terms which need better/final solution later:
// (file links to be updated later if available!);
// NAV; section/subsection; XScreenSaver; keycolor;
@@ -37,7 +37,7 @@ static char help_text[]=
" -playlist <文件> 指定播放列表文件\n"
" -vid x -aid y 选择播放视频æµï¼ˆx)和音频æµï¼ˆy)\n"
" -fps x -srate y 改å˜è§†é¢‘帧率为 x(fps),音频采样率为 y(Hz)\n"
-" -pp <è´¨é‡> å¯ç”¨åŽæœŸå¤„ç†è¿‡æ»¤å™¨/滤镜(详è§äºŽæ‰‹å†Œç›¸å…³é¡µé¢ï¼‰\n"
+" -pp <è´¨é‡> å¯ç”¨åŽæœŸå¤„ç†è¿‡æ»¤å™¨ï¼ˆè¯¦è§äºŽæ‰‹å†Œç›¸å…³é¡µé¢ï¼‰\n"
" -framedrop å¯ç”¨ä¸¢å¸§ï¼ˆç”¨äºŽè¿è¡Œæ…¢çš„机器)\n"
"\n"
"基本控制键: (完整列表è§æ‰‹å†Œç›¸å…³é¡µé¢ï¼Œä¹Ÿè¯·æŸ¥é˜… input.conf)\n"
@@ -137,58 +137,58 @@ static char help_text[]=
#define MSGTR_PlaylistLoadUnable "\n无法装载播放列表 %s\n"
#define MSGTR_Exit_SIGILL_RTCpuSel \
"- “éžæ³•æŒ‡ä»¤â€å¯¼è‡´ MPlayer 崩溃。\n"\
-" è¿™å¯èƒ½æ˜¯æˆ‘们的新代ç ä¸­è¿è¡Œæ—¶ CPU-检测的一个错误...\n"\
+" è¿™å¯èƒ½æ˜¯æˆ‘们新的实时 CPU 侦测代ç ä¸­çš„一个缺陷...\n"\
" 请阅读 DOCS/zh/bugreports.html。\n"
#define MSGTR_Exit_SIGILL \
"- “éžæ³•æŒ‡ä»¤â€å¯¼è‡´ MPlayer 崩溃。\n"\
-" 这通常å‘生在现在你所è¿è¡Œä¹‹ä¸Šçš„ CPU ä¸åŒäºŽ\n"\
-" 编译/优化时的 CPU 所造æˆçš„。\n"\
-" è¯å®žå®ƒï¼\n"
+" 这通常是在你è¿è¡Œ MPlayer çš„ CPU 与其\n"\
+" 编译/优化时所针对的 CPU ä¸åŒæ—¶å‘生。\n"\
+" 检查是å¦å¦‚æ­¤ï¼\n"
#define MSGTR_Exit_SIGSEGV_SIGFPE \
-"- 过度使用 CPU/FPU/RAM 导致 MPlayer 崩溃。\n"\
-" 使用 --enable-debug é‡æ–°ç¼–译 MPlayer 并用调试程åºâ€œgdbâ€å跟踪和\n"\
-" å汇编。具体细节看 DOCS/zh/bugreports.html#crash。\n"
+"- ä¸åˆç†ä½¿ç”¨ CPU/FPU/RAM 导致 MPlayer 崩溃。\n"\
+" 使用 --enable-debug é‡æ–°ç¼–译 MPlayer 并建立“gdbâ€å跟踪和\n"\
+" åæ±‡ç¼–è¾“å‡ºã€‚å…·ä½“ç»†èŠ‚è§ DOCS/zh/bugreports.html#crash。\n"
#define MSGTR_Exit_SIGCRASH \
"- MPlayer 崩溃了。这ä¸åº”该å‘生。\n"\
-" è¿™å¯èƒ½æ˜¯ MPlayer 代ç ä¸­ _或者_ 你的驱动中 _或者_ ä½ çš„ gcc 版本中的一个\n"\
-" 错误。如你觉得这是 MPlayer 的错误,请阅读 DOCS/zh/bugreports.html\n"\
-" 并éµå¾ªä¸Šé¢çš„步骤报告错误。除éžä½ åœ¨æŠ¥å‘Šä¸€ä¸ªå¯èƒ½çš„错误时候æ供我们\n"\
-" 所需è¦çš„ä¿¡æ¯, å¦åˆ™æˆ‘们ä¸èƒ½ä¹Ÿä¸ä¼šå¸®åŠ©ä½ ã€‚\n"
-#define MSGTR_LoadingConfig "正在装载é…置文件 '%s'\n"
-#define MSGTR_LoadingProtocolProfile "加载å议的相关é…置集‘%s’\n"
-#define MSGTR_LoadingExtensionProfile "加载扩展组件的相关é…置集‘%s’\n"
-#define MSGTR_AddedSubtitleFile "字幕: 添加字幕文件 (%d): %s\n"
-#define MSGTR_RemovedSubtitleFile "字幕: 删除字幕文件 (%d): %s\n"
-#define MSGTR_ErrorOpeningOutputFile "打开写入文件 [%s] 失败!\n"
-#define MSGTR_CommandLine "命令行: "
-#define MSGTR_RTCDeviceNotOpenable "打开 %s 失败: %s (此文件应该能被用户读å–。)\n"
-#define MSGTR_LinuxRTCInitErrorIrqpSet "Linux RTC åˆå§‹åŒ–错误在 ioctl (rtc_irqp_set %lu): %s\n"
-#define MSGTR_IncreaseRTCMaxUserFreq "试图添加 \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" 到你的系统å¯åŠ¨è„šæœ¬ã€‚\n"
-#define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC åˆå§‹åŒ–错误在 ioctl (rtc_pie_on): %s\n"
+" è¿™å¯èƒ½æ˜¯ MPlayer 或者 你的驱动中 或者 ä½ çš„ gcc 版本中的一个缺陷。\n"\
+" 如你觉得这是 MPlayer 的问题,请阅读 DOCS/zh/bugreports.html\n"\
+" 并éµå¾ªå…¶ä¸­çš„指示去åšã€‚除éžä½ åœ¨æŠ¥å‘Šä¸€ä¸ªæ½œåœ¨çš„缺陷时候æ供我们\n"\
+" 所需è¦çš„ä¿¡æ¯ï¼Œå¦åˆ™æˆ‘们ä¸èƒ½ä¹Ÿä¸ä¼šå¸®åŠ©ä½ ã€‚\n"
+#define MSGTR_LoadingConfig "正在加载é…ç½® '%s'\n"
+#define MSGTR_LoadingProtocolProfile "加载å议相关的é…置集‘%s’\n"
+#define MSGTR_LoadingExtensionProfile "加载扩展组件相关的é…置集‘%s’\n"
+#define MSGTR_AddedSubtitleFile "字幕:添加字幕文件(%d):%s\n"
+#define MSGTR_RemovedSubtitleFile "字幕:移除字幕文件(%d): %s\n"
+#define MSGTR_ErrorOpeningOutputFile "以写入方å¼æ‰“开文件 [%s] 失败ï¼\n"
+#define MSGTR_CommandLine "命令行:"
+#define MSGTR_RTCDeviceNotOpenable "打开 %s 失败:%s(用户应当有æƒé™è¯»å–该设备。)\n"
+#define MSGTR_LinuxRTCInitErrorIrqpSet "ioctl (rtc_irqp_set %lu) 中出现 Linux RTC åˆå§‹åŒ–错误:%s\n"
+#define MSGTR_IncreaseRTCMaxUserFreq "å°è¯•æ·»åŠ  \"echo %lu > /proc/sys/dev/rtc/max-user-freq\" 到你的系统å¯åŠ¨è„šæœ¬ä¸­ã€‚\n"
+#define MSGTR_LinuxRTCInitErrorPieOn "ioctl (rtc_pie_on) 中出现 Linux RTC åˆå§‹åŒ–错误:%s\n"
#define MSGTR_UsingTimingType "正在使用 %s 计时。\n"
#define MSGTR_NoIdleAndGui "GMPLayer ä¸èƒ½ä½¿ç”¨é€‰é¡¹ -idle。\n"
-#define MSGTR_MenuInitialized "èœå•å·²åˆå§‹åŒ–: %s\n"
+#define MSGTR_MenuInitialized "èœå•å·²åˆå§‹åŒ–:%s\n"
#define MSGTR_MenuInitFailed "èœå•åˆå§‹åŒ–失败。\n"
-#define MSGTR_Getch2InitializedTwice "警告: getch2_init 被调用两次!\n"
-#define MSGTR_DumpstreamFdUnavailable "æ— æ³•è½¬å‚¨æ­¤æµ - 没有å¯ç”¨çš„文件æ述符。\n"
+#define MSGTR_Getch2InitializedTwice "警告:getch2_init 被两次调用ï¼\n"
+#define MSGTR_DumpstreamFdUnavailable "无法导出该数æ®æµ - 没有å¯ç”¨çš„文件æ述符。\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "ä¸èƒ½ç”¨æ ¹èœå• %s 打开 libmenu 视频过滤器。\n"
-#define MSGTR_AudioFilterChainPreinitError "音频过滤器链预å¯åŠ¨é”™è¯¯!\n"
-#define MSGTR_LinuxRTCReadError "Linux RTC 读å–错误: %s\n"
-#define MSGTR_SoftsleepUnderflow "警告! Softsleep å‘下溢出!\n"
-#define MSGTR_DvdnavNullEvent "DVDNAV 事件为空?!\n"
-#define MSGTR_DvdnavHighlightEventBroken "DVDNAV 事件: 高亮事件æŸå\n"
-#define MSGTR_DvdnavEvent "DVDNAV 事件: %s\n"
-#define MSGTR_DvdnavHighlightHide "DVDNAV 事件: 高亮éšè—\n"
-#define MSGTR_DvdnavStillFrame "######################################## DVDNAV 事件: é™æ­¢å¸§: %d秒\n"
-#define MSGTR_DvdnavNavStop "DVDNAV 事件: Navåœæ­¢\n"
-#define MSGTR_DvdnavNavNOP "DVDNAV 事件: Navæ— æ“作\n"
-#define MSGTR_DvdnavNavSpuStreamChangeVerbose "DVDNAV 事件: Nav SPU æµæ”¹å˜: 物ç†: %d/%d/%d 逻辑: %d\n"
-#define MSGTR_DvdnavNavSpuStreamChange "DVDNAV 事件: Nav SPU æµæ”¹å˜: 物ç†: %d 逻辑: %d\n"
-#define MSGTR_DvdnavNavAudioStreamChange "DVDNAV 事件: Nav 音频æµæ”¹å˜: 物ç†: %d 逻辑: %d\n"
-#define MSGTR_DvdnavNavVTSChange "DVDNAV 事件: Nav VTS 改å˜\n"
-#define MSGTR_DvdnavNavCellChange "DVDNAV 事件: Nav Cell 改å˜\n"
-#define MSGTR_DvdnavNavSpuClutChange "DVDNAV 事件: Nav SPU CLUT 改å˜\n"
-#define MSGTR_DvdnavNavSeekDone "DVDNAV 事件: Nav æœå¯»å®Œæˆ\n"
+#define MSGTR_AudioFilterChainPreinitError "音频过滤器链预åˆå§‹åŒ–错误ï¼\n"
+#define MSGTR_LinuxRTCReadError "Linux RTC 读å–错误:%s\n"
+#define MSGTR_SoftsleepUnderflow "警告ï¼Softsleep 数值下溢ï¼\n"
+#define MSGTR_DvdnavNullEvent "DVDNAV 事件为空?ï¼\n"
+#define MSGTR_DvdnavHighlightEventBroken "DVDNAV 事件:é‡è¦äº‹ä»¶æŸå\n"
+#define MSGTR_DvdnavEvent "DVDNAV 事件:%s\n"
+#define MSGTR_DvdnavHighlightHide "DVDNAV 事件:é‡è¦äº‹ä»¶éšè—\n"
+#define MSGTR_DvdnavStillFrame "######################################## DVDNAV 事件:é™æ­¢å¸§ï¼š%d 秒\n"
+#define MSGTR_DvdnavNavStop "DVDNAV 事件:Nav åœæ­¢\n"
+#define MSGTR_DvdnavNavNOP "DVDNAV 事件:Nav æ— æ“作\n"
+#define MSGTR_DvdnavNavSpuStreamChangeVerbose "DVDNAV 事件:Nav SPU æ•°æ®æµåˆ‡æ¢ï¼šç‰©ç†ä½ç½®ï¼š%d/%d/%d 逻辑ä½ç½®ï¼š%d\n"
+#define MSGTR_DvdnavNavSpuStreamChange "DVDNAV 事件:Nav SPU æ•°æ®æµåˆ‡æ¢ï¼šç‰©ç†ä½ç½®ï¼š%d 逻辑ä½ç½®ï¼š%d\n"
+#define MSGTR_DvdnavNavAudioStreamChange "DVDNAV 事件:Nav 音频æµåˆ‡æ¢ï¼šç‰©ç†ä½ç½®ï¼š%d 逻辑ä½ç½®ï¼š%d\n"
+#define MSGTR_DvdnavNavVTSChange "DVDNAV 事件:Nav VTS 切æ¢\n"
+#define MSGTR_DvdnavNavCellChange "DVDNAV 事件:Nav Cell 切æ¢\n"
+#define MSGTR_DvdnavNavSpuClutChange "DVDNAV 事件:Nav SPU CLUT 切æ¢\n"
+#define MSGTR_DvdnavNavSeekDone "DVDNAV 事件:Nav 定ä½å®Œæˆ\n"
#define MSGTR_MenuCall "èœå•è°ƒç”¨\n"
#define MSGTR_EdlOutOfMem "ä¸èƒ½åˆ†é…足够的内存æ¥ä¿æŒ EDL æ•°æ®ã€‚\n"
@@ -1290,6 +1290,12 @@ static char help_text[]=
#define MSGTR_INPUT_JOYSTICK_WarnLostSync "æ“纵æ†: 警告åˆå§‹äº‹ä»¶, 失去了和驱动的åŒæ­¥ã€‚\n"
#define MSGTR_INPUT_JOYSTICK_WarnUnknownEvent "æ“作æ†è­¦å‘ŠæœªçŸ¥äº‹ä»¶ç±»åž‹%d\n"
+// appleir.c
+
+#define MSGTR_INPUT_APPLE_IR_Init "在设备 %s 上åˆå§‹åŒ– Apple IR\n"
+#define MSGTR_INPUT_APPLE_IR_Detect "在设备 %s 上侦测到 Apple IR\n"
+#define MSGTR_INPUT_APPLE_IR_CantOpen "无法打开 Apple IR 设备:%s\n"
+
// input.c
#define MSGTR_INPUT_INPUT_ErrCantRegister2ManyCmdFds "命令文件æ述符太多, ä¸èƒ½æ³¨å†Œæ–‡ä»¶æ述符 %d。\n"
@@ -1700,6 +1706,7 @@ static char help_text[]=
#define MSGTR_LIBVO_MGA_IncompatibleDriverVersion "[MGA] ä½ çš„ mga_vid 驱动版本与 MPlayer 的版本ä¸å…¼å®¹!\n"
#define MSGTR_LIBVO_MGA_CouldntOpen "[MGA] 打ä¸å¼€: %s\n"
#define MGSTR_LIBVO_MGA_ResolutionTooHigh "[MGA] 原分辨率至少有一维大于 1023x1023。请用软件或用 -lavdopts lowres=1 é‡æ–°ç¼©æ”¾\n"
+#define MGSTR_LIBVO_MGA_mgavidVersionMismatch "[MGA] mga_vid 驱动的版本å·ï¼ˆ%u)与 MPlayer 编译时æ¤å…¥çš„ä¸ç¬¦ï¼ˆ%u)\n"
// libvo/vesa_lvo.c
@@ -1948,6 +1955,7 @@ static char help_text[]=
"[VO_XV] DOCS/HTML/en/video.html#xv!\n"\
"[VO_XV] 请å‚è§ 'mplayer -vo help' 找其它 (éž-xv) 视频输出驱动。\n"\
"[VO_XV] 试试 -vo x11.\n"
+#define MSGTR_LIBVO_XV_Adaptor "[VO_XV] 使用 Xv 转æ¢å™¨ #%d(%s)\n"
// loader/ldt_keeper.c
@@ -2028,7 +2036,7 @@ static char help_text[]=
#define MSGTR_LIBASS_ErrorOpeningFont "[ass] 打开字体出错: %s, %d\n"
// ass_fontconfig.c
-#define MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne "[ass] fontconfig: 选中的字体家æ—ä¸æ˜¯è¦æ±‚çš„: '%s' != '%s'\n"
+#define MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne "[ass] fontconfig:所选字体ä¸æ˜¯æ‰€è¦æ±‚使用的:'%s' != '%s'\n"
#define MSGTR_LIBASS_UsingDefaultFontFamily "[ass] fontconfig_select: 使用缺çœå­—体家æ—: (%s, %d, %d) -> %s, %d\n"
#define MSGTR_LIBASS_UsingDefaultFont "[ass] fontconfig_select: 使用缺çœå­—体: (%s, %d, %d) -> %s, %d\n"
#define MSGTR_LIBASS_UsingArialFontFamily "[ass] fontconfig_select: 使用 'Arial' 字体家æ—: (%s, %d, %d) -> %s, %d\n"
@@ -2059,7 +2067,7 @@ static char help_text[]=
#define MSGTR_LIBASS_EventHeightHasChanged "[ass] 警告! 事件高度(height) 已改å˜! \n"
// ass_font.c
-#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] å­—å½¢ 0x%X 未找到, é‡æ–°é€‰æ‹©å­—体 (%s, %d, %d)\n"
+#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] å­—å½¢ 0x%X 未找到,为 (%s, %d, %d) 选择å¦ä¸€ç§å­—体\n"
#define MSGTR_LIBASS_GlyphNotFound "[ass] 字形 0x%X 未在字体中找到 (%s, %d, %d)\n"
#define MSGTR_LIBASS_ErrorOpeningMemoryFont "[ass] 打开内存字体出错: %s\n"
#define MSGTR_LIBASS_NoCharmaps "[ass] 字体缺少字符映射表\n"
diff --git a/help/help_mp-zh_TW.h b/help/help_mp-zh_TW.h
index 4ef549898e..5ae59cfce5 100644
--- a/help/help_mp-zh_TW.h
+++ b/help/help_mp-zh_TW.h
@@ -162,7 +162,6 @@ static char help_text[]=
#define MSGTR_MenuInitFailed "èœå–®åˆå§‹åŒ–失敗。\n"
#define MSGTR_Getch2InitializedTwice "警告: getch2_init 被調用兩次!\n"
#define MSGTR_DumpstreamFdUnavailable "ç„¡æ³•è½‰å„²æ­¤æµ - 没有å¯ç”¨çš„文件æ述符。\n"
-#define MSGTR_FallingBackOnPlaylist "回退到試ç€è§£æžæ’­æ”¾åˆ—表 %s...\n"
#define MSGTR_CantOpenLibmenuFilterWithThisRootMenu "ä¸èƒ½ç”¨æ ¹èœå–® %s 打開 libmenu 視頻éŽæ¿¾å™¨ã€‚\n"
#define MSGTR_AudioFilterChainPreinitError "音頻éŽæ¿¾å™¨éˆé å•Ÿå‹•éŒ¯èª¤!\n"
#define MSGTR_LinuxRTCReadError "Linux RTC 讀å–錯誤: %s\n"
@@ -522,7 +521,7 @@ static char help_text[]=
#define MSGTR_SMBFileNotFound "打ä¸é–‹å±€åŸŸç¶²å†…çš„: '%s'\n"
#define MSGTR_SMBNotCompiled "MPlayer 没有編譯æˆæ”¯æŒ SMB 的讀å–。\n"
-#define MSGTR_CantOpenDVD "打ä¸é–‹ DVD 設備: %s\n"
+#define MSGTR_CantOpenDVD "打ä¸é–‹ DVD 設備: %s (%s)\n"
// stream_dvd.c
#define MSGTR_DVDspeedCantOpen "ä¸èƒ½ä»¥å¯«æ–¹å¼æ‰“é–‹DVD設備, 改變DVD速度需è¦å¯«æ–¹å¼ã€‚\n"
@@ -1189,8 +1188,6 @@ static char help_text[]=
"[AO_ALSA] device=<device-name>\n"\
"[AO_ALSA] 設置設備 (change , to . and : to =)\n"
#define MSGTR_AO_ALSA_ChannelsNotSupported "[AO_ALSA] %d è²é“ä¸è¢«æ”¯æŒã€‚\n"
-#define MSGTR_AO_ALSA_CannotReadAlsaConfiguration "[AO_ALSA] ä¸èƒ½è®€å– ALSA é…ç½®: %s\n"
-#define MSGTR_AO_ALSA_CannotCopyConfiguration "[AO_ALSA] ä¸èƒ½æ‹·è²é…ç½®: %s\n"
#define MSGTR_AO_ALSA_OpenInNonblockModeFailed "[AO_ALSA] 打開 nonblock-æ¨¡å¼ å¤±æ•—, 試ç€æ‰“é–‹ block-模å¼ã€‚\n"
#define MSGTR_AO_ALSA_PlaybackOpenError "[AO_ALSA] 回放打開錯誤: %s\n"
#define MSGTR_AO_ALSA_ErrorSetBlockMode "[AL_ALSA] 錯誤設置 block-æ¨¡å¼ %s。\n"
@@ -1955,7 +1952,6 @@ static char help_text[]=
#define MSGTR_RADIO_CaptureStarting "[radio] 開始æ•ç²ã€‚\n"
#define MSGTR_RADIO_ClearBufferFailed "[radio] 清空緩è¡å¤±æ•—: %s\n"
#define MSGTR_RADIO_StreamEnableCacheFailed "[radio] 調用 stream_enable_cache 失敗: %s\n"
-#define MSGTR_RADIO_DriverUnknownId "[radio] 未知驅動號: %d\n"
#define MSGTR_RADIO_DriverUnknownStr "[radio] 未知驅動å: %s\n"
#define MSGTR_RADIO_DriverV4L2 "[radio] 使用 V4Lv2 廣播接å£ã€‚\n"
#define MSGTR_RADIO_DriverV4L "[radio] 使用 V4Lv1 廣播接å£ã€‚\n"
@@ -2018,7 +2014,6 @@ static char help_text[]=
#define MSGTR_LIBASS_EmptyEvent "[ass] 空事件!\n"
#define MSGTR_LIBASS_MAX_GLYPHS_Reached "[ass] é”到了字形最大值: 事件 %d, 開始 = %llu, 時長 = %llu\n 文本 = %s\n"
#define MSGTR_LIBASS_EventHeightHasChanged "[ass] 警告! 事件高度(height) 已改變! \n"
-#define MSGTR_LIBASS_TooManySimultaneousEvents "[ass] éŽå¤šåŒæ™‚的事件!\n"
// ass_font.c
#define MSGTR_LIBASS_GlyphNotFoundReselectingFont "[ass] å­—å½¢ 0x%X 未找到, é‡æ–°é¸æ“‡å­—é«” (%s, %d, %d)\n"
diff --git a/input/appleir.c b/input/appleir.c
new file mode 100644
index 0000000000..756c66047d
--- /dev/null
+++ b/input/appleir.c
@@ -0,0 +1,152 @@
+/*
+ * Linux Apple IR Remote input interface
+ *
+ * Copyright (C) 2008 Benjamin Zores <ben at geexbox dot org>
+ *
+ * This file is part of MPlayer.
+ *
+ * MPlayer 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.
+ *
+ * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include "ar.h"
+#include "input.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <linux/types.h>
+#include <linux/input.h>
+
+#include "mp_msg.h"
+#include "help_mp.h"
+
+#define EVDEV_MAX_EVENTS 32
+
+/* ripped from AppleIR driver */
+#define USB_VENDOR_APPLE 0x05ac
+#define USB_DEV_APPLE_IR 0x8240
+#define USB_DEV_APPLE_IR_2 0x8242
+
+/* Apple IR Remote evdev mapping */
+#define APPLE_IR_MINUS KEY_VOLUMEDOWN
+#define APPLE_IR_PLUS KEY_VOLUMEUP
+#define APPLE_IR_MENU KEY_MENU
+#define APPLE_IR_FORWARD KEY_NEXTSONG
+#define APPLE_IR_PLAY KEY_PLAYPAUSE
+#define APPLE_IR_BACKWARD KEY_PREVIOUSSONG
+
+static const struct {
+ int linux_keycode;
+ int value;
+ int mp_keycode;
+} apple_ir_mapping[] = {
+ { APPLE_IR_PLAY, 1, AR_PLAY },
+ { APPLE_IR_PLAY, 2, AR_PLAY_HOLD },
+ { APPLE_IR_FORWARD, 1, AR_NEXT },
+ { APPLE_IR_FORWARD, 2, AR_NEXT_HOLD },
+ { APPLE_IR_BACKWARD, 1, AR_PREV },
+ { APPLE_IR_BACKWARD, 2, AR_PREV_HOLD },
+ { APPLE_IR_MENU, 1, AR_MENU },
+ { APPLE_IR_MENU, 2, AR_MENU_HOLD },
+ { APPLE_IR_PLUS, 1, AR_VUP },
+ { APPLE_IR_MINUS, 1, AR_VDOWN },
+ { -1, -1, -1 }
+};
+
+int mp_input_appleir_init (char *dev)
+{
+ int i, fd;
+
+ if (dev)
+ {
+ mp_msg (MSGT_INPUT, MSGL_V, MSGTR_INPUT_APPLE_IR_Init, dev);
+ fd = open (dev, O_RDONLY | O_NONBLOCK);
+ if (fd < 0)
+ {
+ mp_msg (MSGT_INPUT, MSGL_ERR,
+ MSGTR_INPUT_APPLE_IR_CantOpen, strerror (errno));
+ return -1;
+ }
+
+ return fd;
+ }
+ else
+ {
+ /* look for a valid AppleIR device on system */
+ for (i = 0; i < EVDEV_MAX_EVENTS; i++)
+ {
+ struct input_id id;
+ char file[64];
+
+ sprintf (file, "/dev/input/event%d", i);
+ fd = open (file, O_RDONLY | O_NONBLOCK);
+ if (fd < 0)
+ continue;
+
+ ioctl (fd, EVIOCGID, &id);
+ if (id.bustype == BUS_USB &&
+ id.vendor == USB_VENDOR_APPLE &&
+ (id.product == USB_DEV_APPLE_IR ||id.product == USB_DEV_APPLE_IR_2))
+ {
+ mp_msg (MSGT_INPUT, MSGL_V, MSGTR_INPUT_APPLE_IR_Detect, file);
+ return fd;
+ }
+ close (fd);
+ }
+
+ mp_msg (MSGT_INPUT, MSGL_ERR,
+ MSGTR_INPUT_APPLE_IR_CantOpen, strerror (errno));
+ }
+
+ return -1;
+}
+
+int mp_input_appleir_read(void *ctx, int fd)
+{
+ struct input_event ev;
+ int i, r;
+
+ r = read (fd, &ev, sizeof (struct input_event));
+ if (r <= 0 || r < sizeof (struct input_event))
+ return MP_INPUT_NOTHING;
+
+ /* check for key press only */
+ if (ev.type != EV_KEY)
+ return MP_INPUT_NOTHING;
+
+ /* EvDev Key values:
+ * 0: key release
+ * 1: key press
+ * 2: key auto-repeat
+ */
+ if (ev.value == 0)
+ return MP_INPUT_NOTHING;
+
+ /* find Linux evdev -> MPlayer keycode mapping */
+ for (i = 0; apple_ir_mapping[i].linux_keycode != -1; i++)
+ if (apple_ir_mapping[i].linux_keycode == ev.code &&
+ apple_ir_mapping[i].value == ev.value)
+ return apple_ir_mapping[i].mp_keycode;
+
+ return MP_INPUT_NOTHING;
+}
diff --git a/input/ar.h b/input/ar.h
index a52dccc4c8..12944f84e1 100644
--- a/input/ar.h
+++ b/input/ar.h
@@ -35,8 +35,13 @@
#define AR_VUP (AR_BASE + 8)
#define AR_VDOWN (AR_BASE + 9)
+/* MacOSX Driver */
int mp_input_ar_init(void);
int mp_input_ar_read(void *ctx, int fd);
void mp_input_ar_close(int fd);
+/* Linux Driver */
+int mp_input_appleir_init(char* dev);
+int mp_input_appleir_read(void *ctx, int fd);
+
#endif /* MPLAYER_AR_H */
diff --git a/input/input.c b/input/input.c
index dee2f3a7f7..940076aab6 100644
--- a/input/input.c
+++ b/input/input.c
@@ -75,6 +75,7 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_SPEED_MULT, "speed_mult", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
{ MP_CMD_SPEED_SET, "speed_set", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
{ MP_CMD_QUIT, "quit", 0, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
+ { MP_CMD_STOP, "stop", 0, { {-1,{0}} } },
{ MP_CMD_PAUSE, "pause", 0, { {-1,{0}} } },
{ MP_CMD_FRAME_STEP, "frame_step", 0, { {-1,{0}} } },
{ MP_CMD_PLAY_TREE_STEP, "pt_step",1, { { MP_CMD_ARG_INT ,{0}}, { MP_CMD_ARG_INT ,{0}}, {-1,{0}} } },
@@ -484,6 +485,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = {
{ { '!', 0 }, "seek_chapter -1" },
{ { '@', 0 }, "seek_chapter 1" },
{ { 'A', 0 }, "switch_angle 1" },
+ { { 'U', 0 }, "stop" },
{ { 0 }, NULL }
};
@@ -599,6 +601,7 @@ static const m_option_t input_conf[] = {
{ "keylist", print_key_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL },
{ "cmdlist", print_cmd_list, CONF_TYPE_FUNC, CONF_GLOBAL, 0, 0, NULL },
OPT_STRING("js-dev", input.js_dev, CONF_GLOBAL),
+ OPT_STRING("ar-dev", input.ar_dev, CONF_GLOBAL),
OPT_STRING("file", input.in_file, CONF_GLOBAL),
{ NULL, NULL, 0, 0, 0, 0, NULL}
};
@@ -1741,6 +1744,17 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui)
}
#endif
+#ifdef HAVE_APPLE_IR
+ if (input_conf->use_ar) {
+ int fd = mp_input_appleir_init(input_conf->ar_dev);
+ if(fd < 0)
+ mp_msg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_INPUT_ErrCantInitAppleRemote);
+ else
+ mp_input_add_key_fd(ictx, fd, 1, mp_input_appleir_read,
+ (mp_close_func_t)close, NULL);
+ }
+#endif
+
if (input_conf->in_file) {
struct stat st;
if (stat(input_conf->in_file, &st))
diff --git a/input/input.h b/input/input.h
index 0a09f68d2c..9f87d57596 100644
--- a/input/input.h
+++ b/input/input.h
@@ -109,6 +109,7 @@
#define MP_CMD_SWITCH_ANGLE 105
#define MP_CMD_ASS_USE_MARGINS 106
#define MP_CMD_SWITCH_TITLE 107
+#define MP_CMD_STOP 108
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001
diff --git a/input/joystick.c b/input/joystick.c
index 02e00d207f..d50b8678a2 100644
--- a/input/joystick.c
+++ b/input/joystick.c
@@ -120,9 +120,9 @@ int mp_input_joystick_read(void *ctx, int fd) {
btns &= ~(1 << ev.number);
btns |= (ev.value << ev.number);
if(ev.value == 1)
- return ((JOY_BTN0+ev.number) | MP_KEY_DOWN);
+ return (JOY_BTN0 + ev.number) | MP_KEY_DOWN;
else
- return (JOY_BTN0+ev.number);
+ return JOY_BTN0 + ev.number;
} else if(ev.type & JS_EVENT_AXIS) {
if(ev.value < -JOY_AXIS_DELTA && axis[ev.number] != -1) {
axis[ev.number] = -1;
diff --git a/liba52/imdct.c b/liba52/imdct.c
index c5ebc94dc4..4b88e6cea3 100644
--- a/liba52/imdct.c
+++ b/liba52/imdct.c
@@ -382,10 +382,10 @@ void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias)
#define WORD_s2 0x18,0x19,0x1a,0x1b
#define WORD_s3 0x1c,0x1d,0x1e,0x1f
-#ifdef __APPLE_CC__
-#define AVV(x...) (x)
-#else
+#ifdef HAVE_ALTIVEC_VECTOR_BRACES
#define AVV(x...) {x}
+#else
+#define AVV(x...) (x)
#endif
#define vcprm(a,b,c,d) (const vector unsigned char)AVV(WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d)
diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff
index 304ba4014c..3c67c0d0fd 100644
--- a/liba52/liba52_changes.diff
+++ b/liba52/liba52_changes.diff
@@ -1563,10 +1563,10 @@
+#define WORD_s2 0x18,0x19,0x1a,0x1b
+#define WORD_s3 0x1c,0x1d,0x1e,0x1f
+
-+#ifdef __APPLE_CC__
-+#define AVV(x...) (x)
-+#else
++#ifdef HAVE_ALTIVEC_VECTOR_BRACES
+#define AVV(x...) {x}
++#else
++#define AVV(x...) (x)
+#endif
+
+#define vcprm(a,b,c,d) (const vector unsigned char)AVV(WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d)
diff --git a/libaf/window.c b/libaf/window.c
index 715257d9df..d54a3cb493 100644
--- a/libaf/window.c
+++ b/libaf/window.c
@@ -157,7 +157,7 @@ static FLOAT_TYPE besselizero(FLOAT_TYPE x)
sum += u;
n++;
} while (u >= BIZ_EPSILON * sum);
- return(sum);
+ return sum;
}
/*
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c
index 53a9768730..0d925ce9e3 100644
--- a/libao2/ao_alsa.c
+++ b/libao2/ao_alsa.c
@@ -232,7 +232,7 @@ static int control(int cmd, void *arg)
}
} //end switch
- return(CONTROL_UNKNOWN);
+ return CONTROL_UNKNOWN;
}
static void parse_device (char *dest, const char *src, int len)
@@ -498,11 +498,11 @@ static int init(int rate_hz, int channels, int format, int flags)
mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_OpenInNonblockModeFailed);
if ((err = try_open_device(alsa_device, 0, format == AF_FORMAT_AC3)) < 0) {
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err));
- return(0);
+ return 0;
}
} else {
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err));
- return(0);
+ return 0;
}
}
@@ -520,7 +520,7 @@ static int init(int rate_hz, int channels, int format, int flags)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetInitialParameters,
snd_strerror(err));
- return(0);
+ return 0;
}
err = snd_pcm_hw_params_set_access(alsa_handler, alsa_hwparams,
@@ -528,7 +528,7 @@ static int init(int rate_hz, int channels, int format, int flags)
if (err < 0) {
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetAccessType,
snd_strerror(err));
- return (0);
+ return 0;
}
/* workaround for nonsupported formats
@@ -547,7 +547,7 @@ static int init(int rate_hz, int channels, int format, int flags)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetFormat,
snd_strerror(err));
- return(0);
+ return 0;
}
if ((err = snd_pcm_hw_params_set_channels_near(alsa_handler, alsa_hwparams,
@@ -555,7 +555,7 @@ static int init(int rate_hz, int channels, int format, int flags)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetChannels,
snd_strerror(err));
- return(0);
+ return 0;
}
/* workaround for buggy rate plugin (should be fixed in ALSA 1.0.11)
@@ -566,7 +566,7 @@ static int init(int rate_hz, int channels, int format, int flags)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToDisableResampling,
snd_strerror(err));
- return(0);
+ return 0;
}
#endif
@@ -575,7 +575,7 @@ static int init(int rate_hz, int channels, int format, int flags)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetSamplerate2,
snd_strerror(err));
- return(0);
+ return 0;
}
bytes_per_sample = snd_pcm_format_physical_width(alsa_format) / 8;
@@ -592,7 +592,7 @@ static int init(int rate_hz, int channels, int format, int flags)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetBufferTimeNear,
snd_strerror(err));
- return(0);
+ return 0;
} else
alsa_buffer_time = err;
@@ -711,7 +711,7 @@ static int init(int rate_hz, int channels, int format, int flags)
} // end switch alsa_handler (spdif)
alsa_can_pause = snd_pcm_hw_params_can_pause(alsa_hwparams);
- return(1);
+ return 1;
} // end init
@@ -837,7 +837,7 @@ static int play(void* data, int len, int flags)
mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_TryingToResetSoundcard);
if ((res = snd_pcm_prepare(alsa_handler)) < 0) {
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(res));
- return(0);
+ return 0;
break;
}
}
@@ -857,13 +857,13 @@ static int get_space(void)
if ((ret = snd_pcm_status(alsa_handler, status)) < 0)
{
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_CannotGetPcmStatus, snd_strerror(ret));
- return(0);
+ return 0;
}
ret = snd_pcm_status_get_avail(status) * bytes_per_sample;
if (ret > ao_data.buffersize) // Buffer underrun?
ret = ao_data.buffersize;
- return(ret);
+ return ret;
}
/* delay in seconds between first and last sample in buffer */
@@ -884,6 +884,6 @@ static float get_delay(void)
}
return (float)delay / (float)ao_data.samplerate;
} else {
- return(0);
+ return 0;
}
}
diff --git a/libao2/ao_alsa5.c b/libao2/ao_alsa5.c
index 84de03cfab..7bec0371e6 100644
--- a/libao2/ao_alsa5.c
+++ b/libao2/ao_alsa5.c
@@ -35,7 +35,7 @@ static int alsa_rate = SND_PCM_RATE_CONTINUOUS;
/* to set/get/query special features/parameters */
static int control(int cmd, void *arg)
{
- return(CONTROL_UNKNOWN);
+ return CONTROL_UNKNOWN;
}
/*
@@ -62,7 +62,7 @@ static int init(int rate_hz, int channels, int format, int flags)
if ((cards = snd_cards()) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_SoundCardNotFound);
- return(0);
+ return 0;
}
ao_data.format = format;
@@ -112,7 +112,7 @@ static int init(int rate_hz, int channels, int format, int flags)
break;
case -1:
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_InvalidFormatReq,af_fmt2str_short(format));
- return(0);
+ return 0;
default:
break;
}
@@ -164,13 +164,13 @@ static int init(int rate_hz, int channels, int format, int flags)
if ((err = snd_pcm_open(&alsa_handler, 0, 0, SND_PCM_OPEN_PLAYBACK)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PlayBackError, snd_strerror(err));
- return(0);
+ return 0;
}
if ((err = snd_pcm_info(alsa_handler, &info)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmInfoError, snd_strerror(err));
- return(0);
+ return 0;
}
mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_ALSA5_SoundcardsFound,
@@ -183,7 +183,7 @@ static int init(int rate_hz, int channels, int format, int flags)
if ((err = snd_pcm_channel_info(alsa_handler, &chninfo)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PcmChanInfoError, snd_strerror(err));
- return(0);
+ return 0;
}
#ifndef __QNX__
@@ -207,7 +207,7 @@ static int init(int rate_hz, int channels, int format, int flags)
if ((err = snd_pcm_channel_params(alsa_handler, &params)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_CantSetParms, snd_strerror(err));
- return(0);
+ return 0;
}
memset(&setup, 0, sizeof(setup));
@@ -220,19 +220,19 @@ static int init(int rate_hz, int channels, int format, int flags)
if ((err = snd_pcm_channel_setup(alsa_handler, &setup)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_CantSetChan, snd_strerror(err));
- return(0);
+ return 0;
}
if ((err = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_ChanPrepareError, snd_strerror(err));
- return(0);
+ return 0;
}
mp_msg(MSGT_AO, MSGL_INFO, "AUDIO: %d Hz/%d channels/%d bps/%d bytes buffer/%s\n",
ao_data.samplerate, ao_data.channels, ao_data.bps, ao_data.buffersize,
snd_pcm_get_format_name(alsa_format.format));
- return(1);
+ return 1;
}
/* close audio device */
@@ -321,7 +321,7 @@ static int play(void* data, int len, int flags)
int got_len;
if (!len)
- return(0);
+ return 0;
if ((got_len = snd_pcm_write(alsa_handler, data, len)) < 0)
{
@@ -331,20 +331,20 @@ static int play(void* data, int len, int flags)
if ((got_len = snd_pcm_channel_prepare(alsa_handler, SND_PCM_CHANNEL_PLAYBACK)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_PlaybackPrepareError, snd_strerror(got_len));
- return(0);
+ return 0;
}
if ((got_len = snd_pcm_write(alsa_handler, data, len)) < 0)
{
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_WriteErrorAfterReset,
snd_strerror(got_len));
- return(0);
+ return 0;
}
- return(got_len); /* 2nd write was ok */
+ return got_len; /* 2nd write was ok */
}
mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_ALSA5_OutPutError, snd_strerror(got_len));
- return(0);
+ return 0;
}
- return(got_len);
+ return got_len;
}
/* how many byes are free in the buffer */
@@ -355,9 +355,9 @@ static int get_space(void)
ch_stat.channel = SND_PCM_CHANNEL_PLAYBACK;
if (snd_pcm_channel_status(alsa_handler, &ch_stat) < 0)
- return(0); /* error occurred */
+ return 0; /* error occurred */
else
- return(ch_stat.free);
+ return ch_stat.free;
}
/* delay in seconds between first and last sample in buffer */
@@ -368,7 +368,7 @@ static float get_delay(void)
ch_stat.channel = SND_PCM_CHANNEL_PLAYBACK;
if (snd_pcm_channel_status(alsa_handler, &ch_stat) < 0)
- return((float)ao_data.buffersize/(float)ao_data.bps); /* error occurred */
+ return (float)ao_data.buffersize/(float)ao_data.bps; /* error occurred */
else
- return((float)ch_stat.count/(float)ao_data.bps);
+ return (float)ch_stat.count/(float)ao_data.bps;
}
diff --git a/libao2/ao_arts.c b/libao2/ao_arts.c
index 96379560a0..092fe20dd4 100644
--- a/libao2/ao_arts.c
+++ b/libao2/ao_arts.c
@@ -37,7 +37,7 @@ LIBAO_EXTERN(arts)
static int control(int cmd, void *arg)
{
- return(CONTROL_UNKNOWN);
+ return CONTROL_UNKNOWN;
}
static int init(int rate_hz, int channels, int format, int flags)
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index 3d460a9bfb..0437b39a24 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -231,7 +231,7 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
/* Open the audio device and start playing sound! */
if(SDL_OpenAudio(&aspec, &obtained) < 0) {
mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_SDL_CantOpenAudio, SDL_GetError());
- return(0);
+ return 0;
}
/* did we got what we wanted ? */
diff --git a/libass/ass.c b/libass/ass.c
index 5c750d6852..55a4a79b7f 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -163,7 +163,7 @@ static void rskip_spaces(char** str, char* limit) {
static int lookup_style(ass_track_t* track, char* name) {
int i;
if (*name == '*') ++name; // FIXME: what does '*' really mean ?
- for (i=0; i<track->n_styles; ++i) {
+ for (i = track->n_styles - 1; i >= 0; --i) {
// FIXME: mb strcasecmp ?
if (strcmp(track->styles[i].Name, name) == 0)
return i;
@@ -846,16 +846,22 @@ static char* sub_recode(char* data, size_t size, char* codepage)
char* ip;
char* op;
size_t rc;
+ int clear = 0;
- outbuf = malloc(size);
+ outbuf = malloc(osize);
ip = data;
op = outbuf;
- while (ileft) {
- rc = iconv(icdsc, &ip, &ileft, &op, &oleft);
+ while (1) {
+ if (ileft)
+ rc = iconv(icdsc, &ip, &ileft, &op, &oleft);
+ else {// clear the conversion state and leave
+ clear = 1;
+ rc = iconv(icdsc, NULL, NULL, &op, &oleft);
+ }
if (rc == (size_t)(-1)) {
if (errno == E2BIG) {
- int offset = op - outbuf;
+ size_t offset = op - outbuf;
outbuf = (char*)realloc(outbuf, osize + size);
op = outbuf + offset;
osize += size;
@@ -864,7 +870,9 @@ static char* sub_recode(char* data, size_t size, char* codepage)
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorRecodingFile);
return NULL;
}
- }
+ } else
+ if (clear)
+ break;
}
outbuf[osize - oleft - 1] = 0;
}
diff --git a/libass/ass_cache.c b/libass/ass_cache.c
index 1269d04409..41645c4a48 100644
--- a/libass/ass_cache.c
+++ b/libass/ass_cache.c
@@ -86,7 +86,7 @@ static unsigned hashmap_hash(void* buf, size_t len)
static int hashmap_key_compare(void* a, void* b, size_t size)
{
- return (memcmp(a, b, size) == 0);
+ return memcmp(a, b, size) == 0;
}
static void hashmap_item_dtor(void* key, size_t key_size, void* value, size_t value_size)
diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c
index b66dad7e60..ccbb47086f 100644
--- a/libass/ass_fontconfig.c
+++ b/libass/ass_fontconfig.c
@@ -150,11 +150,13 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
if (curf >= fset->nfont)
goto error;
+#if (FC_VERSION >= 20297)
// Remove all extra family names from original pattern.
// After this, FcFontRenderPrepare will select the most relevant family
// name in case there are more than one of them.
for (; family_cnt > 1; --family_cnt)
FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
+#endif
rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);
if (!rpat)
@@ -349,35 +351,39 @@ static void process_fontdata(fc_instance_t* priv, ass_library_t* library, FT_Lib
FcPattern* pattern;
FcFontSet* fset;
FcBool res;
+ int face_index, num_faces = 1;
- rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, 0, &face);
- if (rc) {
- mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorOpeningMemoryFont, name);
- return;
- }
+ for (face_index = 0; face_index < num_faces; ++face_index) {
+ rc = FT_New_Memory_Face(ftlibrary, (unsigned char*)data, data_size, face_index, &face);
+ if (rc) {
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_ErrorOpeningMemoryFont, name);
+ return;
+ }
+ num_faces = face->num_faces;
- pattern = FcFreeTypeQueryFace(face, (unsigned char*)name, 0, FcConfigGetBlanks(priv->config));
- if (!pattern) {
- mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FunctionCallFailed, "FcFreeTypeQueryFace");
- FT_Done_Face(face);
- return;
- }
+ pattern = FcFreeTypeQueryFace(face, (unsigned char*)name, 0, FcConfigGetBlanks(priv->config));
+ if (!pattern) {
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FunctionCallFailed, "FcFreeTypeQueryFace");
+ FT_Done_Face(face);
+ return;
+ }
- fset = FcConfigGetFonts(priv->config, FcSetSystem); // somehow it failes when asked for FcSetApplication
- if (!fset) {
- mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FunctionCallFailed, "FcConfigGetFonts");
- FT_Done_Face(face);
- return;
- }
+ fset = FcConfigGetFonts(priv->config, FcSetSystem); // somehow it failes when asked for FcSetApplication
+ if (!fset) {
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FunctionCallFailed, "FcConfigGetFonts");
+ FT_Done_Face(face);
+ return;
+ }
+
+ res = FcFontSetAdd(fset, pattern);
+ if (!res) {
+ mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FunctionCallFailed, "FcFontSetAdd");
+ FT_Done_Face(face);
+ return;
+ }
- res = FcFontSetAdd(fset, pattern);
- if (!res) {
- mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FunctionCallFailed, "FcFontSetAdd");
FT_Done_Face(face);
- return;
}
-
- FT_Done_Face(face);
#endif
}
diff --git a/libmenu/menu_filesel.c b/libmenu/menu_filesel.c
index 92d9728658..d656c11c70 100644
--- a/libmenu/menu_filesel.c
+++ b/libmenu/menu_filesel.c
@@ -241,7 +241,7 @@ static int open_dir(menu_t* menu,char* args) {
if(dp->d_name[0] == '.' && strcmp(dp->d_name,"..") != 0)
continue;
if (menu_chroot && !strcmp (dp->d_name,"..")) {
- int len = strlen (menu_chroot);
+ size_t len = strlen (menu_chroot);
if ((strlen (mpriv->dir) == len || strlen (mpriv->dir) == len + 1)
&& !strncmp (mpriv->dir, menu_chroot, len))
continue;
diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c
index 2cd68f3205..0cbf35cf53 100644
--- a/libmenu/vf_menu.c
+++ b/libmenu/vf_menu.c
@@ -215,7 +215,7 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in
}
static int query_format(struct vf_instance* vf, unsigned int fmt){
- return (vf_next_query_format(vf,fmt));
+ return vf_next_query_format(vf, fmt);
}
static int open_vf(vf_instance_t *vf, char* args){
diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c
index 0c1db05c69..f177d94195 100644
--- a/libmpcodecs/ad_hwac3.c
+++ b/libmpcodecs/ad_hwac3.c
@@ -128,14 +128,17 @@ static int init(sh_audio_t *sh_audio)
}
if(ac3dts_fillbuff(sh_audio) < 0)
{
+ a52_free(a52_state);
mp_msg(MSGT_DECAUDIO, MSGL_ERR, "AC3/DTS sync failed\n");
return 0;
}
+ sh_audio->context = a52_state;
return 1;
}
static void uninit(sh_audio_t *sh)
{
+ a52_free(sh->context);
}
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c
index 6cb7cca612..a47f2183ef 100644
--- a/libmpcodecs/ad_liba52.c
+++ b/libmpcodecs/ad_liba52.c
@@ -253,6 +253,7 @@ while(sh_audio->channels>0){
static void uninit(sh_audio_t *sh)
{
+ a52_free(a52_state);
}
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c
index bd26531ae4..3915101ae4 100644
--- a/libmpcodecs/ad_twin.c
+++ b/libmpcodecs/ad_twin.c
@@ -216,7 +216,7 @@ static int bread(char *data, /* Output: Output data array */
}
iptr = priv->ptr; /* current file data buffer pointer */
if ( iptr >= priv->nbuf ) /* If data file is empty then return */
- return(retval);
+ return retval;
ibufadr = iptr/BYTE_BIT; /* current file data buffer address */
ibufbit = iptr%BYTE_BIT; /* current file data buffer bit */
/* tmpdat = stream->buf[ibufadr] >> (BYTE_BIT-ibufbit-1); */
@@ -235,7 +235,7 @@ static int bread(char *data, /* Output: Output data array */
}
++retval;
}
- return(retval);
+ return retval;
}
#define BITS_INT (sizeof(int)*8)
@@ -266,7 +266,7 @@ static int get_bstm(int *data, /* Input: input data */
mask >>= 1;
}
*data = work;
- return(retval);
+ return retval;
}
static int GetVqInfo( tvqConfInfoSubBlock *cfg,
diff --git a/libmpcodecs/ae_lame.c b/libmpcodecs/ae_lame.c
index 433fdc1fd0..80242dd351 100644
--- a/libmpcodecs/ae_lame.c
+++ b/libmpcodecs/ae_lame.c
@@ -122,7 +122,7 @@ static int encode_lame(audio_encoder_t *encoder, uint8_t *dest, void *src, int l
else
n = lame_encode_buffer_interleaved(lame,(short *)src, len/4, dest, max_size);
- return (n < 0 ? 0 : n);
+ return n < 0 ? 0 : n;
}
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index b2c4b518ba..9293ee4b8d 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -89,7 +89,7 @@ int set_video_colors(sh_video_t *sh_video, const char *item, int value)
if (vf) {
int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, &data);
if (ret == CONTROL_TRUE)
- return (1);
+ return 1;
}
/* try software control */
const struct vd_functions *vd = sh_video->vd_driver;
@@ -114,7 +114,7 @@ int get_video_colors(sh_video_t *sh_video, const char *item, int *value)
int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, &data);
if (ret == CONTROL_TRUE) {
*value = data.value;
- return (1);
+ return 1;
}
}
/* try software control */
@@ -133,7 +133,7 @@ int set_rectangle(sh_video_t *sh_video, int param, int value)
if (vf) {
int ret = vf->control(vf, VFCTRL_CHANGE_RECTANGLE, data);
if (ret)
- return (1);
+ return 1;
}
return 0;
}
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c
index 72a71b66cf..30df2391f4 100644
--- a/libmpcodecs/img_format.c
+++ b/libmpcodecs/img_format.c
@@ -7,66 +7,66 @@ const char *vo_format_name(int format)
static char unknown_format[20];
switch(format)
{
- case IMGFMT_RGB1: return("RGB 1-bit");
- case IMGFMT_RGB4: return("RGB 4-bit");
- case IMGFMT_RG4B: return("RGB 4-bit per byte");
- case IMGFMT_RGB8: return("RGB 8-bit");
- case IMGFMT_RGB15: return("RGB 15-bit");
- case IMGFMT_RGB16: return("RGB 16-bit");
- case IMGFMT_RGB24: return("RGB 24-bit");
-// case IMGFMT_RGB32: return("RGB 32-bit");
- case IMGFMT_BGR1: return("BGR 1-bit");
- case IMGFMT_BGR4: return("BGR 4-bit");
- case IMGFMT_BG4B: return("BGR 4-bit per byte");
- case IMGFMT_BGR8: return("BGR 8-bit");
- case IMGFMT_BGR15: return("BGR 15-bit");
- case IMGFMT_BGR16: return("BGR 16-bit");
- case IMGFMT_BGR24: return("BGR 24-bit");
-// case IMGFMT_BGR32: return("BGR 32-bit");
- case IMGFMT_ABGR: return("ABGR");
- case IMGFMT_BGRA: return("BGRA");
- case IMGFMT_ARGB: return("ARGB");
- case IMGFMT_RGBA: return("RGBA");
- case IMGFMT_YVU9: return("Planar YVU9");
- case IMGFMT_IF09: return("Planar IF09");
- case IMGFMT_YV12: return("Planar YV12");
- case IMGFMT_I420: return("Planar I420");
- case IMGFMT_IYUV: return("Planar IYUV");
- case IMGFMT_CLPL: return("Planar CLPL");
- case IMGFMT_Y800: return("Planar Y800");
- case IMGFMT_Y8: return("Planar Y8");
- case IMGFMT_444P: return("Planar 444P");
- case IMGFMT_422P: return("Planar 422P");
- case IMGFMT_411P: return("Planar 411P");
- case IMGFMT_NV12: return("Planar NV12");
- case IMGFMT_NV21: return("Planar NV21");
- case IMGFMT_HM12: return("Planar NV12 Macroblock");
- case IMGFMT_IUYV: return("Packed IUYV");
- case IMGFMT_IY41: return("Packed IY41");
- case IMGFMT_IYU1: return("Packed IYU1");
- case IMGFMT_IYU2: return("Packed IYU2");
- case IMGFMT_UYVY: return("Packed UYVY");
- case IMGFMT_UYNV: return("Packed UYNV");
- case IMGFMT_cyuv: return("Packed CYUV");
- case IMGFMT_Y422: return("Packed Y422");
- case IMGFMT_YUY2: return("Packed YUY2");
- case IMGFMT_YUNV: return("Packed YUNV");
- case IMGFMT_YVYU: return("Packed YVYU");
- case IMGFMT_Y41P: return("Packed Y41P");
- case IMGFMT_Y211: return("Packed Y211");
- case IMGFMT_Y41T: return("Packed Y41T");
- case IMGFMT_Y42T: return("Packed Y42T");
- case IMGFMT_V422: return("Packed V422");
- case IMGFMT_V655: return("Packed V655");
- case IMGFMT_CLJR: return("Packed CLJR");
- case IMGFMT_YUVP: return("Packed YUVP");
- case IMGFMT_UYVP: return("Packed UYVP");
- case IMGFMT_MPEGPES: return("Mpeg PES");
- case IMGFMT_ZRMJPEGNI: return("Zoran MJPEG non-interlaced");
- case IMGFMT_ZRMJPEGIT: return("Zoran MJPEG top field first");
- case IMGFMT_ZRMJPEGIB: return("Zoran MJPEG bottom field first");
- case IMGFMT_XVMC_MOCO_MPEG2: return("MPEG1/2 Motion Compensation");
- case IMGFMT_XVMC_IDCT_MPEG2: return("MPEG1/2 Motion Compensation and IDCT");
+ case IMGFMT_RGB1: return "RGB 1-bit";
+ case IMGFMT_RGB4: return "RGB 4-bit";
+ case IMGFMT_RG4B: return "RGB 4-bit per byte";
+ case IMGFMT_RGB8: return "RGB 8-bit";
+ case IMGFMT_RGB15: return "RGB 15-bit";
+ case IMGFMT_RGB16: return "RGB 16-bit";
+ case IMGFMT_RGB24: return "RGB 24-bit";
+// case IMGFMT_RGB32: return "RGB 32-bit";
+ case IMGFMT_BGR1: return "BGR 1-bit";
+ case IMGFMT_BGR4: return "BGR 4-bit";
+ case IMGFMT_BG4B: return "BGR 4-bit per byte";
+ case IMGFMT_BGR8: return "BGR 8-bit";
+ case IMGFMT_BGR15: return "BGR 15-bit";
+ case IMGFMT_BGR16: return "BGR 16-bit";
+ case IMGFMT_BGR24: return "BGR 24-bit";
+// case IMGFMT_BGR32: return "BGR 32-bit";
+ case IMGFMT_ABGR: return "ABGR";
+ case IMGFMT_BGRA: return "BGRA";
+ case IMGFMT_ARGB: return "ARGB";
+ case IMGFMT_RGBA: return "RGBA";
+ case IMGFMT_YVU9: return "Planar YVU9";
+ case IMGFMT_IF09: return "Planar IF09";
+ case IMGFMT_YV12: return "Planar YV12";
+ case IMGFMT_I420: return "Planar I420";
+ case IMGFMT_IYUV: return "Planar IYUV";
+ case IMGFMT_CLPL: return "Planar CLPL";
+ case IMGFMT_Y800: return "Planar Y800";
+ case IMGFMT_Y8: return "Planar Y8";
+ case IMGFMT_444P: return "Planar 444P";
+ case IMGFMT_422P: return "Planar 422P";
+ case IMGFMT_411P: return "Planar 411P";
+ case IMGFMT_NV12: return "Planar NV12";
+ case IMGFMT_NV21: return "Planar NV21";
+ case IMGFMT_HM12: return "Planar NV12 Macroblock";
+ case IMGFMT_IUYV: return "Packed IUYV";
+ case IMGFMT_IY41: return "Packed IY41";
+ case IMGFMT_IYU1: return "Packed IYU1";
+ case IMGFMT_IYU2: return "Packed IYU2";
+ case IMGFMT_UYVY: return "Packed UYVY";
+ case IMGFMT_UYNV: return "Packed UYNV";
+ case IMGFMT_cyuv: return "Packed CYUV";
+ case IMGFMT_Y422: return "Packed Y422";
+ case IMGFMT_YUY2: return "Packed YUY2";
+ case IMGFMT_YUNV: return "Packed YUNV";
+ case IMGFMT_YVYU: return "Packed YVYU";
+ case IMGFMT_Y41P: return "Packed Y41P";
+ case IMGFMT_Y211: return "Packed Y211";
+ case IMGFMT_Y41T: return "Packed Y41T";
+ case IMGFMT_Y42T: return "Packed Y42T";
+ case IMGFMT_V422: return "Packed V422";
+ case IMGFMT_V655: return "Packed V655";
+ case IMGFMT_CLJR: return "Packed CLJR";
+ case IMGFMT_YUVP: return "Packed YUVP";
+ case IMGFMT_UYVP: return "Packed UYVP";
+ case IMGFMT_MPEGPES: return "Mpeg PES";
+ case IMGFMT_ZRMJPEGNI: return "Zoran MJPEG non-interlaced";
+ case IMGFMT_ZRMJPEGIT: return "Zoran MJPEG top field first";
+ case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first";
+ case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation";
+ case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT";
}
snprintf(unknown_format,20,"Unknown 0x%04x",format);
return unknown_format;
diff --git a/libmpcodecs/native/rtjpegn.h b/libmpcodecs/native/rtjpegn.h
index 21bd939311..a854818e2f 100644
--- a/libmpcodecs/native/rtjpegn.h
+++ b/libmpcodecs/native/rtjpegn.h
@@ -21,8 +21,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef RTJPEGN_H
-#define RTJPEGN_H
+#ifndef MPLAYER_RTJPEGN_H
+#define MPLAYER_RTJPEGN_H
#include <stdint.h>
@@ -58,4 +58,4 @@ extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride);
extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride);
extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride);
-#endif /* RTJPEGN_H */
+#endif /* MPLAYER_RTJPEGN_H */
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index d3cf55cdc4..68cc62dd99 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -211,7 +211,7 @@ static int init(sh_video_t *sh){
ctx = sh->context = malloc(sizeof(vd_ffmpeg_ctx));
if (!ctx)
- return(0);
+ return 0;
memset(ctx, 0, sizeof(vd_ffmpeg_ctx));
lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh->codec->dll);
diff --git a/libmpcodecs/vd_qtvideo.c b/libmpcodecs/vd_qtvideo.c
index a690257875..a79f7db490 100644
--- a/libmpcodecs/vd_qtvideo.c
+++ b/libmpcodecs/vd_qtvideo.c
@@ -196,7 +196,7 @@ static int init(sh_video_t *sh){
prev=FindNextComponent(NULL,&desc);
if(!prev){
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot find requested component\n");
- return(0);
+ return 0;
}
mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Found it! ID = %p\n",prev);
@@ -278,7 +278,7 @@ static int init(sh_video_t *sh){
break;
default:
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Unknown requested csp\n");
- return(0);
+ return 0;
}
mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), (char *)&qt_imgfmt);
sh->context = (void *)qt_imgfmt;
diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c
index 5070266aab..b2cb72ba86 100644
--- a/libmpcodecs/vd_realvid.c
+++ b/libmpcodecs/vd_realvid.c
@@ -427,5 +427,5 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
(sh->disp_w != transform_out[3] || sh->disp_h != transform_out[4]))
initialized = 0;
- return (result?NULL:mpi);
+ return result ? NULL : mpi;
}
diff --git a/libmpcodecs/vd_xanim.c b/libmpcodecs/vd_xanim.c
index 5d1e4ec739..eb06eef122 100644
--- a/libmpcodecs/vd_xanim.c
+++ b/libmpcodecs/vd_xanim.c
@@ -211,7 +211,7 @@ static int xacodec_load(sh_video_t *sh, char *filename)
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s while %s\n", filename, error);
else
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s\n", filename);
- return(0);
+ return 0;
}
what_the = dlsym(priv->file_handler, "What_The");
@@ -219,7 +219,7 @@ static int xacodec_load(sh_video_t *sh, char *filename)
{
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to init %s while %s\n", filename, error);
dlclose(priv->file_handler);
- return(0);
+ return 0;
}
mod_hdr = what_the();
@@ -227,7 +227,7 @@ static int xacodec_load(sh_video_t *sh, char *filename)
{
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: initializer function failed in %s\n", filename);
dlclose(priv->file_handler);
- return(0);
+ return 0;
}
mp_msg(MSGT_DECVIDEO, MSGL_V, "=== XAnim Codec ===\n");
@@ -245,7 +245,7 @@ static int xacodec_load(sh_video_t *sh, char *filename)
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported api revision (%d) in %s\n",
mod_hdr->api_rev, filename);
dlclose(priv->file_handler);
- return(0);
+ return 0;
}
func = mod_hdr->funcs;
@@ -253,7 +253,7 @@ static int xacodec_load(sh_video_t *sh, char *filename)
{
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: function table error in %s\n", filename);
dlclose(priv->file_handler);
- return(0);
+ return 0;
}
mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: %p entries: %d]\n",
@@ -281,7 +281,7 @@ static int xacodec_load(sh_video_t *sh, char *filename)
priv->dec_func = (void *)func[i].dec_func;
}
}
- return(1);
+ return 1;
}
static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr)
@@ -295,7 +295,7 @@ static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr)
{
codec_hdr->decoder = priv->dec_func;
mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "We got decoder's address at init! %p\n", codec_hdr->decoder);
- return(1);
+ return 1;
}
#endif
@@ -306,16 +306,16 @@ static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr)
priv->dec_func = (void *)codec_hdr->decoder;
mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Codec is supported: found decoder for %s at %p\n",
codec_hdr->description, codec_hdr->decoder);
- return(1);
+ return 1;
case CODEC_UNSUPPORTED:
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unsupported by dll\n",
codec_hdr->description);
- return(0);
+ return 0;
case CODEC_UNKNOWN:
default:
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unknown by dll\n",
codec_hdr->description);
- return(0);
+ return 0;
}
}
@@ -475,7 +475,7 @@ void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type)
{
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')",
image_type, dith_type);
- return((void*)XA_YUV_2x2_clr);
+ return (void*)XA_YUV_2x2_clr;
}
/* -------------------- whole YUV frame converters ------------------------- */
@@ -581,7 +581,7 @@ void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned in
void *XA_YUV1611_Func(unsigned int image_type)
{
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV1611_Func('image_type: %d')", image_type);
- return((void *)XA_YUV1611_Convert);
+ return (void *)XA_YUV1611_Convert;
}
/* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */
@@ -619,7 +619,7 @@ void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned
void *XA_YUV221111_Func(unsigned int image_type)
{
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type);
- return((void *)XA_YUV221111_Convert);
+ return (void *)XA_YUV221111_Convert;
}
/* *** EOF XANIM *** */
@@ -657,7 +657,7 @@ static int init(sh_video_t *sh)
snprintf(dll, 1024, "%s/%s", def_path, sh->codec->dll);
if (xacodec_load(sh, dll) == 0)
- return(0);
+ return 0;
codec_hdr.xapi_rev = XAVID_API_REV;
codec_hdr.anim_hdr = malloc(4096);
@@ -690,13 +690,13 @@ static int init(sh_video_t *sh)
default:
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported image out format (%s)\n",
vo_format_name(sh->codec->outfmt[sh->outfmtidx]));
- return(0);
+ return 0;
}
mp_msg(MSGT_DECVIDEO, MSGL_INFO, "xacodec: querying for input %dx%d %dbit [fourcc: %4x] (%s)...\n",
codec_hdr.x, codec_hdr.y, codec_hdr.depth, codec_hdr.compression, codec_hdr.description);
if (xacodec_query(sh, &codec_hdr) == 0)
- return(0);
+ return 0;
// free(codec_hdr.anim_hdr);
@@ -705,7 +705,7 @@ static int init(sh_video_t *sh)
{
mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: memory allocation error: %s\n",
strerror(errno));
- return(0);
+ return 0;
}
priv->decinfo->cmd = 0;
priv->decinfo->skip_flag = 0;
@@ -721,7 +721,7 @@ static int init(sh_video_t *sh)
mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "decinfo->extra, filled by codec: %p [%s]\n",
&priv->decinfo->extra, (char *)priv->decinfo->extra);
- return(1);
+ return 1;
}
// uninit driver
diff --git a/libmpcodecs/vd_xvid4.c b/libmpcodecs/vd_xvid4.c
index e7e39496f2..54d3a2a563 100644
--- a/libmpcodecs/vd_xvid4.c
+++ b/libmpcodecs/vd_xvid4.c
@@ -86,7 +86,7 @@ static float stats2aspect(xvid_dec_stats_t *stats);
static int control(sh_video_t *sh,int cmd,void* arg,...)
{
- return(CONTROL_UNKNOWN);
+ return CONTROL_UNKNOWN;
}
/*============================================================================
@@ -144,7 +144,7 @@ static int init(sh_video_t *sh)
default:
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Unsupported out_fmt: 0x%X\n",
sh->codec->outfmt[sh->outfmtidx]);
- return(0);
+ return 0;
}
/* Gather some information about the host library */
@@ -160,7 +160,7 @@ static int init(sh_video_t *sh)
/* Initialize the xvidcore library */
if(xvid_global(NULL, XVID_GBL_INIT, &xvid_ini, NULL))
- return(0);
+ return 0;
/* We use 0 width and height so xvidcore will resize its buffers
* if required. That allows this vd plugin to do resize on first
@@ -171,7 +171,7 @@ static int init(sh_video_t *sh)
/* Get a decoder instance */
if(xvid_decore(0, XVID_DEC_CREATE, &dec_p, NULL)<0) {
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "XviD init failed\n");
- return(0);
+ return 0;
}
p = malloc(sizeof(priv_t));
@@ -192,7 +192,7 @@ static int init(sh_video_t *sh)
break;
}
- return(1);
+ return 1;
}
/*============================================================================
@@ -221,7 +221,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
if(!data || len <= 0)
- return(NULL);
+ return NULL;
memset(&dec,0,sizeof(xvid_dec_frame_t));
memset(&stats, 0, sizeof(xvid_dec_stats_t));
@@ -272,7 +272,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
consumed = xvid_decore(p->hdl, XVID_DEC_DECODE, &dec, &stats);
if (consumed < 0) {
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Decoding error\n");
- return(NULL);
+ return NULL;
}
/* Found a VOL information stats, if VO plugin is not initialized
@@ -280,7 +280,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
if (stats.type == XVID_TYPE_VOL && !p->vo_initialized) {
sh->aspect = stats2aspect(&stats);
if(!mpcodecs_config_vo(sh, stats.data.vol.width, stats.data.vol.height, IMGFMT_YV12))
- return(NULL);
+ return NULL;
/* Don't take this path twice */
p->vo_initialized = !p->vo_initialized;
@@ -309,7 +309,7 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
/* If we got out the decoding loop because the buffer was empty and there was nothing
* to output yet, then just return NULL */
- return((stats.type == XVID_TYPE_NOTHING)? NULL: mpi);
+ return (stats.type == XVID_TYPE_NOTHING) ? NULL : mpi;
}
/*****************************************************************************
@@ -368,10 +368,10 @@ static float stats2aspect(xvid_dec_stats_t *stats)
dar = ((float)stats->data.vol.width*wpar);
dar /= ((float)stats->data.vol.height*hpar);
- return(dar);
+ return dar;
}
- return(0.0f);
+ return 0.0f;
}
/*****************************************************************************
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index e4bb1c0137..f217258c0b 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -782,7 +782,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
pic->top_field_first= lavc_param_top;
}
- return (encode_frame(vf, pic, pts) >= 0);
+ return encode_frame(vf, pic, pts) >= 0;
}
static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts){
diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c
index 25a2cb19f7..fc9e1ff531 100644
--- a/libmpcodecs/ve_qtvideo.c
+++ b/libmpcodecs/ve_qtvideo.c
@@ -149,7 +149,7 @@ static int config(struct vf_instance* vf,
compressor=FindNextComponent(NULL,&cdesc);
if(!compressor){
mp_msg(MSGT_MENCODER,MSGL_ERR,"Cannot find requested component\n");
- return(0);
+ return 0;
}
mp_msg(MSGT_MENCODER,MSGL_DBG2,"Found it! ID = %p\n",compressor);
diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c
index bc2eb6014f..724619ad04 100644
--- a/libmpcodecs/ve_x264.c
+++ b/libmpcodecs/ve_x264.c
@@ -232,7 +232,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt)
{
switch(fmt) {
case IMGFMT_I420:
- return (VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW);
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
case IMGFMT_YV12:
case IMGFMT_422P:
case IMGFMT_444P:
diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c
index f79d26e985..3e400eb9bd 100644
--- a/libmpcodecs/ve_xvid4.c
+++ b/libmpcodecs/ve_xvid4.c
@@ -405,14 +405,14 @@ config(struct vf_instance* vf,
mod->d_height = d_height;
if(dispatch_settings(mod) == BAD)
- return(BAD);
+ return BAD;
/*--------------------------------------------------------------------
* Set remaining information in the xvid_enc_create_t structure
*------------------------------------------------------------------*/
if(set_create_struct(mod) == BAD)
- return(BAD);
+ return BAD;
/*--------------------------------------------------------------------
* Encoder instance creation
@@ -423,7 +423,7 @@ config(struct vf_instance* vf,
if(err<0) {
mp_msg(MSGT_MENCODER, MSGL_ERR,
"xvid: xvidcore returned a '%s' error\n", errorstring(err));
- return(BAD);
+ return BAD;
}
/* Store the encoder instance into the private data */
@@ -431,7 +431,7 @@ config(struct vf_instance* vf,
mod->mux->decoder_delay = mod->create.max_bframes ? 1 : 0;
- return(FINE);
+ return FINE;
}
/*============================================================================
@@ -487,7 +487,7 @@ xvid_mplayer_module_t *mod = (xvid_mplayer_module_t *)vf->priv;
flush_internal_buffers(mod);
break;
}
- return(CONTROL_UNKNOWN);
+ return CONTROL_UNKNOWN;
}
/*============================================================================
@@ -501,12 +501,12 @@ query_format(struct vf_instance* vf, unsigned int fmt)
case IMGFMT_YV12:
case IMGFMT_IYUV:
case IMGFMT_I420:
- return(VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW);
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
case IMGFMT_YUY2:
case IMGFMT_UYVY:
- return(VFCAP_CSP_SUPPORTED);
+ return VFCAP_CSP_SUPPORTED;
}
- return(BAD);
+ return BAD;
}
/*============================================================================
@@ -531,7 +531,7 @@ put_image(struct vf_instance* vf, mp_image_t *mpi, double pts)
* -----------------------------------------------------------------*/
if(set_frame_struct(mod, mpi) == BAD)
- return(BAD);
+ return BAD;
/* -------------------------------------------------------------------
* Encode the frame
@@ -543,13 +543,13 @@ put_image(struct vf_instance* vf, mp_image_t *mpi, double pts)
if(size<0) {
mp_msg(MSGT_MENCODER, MSGL_ERR,
"xvid: xvidcore returned a '%s' error\n", errorstring(size));
- return(BAD);
+ return BAD;
}
/* If size is == 0, we're done with that frame */
if(size == 0) {
++mod->mux->encoder_delay;
- return(FINE);
+ return FINE;
}
/* xvidcore returns stats about encoded frame in an asynchronous way
@@ -561,7 +561,7 @@ put_image(struct vf_instance* vf, mp_image_t *mpi, double pts)
size,
(mod->frame.out_flags & XVID_KEYFRAME)?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
- return(FINE);
+ return FINE;
}
/*============================================================================
@@ -590,7 +590,7 @@ vf_open(vf_instance_t *vf, char* args)
if(mod == NULL) {
mp_msg(MSGT_MENCODER,MSGL_ERR,
"xvid: memory allocation failure (private data)\n");
- return(BAD);
+ return BAD;
}
/* Initialize the module to zeros */
@@ -607,7 +607,7 @@ vf_open(vf_instance_t *vf, char* args)
if(mod->mux->bih == NULL) {
mp_msg(MSGT_MENCODER,MSGL_ERR,
"xvid: memory allocation failure (BITMAP header)\n");
- return(BAD);
+ return BAD;
}
mod->mux->bih->biSize = sizeof(BITMAPINFOHEADER);
@@ -639,10 +639,10 @@ vf_open(vf_instance_t *vf, char* args)
/* Initialize the xvidcore library */
if (xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL) < 0) {
mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: initialisation failure\n");
- return(BAD);
+ return BAD;
}
- return(FINE);
+ return FINE;
}
/*****************************************************************************
@@ -679,7 +679,7 @@ static int dispatch_settings(xvid_mplayer_module_t *mod)
{
mp_msg(MSGT_MENCODER,MSGL_ERR,
"xvid:[ERROR] \"%s\" is an invalid profile name\n", xvidenc_profile);
- return(BAD);
+ return BAD;
}
/* -------------------------------------------------------------------
@@ -954,7 +954,7 @@ static int dispatch_settings(xvid_mplayer_module_t *mod)
else
mp_msg(MSGT_MENCODER, MSGL_INFO,
"xvid: par=0/0 (vga11) forced by choosing a DXN profile\n");
- return(FINE);
+ return FINE;
}
static int set_create_struct(xvid_mplayer_module_t *mod)
@@ -968,7 +968,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
if(xvidenc_profile)
selected_profile = profileFromName(xvidenc_profile);
if(!selected_profile)
- return(BAD);
+ return BAD;
/* Most of the structure is initialized by dispatch settings, only a
* few things are missing */
@@ -988,7 +988,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
mp_msg(MSGT_MENCODER,MSGL_ERR,
"xvid:[ERROR] resolution must be <= %dx%d for the chosen profile\n",
selected_profile->width, selected_profile->height);
- return(BAD);
+ return BAD;
}
/* FPS */
@@ -1002,7 +1002,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
mp_msg(MSGT_MENCODER,MSGL_ERR,
"xvid:[ERROR] frame rate must be <= %d for the chosen profile\n",
selected_profile->fps);
- return(BAD);
+ return BAD;
}
/* Encodings zones */
@@ -1024,7 +1024,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
mp_msg(MSGT_MENCODER, MSGL_ERR,
"xvid: you can't mix Fixed Quantizer Rate Control"
" with other Rate Control mechanisms\n");
- return(BAD);
+ return BAD;
}
if(xvidenc_bitrate != 0 && xvidenc_pass == 1) {
@@ -1062,7 +1062,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
mp_msg(MSGT_MENCODER, MSGL_ERR,
"xvid: you must specify one or a valid combination of "
"'bitrate', 'pass', 'fixed_quant' settings\n");
- return(BAD);
+ return BAD;
}
/* Sanity checking */
@@ -1071,7 +1071,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
mp_msg(MSGT_MENCODER, MSGL_ERR,
"xvid: this code should not be reached - fill a bug "
"report\n");
- return(BAD);
+ return BAD;
}
/* This is a single pass encoding: either a CBR pass or a constant
@@ -1183,7 +1183,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
if(e != 3)
{
mp_msg(MSGT_MENCODER,MSGL_ERR, "error parsing zones\n");
- return(BAD);
+ return BAD;
}
q = (int)(value * 100);
if (mode == 'q')
@@ -1191,7 +1191,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
if (q < 200 || q > 3100) // make sure that quantizer is in allowable range
{
mp_msg(MSGT_MENCODER, MSGL_ERR, "zone quantizer must be between 2 and 31\n");
- return(BAD);
+ return BAD;
}
else
{
@@ -1203,7 +1203,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
if (q < 1 || q > 200)
{
mp_msg(MSGT_MENCODER, MSGL_ERR, "zone weight must be between 1 and 200\n");
- return(BAD);
+ return BAD;
}
else
{
@@ -1222,7 +1222,7 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
if(p) p++;
}
}
- return(FINE);
+ return FINE;
}
static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi)
@@ -1253,7 +1253,7 @@ static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi)
mp_msg(MSGT_MENCODER, MSGL_ERR,
"xvid: unsupported picture format (%s)!\n",
vo_format_name(mpi->imgfmt));
- return(BAD);
+ return BAD;
}
/* Bind source frame */
@@ -1268,7 +1268,7 @@ static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi)
* plugins */
frame->quant = 0;
- return(FINE);
+ return FINE;
}
static void
@@ -1411,7 +1411,7 @@ static void *read_matrix(unsigned char *filename)
/* Allocate matrix space */
if((matrix = malloc(64*sizeof(unsigned char))) == NULL)
- return(NULL);
+ return NULL;
/* Open the matrix file */
if((input = fopen(filename, "rb")) == NULL) {
@@ -1419,7 +1419,7 @@ static void *read_matrix(unsigned char *filename)
"xvid: Error opening the matrix file %s\n",
filename);
free(matrix);
- return(NULL);
+ return NULL;
}
/* Read the matrix */
@@ -1434,7 +1434,7 @@ static void *read_matrix(unsigned char *filename)
filename);
free(matrix);
fclose(input);
- return(NULL);
+ return NULL;
}
/* Clamp the value to safe range */
@@ -1449,7 +1449,7 @@ static void *read_matrix(unsigned char *filename)
/* We're done */
fclose(input);
- return(matrix);
+ return matrix;
}
@@ -1481,7 +1481,7 @@ par_string(int parcode)
par_string = "unknown";
break;
}
- return (par_string);
+ return par_string;
}
static const char *errorstring(int err)
@@ -1507,7 +1507,7 @@ static const char *errorstring(int err)
error = "Unknown";
}
- return(error);
+ return error;
}
/*****************************************************************************
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c
index 0ed82f586f..46ab7790cd 100644
--- a/libmpcodecs/vf_expand.c
+++ b/libmpcodecs/vf_expand.c
@@ -421,7 +421,7 @@ static int control(struct vf_instance* vf, int request, void* data){
}
static int query_format(struct vf_instance* vf, unsigned int fmt){
- return (vf_next_query_format(vf,fmt));
+ return vf_next_query_format(vf,fmt);
}
static int open(vf_instance_t *vf, char* args){
diff --git a/libmpcodecs/vf_framestep.c b/libmpcodecs/vf_framestep.c
index a7bba57d88..c5f93244de 100644
--- a/libmpcodecs/vf_framestep.c
+++ b/libmpcodecs/vf_framestep.c
@@ -147,7 +147,7 @@ static int open(vf_instance_t *vf, char* args)
vf->default_reqs = VFCAP_ACCEPT_STRIDE;
vf->priv = p = calloc(1, sizeof(struct vf_priv_s));
if (p == NULL) {
- return(0);
+ return 0;
}
if (args != NULL) {
@@ -172,7 +172,7 @@ static int open(vf_instance_t *vf, char* args)
p->frame_step = atoi(args);
if (p->frame_step <= 0) {
mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_ErrorParsingArgument);
- return(0);
+ return 0;
}
}
}
diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c
index 923422848e..40bd100d73 100644
--- a/libmpcodecs/vf_lavc.c
+++ b/libmpcodecs/vf_lavc.c
@@ -107,7 +107,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){
case IMGFMT_YV12:
case IMGFMT_I420:
case IMGFMT_IYUV:
- return (vf_next_query_format(vf,IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE)));
+ return vf_next_query_format(vf, IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_ACCEPT_STRIDE));
}
return 0;
}
diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c
index fc56e50163..449516f758 100644
--- a/libmpcodecs/vf_palette.c
+++ b/libmpcodecs/vf_palette.c
@@ -189,7 +189,7 @@ static int open(vf_instance_t *vf, char* args){
if (!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
{
mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);
- return(0);
+ return 0;
}
}
return 1;
diff --git a/libmpcodecs/vf_tile.c b/libmpcodecs/vf_tile.c
index 76daa4cc9f..c5b4b90e96 100644
--- a/libmpcodecs/vf_tile.c
+++ b/libmpcodecs/vf_tile.c
@@ -172,7 +172,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts)
}
else {
/* Skip the frame */
- return(0);
+ return 0;
}
}
@@ -237,7 +237,7 @@ static int parse_int(char **s, int *rt, int def_val)
}
else if (**s != '\0') {
/* Error, we got some wrong char */
- return(1);
+ return 1;
}
}
else {
@@ -245,7 +245,7 @@ static int parse_int(char **s, int *rt, int def_val)
}
*rt = t;
- return(0);
+ return 0;
}
@@ -263,7 +263,7 @@ static int open(vf_instance_t *vf, char* args)
/* Private data */
vf->priv = p = calloc(1, sizeof(struct vf_priv_s));
if (p == NULL) {
- return(0);
+ return 0;
}
if (args == NULL) {
@@ -280,7 +280,7 @@ static int open(vf_instance_t *vf, char* args)
if (er) {
mp_msg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_ErrorParsingArgument);
- return(0);
+ return 0;
}
/* Load some default */
if ((p->xytile <= 0) || (p->xytile > p->xtile * p->ytile)) {
diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c
index 032c739fc6..d1717c791e 100644
--- a/libmpdemux/demux_audio.c
+++ b/libmpdemux/demux_audio.c
@@ -293,7 +293,8 @@ static int demux_audio_open(demuxer_t* demuxer) {
}
} else if( hdr[0] == 'f' && hdr[1] == 'L' && hdr[2] == 'a' && hdr[3] == 'C' ) {
frmt = fLaC;
- break;
+ if (!mp3_hdrs || mp3_hdrs->cons_hdrs < 3)
+ break;
}
// Add here some other audio format detection
if(step < HDR_SIZE)
diff --git a/libmpdemux/demux_avs.h b/libmpdemux/demux_avs.h
index 29526d6964..0962146281 100644
--- a/libmpdemux/demux_avs.h
+++ b/libmpdemux/demux_avs.h
@@ -132,15 +132,15 @@ static inline AVS_Value avs_new_value_array(AVS_Value * v0, int size)
static inline int avs_is_error(AVS_Value v) { return v.type == 'e'; }
static inline int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
static inline int avs_is_string(AVS_Value v) { return v.type == 's'; }
-static inline int avs_has_video(const AVS_VideoInfo * p) { return (p->width!=0); }
-static inline int avs_has_audio(const AVS_VideoInfo * p) { return (p->audio_samples_per_second!=0); }
+static inline int avs_has_video(const AVS_VideoInfo * p) { return p->width != 0; }
+static inline int avs_has_audio(const AVS_VideoInfo * p) { return p->audio_samples_per_second != 0; }
static inline const char * avs_as_string(AVS_Value v)
{ return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; }
/* Color spaces */
static inline int avs_is_rgb(const AVS_VideoInfo * p)
-{ return (p->pixel_type&AVS_CS_BGR); }
+{ return p->pixel_type & AVS_CS_BGR; }
static inline int avs_is_rgb24(const AVS_VideoInfo * p)
{ return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties
@@ -149,7 +149,7 @@ static inline int avs_is_rgb32(const AVS_VideoInfo * p)
{ return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; }
static inline int avs_is_yuy(const AVS_VideoInfo * p)
-{ return (p->pixel_type&AVS_CS_YUV ); }
+{ return p->pixel_type & AVS_CS_YUV; }
static inline int avs_is_yuy2(const AVS_VideoInfo * p)
{ return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }
diff --git a/libmpdemux/demux_demuxers.c b/libmpdemux/demux_demuxers.c
index 615e1961ee..a5f87e601b 100644
--- a/libmpdemux/demux_demuxers.c
+++ b/libmpdemux/demux_demuxers.c
@@ -38,6 +38,11 @@ demuxer_t* new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd) {
ret->audio = ad->audio;
ret->sub = sd->sub;
+ // HACK?, necessary for subtitle (and audio and video when implemented) switching
+ memcpy(ret->v_streams, vd->v_streams, sizeof(ret->v_streams));
+ memcpy(ret->a_streams, ad->a_streams, sizeof(ret->a_streams));
+ memcpy(ret->s_streams, sd->s_streams, sizeof(ret->s_streams));
+
ret->desc = &demuxer_desc_demuxers;
return ret;
diff --git a/libmpdemux/demux_film.c b/libmpdemux/demux_film.c
index e6285a759a..c310f3bd18 100644
--- a/libmpdemux/demux_film.c
+++ b/libmpdemux/demux_film.c
@@ -238,7 +238,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
{
mp_msg(MSGT_DEMUX, MSGL_ERR, "Not a FILM file\n");
free(film_data);
- return(NULL);
+ return NULL;
}
// get the header size, which implicitly points past the header and
@@ -428,7 +428,7 @@ static demuxer_t* demux_open_film(demuxer_t* demuxer)
default:
mp_msg(MSGT_DEMUX, MSGL_ERR, "Unrecognized FILM header chunk: %08X\n",
chunk_type);
- return(NULL);
+ return NULL;
break;
}
}
diff --git a/libmpdemux/demux_fli.c b/libmpdemux/demux_fli.c
index e66becc62a..37fa4d4559 100644
--- a/libmpdemux/demux_fli.c
+++ b/libmpdemux/demux_fli.c
@@ -95,7 +95,7 @@ static demuxer_t* demux_open_fli(demuxer_t* demuxer){
magic_number);
free(header);
free(frames);
- return(NULL);
+ return NULL;
}
// fetch the number of frames
diff --git a/libmpdemux/demux_mpg.c b/libmpdemux/demux_mpg.c
index 3ebec07a8e..55da5f00a6 100644
--- a/libmpdemux/demux_mpg.c
+++ b/libmpdemux/demux_mpg.c
@@ -158,9 +158,7 @@ static float read_first_mpeg_pts_at_position(demuxer_t* demuxer, off_t stream_po
if(found == 3) pts = found_pts3;
//clean up from searching of first pts;
- ds_free_packs(demuxer->audio);
- ds_free_packs(demuxer->video);
- ds_free_packs(demuxer->sub);
+ demux_flush(demuxer);
return pts;
}
@@ -981,9 +979,7 @@ void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,float audio_delay, in
//prepare another seek because we are off by more than 0.5s
if(mpg_d) {
newpos += (newpts - mpg_d->last_pts) * (newpos - oldpos) / (mpg_d->last_pts - oldpts);
- ds_free_packs(d_audio);
- ds_free_packs(d_video);
- ds_free_packs(demuxer->sub);
+ demux_flush(demuxer);
demuxer->stream->eof=0; // clear eof flag
d_video->eof=0;
d_audio->eof=0;
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index b746fa18b0..8e57fa3129 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -3139,13 +3139,8 @@ static void demux_seek_ts(demuxer_t *demuxer, float rel_seek_secs, float audio_d
ts_dump_streams(demuxer->priv);
reset_fifos(demuxer, sh_audio != NULL, sh_video != NULL, demuxer->sub->id > 0);
+ demux_flush(demuxer);
- if(sh_audio != NULL)
- ds_free_packs(d_audio);
- if(sh_video != NULL)
- ds_free_packs(d_video);
- if(demuxer->sub->id > 0)
- ds_free_packs(d_sub);
video_stats = (sh_video != NULL);
diff --git a/libmpdemux/demux_xmms.c b/libmpdemux/demux_xmms.c
index 7bd2f6546a..c6bf5eae90 100644
--- a/libmpdemux/demux_xmms.c
+++ b/libmpdemux/demux_xmms.c
@@ -75,8 +75,8 @@ static void disk_flush(int time) {
}
static int disk_free(void) { // vqf plugin sends more than it should
- return (XMMS_PACKETSIZE-xmms_audiopos<XMMS_PACKETSIZE/4 ?
- 0:XMMS_PACKETSIZE-xmms_audiopos-XMMS_PACKETSIZE/4);
+ return XMMS_PACKETSIZE - xmms_audiopos < XMMS_PACKETSIZE / 4 ?
+ 0 : XMMS_PACKETSIZE - xmms_audiopos - XMMS_PACKETSIZE / 4;
}
static int disk_playing(void) {
diff --git a/libmpdemux/demuxer.c b/libmpdemux/demuxer.c
index 1762f99741..8987f1679a 100644
--- a/libmpdemux/demuxer.c
+++ b/libmpdemux/demuxer.c
@@ -122,9 +122,6 @@ const demuxer_desc_t *const demuxer_list[] = {
&demuxer_desc_mpeg_gxf,
&demuxer_desc_mpeg4_es,
&demuxer_desc_h264_es,
-#ifdef MUSEPACK
- &demuxer_desc_mpc,
-#endif
&demuxer_desc_audio,
&demuxer_desc_mpeg_ty,
#ifdef STREAMING_LIVE555
@@ -136,6 +133,9 @@ const demuxer_desc_t *const demuxer_list[] = {
#ifdef USE_LIBAVFORMAT
&demuxer_desc_lavf,
#endif
+#ifdef MUSEPACK
+ &demuxer_desc_mpc,
+#endif
#ifdef HAVE_LIBDV095
&demuxer_desc_rawdv,
#endif
@@ -277,10 +277,11 @@ sh_audio_t *new_sh_audio_aid(demuxer_t *demuxer, int id, int aid)
if (demuxer->a_streams[id]) {
mp_msg(MSGT_DEMUXER, MSGL_WARN, MSGTR_AudioStreamRedefined, id);
} else {
- sh_audio_t *sh;
mp_msg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundAudioStream, id);
- demuxer->a_streams[id] = calloc(1, sizeof(sh_audio_t));
- sh = demuxer->a_streams[id];
+ sh_audio_t *sh = calloc(1, sizeof(sh_audio_t));
+ demuxer->a_streams[id] = sh;
+ sh->aid = aid;
+ sh->ds = demuxer->audio;
// set some defaults
sh->samplesize = 2;
sh->sample_format = AF_FORMAT_S16_NE;
@@ -289,7 +290,6 @@ sh_audio_t *new_sh_audio_aid(demuxer_t *demuxer, int id, int aid)
sh->opts = demuxer->opts;
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_ID=%d\n", aid);
}
- ((sh_audio_t *) demuxer->a_streams[id])->aid = aid;
return demuxer->a_streams[id];
}
@@ -318,10 +318,11 @@ sh_video_t *new_sh_video_vid(demuxer_t *demuxer, int id, int vid)
mp_msg(MSGT_DEMUXER, MSGL_V, MSGTR_FoundVideoStream, id);
sh_video_t *sh = calloc(1, sizeof *sh);
demuxer->v_streams[id] = sh;
+ sh->vid = vid;
+ sh->ds = demuxer->video;
sh->opts = demuxer->opts;
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_ID=%d\n", vid);
}
- ((sh_video_t *) demuxer->v_streams[id])->vid = vid;
return demuxer->v_streams[id];
}
@@ -1049,6 +1050,13 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format,
}
+void demux_flush(demuxer_t *demuxer)
+{
+ ds_free_packs(demuxer->video);
+ ds_free_packs(demuxer->audio);
+ ds_free_packs(demuxer->sub);
+}
+
int demux_seek(demuxer_t *demuxer, float rel_seek_secs, float audio_delay,
int flags)
{
@@ -1071,12 +1079,9 @@ int demux_seek(demuxer_t *demuxer, float rel_seek_secs, float audio_delay,
return 0;
}
// clear demux buffers:
- if (sh_audio) {
- ds_free_packs(d_audio);
+ demux_flush(demuxer);
+ if (sh_audio)
sh_audio->a_buffer_len = 0;
- }
- ds_free_packs(d_video);
- ds_free_packs(demuxer->sub);
demuxer->stream->eof = 0;
demuxer->video->eof = 0;
@@ -1337,14 +1342,7 @@ int demuxer_seek_chapter(demuxer_t *demuxer, int chapter, int mode,
chapter += current;
}
- if (demuxer->video->sh)
- ds_free_packs(demuxer->video);
-
- if (demuxer->audio->sh)
- ds_free_packs(demuxer->audio);
-
- if (demuxer->sub->id >= 0)
- ds_free_packs(demuxer->sub);
+ demux_flush(demuxer);
ris =
stream_control(demuxer->stream, STREAM_CTRL_SEEK_TO_CHAPTER,
@@ -1526,14 +1524,7 @@ int demuxer_set_angle(demuxer_t *demuxer, int angle)
if ((angles < 1) || (angle > angles))
return -1;
- if (demuxer->video->sh)
- ds_free_packs(demuxer->video);
-
- if (demuxer->audio->sh)
- ds_free_packs(demuxer->audio);
-
- if (demuxer->sub->id >= 0)
- ds_free_packs(demuxer->sub);
+ demux_flush(demuxer);
ris = stream_control(demuxer->stream, STREAM_CTRL_SET_ANGLE, &angle);
if (ris == STREAM_UNSUPPORTED)
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index 30ab6f69e6..76ab7221e4 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -366,6 +366,7 @@ static inline int avi_stream_id(unsigned int id){
}
demuxer_t* demux_open(struct MPOpts *opts, stream_t *stream,int file_format,int aid,int vid,int sid,char* filename);
+void demux_flush(demuxer_t *demuxer);
int demux_seek(demuxer_t *demuxer,float rel_seek_secs,float audio_delay,int flags);
demuxer_t* new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd);
diff --git a/libmpdemux/mp_taglists.c b/libmpdemux/mp_taglists.c
index 5bcf739188..a620ef5649 100644
--- a/libmpdemux/mp_taglists.c
+++ b/libmpdemux/mp_taglists.c
@@ -24,6 +24,7 @@
static const AVCodecTag mp_wav_tags[] = {
{ CODEC_ID_ADPCM_4XM, MKTAG('4', 'X', 'M', 'A')},
{ CODEC_ID_ADPCM_EA, MKTAG('A', 'D', 'E', 'A')},
+ { CODEC_ID_ADPCM_EA_MAXIS_XA, MKTAG('A', 'D', 'X', 'A')},
{ CODEC_ID_ADPCM_IMA_WS, MKTAG('A', 'I', 'W', 'S')},
{ CODEC_ID_ADPCM_THP, MKTAG('T', 'H', 'P', 'A')},
{ CODEC_ID_AMR_NB, MKTAG('n', 'b', 0, 0)},
@@ -33,6 +34,7 @@ static const AVCodecTag mp_wav_tags[] = {
{ CODEC_ID_MUSEPACK7, MKTAG('M', 'P', 'C', ' ')},
{ CODEC_ID_MUSEPACK8, MKTAG('M', 'P', 'C', '8')},
{ CODEC_ID_NELLYMOSER, MKTAG('N', 'E', 'L', 'L')},
+ { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p')},
{ CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2')},
{ CODEC_ID_ROQ_DPCM, MKTAG('R', 'o', 'Q', 'A')},
{ CODEC_ID_SHORTEN, MKTAG('s', 'h', 'r', 'n')},
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index 12410f542e..fe7f5715fc 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -32,6 +32,8 @@ extern char *info_copyright;
extern char *info_sourceform;
extern char *info_comment;
+#define BIO_BUFFER_SIZE 32768
+
typedef struct {
//AVInputFormat *avif;
AVFormatContext *oc;
@@ -39,6 +41,7 @@ typedef struct {
int audio_streams;
int video_streams;
int64_t last_pts;
+ uint8_t buffer[BIO_BUFFER_SIZE];
} muxer_priv_t;
typedef struct {
@@ -64,39 +67,15 @@ m_option_t lavfopts_conf[] = {
{NULL, NULL, 0, 0, 0, 0, NULL}
};
-/* This should be transmitted to mp_open() through the filename when
- * thread safety is needed but MPlayer == no threads and especially
- * not multiple muxers being initialized at once so there is no
- * point in the extra complexity, a static is simpler. */
-static muxer_t *priv_data;
-
-static int mp_open(URLContext *h, const char *filename, int flags)
-{
- h->priv_data= priv_data;
- return 0;
-}
-
-static int mp_close(URLContext *h)
-{
- return 0;
-}
-
-
-static int mp_read(URLContext *h, unsigned char *buf, int size)
+static int mp_write(void *opaque, uint8_t *buf, int size)
{
- mp_msg(MSGT_MUXER, MSGL_WARN, "READ %d\n", size);
- return -1;
-}
-
-static int mp_write(URLContext *h, unsigned char *buf, int size)
-{
- muxer_t *muxer = (muxer_t*)h->priv_data;
+ muxer_t *muxer = opaque;
return stream_write_buffer(muxer->stream, buf, size);
}
-static offset_t mp_seek(URLContext *h, offset_t pos, int whence)
+static offset_t mp_seek(void *opaque, offset_t pos, int whence)
{
- muxer_t *muxer = (muxer_t*)h->priv_data;
+ muxer_t *muxer = opaque;
if(whence == SEEK_CUR)
{
off_t cur = stream_tell(muxer->stream);
@@ -118,16 +97,6 @@ static offset_t mp_seek(URLContext *h, offset_t pos, int whence)
}
-static URLProtocol mp_protocol = {
- "menc",
- mp_open,
- mp_read,
- mp_write,
- mp_seek,
- mp_close,
- NULL
-};
-
static muxer_stream_t* lavf_new_stream(muxer_t *muxer, int type)
{
muxer_priv_t *priv = muxer->priv;
@@ -321,7 +290,7 @@ static void write_trailer(muxer_t *muxer)
av_freep(&(priv->oc->streams[i]));
}
- url_fclose(priv->oc->pb);
+ av_freep(&priv->oc->pb);
av_free(priv->oc);
}
@@ -338,7 +307,6 @@ int muxer_init_muxer_lavf(muxer_t *muxer)
{
muxer_priv_t *priv;
AVOutputFormat *fmt = NULL;
- char mp_filename[256] = "menc://stream.dummy";
av_register_all();
@@ -404,14 +372,9 @@ int muxer_init_muxer_lavf(muxer_t *muxer)
}
}
- register_protocol(&mp_protocol);
-
- priv_data= muxer;
- if(url_fopen(&priv->oc->pb, mp_filename, URL_WRONLY))
- {
- mp_msg(MSGT_MUXER, MSGL_FATAL, "Could not open outfile.\n");
- goto fail;
- }
+ priv->oc->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 1, muxer, NULL, mp_write, mp_seek);
+ if ((muxer->stream->flags & STREAM_SEEK) != STREAM_SEEK)
+ priv->oc->pb->is_streamed = 1;
muxer->priv = (void *) priv;
muxer->cont_new_stream = &lavf_new_stream;
diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c
index f5367e515b..2a659b7f00 100644
--- a/libmpdemux/muxer_mpeg.c
+++ b/libmpdemux/muxer_mpeg.c
@@ -231,27 +231,25 @@ static void fix_audio_sys_header(muxer_priv_t *priv, uint8_t id, uint8_t newid,
static inline int is_mpeg1(uint32_t x)
{
- return (
+ return
(x == 0x10000001) ||
(x == mmioFOURCC('m','p','g','1')) ||
- (x == mmioFOURCC('M','P','G','1'))
- );
+ (x == mmioFOURCC('M','P','G','1'));
}
static inline int is_mpeg2(uint32_t x)
{
- return (
+ return
(x == 0x10000002) ||
(x == mmioFOURCC('m','p','g','2')) ||
(x == mmioFOURCC('M','P','G','2')) ||
(x == mmioFOURCC('m','p','e','g')) ||
- (x == mmioFOURCC('M','P','E','G'))
- );
+ (x == mmioFOURCC('M','P','E','G'));
}
static inline int is_mpeg4(uint32_t x)
{
- return (
+ return
(x == 0x10000004) ||
(x == mmioFOURCC('d','i','v','x')) ||
(x == mmioFOURCC('D','I','V','X')) ||
@@ -265,8 +263,7 @@ static inline int is_mpeg4(uint32_t x)
(x == mmioFOURCC('F', 'M','P','4')) ||
(x == mmioFOURCC('f', 'm','p','4')) ||
(x == mmioFOURCC('D', 'X','5','0')) ||
- (x == mmioFOURCC('d', 'x','5','0'))
- );
+ (x == mmioFOURCC('d', 'x','5','0'));
}
//from unrarlib.c
@@ -666,7 +663,7 @@ static int write_mpeg_psm(muxer_t *muxer, char *buff)
static int psm_is_late(muxer_priv_t *priv)
{
- return (!priv->data_size || (priv->scr >= priv->last_psm_scr + 27000000ULL));
+ return !priv->data_size || (priv->scr >= priv->last_psm_scr + 27000000ULL);
}
static int write_mpeg_pes_header(muxer_headers_t *h, uint8_t *pes_id, uint8_t *buff, uint16_t plen, int stuffing_len, int mux_type)
diff --git a/libmpeg2/idct_altivec.c b/libmpeg2/idct_altivec.c
index 303cfe8662..381ef069f0 100644
--- a/libmpeg2/idct_altivec.c
+++ b/libmpeg2/idct_altivec.c
@@ -56,10 +56,10 @@ static inline vector_s16_t my_vec_mergel (vector_s16_t const A,
#define vec_mergel my_vec_mergel
#endif
-#if defined(__APPLE_CC__) /* apple */
-#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
-#else /* gnu */
+#ifdef HAVE_ALTIVEC_H /* gnu */
#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h}
+#else /* apple */
+#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
#endif
static const vector_s16_t constants ATTR_ALIGN(16) =
diff --git a/libmpeg2/libmpeg-0.4.1.diff b/libmpeg2/libmpeg-0.4.1.diff
index b54b28a952..8a39bd1498 100644
--- a/libmpeg2/libmpeg-0.4.1.diff
+++ b/libmpeg2/libmpeg-0.4.1.diff
@@ -50,20 +50,6 @@
+#endif /* ARCH_X86 || ARCH_X86_64 */
#if defined(ARCH_PPC) || defined(ARCH_SPARC)
-@@ -166,10 +168,10 @@
-
- canjump = 1;
-
--#ifdef HAVE_ALTIVEC_H /* gnu */
--#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t"
--#else /* apple */
-+#if defined(__APPLE_CC__) /* apple */
- #define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t"
-+#else /* gnu */
-+#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t"
- #endif
- asm volatile ("mtspr 256, %0\n\t"
- VAND (0, 0, 0)
@@ -212,7 +241,7 @@
accel = 0;
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c
index 19487d731d..ce0e0ee31a 100644
--- a/libswscale/rgb2rgb.c
+++ b/libswscale/rgb2rgb.c
@@ -305,13 +305,13 @@ void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const ui
{
long i;
for (i=0; i<num_pixels; i++)
- ((uint16_t *)dst)[i] = ((uint16_t *)palette)[src[i]];
+ ((uint16_t *)dst)[i] = ((const uint16_t *)palette)[src[i]];
}
void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
long i;
for (i=0; i<num_pixels; i++)
- ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[src[i]]);
+ ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
}
/**
@@ -321,13 +321,13 @@ void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const ui
{
long i;
for (i=0; i<num_pixels; i++)
- ((uint16_t *)dst)[i] = ((uint16_t *)palette)[src[i]];
+ ((uint16_t *)dst)[i] = ((const uint16_t *)palette)[src[i]];
}
void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
{
long i;
for (i=0; i<num_pixels; i++)
- ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[src[i]]);
+ ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
}
void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
@@ -372,8 +372,8 @@ void rgb24tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
- uint8_t *d = (uint8_t *)dst;
- const uint16_t *s = (uint16_t *)src;
+ uint8_t *d = dst;
+ const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
{
@@ -396,7 +396,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
void rgb16tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
- uint8_t *d = (uint8_t *)dst;
+ uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
@@ -446,7 +446,7 @@ void rgb16tobgr15(const uint8_t *src, uint8_t *dst, long src_size)
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
- uint8_t *d = (uint8_t *)dst;
+ uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
@@ -470,8 +470,8 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
void rgb15tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
{
const uint16_t *end;
- uint8_t *d = (uint8_t *)dst;
- const uint16_t *s = (uint16_t *)src;
+ uint8_t *d = dst;
+ const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while (s < end)
{
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index 4aa607d9af..3fb04c9c91 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -271,14 +271,14 @@ static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, long src_
mm_end = end - 3;
while (s < mm_end)
{
- register unsigned x= *((uint32_t *)s);
+ register unsigned x= *((const uint32_t *)s);
*((uint32_t *)d) = (x&0x7FFF7FFF) + (x&0x7FE07FE0);
d+=4;
s+=4;
}
if (s < end)
{
- register unsigned short x= *((uint16_t *)s);
+ register unsigned short x= *((const uint16_t *)s);
*((uint16_t *)d) = (x&0x7FFF) + (x&0x7FE0);
}
}
@@ -325,14 +325,14 @@ static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, long src_
mm_end = end - 3;
while (s < mm_end)
{
- register uint32_t x= *((uint32_t *)s);
+ register uint32_t x= *((const uint32_t*)s);
*((uint32_t *)d) = ((x>>1)&0x7FE07FE0) | (x&0x001F001F);
s+=4;
d+=4;
}
if (s < end)
{
- register uint16_t x= *((uint16_t *)s);
+ register uint16_t x= *((const uint16_t*)s);
*((uint16_t *)d) = ((x>>1)&0x7FE0) | (x&0x001F);
s+=2;
d+=2;
@@ -432,7 +432,7 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_
#endif
while (s < end)
{
- register int rgb = *(uint32_t*)s; s += 4;
+ register int rgb = *(const uint32_t*)s; s += 4;
*d++ = ((rgb&0xFF)>>3) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>8);
}
}
@@ -493,7 +493,7 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long s
#endif
while (s < end)
{
- register int rgb = *(uint32_t*)s; s += 4;
+ register int rgb = *(const uint32_t*)s; s += 4;
*d++ = ((rgb&0xF8)<<8) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>19);
}
}
@@ -591,7 +591,7 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_
#endif
while (s < end)
{
- register int rgb = *(uint32_t*)s; s += 4;
+ register int rgb = *(const uint32_t*)s; s += 4;
*d++ = ((rgb&0xFF)>>3) + ((rgb&0xF800)>>6) + ((rgb&0xF80000)>>9);
}
}
@@ -652,7 +652,7 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long s
#endif
while (s < end)
{
- register int rgb = *(uint32_t*)s; s += 4;
+ register int rgb = *(const uint32_t*)s; s += 4;
*d++ = ((rgb&0xF8)<<7) + ((rgb&0xF800)>>6) + ((rgb&0xF80000)>>19);
}
}
@@ -936,8 +936,8 @@ static inline void RENAME(rgb15to24)(const uint8_t *src, uint8_t *dst, long src_
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
- uint8_t *d = (uint8_t *)dst;
- const uint16_t *s = (uint16_t *)src;
+ uint8_t *d = dst;
+ const uint16_t *s = (const uint16_t*)src;
end = s + src_size/2;
#ifdef HAVE_MMX
asm volatile(PREFETCH" %0"::"m"(*s):"memory");
@@ -1219,7 +1219,7 @@ static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
- uint8_t *d = (uint8_t *)dst;
+ uint8_t *d = dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
@@ -1297,8 +1297,8 @@ static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
- uint8_t *d = (uint8_t *)dst;
- const uint16_t *s = (uint16_t *)src;
+ uint8_t *d = dst;
+ const uint16_t *s = (const uint16_t*)src;
end = s + src_size/2;
#ifdef HAVE_MMX
asm volatile(PREFETCH" %0"::"m"(*s):"memory");
@@ -1366,7 +1366,8 @@ static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_
static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long src_size)
{
long idx = 15 - src_size;
- uint8_t *s = (uint8_t *) src-idx, *d = dst-idx;
+ const uint8_t *s = src-idx;
+ uint8_t *d = dst-idx;
#ifdef HAVE_MMX
asm volatile(
"test %0, %0 \n\t"
@@ -1420,7 +1421,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long s
: "memory");
#endif
for (; idx<15; idx+=4) {
- register int v = *(uint32_t *)&s[idx], g = v & 0xff00ff00;
+ register int v = *(const uint32_t *)&s[idx], g = v & 0xff00ff00;
v &= 0xff00ff;
*(uint32_t *)&d[idx] = (v>>16) + g + (v<<16);
}
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index bca92ab6fb..139bc55e5f 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1848,8 +1848,8 @@ static int gray16swap(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
int y= srcSliceY;
int height= srcSliceH;
int i, j;
- uint16_t *srcPtr= src[0];
- uint16_t *dstPtr= dst[0] + dstStride[0]*y/2;
+ uint16_t *srcPtr= (uint16_t*)src[0];
+ uint16_t *dstPtr= (uint16_t*)(dst[0] + dstStride[0]*y/2);
for (i=0; i<height; i++)
{
for (j=0; j<length; j++) dstPtr[j] = bswap_16(srcPtr[j]);
@@ -2390,9 +2390,9 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH
if (flags&SWS_PRINT_INFO)
{
#ifdef DITHER1XBPP
- char *dither= " dithered";
+ const char *dither= " dithered";
#else
- char *dither= "";
+ const char *dither= "";
#endif
if (flags&SWS_FAST_BILINEAR)
av_log(c, AV_LOG_INFO, "FAST_BILINEAR scaler, ");
@@ -2542,7 +2542,7 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int v= av_clip_uint8(((RV*r + GV*g + BV*b)>>RGB2YUV_SHIFT) + 128);
pal[i]= y + (u<<8) + (v<<16);
}
- src2[1]= pal;
+ src2[1]= (uint8_t*)pal;
}
// copy strides, so they can safely be modified
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index 360b592cf4..f76c5948c5 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -2539,7 +2539,7 @@ static inline void RENAME(hyscale)(uint16_t *dst, long dstWidth, uint8_t *src, i
}
else if (srcFormat==PIX_FMT_RGB8 || srcFormat==PIX_FMT_BGR8 || srcFormat==PIX_FMT_PAL8 || srcFormat==PIX_FMT_BGR4_BYTE || srcFormat==PIX_FMT_RGB4_BYTE)
{
- RENAME(palToY)(formatConvBuffer, src, srcW, pal);
+ RENAME(palToY)(formatConvBuffer, src, srcW, (uint32_t*)pal);
src= formatConvBuffer;
}
@@ -2755,7 +2755,7 @@ inline static void RENAME(hcscale)(uint16_t *dst, long dstWidth, uint8_t *src1,
}
else if (srcFormat==PIX_FMT_RGB8 || srcFormat==PIX_FMT_BGR8 || srcFormat==PIX_FMT_PAL8 || srcFormat==PIX_FMT_BGR4_BYTE || srcFormat==PIX_FMT_RGB4_BYTE)
{
- RENAME(palToUV)(formatConvBuffer, formatConvBuffer+VOFW, src1, src2, srcW, pal);
+ RENAME(palToUV)(formatConvBuffer, formatConvBuffer+VOFW, src1, src2, srcW, (uint32_t*)pal);
src1= formatConvBuffer;
src2= formatConvBuffer+VOFW;
}
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 68576504a4..9c84e71cf2 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -15,6 +15,7 @@
#include <math.h>
#include "old_vo_defines.h"
#include "gl_common.h"
+#include "libavutil/common.h"
/**
* \defgroup glextfunctions OpenGL extension functions
@@ -769,7 +770,7 @@ static const char *unsharp_filt_template =
"TEX b.g, coord2.zwzw, texture[%c], %s;"
"DP3 b, b, {0.25, 0.25, 0.25};"
"SUB b.r, a.r, b.r;"
- "MAD yuv.%c, b.r, %s, a.r;";
+ "MAD yuv.%c, b.r, {%f}, a.r;";
static const char *unsharp_filt_template2 =
"PARAM dcoord%c = {%f, %f, %f, %f};"
@@ -793,7 +794,7 @@ static const char *unsharp_filt_template2 =
"TEX b.g, coord2.zwzw, texture[%c], %s;"
"DP4 b.r, b, {-0.1171875, -0.1171875, -0.1171875, -0.09765625};"
"MAD b.r, a.r, {0.859375}, b.r;"
- "MAD yuv.%c, b.r, %s, a.r;";
+ "MAD yuv.%c, b.r, {%f}, a.r;";
static const char *yuv_prog_template =
"PARAM ycoef = {%.4f, %.4f, %.4f};"
@@ -867,80 +868,68 @@ static void create_scaler_textures(int scaler, int *texu, char *texs) {
static void gen_gamma_map(unsigned char *map, int size, float gamma);
-static void get_yuv2rgb_coeffs(float brightness, float contrast, float uvcos, float uvsin,
- float *ry, float *ru, float *rv, float *rc,
- float *gy, float *gu, float *gv, float *gc,
- float *by, float *bu, float *bv, float *bc) {
- *ry = 1.164 * contrast;
- *gy = 1.164 * contrast;
- *by = 1.164 * contrast;
- *ru = 0 * uvcos + 1.596 * uvsin;
- *rv = 0 * uvsin + 1.596 * uvcos;
- *gu = -0.391 * uvcos + -0.813 * uvsin;
- *gv = -0.391 * uvsin + -0.813 * uvcos;
- *bu = 2.018 * uvcos + 0 * uvsin;
- *bv = 2.018 * uvsin + 0 * uvcos;
- *rc = (-16 * *ry + (-128) * *ru + (-128) * *rv) / 255.0 + brightness;
- *gc = (-16 * *gy + (-128) * *gu + (-128) * *gv) / 255.0 + brightness;
- *bc = (-16 * *by + (-128) * *bu + (-128) * *bv) / 255.0 + brightness;
- // these "center" contrast control so that e.g. a contrast of 0
- // leads to a grey image, not a black one
- *rc += 0.5 - contrast / 2.0;
- *gc += 0.5 - contrast / 2.0;
- *bc += 0.5 - contrast / 2.0;
+#define ROW_R 0
+#define ROW_G 1
+#define ROW_B 2
+#define COL_Y 0
+#define COL_U 1
+#define COL_V 2
+#define COL_C 3
+
+static void get_yuv2rgb_coeffs(gl_conversion_params_t *params, float yuv2rgb[3][4]) {
+ float uvcos = params->saturation * cos(params->hue);
+ float uvsin = params->saturation * sin(params->hue);
+ int i;
+ float uv_coeffs[3][2] = {
+ { 0.000, 1.596},
+ {-0.391, -0.813},
+ { 2.018, 0.000}
+ };
+ for (i = 0; i < 3; i++) {
+ yuv2rgb[i][COL_C] = params->brightness;
+ yuv2rgb[i][COL_Y] = 1.164 * params->contrast;
+ yuv2rgb[i][COL_C] += (-16 / 255.0) * yuv2rgb[i][COL_Y];
+ yuv2rgb[i][COL_U] = uv_coeffs[i][0] * uvcos + uv_coeffs[i][1] * uvsin;
+ yuv2rgb[i][COL_C] += (-128 / 255.0) * yuv2rgb[i][COL_U];
+ yuv2rgb[i][COL_V] = uv_coeffs[i][0] * uvsin + uv_coeffs[i][1] * uvcos;
+ yuv2rgb[i][COL_C] += (-128 / 255.0) * yuv2rgb[i][COL_V];
+ // this "centers" contrast control so that e.g. a contrast of 0
+ // leads to a grey image, not a black one
+ yuv2rgb[i][COL_C] += 0.5 - params->contrast / 2.0;
+ }
}
//! size of gamma map use to avoid slow exp function in gen_yuv2rgb_map
#define GMAP_SIZE (1024)
/**
* \brief generate a 3D YUV -> RGB map
+ * \param params struct containing parameters like brightness, gamma, ...
* \param map where to store map. Must provide space for (size + 2)^3 elements
* \param size size of the map, excluding border
- * \param brightness desired brightness adjustment for conversion
- * \param contrast desired contrast adjustment for conversion
- * \param uvcos desired hue/saturation adjustment for conversion
- * \param uvsin desired hue/saturation adjustment for conversion
- * \param rgamma desired red gamma adjustment for conversion
- * \param ggamma desired green gamma adjustment for conversion
- * \param bgamma desired blue gamma adjustment for conversion
*/
-static void gen_yuv2rgb_map(unsigned char *map, int size, float brightness,
- float contrast, float uvcos, float uvsin,
- float rgamma, float ggamma, float bgamma) {
- int i, j, k;
+static void gen_yuv2rgb_map(gl_conversion_params_t *params, unsigned char *map, int size) {
+ int i, j, k, l;
float step = 1.0 / size;
float y, u, v;
- float r, g, b;
- float ry, ru, rv, rc;
- float gy, gu, gv, gc;
- float by, bu, bv, bc;
+ float yuv2rgb[3][4];
unsigned char gmaps[3][GMAP_SIZE];
- gen_gamma_map(gmaps[0], GMAP_SIZE, rgamma);
- gen_gamma_map(gmaps[1], GMAP_SIZE, ggamma);
- gen_gamma_map(gmaps[2], GMAP_SIZE, bgamma);
- get_yuv2rgb_coeffs(brightness, contrast, uvcos, uvsin,
- &ry, &ru, &rv, &rc, &gy, &gu, &gv, &gc, &by, &bu, &bv, &bc);
- ry *= GMAP_SIZE - 1; ru *= GMAP_SIZE - 1; rv *= GMAP_SIZE - 1; rc *= GMAP_SIZE - 1;
- gy *= GMAP_SIZE - 1; gu *= GMAP_SIZE - 1; gv *= GMAP_SIZE - 1; gc *= GMAP_SIZE - 1;
- by *= GMAP_SIZE - 1; bu *= GMAP_SIZE - 1; bv *= GMAP_SIZE - 1; bc *= GMAP_SIZE - 1;
+ gen_gamma_map(gmaps[0], GMAP_SIZE, params->rgamma);
+ gen_gamma_map(gmaps[1], GMAP_SIZE, params->ggamma);
+ gen_gamma_map(gmaps[2], GMAP_SIZE, params->bgamma);
+ get_yuv2rgb_coeffs(params, yuv2rgb);
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 4; j++)
+ yuv2rgb[i][j] *= GMAP_SIZE - 1;
v = 0;
for (i = -1; i <= size; i++) {
u = 0;
for (j = -1; j <= size; j++) {
y = 0;
for (k = -1; k <= size; k++) {
- r = ry * y + ru * u + rv * v + rc;
- g = gy * y + gu * u + gv * v + gc;
- b = by * y + bu * u + bv * v + bc;
- if (r > GMAP_SIZE - 1) r = GMAP_SIZE - 1;
- if (r < 0) r = 0;
- if (g > GMAP_SIZE - 1) g = GMAP_SIZE - 1;
- if (g < 0) g = 0;
- if (b > GMAP_SIZE - 1) b = GMAP_SIZE - 1;
- if (b < 0) b = 0;
- *map++ = gmaps[0][(int)r];
- *map++ = gmaps[1][(int)g];
- *map++ = gmaps[2][(int)b];
+ for (l = 0; l < 3; l++) {
+ float rgb = yuv2rgb[l][COL_Y] * y + yuv2rgb[l][COL_U] * u + yuv2rgb[l][COL_V] * v + yuv2rgb[l][COL_C];
+ *map++ = gmaps[l][av_clip(rgb, 0, GMAP_SIZE - 1)];
+ }
y += (k == -1 || k == size - 1) ? step / 2 : step;
}
u += (j == -1 || j == size - 1) ? step / 2 : step;
@@ -955,20 +944,13 @@ static void gen_yuv2rgb_map(unsigned char *map, int size, float brightness,
#define LOOKUP_3DRES 32
/**
* \brief creates and initializes helper textures needed for yuv conversion
+ * \param params struct containing parameters like brightness, gamma, ...
* \param texu contains next free texture unit number
* \param texs texture unit ids for the conversion are stored in this array
- * \param brightness desired brightness adjustment for conversion
- * \param contrast desired contrast adjustment for conversion
- * \param uvcos desired hue/saturation adjustment for conversion
- * \param uvsin desired hue/saturation adjustment for conversion
- * \param rgamma desired red gamma adjustment for conversion
- * \param ggamma desired green gamma adjustment for conversion
- * \param bgamma desired blue gamma adjustment for conversion
*/
-static void create_conv_textures(int conv, int *texu, char *texs,
- float brightness, float contrast, float uvcos, float uvsin,
- float rgamma, float ggamma, float bgamma) {
+static void create_conv_textures(gl_conversion_params_t *params, int *texu, char *texs) {
unsigned char *lookup_data = NULL;
+ int conv = YUV_CONVERSION(params->type);
switch (conv) {
case YUV_CONVERSION_FRAGMENT:
case YUV_CONVERSION_FRAGMENT_POW:
@@ -977,9 +959,9 @@ static void create_conv_textures(int conv, int *texu, char *texs,
texs[0] = (*texu)++;
ActiveTexture(GL_TEXTURE0 + texs[0]);
lookup_data = malloc(4 * LOOKUP_RES);
- gen_gamma_map(lookup_data, LOOKUP_RES, rgamma);
- gen_gamma_map(&lookup_data[LOOKUP_RES], LOOKUP_RES, ggamma);
- gen_gamma_map(&lookup_data[2 * LOOKUP_RES], LOOKUP_RES, bgamma);
+ gen_gamma_map(lookup_data, LOOKUP_RES, params->rgamma);
+ gen_gamma_map(&lookup_data[LOOKUP_RES], LOOKUP_RES, params->ggamma);
+ gen_gamma_map(&lookup_data[2 * LOOKUP_RES], LOOKUP_RES, params->bgamma);
glCreateClearTex(GL_TEXTURE_2D, GL_LUMINANCE8, GL_LINEAR,
LOOKUP_RES, 4, 0);
glUploadTex(GL_TEXTURE_2D, GL_LUMINANCE, GL_UNSIGNED_BYTE, lookup_data,
@@ -997,8 +979,7 @@ static void create_conv_textures(int conv, int *texu, char *texs,
texs[0] = (*texu)++;
ActiveTexture(GL_TEXTURE0 + texs[0]);
lookup_data = malloc(3 * sz * sz * sz);
- gen_yuv2rgb_map(lookup_data, LOOKUP_3DRES, brightness, contrast,
- uvcos, uvsin, rgamma, ggamma, bgamma);
+ gen_yuv2rgb_map(params, lookup_data, LOOKUP_3DRES);
glAdjustAlignment(sz);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
TexImage3D(GL_TEXTURE_3D, 0, 3, sz, sz, sz, 1,
@@ -1031,9 +1012,11 @@ static void create_conv_textures(int conv, int *texu, char *texs,
* \param rect if rectangular (pixel) adressing should be used for in_tex
* \param texw width of the in_tex texture
* \param texh height of the in_tex texture
+ * \param strength strength of filter effect if the scaler does some kind of filtering
*/
static void add_scaler(int scaler, char **prog_pos, int *remain, char *texs,
- char in_tex, char out_comp, int rect, int texw, int texh) {
+ char in_tex, char out_comp, int rect, int texw, int texh,
+ double strength) {
const char *ttype = rect ? "RECT" : "2D";
const float ptw = rect ? 1.0 : 1.0 / texw;
const float pth = rect ? 1.0 : 1.0 / texh;
@@ -1079,7 +1062,7 @@ static void add_scaler(int scaler, char **prog_pos, int *remain, char *texs,
out_comp, 0.5 * ptw, 0.5 * pth, 0.5 * ptw, -0.5 * pth,
in_tex, out_comp, in_tex, out_comp, in_tex,
in_tex, ttype, in_tex, ttype, in_tex, ttype, in_tex, ttype,
- in_tex, ttype, out_comp, "{0.5}");
+ in_tex, ttype, out_comp, strength);
break;
case YUV_SCALER_UNSHARP2:
snprintf(*prog_pos, *remain, unsharp_filt_template2,
@@ -1089,7 +1072,7 @@ static void add_scaler(int scaler, char **prog_pos, int *remain, char *texs,
in_tex, ttype, in_tex, ttype, in_tex, ttype, in_tex, ttype,
in_tex, ttype, in_tex, out_comp, in_tex, out_comp,
in_tex, ttype, in_tex, ttype, in_tex, ttype,
- in_tex, ttype, out_comp, "{0.5}");
+ in_tex, ttype, out_comp, strength);
break;
}
*remain -= strlen(*prog_pos);
@@ -1156,17 +1139,14 @@ int loadGPUProgram(GLenum target, char *prog) {
/**
* \brief setup a fragment program that will do YUV->RGB conversion
- * \param brightness brightness adjustment offset
- * \param contrast contrast adjustment factor
- * \param uvcos used for saturation and hue adjustment
- * \param uvsin used for saturation and hue adjustment
- * \param lookup use fragment program that uses texture unit 4 to
- * do additional conversion via lookup.
+ * \param parms struct containing parameters like conversion and scaler type,
+ * brightness, ...
*/
-static void glSetupYUVFragprog(float brightness, float contrast,
- float uvcos, float uvsin, float rgamma,
- float ggamma, float bgamma, int type, int rect,
- int texw, int texh) {
+static void glSetupYUVFragprog(gl_conversion_params_t *params) {
+ int type = params->type;
+ int texw = params->texw;
+ int texh = params->texh;
+ int rect = params->target == GL_TEXTURE_RECTANGLE;
static const char prog_hdr[] =
"!!ARBfp1.0\n"
"OPTION ARB_precision_hint_fastest;"
@@ -1182,11 +1162,8 @@ static void glSetupYUVFragprog(float brightness, float contrast,
GLint i;
// this is the conversion matrix, with y, u, v factors
// for red, green, blue and the constant offsets
- float ry, ru, rv, rc;
- float gy, gu, gv, gc;
- float by, bu, bv, bc;
- create_conv_textures(YUV_CONVERSION(type), &cur_texu, conv_texs,
- brightness, contrast, uvcos, uvsin, rgamma, ggamma, bgamma);
+ float yuv2rgb[3][4];
+ create_conv_textures(params, &cur_texu, conv_texs);
create_scaler_textures(YUV_LUM_SCALER(type), &cur_texu, lum_scale_texs);
if (YUV_CHROM_SCALER(type) == YUV_LUM_SCALER(type))
memcpy(chrom_scale_texs, lum_scale_texs, sizeof(chrom_scale_texs));
@@ -1206,26 +1183,34 @@ static void glSetupYUVFragprog(float brightness, float contrast,
prog_pos = yuv_prog + sizeof(prog_hdr) - 1;
prog_remain = MAX_PROGSZ - sizeof(prog_hdr);
add_scaler(YUV_LUM_SCALER(type), &prog_pos, &prog_remain, lum_scale_texs,
- '0', 'r', rect, texw, texh);
+ '0', 'r', rect, texw, texh, params->filter_strength);
add_scaler(YUV_CHROM_SCALER(type), &prog_pos, &prog_remain, chrom_scale_texs,
- '1', 'g', rect, texw / 2, texh / 2);
+ '1', 'g', rect, texw / 2, texh / 2, params->filter_strength);
add_scaler(YUV_CHROM_SCALER(type), &prog_pos, &prog_remain, chrom_scale_texs,
- '2', 'b', rect, texw / 2, texh / 2);
- get_yuv2rgb_coeffs(brightness, contrast, uvcos, uvsin,
- &ry, &ru, &rv, &rc, &gy, &gu, &gv, &gc, &by, &bu, &bv, &bc);
+ '2', 'b', rect, texw / 2, texh / 2, params->filter_strength);
+ get_yuv2rgb_coeffs(params, yuv2rgb);
switch (YUV_CONVERSION(type)) {
case YUV_CONVERSION_FRAGMENT:
snprintf(prog_pos, prog_remain, yuv_prog_template,
- ry, gy, by, ru, gu, bu, rv, gv, bv, rc, gc, bc);
+ yuv2rgb[ROW_R][COL_Y], yuv2rgb[ROW_G][COL_Y], yuv2rgb[ROW_B][COL_Y],
+ yuv2rgb[ROW_R][COL_U], yuv2rgb[ROW_G][COL_U], yuv2rgb[ROW_B][COL_U],
+ yuv2rgb[ROW_R][COL_V], yuv2rgb[ROW_G][COL_V], yuv2rgb[ROW_B][COL_V],
+ yuv2rgb[ROW_R][COL_C], yuv2rgb[ROW_G][COL_C], yuv2rgb[ROW_B][COL_C]);
break;
case YUV_CONVERSION_FRAGMENT_POW:
snprintf(prog_pos, prog_remain, yuv_pow_prog_template,
- ry, gy, by, ru, gu, bu, rv, gv, bv, rc, gc, bc,
- (float)1.0 / rgamma, (float)1.0 / bgamma, (float)1.0 / bgamma);
+ yuv2rgb[ROW_R][COL_Y], yuv2rgb[ROW_G][COL_Y], yuv2rgb[ROW_B][COL_Y],
+ yuv2rgb[ROW_R][COL_U], yuv2rgb[ROW_G][COL_U], yuv2rgb[ROW_B][COL_U],
+ yuv2rgb[ROW_R][COL_V], yuv2rgb[ROW_G][COL_V], yuv2rgb[ROW_B][COL_V],
+ yuv2rgb[ROW_R][COL_C], yuv2rgb[ROW_G][COL_C], yuv2rgb[ROW_B][COL_C],
+ (float)1.0 / params->rgamma, (float)1.0 / params->bgamma, (float)1.0 / params->bgamma);
break;
case YUV_CONVERSION_FRAGMENT_LOOKUP:
snprintf(prog_pos, prog_remain, yuv_lookup_prog_template,
- ry, gy, by, ru, gu, bu, rv, gv, bv, rc, gc, bc,
+ yuv2rgb[ROW_R][COL_Y], yuv2rgb[ROW_G][COL_Y], yuv2rgb[ROW_B][COL_Y],
+ yuv2rgb[ROW_R][COL_U], yuv2rgb[ROW_G][COL_U], yuv2rgb[ROW_B][COL_U],
+ yuv2rgb[ROW_R][COL_V], yuv2rgb[ROW_G][COL_V], yuv2rgb[ROW_B][COL_V],
+ yuv2rgb[ROW_R][COL_C], yuv2rgb[ROW_G][COL_C], yuv2rgb[ROW_B][COL_C],
conv_texs[0], conv_texs[0], conv_texs[0]);
break;
case YUV_CONVERSION_FRAGMENT_LOOKUP3D:
@@ -1265,25 +1250,14 @@ static void gen_gamma_map(unsigned char *map, int size, float gamma) {
/**
* \brief setup YUV->RGB conversion
- * \param target texture target for Y, U and V textures (e.g. GL_TEXTURE_2D)
- * \param type YUV conversion type
- * \param brightness brightness adjustment offset
- * \param contrast contrast adjustment factor
- * \param hue hue adjustment angle
- * \param saturation saturation adjustment factor
- * \param rgamma gamma value for red channel
- * \param ggamma gamma value for green channel
- * \param bgamma gamma value for blue channel
+ * \param parms struct containing parameters like conversion and scaler type,
+ * brightness, ...
* \ingroup glconversion
*/
-void glSetupYUVConversion(GLenum target, int type,
- float brightness, float contrast,
- float hue, float saturation,
- float rgamma, float ggamma, float bgamma,
- int texw, int texh) {
- float uvcos = saturation * cos(hue);
- float uvsin = saturation * sin(hue);
- switch (YUV_CONVERSION(type)) {
+void glSetupYUVConversion(gl_conversion_params_t *params) {
+ float uvcos = params->saturation * cos(params->hue);
+ float uvsin = params->saturation * sin(params->hue);
+ switch (YUV_CONVERSION(params->type)) {
case YUV_CONVERSION_COMBINERS:
glSetupYUVCombiners(uvcos, uvsin);
break;
@@ -1294,13 +1268,10 @@ void glSetupYUVConversion(GLenum target, int type,
case YUV_CONVERSION_FRAGMENT_LOOKUP3D:
case YUV_CONVERSION_FRAGMENT:
case YUV_CONVERSION_FRAGMENT_POW:
- glSetupYUVFragprog(brightness, contrast, uvcos, uvsin,
- rgamma, ggamma, bgamma, type,
- target == GL_TEXTURE_RECTANGLE,
- texw, texh);
+ glSetupYUVFragprog(params);
break;
default:
- mp_msg(MSGT_VO, MSGL_ERR, "[gl] unknown conversion type %i\n", YUV_CONVERSION(type));
+ mp_msg(MSGT_VO, MSGL_ERR, "[gl] unknown conversion type %i\n", YUV_CONVERSION(params->type));
}
}
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index 05d1bde862..a7a4f8c2b1 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -263,11 +263,22 @@ int loadGPUProgram(GLenum target, char *prog);
//! extract chrominance scaler out of type
#define YUV_CHROM_SCALER(t) ((t >> YUV_CHROM_SCALER_SHIFT) & YUV_SCALER_MASK)
/** \} */
-void glSetupYUVConversion(GLenum target, int type,
- float brightness, float contrast,
- float hue, float saturation,
- float rgamma, float ggamma, float bgamma,
- int texw, int texh);
+typedef struct {
+ GLenum target;
+ int type;
+ float brightness;
+ float contrast;
+ float hue;
+ float saturation;
+ float rgamma;
+ float ggamma;
+ float bgamma;
+ int texw;
+ int texh;
+ float filter_strength;
+} gl_conversion_params_t;
+
+void glSetupYUVConversion(gl_conversion_params_t *params);
void glEnableYUVConversion(GLenum target, int type);
void glDisableYUVConversion(GLenum target, int type);
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index e90aebd764..acd7d88cd2 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -364,7 +364,7 @@ static int mga_init(int width,int height,unsigned int format){
mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
default:
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format);
- return (-1);
+ return -1;
}
mga_vid_config.src_width = width;
@@ -382,7 +382,7 @@ static int mga_init(int width,int height,unsigned int format){
if(width > 1024 && height > 1024)
{
mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
- return (-1);
+ return -1;
} else if(height <= 1024)
{
// try whether we have a G550
@@ -393,7 +393,7 @@ static int mga_init(int width,int height,unsigned int format){
{
// we don't have a G550, so our resolution is too high
mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
- return (-1);
+ return -1;
} else {
// there is a deeper problem
// we have a G550, but still couldn't configure mga_vid
@@ -445,6 +445,7 @@ static int mga_uninit(){
static int preinit(const char *vo_subdevice)
{
+ uint32_t ver;
const char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
sws_rgb2rgb_init(get_sws_cpuflags());
@@ -453,7 +454,17 @@ static int preinit(const char *vo_subdevice)
{
perror("open");
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname);
- return(-1);
+ return -1;
+ }
+
+ // check whether the mga_vid driver has the same
+ // version as we expect
+
+ ioctl(f,MGA_VID_GET_VERSION,&ver);
+ if(MGA_VID_VERSION != ver)
+ {
+ mp_msg(MSGT_VO, MSGL_ERR, MGSTR_LIBVO_MGA_mgavidVersionMismatch, ver, MGA_VID_VERSION);
+ return -1;
}
#ifdef VO_XMGA
diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
index f68ae611bd..669b922a6d 100644
--- a/libvo/vo_cvidix.c
+++ b/libvo/vo_cvidix.c
@@ -134,7 +134,7 @@ static int draw_frame(uint8_t *src[]){
}
static int query_format(uint32_t format){
- return(vidix_query_fourcc(format));
+ return vidix_query_fourcc(format);
}
static void uninit(void){
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index d829dc219a..fac15a46dd 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -917,11 +917,11 @@ query_format( uint32_t format )
return 0;
}
- return (VFCAP_HWSCALE_UP |
+ return VFCAP_HWSCALE_UP |
VFCAP_HWSCALE_DOWN |
VFCAP_CSP_SUPPORTED_BY_HW |
VFCAP_CSP_SUPPORTED |
- VFCAP_OSD);
+ VFCAP_OSD;
}
static void
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index 70079440b6..1aa0050337 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -119,11 +119,11 @@ static int vd_EnableMode(int depth, int bitspp,
static int vd_ModeEqual(int depth, int bitspp,
int rmask, int gmask, int bmask, int index)
{
- return ((vo_dga_modes[index].vdm_depth == depth &&
+ return (vo_dga_modes[index].vdm_depth == depth &&
vo_dga_modes[index].vdm_bitspp == bitspp &&
vo_dga_modes[index].vdm_rmask == rmask &&
vo_dga_modes[index].vdm_gmask == gmask &&
- vo_dga_modes[index].vdm_bmask == bmask) ? 1 : 0);
+ vo_dga_modes[index].vdm_bmask == bmask) ? 1 : 0;
}
@@ -964,7 +964,7 @@ static uint32_t get_image(mp_image_t * mpi)
|| (mpi->type == MP_IMGTYPE_STATIC && vo_dga_nr_video_buffers > 1)
|| (mpi->type == MP_IMGTYPE_IP && vo_dga_nr_video_buffers < 2)
|| (mpi->type == MP_IMGTYPE_IPB))
- return (VO_FALSE);
+ return VO_FALSE;
if ((mpi->flags & MP_IMGFLAG_ACCEPT_STRIDE) ||
(mpi->flags & MP_IMGFLAG_ACCEPT_WIDTH &&
@@ -978,10 +978,10 @@ static uint32_t get_image(mp_image_t * mpi)
mpi->width =
(vo_dga_bytes_per_line + vo_dga_vp_skip) / (mpi->bpp / 8);
mpi->flags |= MP_IMGFLAG_DIRECT;
- return (VO_TRUE);
+ return VO_TRUE;
}
- return (VO_FALSE);
+ return VO_FALSE;
}
static int control(uint32_t request, void *data)
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 178f17869a..abe5d9aeeb 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1038,7 +1038,7 @@ static int query_format(uint32_t format)
return 0;
#ifdef CONFIG_VIDIX
if(vidix_name)
- return (vidix_query_fourcc(format));
+ return vidix_query_fourcc(format);
#endif
if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) {
int bpp = format & 0xff;
@@ -1141,8 +1141,8 @@ static int preinit(const char *vo_subdevice)
fb_dev_name = strdup(vo_subdevice);
}
}
- if(!pre_init_err) return (pre_init_err=(fb_preinit(0)?0:-1));
- return(-1);
+ if(!pre_init_err) return pre_init_err = (fb_preinit(0) ? 0 : -1);
+ return -1;
}
static uint32_t get_image(mp_image_t *mpi)
@@ -1156,12 +1156,12 @@ static uint32_t get_image(mp_image_t *mpi)
(mpi->width != in_width) ||
(mpi->height != in_height)
)
- return(VO_FALSE);
+ return VO_FALSE;
mpi->planes[0] = center;
mpi->stride[0] = fb_line_len;
mpi->flags |= MP_IMGFLAG_DIRECT;
- return(VO_TRUE);
+ return VO_TRUE;
}
static int control(uint32_t request, void *data)
diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c
index a4ded390a6..b3f970ad8c 100644
--- a/libvo/vo_ggi.c
+++ b/libvo/vo_ggi.c
@@ -143,17 +143,17 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
if (ggiSetMode(ggi_conf.vis, &mode) < 0) {
mp_msg(MSGT_VO, MSGL_ERR, "[ggi] unable to set display mode\n");
- return (-1);
+ return -1;
}
if (ggiGetMode(ggi_conf.vis, &mode) < 0) {
mp_msg(MSGT_VO, MSGL_ERR, "[ggi] unable to get display mode\n");
- return (-1);
+ return -1;
}
if ((mode.graphtype == GT_INVALID)
|| (mode.graphtype == GT_AUTO))
{
mp_msg(MSGT_VO, MSGL_ERR, "[ggi] not supported depth/bpp\n");
- return (-1);
+ return -1;
}
#if 0
@@ -223,7 +223,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
} else {
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] Unknown image format: %s\n",
vo_format_name(ggi_conf.srcformat));
- return (-1);
+ return -1;
}
mp_msg(MSGT_VO, MSGL_INFO, "[ggi] input: %dx%dx%d, output: %dx%dx%d\n",
@@ -237,7 +237,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
ggi_conf.flushregion.x2 = vo_dwidth;
ggi_conf.flushregion.y2 = vo_dheight;
- return (0);
+ return 0;
}
static uint32_t get_image(mp_image_t *mpi)
@@ -246,19 +246,19 @@ static uint32_t get_image(mp_image_t *mpi)
if (!((IMGFMT_IS_BGR(mpi->imgfmt)) &&
(IMGFMT_BGR_DEPTH(mpi->imgfmt) == vo_dbpp)))
{
- return (VO_FALSE);
+ return VO_FALSE;
}
if (!((IMGFMT_IS_RGB(mpi->imgfmt)) &&
(IMGFMT_RGB_DEPTH(mpi->imgfmt) == vo_dbpp)))
{
- return (VO_FALSE);
+ return VO_FALSE;
}
if (!((mpi->width == ggi_conf.srcwidth) &&
(mpi->height == ggi_conf.srcheight)))
{
- return (VO_FALSE);
+ return VO_FALSE;
}
mpi->planes[1] = mpi->planes[2] = NULL;
@@ -274,7 +274,7 @@ static uint32_t get_image(mp_image_t *mpi)
}
#endif
- return (VO_TRUE);
+ return VO_TRUE;
}
@@ -288,7 +288,7 @@ static int draw_frame(uint8_t *src[])
ggi_conf.flushregion.x2 = vo_dwidth;
ggi_conf.flushregion.y2 = vo_dheight;
- return (0);
+ return 0;
}
static void draw_osd(void)
@@ -348,7 +348,7 @@ static int draw_slice(uint8_t *src[], int stride[],
ggi_conf.flushregion.y2 = vo_dy + y + h;
}
- return (1);
+ return 1;
}
static int query_format(uint32_t format)
@@ -388,19 +388,19 @@ static int query_format(uint32_t format)
return vfcap;
}
}
- return (0);
+ return 0;
}
static int preinit(const char *arg)
{
if (ggiInit() != 0) {
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize GGI\n");
- return (-1);
+ return -1;
}
#ifdef HAVE_GGIWMH
if (ggiWmhInit() < 0) {
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize libggiwmh\n");
- return (-1);
+ return -1;
}
#endif
@@ -421,7 +421,7 @@ static int preinit(const char *arg)
mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to open '%s' output\n",
(ggi_conf.driver == NULL) ? "default" : ggi_conf.driver);
ggiExit();
- return (-1);
+ return -1;
}
ggi_conf.drawvis = ggi_conf.vis;
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 93dfa6f923..68345ef2cc 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -74,6 +74,7 @@ static int use_aspect;
static int use_yuv;
static int lscale;
static int cscale;
+static float filter_strength;
static int yuvconvtype;
static int use_rectangle;
static int err_shown;
@@ -116,6 +117,8 @@ static int ass_border_x, ass_border_y;
static unsigned int slice_height = 1;
+static void redraw(void);
+
static void resize(int x,int y){
mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n",x,y);
if (WinID >= 0) {
@@ -153,7 +156,7 @@ static void resize(int x,int y){
vo_osd_changed(OSDTYPE_OSD);
}
glClear(GL_COLOR_BUFFER_BIT);
- flip_page();
+ redraw();
}
static void texSize(int w, int h, int *texw, int *texh) {
@@ -179,9 +182,10 @@ static void update_yuvconv(void) {
float rgamma = exp(log(8.0) * eq_rgamma / 100.0);
float ggamma = exp(log(8.0) * eq_ggamma / 100.0);
float bgamma = exp(log(8.0) * eq_bgamma / 100.0);
- glSetupYUVConversion(gl_target, yuvconvtype, bri, cont, hue, sat,
- rgamma, ggamma, bgamma,
- texture_width, texture_height);
+ gl_conversion_params_t params = {gl_target, yuvconvtype,
+ bri, cont, hue, sat, rgamma, ggamma, bgamma,
+ texture_width, texture_height, filter_strength};
+ glSetupYUVConversion(&params);
if (custom_prog) {
FILE *f = fopen(custom_prog, "r");
if (!f)
@@ -503,7 +507,7 @@ static void check_events(void)
{
int e=vo_check_events();
if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight);
- if(e&VO_EVENT_EXPOSE && int_pause) flip_page();
+ if(e&VO_EVENT_EXPOSE && int_pause) redraw();
}
/**
@@ -575,6 +579,8 @@ static void create_osd_texture(int x0, int y0, int w, int h,
osdtexCnt++;
}
+static void do_render_osd(void);
+
static void draw_osd(void)
{
if (!use_osd) return;
@@ -585,11 +591,10 @@ static void draw_osd(void)
osd_h = (scaled_osd) ? image_height : vo_dheight;
vo_draw_text(osd_w, osd_h, create_osd_texture);
}
+ if (vo_doublebuffering) do_render_osd();
}
-static void
-flip_page(void)
-{
+static void do_render(void) {
// glEnable(GL_TEXTURE_2D);
// glBindTexture(GL_TEXTURE_2D, texture_id);
@@ -603,7 +608,9 @@ flip_page(void)
mpi_flipped ^ vo_flipped);
if (image_format == IMGFMT_YV12)
glDisableYUVConversion(gl_target, yuvconvtype);
+}
+static void do_render_osd(void) {
if (osdtexCnt > 0 || eosdDispList) {
// set special rendering parameters
if (!scaled_osd) {
@@ -633,16 +640,25 @@ flip_page(void)
glPopMatrix();
BindTexture(gl_target, 0);
}
+}
- if (use_glFinish)
- glFinish();
- if (vo_doublebuffering)
+static void flip_page(void) {
+ if (vo_doublebuffering) {
+ if (use_glFinish) glFinish();
swapGlBuffers();
- else if (!use_glFinish)
- glFlush();
-
- if (vo_fs && use_aspect && vo_doublebuffering)
- glClear(GL_COLOR_BUFFER_BIT);
+ if (vo_fs && use_aspect)
+ glClear(GL_COLOR_BUFFER_BIT);
+ } else {
+ do_render();
+ do_render_osd();
+ if (use_glFinish) glFinish();
+ else glFlush();
+ }
+}
+
+static void redraw(void) {
+ if (vo_doublebuffering) { do_render(); do_render_osd(); }
+ flip_page();
}
//static inline uint32_t draw_slice_x11(uint8_t *src[], uint32_t slice_num)
@@ -713,7 +729,7 @@ static uint32_t draw_image(mp_image_t *mpi) {
unsigned char *planes[3];
mp_image_t mpi2 = *mpi;
if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)
- return VO_TRUE;
+ goto skip_upload;
mpi2.flags = 0; mpi2.type = MP_IMGTYPE_TEMP;
mpi2.width = mpi2.w; mpi2.height = mpi2.h;
if (force_pbo && !(mpi->flags & MP_IMGFLAG_DIRECT) && !gl_bufferptr && get_image(&mpi2) == VO_TRUE) {
@@ -753,6 +769,8 @@ static uint32_t draw_image(mp_image_t *mpi) {
}
if (mpi->flags & MP_IMGFLAG_DIRECT)
BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+skip_upload:
+ if (vo_doublebuffering) do_render();
return VO_TRUE;
}
@@ -808,6 +826,7 @@ static opt_t subopts[] = {
{"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg},
{"lscale", OPT_ARG_INT, &lscale, (opt_test_f)int_non_neg},
{"cscale", OPT_ARG_INT, &cscale, (opt_test_f)int_non_neg},
+ {"filter-strength", OPT_ARG_FLOAT, &filter_strength, NULL},
{"ati-hack", OPT_ARG_BOOL, &ati_hack, NULL},
{"force-pbo", OPT_ARG_BOOL, &force_pbo, NULL},
{"glfinish", OPT_ARG_BOOL, &use_glFinish, NULL},
@@ -830,6 +849,7 @@ static int preinit(const char *arg)
use_yuv = 0;
lscale = 0;
cscale = 0;
+ filter_strength = 0.5;
use_rectangle = 0;
use_glFinish = 0;
ati_hack = 0;
@@ -912,11 +932,33 @@ static int preinit(const char *arg)
return 0;
}
+#define MASK_ALL_YUV (~(1 << YUV_CONVERSION_NONE))
+#define MASK_NOT_COMBINERS (~((1 << YUV_CONVERSION_NONE) | (1 << YUV_CONVERSION_COMBINERS) | (1 << YUV_CONVERSION_COMBINERS_ATI)))
+#define MASK_GAMMA_SUPPORT (MASK_NOT_COMBINERS & ~(1 << YUV_CONVERSION_FRAGMENT))
+
+static const struct {
+ const char *name;
+ int *value;
+ int supportmask;
+} eq_map[] = {
+ {"brightness", &eq_bri, MASK_NOT_COMBINERS},
+ {"contrast", &eq_cont, MASK_NOT_COMBINERS},
+ {"saturation", &eq_sat, MASK_ALL_YUV },
+ {"hue", &eq_hue, MASK_ALL_YUV },
+ {"gamma", &eq_rgamma, MASK_GAMMA_SUPPORT},
+ {"red_gamma", &eq_rgamma, MASK_GAMMA_SUPPORT},
+ {"green_gamma", &eq_ggamma, MASK_GAMMA_SUPPORT},
+ {"blue_gamma", &eq_bgamma, MASK_GAMMA_SUPPORT},
+ {NULL, NULL, 0 }
+};
+
static int control(uint32_t request, void *data)
{
switch (request) {
- case VOCTRL_PAUSE: return (int_pause=1);
- case VOCTRL_RESUME: return (int_pause=0);
+ case VOCTRL_PAUSE:
+ case VOCTRL_RESUME:
+ int_pause = (request == VOCTRL_PAUSE);
+ return VO_TRUE;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
case VOCTRL_GET_IMAGE:
@@ -967,66 +1009,24 @@ static int control(uint32_t request, void *data)
case VOCTRL_GET_EQUALIZER:
if (image_format == IMGFMT_YV12) {
struct voctrl_get_equalizer_args *args = data;
- if (strcasecmp(args->name, "brightness") == 0) {
- *args->valueptr = eq_bri;
- if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(args->name, "contrast") == 0) {
- *args->valueptr = eq_cont;
- if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(args->name, "saturation") == 0) {
- *args->valueptr = eq_sat;
- } else if (strcasecmp(args->name, "hue") == 0) {
- *args->valueptr = eq_hue;
- } else if (strcasecmp(args->name, "gamma") == 0) {
- *args->valueptr = eq_rgamma;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(args->name, "red_gamma") == 0) {
- *args->valueptr = eq_rgamma;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(args->name, "green_gamma") == 0) {
- *args->valueptr = eq_ggamma;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(args->name, "blue_gamma") == 0) {
- *args->valueptr = eq_bgamma;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- }
+ int i;
+ for (i = 0; eq_map[i].name; i++)
+ if (strcmp(args->name, eq_map[i].name) == 0) break;
+ if (!(eq_map[i].supportmask & (1 << use_yuv)))
+ break;
+ *args->valueptr = *eq_map[i].value;
return VO_TRUE;
}
break;
case VOCTRL_SET_EQUALIZER:
if (image_format == IMGFMT_YV12) {
struct voctrl_set_equalizer_args *args = data;
- if (strcasecmp(args->name, "brightness") == 0) {
- eq_bri = args->value;
- if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(args->name, "contrast") == 0) {
- eq_cont = args->value;
- if (use_yuv == YUV_CONVERSION_COMBINERS) break; // not supported
- } else if (strcasecmp(args->name, "saturation") == 0) {
- eq_sat = args->value;
- } else if (strcasecmp(args->name, "hue") == 0) {
- eq_hue = args->value;
- } else if (strcasecmp(args->name, "gamma") == 0) {
- eq_rgamma = eq_ggamma = eq_bgamma = args->value;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(args->name, "red_gamma") == 0) {
- eq_rgamma = args->value;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(args->name, "green_gamma") == 0) {
- eq_ggamma = args->value;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- } else if (strcasecmp(args->name, "blue_gamma") == 0) {
- eq_bgamma = args->value;
- if (use_yuv == YUV_CONVERSION_COMBINERS ||
- use_yuv == YUV_CONVERSION_FRAGMENT) break; // not supported
- }
+ int i;
+ for (i = 0; eq_map[i].name; i++)
+ if (strcmp(args->name, eq_map[i].name) == 0) break;
+ if (!(eq_map[i].supportmask & (1 << use_yuv)))
+ break;
+ *eq_map[i].value = args->value;
update_yuvconv();
return VO_TRUE;
}
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 22fd598499..68885c37c2 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -561,6 +561,9 @@ static int initGl(uint32_t d_width, uint32_t d_height)
glDisable(GL_CULL_FACE);
glEnable (GL_TEXTURE_2D);
if (image_format == IMGFMT_YV12) {
+ gl_conversion_params_t params = {GL_TEXTURE_2D, use_yuv,
+ 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0,
+ texture_width, texture_height};
switch (use_yuv) {
case YUV_CONVERSION_FRAGMENT_LOOKUP:
glGenTextures(1, &lookupTex);
@@ -578,8 +581,7 @@ static int initGl(uint32_t d_width, uint32_t d_height)
BindProgram(GL_FRAGMENT_PROGRAM, fragprog);
break;
}
- glSetupYUVConversion(GL_TEXTURE_2D, use_yuv, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0,
- texture_width, texture_height);
+ glSetupYUVConversion(&params);
}
gl_set_antialias(0);
@@ -870,8 +872,10 @@ static int preinit(const char *arg)
static int control(uint32_t request, void *data)
{
switch (request) {
- case VOCTRL_PAUSE: return (int_pause=1);
- case VOCTRL_RESUME: return (int_pause=0);
+ case VOCTRL_PAUSE:
+ case VOCTRL_RESUME:
+ int_pause = (request == VOCTRL_PAUSE);
+ return VO_TRUE;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data));
case VOCTRL_GUISUPPORT:
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index 4987bc3bb8..485202d285 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -359,8 +359,8 @@ static int control(uint32_t request, void *data)
{
switch (request)
{
- case VOCTRL_PAUSE: return (int_pause=1);
- case VOCTRL_RESUME: return (int_pause=0);
+ case VOCTRL_PAUSE: return int_pause = 1;
+ case VOCTRL_RESUME: return int_pause = 0;
case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data));
case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); if(!shared_buffer){ [mpGLView ontop]; } else { [mplayerosxProto ontop]; } return VO_TRUE;
case VOCTRL_ROOTWIN: vo_rootwin = (!(vo_rootwin)); [mpGLView rootwin]; return VO_TRUE;
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index befe158e14..18eb397fbb 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -1232,8 +1232,8 @@ static int control(uint32_t request, void *data)
{
switch (request)
{
- case VOCTRL_PAUSE: return (int_pause=1);
- case VOCTRL_RESUME: return (int_pause=0);
+ case VOCTRL_PAUSE: return int_pause = 1;
+ case VOCTRL_RESUME: return int_pause = 0;
case VOCTRL_FULLSCREEN: vo_fs = (!(vo_fs)); window_fullscreen(); return VO_TRUE;
case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); window_ontop(); return VO_TRUE;
case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data));
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index 36873185c0..522ea8c83a 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -549,7 +549,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
#endif
vga_setdisplaystart(0);
- return (0);
+ return 0;
}
static int draw_slice(uint8_t *image[],int stride[],
@@ -698,7 +698,7 @@ int page;
if(!IMGFMT_IS_BGR(mpi->imgfmt) && !IMGFMT_IS_RGB(mpi->imgfmt) ){
assert(0);//should never happen
- return(VO_FALSE);
+ return VO_FALSE;
}
if (
@@ -706,7 +706,7 @@ int page;
(mpi->flags & MP_IMGFLAG_PLANAR) ||
(mpi->flags & MP_IMGFLAG_YUV)
)
- return(VO_FALSE);
+ return VO_FALSE;
//reading from video memory is horribly slow
if( !(mpi->flags & MP_IMGFLAG_READABLE) && vo_directrendering &&
@@ -724,9 +724,9 @@ int page;
mpi->priv=(void *)page;
if( mp_msg_test(MSGT_VO,MSGL_DBG3) )
mp_msg(MSGT_VO,MSGL_DBG3, "vo_svga: direct render allocated! page=%d\n",page);
- return(VO_TRUE);
+ return VO_TRUE;
}
}
- return(VO_FALSE);
+ return VO_FALSE;
}
diff --git a/libvo/vo_tga.c b/libvo/vo_tga.c
index 3a1d1fb6ff..e5cd90181b 100644
--- a/libvo/vo_tga.c
+++ b/libvo/vo_tga.c
@@ -165,7 +165,7 @@ static int write_tga( char *file, int bpp, int dx, int dy, uint8_t *buf, int str
if (er) {
fprintf(stderr, "Error writing file [%s]\n", file);
}
- return(er);
+ return er;
}
static uint32_t draw_image(mp_image_t* mpi)
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index b5fafb24a5..b761fdc036 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -460,7 +460,7 @@ static int query_format(uint32_t format)
if( mp_msg_test(MSGT_VO,MSGL_DBG3) )
mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: query_format was called: %x (%s)\n",format,vo_format_name(format));
#ifdef CONFIG_VIDIX
- if(vidix_name)return(vidix_query_fourcc(format));
+ if(vidix_name) return vidix_query_fourcc(format);
#endif
if (format == IMGFMT_MPEGPES)
return 0;
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c
index 4838165da1..2b35d6abfe 100644
--- a/libvo/vo_winvidix.c
+++ b/libvo/vo_winvidix.c
@@ -257,7 +257,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_h
ShowWindow(hWnd,SW_SHOW);
if(vo_fs)ShowWindow(hWndFS,SW_SHOW);
- return(0);
+ return 0;
}
static void check_events(void){
@@ -289,17 +289,17 @@ static int draw_slice(uint8_t *src[], int stride[],int w, int h, int x, int y){
UNUSED(x);
UNUSED(y);
mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_slice!\n");
- return(-1);
+ return -1;
}
static int draw_frame(uint8_t *src[]){
UNUSED(src);
mp_msg(MSGT_VO, MSGL_FATAL, "[winvidix] error: didn't use vidix draw_frame!\n");
- return(-1);
+ return -1;
}
static int query_format(uint32_t format){
- return(vidix_query_fourcc(format));
+ return vidix_query_fourcc(format);
}
static void uninit(void){
@@ -325,9 +325,9 @@ static int preinit(const char *arg){
}
if (vidix_preinit(vidix_name, video_out_winvidix.old_functions) != 0)
- return(1);
+ return 1;
- return(0);
+ return 0;
}
static int control(uint32_t request, void *data){
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index cc9ca02a6c..fd44bbf3dd 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -667,7 +667,7 @@ static uint32_t get_image(mp_image_t * mpi)
|| (mpi->flags & MP_IMGFLAG_PLANAR)
|| (mpi->flags & MP_IMGFLAG_YUV) || (mpi->width != image_width)
|| (mpi->height != image_height))
- return (VO_FALSE);
+ return VO_FALSE;
if (Flip_Flag)
{
@@ -680,7 +680,7 @@ static uint32_t get_image(mp_image_t * mpi)
}
mpi->flags |= MP_IMGFLAG_DIRECT;
- return (VO_TRUE);
+ return VO_TRUE;
}
static int query_format(uint32_t format)
@@ -753,9 +753,9 @@ static int control(uint32_t request, void *data)
switch (request)
{
case VOCTRL_PAUSE:
- return (int_pause = 1);
+ return int_pause = 1;
case VOCTRL_RESUME:
- return (int_pause = 0);
+ return int_pause = 0;
case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t *) data));
case VOCTRL_GUISUPPORT:
diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c
index a51e9aa48c..04f51790e6 100644
--- a/libvo/vo_xover.c
+++ b/libvo/vo_xover.c
@@ -332,7 +332,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
panscan_calc();
- return(0);
+ return 0;
}
static void check_events(void)
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 0dd6f6d43a..406aaaed44 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -378,7 +378,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
if (vo_ontop)
vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
- return (0);
+ return 0;
}
static void check_events(void)
@@ -418,7 +418,7 @@ static int draw_slice(uint8_t * src[], int stride[],
UNUSED(y);
mp_msg(MSGT_VO, MSGL_FATAL,
"[xvidix] error: didn't used vidix draw_slice!\n");
- return (-1);
+ return -1;
}
static int draw_frame(uint8_t * src[])
@@ -426,12 +426,12 @@ static int draw_frame(uint8_t * src[])
UNUSED(src);
mp_msg(MSGT_VO, MSGL_FATAL,
"[xvidix] error: didn't used vidix draw_frame!\n");
- return (-1);
+ return -1;
}
static int query_format(uint32_t format)
{
- return (vidix_query_fourcc(format));
+ return vidix_query_fourcc(format);
}
static void uninit(void)
@@ -462,12 +462,12 @@ static int preinit(const char *arg)
}
if (!vo_init())
- return (-1);
+ return -1;
if (vidix_preinit(vidix_name, video_out_xvidix.old_functions) != 0)
- return (1);
+ return 1;
- return (0);
+ return 0;
}
static int control(uint32_t request, void *data)
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index b9ff829faa..dee4a9e273 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -319,17 +319,17 @@ uint32_t vidix_query_fourcc(uint32_t format)
int vidix_grkey_support(void)
{
- return(vidix_fourcc.flags & VID_CAP_COLORKEY);
+ return vidix_fourcc.flags & VID_CAP_COLORKEY;
}
int vidix_grkey_get(vidix_grkey_t *gr_key)
{
- return(vdlGetGrKeys(vidix_handler, gr_key));
+ return vdlGetGrKeys(vidix_handler, gr_key);
}
int vidix_grkey_set(const vidix_grkey_t *gr_key)
{
- return(vdlSetGrKeys(vidix_handler, gr_key));
+ return vdlSetGrKeys(vidix_handler, gr_key);
}
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 6fefae61f3..36e3570c6e 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -251,11 +251,11 @@ static int x11_get_property(struct vo_x11_state *x11, Atom type, Atom ** args,
int format;
unsigned long bytesafter;
- return (Success ==
+ return Success ==
XGetWindowProperty(x11->display, x11->rootwin, type, 0, 16384, False,
AnyPropertyType, &type, &format, nitems,
&bytesafter, (unsigned char **) args)
- && *nitems > 0);
+ && *nitems > 0;
}
static int vo_wm_detect(struct vo *vo)
@@ -2093,10 +2093,10 @@ int vo_xv_set_eq(struct vo *vo, uint32_t xv_port, char *name, int value)
(port_value + 100) * (port_max - port_min) / 200 +
port_min;
XvSetPortAttribute(vo->x11->display, xv_port, xv_atom, port_value);
- return (VO_TRUE);
+ return VO_TRUE;
}
}
- return (VO_FALSE);
+ return VO_FALSE;
}
int vo_xv_get_eq(struct vo *vo, uint32_t xv_port, char *name, int *value)
@@ -2159,10 +2159,10 @@ int vo_xv_get_eq(struct vo *vo, uint32_t xv_port, char *name, int *value)
mp_dbg(MSGT_VO, MSGL_V, "xv_get_eq called! (%s, %d)\n",
name, *value);
- return (VO_TRUE);
+ return VO_TRUE;
}
}
- return (VO_FALSE);
+ return VO_FALSE;
}
/**
diff --git a/loader/driver.c b/loader/driver.c
index e7e50326e4..a59b28e67d 100644
--- a/loader/driver.c
+++ b/loader/driver.c
@@ -158,7 +158,7 @@ HDRVR DrvOpen(LPARAM lParam2)
hDriver = (NPDRVR) malloc(sizeof(DRVR));
if (!hDriver)
- return ((HDRVR) 0);
+ return (HDRVR) 0;
memset((void*)hDriver, 0, sizeof(DRVR));
#ifdef WIN32_LOADER
@@ -171,7 +171,7 @@ HDRVR DrvOpen(LPARAM lParam2)
{
printf("Can't open library %s\n", filename);
DrvClose((HDRVR)hDriver);
- return ((HDRVR) 0);
+ return (HDRVR) 0;
}
hDriver->DriverProc = (DRIVERPROC) GetProcAddress(hDriver->hDriverModule,
@@ -180,7 +180,7 @@ HDRVR DrvOpen(LPARAM lParam2)
{
printf("Library %s is not a valid VfW/ACM codec\n", filename);
DrvClose((HDRVR)hDriver);
- return ((HDRVR) 0);
+ return (HDRVR) 0;
}
TRACE("DriverProc == %X\n", hDriver->DriverProc);
diff --git a/loader/dshow/mediatype.c b/loader/dshow/mediatype.c
index 080c296c88..fc37f972f3 100644
--- a/loader/dshow/mediatype.c
+++ b/loader/dshow/mediatype.c
@@ -156,6 +156,6 @@ void DeleteMediaType(AM_MEDIA_TYPE * pMediaType)
#define IsEqualGUID(a,b) (memcmp(a,b,16)==0)
int CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, int bWildcards)
{
- return (((bWildcards && (IsEqualGUID(&pmt1->majortype, &GUID_NULL) || IsEqualGUID(&pmt2->majortype, &GUID_NULL))) || IsEqualGUID(&pmt1->majortype, &pmt2->majortype)) &&
- ((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype)));
+ return ((bWildcards && (IsEqualGUID(&pmt1->majortype, &GUID_NULL) || IsEqualGUID(&pmt2->majortype, &GUID_NULL))) || IsEqualGUID(&pmt1->majortype, &pmt2->majortype)) &&
+ ((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype));
}
diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c
index 88dc032d33..772ee5b0c5 100644
--- a/loader/qtx/qtxload.c
+++ b/loader/qtx/qtxload.c
@@ -17,7 +17,7 @@ ComponentResult ComponentDummy(
params, globals, ComponentDispatch);
printf(" Dummy: global datas: %p\n", *globals);
printf(" Dummy: returning 0\n");
- return(0);
+ return 0;
}
char *get_path(const char* x){ return strdup(x);}
diff --git a/loader/win32.c b/loader/win32.c
index e03ee4c0a5..73222808e0 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -1273,8 +1273,8 @@ static int critsecs_get_pos(CRITICAL_SECTION *cs_win)
for (i=0; i < CRITSECS_LIST_MAX; i++)
if (critsecs_list[i].cs_win == cs_win)
- return(i);
- return(-1);
+ return i;
+ return -1;
}
static int critsecs_get_unused(void)
@@ -1283,8 +1283,8 @@ static int critsecs_get_unused(void)
for (i=0; i < CRITSECS_LIST_MAX; i++)
if (critsecs_list[i].cs_win == NULL)
- return(i);
- return(-1);
+ return i;
+ return -1;
}
struct CRITSECT *critsecs_get_unix(CRITICAL_SECTION *cs_win)
@@ -1293,8 +1293,8 @@ struct CRITSECT *critsecs_get_unix(CRITICAL_SECTION *cs_win)
for (i=0; i < CRITSECS_LIST_MAX; i++)
if (critsecs_list[i].cs_win == cs_win && critsecs_list[i].cs_unix)
- return(critsecs_list[i].cs_unix);
- return(NULL);
+ return critsecs_list[i].cs_unix;
+ return NULL;
}
#endif
diff --git a/loader/wine/heap.h b/loader/wine/heap.h
index 52e2f1c868..592bf8259c 100644
--- a/loader/wine/heap.h
+++ b/loader/wine/heap.h
@@ -33,7 +33,7 @@ extern LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str );
(HIWORD(str) ? HEAP_strdupWtoA( SegptrHeap, 0, (str) ) : (LPSTR)(str))
/* define an inline function, a macro won't do */
static inline SEGPTR WINE_UNUSED SEGPTR_Get(LPCVOID ptr) {
- return (HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, ptr ) : (SEGPTR)ptr);
+ return HIWORD(ptr) ? HEAP_GetSegptr( SegptrHeap, 0, ptr ) : (SEGPTR)ptr;
}
#define SEGPTR_GET(ptr) SEGPTR_Get(ptr)
#define SEGPTR_FREE(ptr) \
diff --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c
index eb64069f61..b884903623 100644
--- a/mp3lib/dct64_altivec.c
+++ b/mp3lib/dct64_altivec.c
@@ -27,10 +27,10 @@
#define WORD_s2 0x18,0x19,0x1a,0x1b
#define WORD_s3 0x1c,0x1d,0x1e,0x1f
-#ifdef __APPLE_CC__
-#define AVV(x...) (x)
-#else
+#ifdef HAVE_ALTIVEC_VECTOR_BRACES
#define AVV(x...) {x}
+#else
+#define AVV(x...) (x)
#endif
#define vcprm(a,b,c,d) (const vector unsigned char)AVV(WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d)
diff --git a/mp_core.h b/mp_core.h
index d3ff5c0785..4a667b56d7 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -32,6 +32,7 @@
#define PT_PREV_SRC -2
#define PT_UP_NEXT 3
#define PT_UP_PREV -3
+#define PT_STOP 4
typedef struct MPContext {
diff --git a/mplayer.c b/mplayer.c
index 65de54f309..0a2a0e3a12 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3200,6 +3200,10 @@ if(stream_dump_type==5){
mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CantOpenDumpfile);
exit_player(mpctx, MSGTR_Exit_error);
}
+ if (dvd_chapter > 1) {
+ int chapter = dvd_chapter - 1;
+ stream_control(mpctx->stream, STREAM_CTRL_SEEK_TO_CHAPTER, &chapter);
+ }
while(!mpctx->stream->eof){
len=stream_read(mpctx->stream,buf,4096);
if(len>0) {
@@ -3722,7 +3726,9 @@ if (mpctx->sh_audio)
if(!mpctx->sh_video) {
// handle audio-only case:
double a_pos=0;
- if(!quiet || end_at.type == END_AT_TIME )
+ // sh_audio can be NULL due to video stream switching
+ // TODO: handle this better
+ if(!quiet || end_at.type == END_AT_TIME && mpctx->sh_audio)
a_pos = playing_audio_pts(mpctx);
if(!quiet)
@@ -4022,6 +4028,9 @@ if(mpctx->eof == PT_NEXT_ENTRY || mpctx->eof == PT_PREV_ENTRY) {
mpctx->playtree_iter = NULL;
}
}
+} else if (mpctx->eof == PT_STOP) {
+ play_tree_iter_free(mpctx->playtree_iter);
+ mpctx->playtree_iter = NULL;
} else { // NEXT PREV SRC
mpctx->eof = mpctx->eof == PT_PREV_SRC ? -1 : 1;
}
diff --git a/options.h b/options.h
index 8b0950b489..a033f2ed9b 100644
--- a/options.h
+++ b/options.h
@@ -64,6 +64,7 @@ typedef struct MPOpts {
unsigned int ar_delay;
unsigned int ar_rate;
char *js_dev;
+ char *ar_dev;
char *in_file;
int use_joystick;
int use_lirc;
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c
index 4d42bec878..6f9567c3db 100644
--- a/osdep/getch2-win.c
+++ b/osdep/getch2-win.c
@@ -101,7 +101,7 @@ static int getch2_internal(void)
}
/*check for function keys*/
if(0x87 >= eventbuffer[i].Event.KeyEvent.wVirtualKeyCode && eventbuffer[i].Event.KeyEvent.wVirtualKeyCode >= 0x70)
- return (KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70);
+ return KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70;
/*only characters should be remaining*/
//printf("getch2: YOU PRESSED \"%c\" \n",eventbuffer[i].Event.KeyEvent.uChar.AsciiChar);
diff --git a/osdep/shmem.c b/osdep/shmem.c
index 5c47bdf382..1adacfaef5 100644
--- a/osdep/shmem.c
+++ b/osdep/shmem.c
@@ -84,7 +84,7 @@ while(1){
return p;
#else
mp_msg(MSGT_OSDEP, MSGL_FATAL, "shmem: no SHM support was compiled in!\n");
- return(NULL);
+ return NULL;
#endif
}
default:
diff --git a/osdep/timer-linux.c b/osdep/timer-linux.c
index f32f92f392..972049ac5f 100644
--- a/osdep/timer-linux.c
+++ b/osdep/timer-linux.c
@@ -32,14 +32,14 @@ int usec_sleep(int usec_delay)
unsigned int GetTimer(void){
struct timeval tv;
gettimeofday(&tv,NULL);
- return (tv.tv_sec*1000000+tv.tv_usec);
+ return tv.tv_sec * 1000000 + tv.tv_usec;
}
// Returns current time in milliseconds
unsigned int GetTimerMS(void){
struct timeval tv;
gettimeofday(&tv,NULL);
- return (tv.tv_sec*1000+tv.tv_usec/1000);
+ return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}
// Initialize timer, must be called at least once at start
diff --git a/spudec.c b/spudec.c
index 2904908e59..5df8647318 100644
--- a/spudec.c
+++ b/spudec.c
@@ -497,7 +497,7 @@ static void spudec_decode(spudec_handle_t *this, int pts100)
int spudec_changed(void * this)
{
spudec_handle_t * spu = (spudec_handle_t*)this;
- return (spu->spu_changed || spu->now_pts > spu->end_pts);
+ return spu->spu_changed || spu->now_pts > spu->end_pts;
}
void spudec_assemble(void *this, unsigned char *packet, unsigned int len, int pts100)
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c
index f3417260a3..57a9d7c584 100644
--- a/stream/asf_mmst_streaming.c
+++ b/stream/asf_mmst_streaming.c
@@ -266,7 +266,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl)
// mp_msg(MSGT_NETWORK,MSGL_INFO,"get header packet finished\n");
- return (header_len);
+ return header_len;
}
diff --git a/stream/cache2.c b/stream/cache2.c
index 7d67bfb034..0696526f32 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -7,6 +7,7 @@
#define READ_USLEEP_TIME 10000
#define FILL_USLEEP_TIME 50000
#define PREFILL_SLEEP_TIME 200
+#define CONTROL_SLEEP_TIME 0
#include <stdio.h>
#include <stdlib.h>
@@ -57,6 +58,12 @@ typedef struct {
// int fifo_flag; // 1 if we should use FIFO to notice cache about buffer reads.
// callback
stream_t* stream;
+ volatile int control;
+ volatile unsigned control_uint_arg;
+ volatile double control_double_arg;
+ volatile int control_res;
+ volatile off_t control_new_pos;
+ volatile double stream_time_length;
} cache_vars_t;
static int min_fill=0;
@@ -191,6 +198,46 @@ static int cache_fill(cache_vars_t* s){
}
+static void cache_execute_control(cache_vars_t *s) {
+ static unsigned last;
+ if (!s->stream->control) {
+ s->stream_time_length = 0;
+ s->control_new_pos = 0;
+ s->control_res = STREAM_UNSUPPORTED;
+ s->control = -1;
+ return;
+ }
+ if (GetTimerMS() - last > 99) {
+ double len;
+ if (s->stream->control(s->stream, STREAM_CTRL_GET_TIME_LENGTH, &len) == STREAM_OK)
+ s->stream_time_length = len;
+ else
+ s->stream_time_length = 0;
+ last = GetTimerMS();
+ }
+ if (s->control == -1) return;
+ switch (s->control) {
+ case STREAM_CTRL_GET_CURRENT_TIME:
+ case STREAM_CTRL_SEEK_TO_TIME:
+ case STREAM_CTRL_GET_ASPECT_RATIO:
+ s->control_res = s->stream->control(s->stream, s->control, &s->control_double_arg);
+ break;
+ case STREAM_CTRL_SEEK_TO_CHAPTER:
+ case STREAM_CTRL_GET_NUM_CHAPTERS:
+ case STREAM_CTRL_GET_CURRENT_CHAPTER:
+ case STREAM_CTRL_GET_NUM_ANGLES:
+ case STREAM_CTRL_GET_ANGLE:
+ case STREAM_CTRL_SET_ANGLE:
+ s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg);
+ break;
+ default:
+ s->control_res = STREAM_UNSUPPORTED;
+ break;
+ }
+ s->control_new_pos = s->stream->pos;
+ s->control = -1;
+}
+
static cache_vars_t* cache_init(int size,int sector){
int num;
#if !defined(WIN32) && !defined(__OS2__)
@@ -331,6 +378,7 @@ static void ThreadProc( void *s ){
if(!cache_fill((cache_vars_t*)s)){
usec_sleep(FILL_USLEEP_TIME); // idle
}
+ cache_execute_control((cache_vars_t*)s);
// cache_stats(s->cache_data);
}
}
@@ -384,3 +432,53 @@ int cache_stream_seek_long(stream_t *stream,off_t pos){
mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos));
return 0;
}
+
+int cache_do_control(stream_t *stream, int cmd, void *arg) {
+ cache_vars_t* s = stream->cache_data;
+ switch (cmd) {
+ case STREAM_CTRL_SEEK_TO_TIME:
+ s->control_double_arg = *(double *)arg;
+ s->control = cmd;
+ break;
+ case STREAM_CTRL_SEEK_TO_CHAPTER:
+ case STREAM_CTRL_SET_ANGLE:
+ s->control_uint_arg = *(unsigned *)arg;
+ s->control = cmd;
+ break;
+// the core might call these every frame, they are too slow for this...
+ case STREAM_CTRL_GET_TIME_LENGTH:
+// case STREAM_CTRL_GET_CURRENT_TIME:
+ *(double *)arg = s->stream_time_length;
+ return s->stream_time_length ? STREAM_OK : STREAM_UNSUPPORTED;
+ case STREAM_CTRL_GET_NUM_CHAPTERS:
+ case STREAM_CTRL_GET_CURRENT_CHAPTER:
+ case STREAM_CTRL_GET_ASPECT_RATIO:
+ case STREAM_CTRL_GET_NUM_ANGLES:
+ case STREAM_CTRL_GET_ANGLE:
+ s->control = cmd;
+ break;
+ default:
+ return STREAM_UNSUPPORTED;
+ }
+ while (s->control != -1)
+ usec_sleep(CONTROL_SLEEP_TIME);
+ switch (cmd) {
+ case STREAM_CTRL_GET_TIME_LENGTH:
+ case STREAM_CTRL_GET_CURRENT_TIME:
+ case STREAM_CTRL_GET_ASPECT_RATIO:
+ *(double *)arg = s->control_double_arg;
+ break;
+ case STREAM_CTRL_GET_NUM_CHAPTERS:
+ case STREAM_CTRL_GET_CURRENT_CHAPTER:
+ case STREAM_CTRL_GET_NUM_ANGLES:
+ case STREAM_CTRL_GET_ANGLE:
+ *(unsigned *)arg = s->control_uint_arg;
+ break;
+ case STREAM_CTRL_SEEK_TO_CHAPTER:
+ case STREAM_CTRL_SEEK_TO_TIME:
+ case STREAM_CTRL_SET_ANGLE:
+ stream->pos = s->read_filepos = s->control_new_pos;
+ break;
+ }
+ return s->control_res;
+}
diff --git a/stream/cache2.h b/stream/cache2.h
index f61865f419..4eb201e177 100644
--- a/stream/cache2.h
+++ b/stream/cache2.h
@@ -4,5 +4,6 @@
#include "stream.h"
extern void cache_uninit(stream_t *s);
+int cache_do_control(stream_t *stream, int cmd, void *arg);
#endif /* MPLAYER_CACHE2_H */
diff --git a/stream/rtp.c b/stream/rtp.c
index db522df9b5..1c31bef4a1 100644
--- a/stream/rtp.c
+++ b/stream/rtp.c
@@ -213,7 +213,7 @@ int read_rtp_from_server(int fd, char *buffer, int length) {
mp_msg(MSGT_NETWORK, MSGL_ERR, "Got empty packet from RTP cache!?\n");
}
- return(length);
+ return length;
}
static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData) {
@@ -251,5 +251,5 @@ static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData) {
// mp_msg(MSGT_NETWORK,MSGL_DBG2,"Reading rtp: v=%x p=%x x=%x cc=%x m=%x pt=%x seq=%x ts=%x lgth=%d\n",rh->b.v,rh->b.p,rh->b.x,rh->b.cc,rh->b.m,rh->b.pt,rh->b.sequence,rh->timestamp,lengthPacket);
- return(0);
+ return 0;
}
diff --git a/stream/stream.c b/stream/stream.c
index e24237fa1d..227fcf4ea4 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -379,6 +379,8 @@ void stream_reset(stream_t *s){
int stream_control(stream_t *s, int cmd, void *arg){
if(!s->control) return STREAM_UNSUPPORTED;
+ if (s->cache_pid)
+ return cache_do_control(s, cmd, arg);
return s->control(s, cmd, arg);
}
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c
index 775652c322..b2c455d5d9 100644
--- a/stream/stream_cddb.c
+++ b/stream/stream_cddb.c
@@ -259,7 +259,7 @@ cddb_discid(int tot_trks) {
}
t = ((cdtoc[tot_trks].min * 60) + cdtoc[tot_trks].sec) -
((cdtoc[0].min * 60) + cdtoc[0].sec);
- return ((n % 0xff) << 24 | t << 8 | tot_trks);
+ return (n % 0xff) << 24 | t << 8 | tot_trks;
}
diff --git a/stream/stream_cue.c b/stream/stream_cue.c
index e25fddf99d..85628131d0 100644
--- a/stream/stream_cue.c
+++ b/stream/stream_cue.c
@@ -120,7 +120,7 @@ static int cue_getTrackinfo(char *Line, tTrack *track)
if(strncmp(&Line[11], "MODE2/2352", 10)==0) track->mode = MODE2_2352;
if(strncmp(&Line[11], "MODE2/2336", 10)==0) track->mode = MODE2_2336;
}
- else return(1);
+ else return 1;
/* Get the track indexes */
while(1) {
@@ -150,7 +150,7 @@ static int cue_getTrackinfo(char *Line, tTrack *track)
else mp_msg (MSGT_OPEN,MSGL_INFO,
MSGTR_MPDEMUX_CUEREAD_UnexpectedCuefileLine, Line);
}
- return(0);
+ return 0;
}
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index c5a22d8089..85a0d6ba03 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -41,7 +41,6 @@
#include "libmpdemux/demuxer.h"
#include "libavutil/intreadwrite.h"
-extern int stream_cache_size;
extern char* dvd_device;
int dvd_angle=1;
int dvd_speed=0; /* 0 => don't touch speed */
@@ -708,7 +707,6 @@ static int control(stream_t *stream,int cmd,void* arg)
case STREAM_CTRL_SEEK_TO_CHAPTER:
{
int r;
- if(stream_cache_size > 0) return STREAM_UNSUPPORTED;
r = seek_to_chapter(stream, d->vts_file, d->tt_srpt, d->cur_title-1, *((unsigned int *)arg));
if(! r) return STREAM_UNSUPPORTED;
@@ -716,14 +714,12 @@ static int control(stream_t *stream,int cmd,void* arg)
}
case STREAM_CTRL_GET_CURRENT_CHAPTER:
{
- if(stream_cache_size > 0) return STREAM_UNSUPPORTED;
*((unsigned int *)arg) = dvd_chapter_from_cell(d, d->cur_title-1, d->cur_cell);
return 1;
}
case STREAM_CTRL_GET_CURRENT_TIME:
{
double tm;
- if(stream_cache_size > 0) return STREAM_UNSUPPORTED;
tm = dvd_get_current_time(stream, 0);
if(tm != -1) {
*((double *)arg) = tm;
@@ -733,7 +729,6 @@ static int control(stream_t *stream,int cmd,void* arg)
}
case STREAM_CTRL_SEEK_TO_TIME:
{
- if(stream_cache_size > 0) return STREAM_UNSUPPORTED;
if(dvd_seek_to_time(stream, d->vts_file, *((double*)arg)))
return 1;
break;
@@ -1062,8 +1057,6 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
*file_format = DEMUXER_TYPE_MPEG_PS;
mp_msg(MSGT_DVD,MSGL_V,"DVD start=%d end=%d \n",d->cur_pack,d->cur_pgc->cell_playback[d->last_cell-1].last_sector);
stream->priv = (void*)d;
- if(stream_cache_size > 0)
- mp_msg(MSGT_DVD,MSGL_INFO,"[stream_dvd] Warning! the cache is enabled. Seeking won't work correctly\n");
return STREAM_OK;
fail:
diff --git a/stream/stream_dvd.h b/stream/stream_dvd.h
index 84ab1baaa1..379a7ffc84 100644
--- a/stream/stream_dvd.h
+++ b/stream/stream_dvd.h
@@ -8,10 +8,10 @@
#include "dvdread/ifo_read.h"
#include "dvdread/nav_read.h"
#else
-#include <dvdread/dvd_reader.h>
-#include <dvdread/ifo_types.h>
-#include <dvdread/ifo_read.h>
-#include <dvdread/nav_read.h>
+#include <libdvdread/dvd_reader.h>
+#include <libdvdread/ifo_types.h>
+#include <libdvdread/ifo_read.h>
+#include <libdvdread/nav_read.h>
#endif
#include "stream.h"
diff --git a/stream/stream_dvd_common.c b/stream/stream_dvd_common.c
index 895db3a567..5b08107dae 100644
--- a/stream/stream_dvd_common.c
+++ b/stream/stream_dvd_common.c
@@ -1,5 +1,10 @@
+#include "config.h"
#include <inttypes.h>
+#ifdef USE_DVDREAD_INTERNAL
#include <dvdread/ifo_types.h>
+#else
+#include <libdvdread/ifo_types.h>
+#endif
#include "stream_dvd_common.h"
/**
diff --git a/stream/stream_dvd_common.h b/stream/stream_dvd_common.h
index 9838f612fc..443daa45f9 100644
--- a/stream/stream_dvd_common.h
+++ b/stream/stream_dvd_common.h
@@ -2,7 +2,11 @@
#define MPLAYER_STREAM_DVD_COMMON_H
#include <inttypes.h>
+#ifdef USE_DVDREAD_INTERNAL
#include <dvdread/ifo_types.h>
+#else
+#include <libdvdread/ifo_types.h>
+#endif
int mp_dvdtimetomsec(dvd_time_t *dt);
diff --git a/stream/stream_ftp.c b/stream/stream_ftp.c
index de821b7ed1..091fc4e35c 100644
--- a/stream/stream_ftp.c
+++ b/stream/stream_ftp.c
@@ -81,7 +81,7 @@ static int fd_can_read(int fd,int timeout) {
tv.tv_sec = timeout;
tv.tv_usec = 0;
- return (select(fd+1, &fds, NULL, NULL, &tv) > 0);
+ return select(fd+1, &fds, NULL, NULL, &tv) > 0;
}
/*
diff --git a/stream/tv.c b/stream/tv.c
index 17bedccce3..696c0d542d 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -601,7 +601,7 @@ static tvi_handle_t *tv_begin(tv_param_t* tv_param)
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param->driver);
else
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_DriverAutoDetectionFailed);
- return(NULL);
+ return NULL;
}
static int tv_uninit(tvi_handle_t *tvh)
@@ -804,7 +804,7 @@ int tv_set_color_options(tvi_handle_t *tvh, int opt, int value)
mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt);
}
- return(TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value)
@@ -825,7 +825,7 @@ int tv_get_color_options(tvi_handle_t *tvh, int opt, int* value)
mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnknownColorOption, opt);
}
- return(TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq)
@@ -836,7 +836,7 @@ int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq)
mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency,
*freq, (float)*freq/16);
}
- return(1);
+ return 1;
}
int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
@@ -853,7 +853,7 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
freq, (float)freq/16);
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
- return(1);
+ return 1;
}
int tv_get_signal(tvi_handle_t *tvh)
@@ -910,7 +910,7 @@ int tv_step_channel_real(tvi_handle_t *tvh, int direction)
tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16));
}
}
- return(1);
+ return 1;
}
int tv_step_channel(tvi_handle_t *tvh, int direction) {
@@ -938,7 +938,7 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) {
tv_channel_current->number, tv_channel_current->name, (float)tv_channel_current->freq/1000);
}
} else tv_step_channel_real(tvh, direction);
- return(1);
+ return 1;
}
int tv_set_channel_real(tvi_handle_t *tvh, char *channel) {
@@ -961,7 +961,7 @@ int tv_set_channel_real(tvi_handle_t *tvh, char *channel) {
break;
}
}
- return(1);
+ return 1;
}
int tv_set_channel(tvi_handle_t *tvh, char *channel) {
@@ -979,7 +979,7 @@ int tv_set_channel(tvi_handle_t *tvh, char *channel) {
tv_channel_current->name, (float)tv_channel_current->freq/1000);
tv_set_freq(tvh, (unsigned long)(((float)tv_channel_current->freq/1000)*16));
} else tv_set_channel_real(tvh, channel);
- return(1);
+ return 1;
}
int tv_last_channel(tvi_handle_t *tvh) {
@@ -1013,7 +1013,7 @@ int tv_last_channel(tvi_handle_t *tvh) {
}
}
}
- return(1);
+ return 1;
}
int tv_step_norm(tvi_handle_t *tvh)
@@ -1029,12 +1029,12 @@ int tv_step_norm(tvi_handle_t *tvh)
}
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
- return(1);
+ return 1;
}
int tv_step_chanlist(tvi_handle_t *tvh)
{
- return(1);
+ return 1;
}
int tv_set_norm(tvi_handle_t *tvh, char* norm)
@@ -1047,7 +1047,7 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm)
return 0;
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
- return(1);
+ return 1;
}
demuxer_desc_t demuxer_desc_tv = {
diff --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c
index 5db90a2bde..1ad7778f37 100644
--- a/stream/tvi_bsdbt848.c
+++ b/stream/tvi_bsdbt848.c
@@ -227,18 +227,18 @@ static int control(priv_t *priv, int cmd, void *arg)
case TVI_CONTROL_IS_TUNER:
if(priv->tunerready == FALSE) return TVI_CONTROL_FALSE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_TUN_GET_FREQ:
{
if(ioctl(priv->tunerfd, TVTUNER_GETFREQ, &priv->tunerfreq) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_GETFREQ", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
*(int *)arg = priv->tunerfreq;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_SET_FREQ:
@@ -248,10 +248,10 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->tunerfd, TVTUNER_SETFREQ, &priv->tunerfreq) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "TVTUNER_SETFREQ", strerror(errno));
- return(0);
+ return 0;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_GET_SIGNAL:
{
@@ -259,10 +259,10 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->tunerfd, TVTUNER_GETSTATUS, &status) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "GETSTATUS", strerror(errno));
- return(0);
+ return 0;
}
*(int*)arg=(status & 0x02)? 100 : 0;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_GET_TUNER:
@@ -275,11 +275,11 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORGINPUT, &priv->input) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORGINPUT", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
*(int *)arg = priv->input;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_SPC_SET_INPUT:
@@ -289,27 +289,27 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSINPUT, &priv->input) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSINPUT", strerror(errno));
- return(0);
+ return 0;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
/* Audio Controls */
case TVI_CONTROL_IS_AUDIO:
if(priv->dspready == FALSE) return TVI_CONTROL_FALSE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_AUD_GET_FORMAT:
{
*(int *)arg = AF_FORMAT_S16_LE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_GET_CHANNELS:
{
*(int *)arg = 2;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_SET_SAMPLERATE:
{
@@ -318,7 +318,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
priv->dspspeed = dspspeed;
@@ -328,24 +328,24 @@ static int control(priv_t *priv, int cmd, void *arg)
priv->dsprate = priv->dspspeed * priv->dspsamplesize/8*
(priv->dspstereo+1);
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_GET_SAMPLERATE:
{
*(int *)arg = priv->dspspeed;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_GET_SAMPLESIZE:
{
*(int *)arg = priv->dspsamplesize/8;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
/* Video Controls */
case TVI_CONTROL_IS_VIDEO:
if(priv->videoready == FALSE) return TVI_CONTROL_FALSE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_TUN_SET_NORM:
{
@@ -406,20 +406,20 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFMT", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSETGEO", strerror(errno));
- return(0);
+ return 0;
}
tmp_fps = priv->fps;
if(ioctl(priv->btfd, METEORSFPS, &tmp_fps) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno));
- return(0);
+ return 0;
}
#ifdef BT848_SAUDIO
@@ -430,20 +430,20 @@ static int control(priv_t *priv, int cmd, void *arg)
}
#endif
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_GET_FORMAT:
*(int *)arg = IMGFMT_UYVY;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_SET_FORMAT:
{
int req_fmt = *(int *)arg;
- if(req_fmt != IMGFMT_UYVY) return(TVI_CONTROL_FALSE);
+ if(req_fmt != IMGFMT_UYVY) return TVI_CONTROL_FALSE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_SET_WIDTH:
priv->geom.columns = *(int *)arg;
@@ -456,14 +456,14 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno));
- return(0);
+ return 0;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_WIDTH:
*(int *)arg = priv->geom.columns;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_SET_HEIGHT:
priv->geom.rows = *(int *)arg;
@@ -481,18 +481,18 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSETGEO, &priv->geom) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848ErrorSettingWidth, strerror(errno));
- return(0);
+ return 0;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_HEIGHT:
*(int *)arg = priv->geom.rows;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_FPS:
*(float *)arg = priv->fps;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
/*
case TVI_CONTROL_VID_SET_FPS:
@@ -503,22 +503,22 @@ static int control(priv_t *priv, int cmd, void *arg)
if(ioctl(priv->btfd, METEORSFPS, &priv->fps) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFPS", strerror(errno));
- return(0);
+ return 0;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
*/
case TVI_CONTROL_VID_CHK_WIDTH:
case TVI_CONTROL_VID_CHK_HEIGHT:
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_IMMEDIATE:
priv->immediatemode = TRUE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
- return(TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
static int init(priv_t *priv)
@@ -660,7 +660,7 @@ if((priv->dspready == TRUE) &&
priv->dspready = FALSE;
}
-return(1);
+return 1;
}
/* that's the real start, we'got the format parameters (checked with control) */
@@ -671,7 +671,7 @@ struct timeval curtime;
int marg;
fprintf(stderr,"START\n");
-if(priv->videoready == FALSE) return(0);
+if(priv->videoready == FALSE) return 0;
signal(SIGUSR1, processframe);
signal(SIGALRM, processframe);
@@ -681,7 +681,7 @@ marg = SIGUSR1;
if(ioctl(priv->btfd, METEORSSIGNAL, &marg) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno));
- return(0);
+ return 0;
}
read(priv->dspfd, &tmp, 2);
@@ -695,24 +695,24 @@ marg = METEOR_CAP_CONTINOUS;
if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORCAPTUR", strerror(errno));
- return(0);
+ return 0;
}
-return(1);
+return 1;
}
static int uninit(priv_t *priv)
{
int marg;
-if(priv->videoready == FALSE) return(0);
+if(priv->videoready == FALSE) return 0;
marg = METEOR_SIG_MODE_MASK;
if(ioctl( priv->btfd, METEORSSIGNAL, &marg) < 0 )
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSSIGNAL", strerror(errno));
- return(0);
+ return 0;
}
marg = METEOR_CAP_STOP_CONT;
@@ -720,7 +720,7 @@ marg = METEOR_CAP_STOP_CONT;
if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848UnableToStopCapture, strerror(errno));
- return(0);
+ return 0;
}
close(priv->btfd);
@@ -731,7 +731,7 @@ priv->btfd = -1;
priv->dspready = priv->videoready = FALSE;
-return(1);
+return 1;
}
@@ -739,7 +739,7 @@ static double grabimmediate_video_frame(priv_t *priv, char *buffer, int len)
{
sigset_t sa_mask;
-if(priv->videoready == FALSE) return(0);
+if(priv->videoready == FALSE) return 0;
alarm(1);
sigfillset(&sa_mask);
@@ -754,7 +754,7 @@ memcpy(buffer, priv->livebuf, len);
/* PTS = 0, show the frame NOW, this routine is only used in playback mode
without audio capture .. */
-return(0);
+return 0;
}
static double grab_video_frame(priv_t *priv, char *buffer, int len)
@@ -762,7 +762,7 @@ static double grab_video_frame(priv_t *priv, char *buffer, int len)
double timestamp=0;
sigset_t sa_mask;
-if(priv->videoready == FALSE) return(0);
+if(priv->videoready == FALSE) return 0;
if(priv->immediatemode == TRUE)
{
@@ -784,12 +784,12 @@ priv->framebuf[priv->curbufframe].dirty = TRUE;
priv->curbufframe++;
if(priv->curbufframe >= RINGSIZE) priv->curbufframe = 0;
-return(timestamp-priv->starttime);
+return timestamp-priv->starttime;
}
static int get_video_framesize(priv_t *priv)
{
-return(priv->geom.columns*priv->geom.rows*16/8);
+return priv->geom.columns * priv->geom.rows * 16 / 8;
}
static double grab_audio_frame(priv_t *priv, char *buffer, int len)
@@ -839,7 +839,7 @@ else
}
}
-return(priv->dspbytesread * 1.0 / priv->dsprate);
+return priv->dspbytesread * 1.0 / priv->dsprate;
}
static int get_audio_framesize(priv_t *priv)
@@ -855,7 +855,7 @@ if(priv->dspready == FALSE) return 0;
if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
else
bytesavail = auinf.record.seek; /* *priv->dspsamplesize; */
@@ -863,7 +863,7 @@ else
if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "FIONREAD", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
#endif
@@ -872,7 +872,7 @@ if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0)
if(bytesavail == 0) return FRAGSIZE;
-return(bytesavail);
+return bytesavail;
}
static int getinput(int innumber)
diff --git a/stream/tvi_def.h b/stream/tvi_def.h
index 7b664a15b9..967c15ee15 100644
--- a/stream/tvi_def.h
+++ b/stream/tvi_def.h
@@ -34,12 +34,12 @@ static tvi_handle_t *new_handle(void)
tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t));
if (!h)
- return(NULL);
+ return NULL;
h->priv = (priv_t *)malloc(sizeof(priv_t));
if (!h->priv)
{
free(h);
- return(NULL);
+ return NULL;
}
memset(h->priv, 0, sizeof(priv_t));
h->functions = &functions;
@@ -49,7 +49,7 @@ static tvi_handle_t *new_handle(void)
h->norm = -1;
h->channel = -1;
h->scan = NULL;
- return(h);
+ return h;
}
static void free_handle(tvi_handle_t *h)
diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c
index 9538a38985..3cf574cee4 100644
--- a/stream/tvi_dshow.c
+++ b/stream/tvi_dshow.c
@@ -2413,7 +2413,7 @@ static double grab_video_frame(priv_t * priv, char *buffer, int len)
static int get_video_framesize(priv_t * priv)
{
// if(!priv->pmtVideo) return 1; //no video
-// return(priv->pmtVideo->lSampleSize);
+// return priv->pmtVideo->lSampleSize;
if (!priv->chains[0]->rbuf)
return 1; //no video
mp_msg(MSGT_TV,MSGL_DBG3,"geT_video_framesize: %d\n",priv->chains[0]->rbuf->blocksize);
@@ -2657,7 +2657,7 @@ static int start(priv_t * priv)
mp_msg(MSGT_TV, MSGL_DBG2, "tvi_dshow: Graph is started.\n");
priv->state = 1;
- return (1);
+ return 1;
}
/**
@@ -3012,7 +3012,7 @@ static int uninit(priv_t * priv)
{
int i;
if (!priv)
- return (1);
+ return 1;
//Debug
if (priv->dwRegister) {
RemoveFromRot(priv->dwRegister);
@@ -3050,7 +3050,7 @@ static int uninit(priv_t * priv)
priv->chains[i] = NULL;
}
CoUninitialize();
- return (1);
+ return 1;
}
/**
@@ -3069,7 +3069,7 @@ static tvi_handle_t *tvi_init_dshow(tv_param_t* tv_param)
h = new_handle();
if (!h)
- return (NULL);
+ return NULL;
priv = h->priv;
@@ -3210,9 +3210,9 @@ static int control(priv_t * priv, int cmd, void *arg)
DisplayMediaType("VID_GET_FORMAT", priv->chains[0]->pmt);
if (priv->fcc) {
*(int *) arg = priv->fcc;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
} else
- return (TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
case TVI_CONTROL_VID_SET_WIDTH:
{
@@ -3242,13 +3242,13 @@ static int control(priv_t * priv, int cmd, void *arg)
priv->width = width;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_GET_WIDTH:
{
if (priv->width) {
*(int *) arg = priv->width;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
} else
return TVI_CONTROL_FALSE;
}
@@ -3265,7 +3265,7 @@ static int control(priv_t * priv, int cmd, void *arg)
if (width % pCaps->OutputGranularityX)
return TVI_CONTROL_FALSE;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_SET_HEIGHT:
{
@@ -3298,13 +3298,13 @@ static int control(priv_t * priv, int cmd, void *arg)
Vhdr->bmiHeader.biHeight) >> 3;
priv->height = height;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_GET_HEIGHT:
{
if (priv->height) {
*(int *) arg = priv->height;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
} else
return TVI_CONTROL_FALSE;
}
@@ -3322,7 +3322,7 @@ static int control(priv_t * priv, int cmd, void *arg)
if (height % pCaps->OutputGranularityY)
return TVI_CONTROL_FALSE;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_IS_AUDIO:
if (!priv->chains[1]->pmt)
@@ -3399,7 +3399,7 @@ static int control(priv_t * priv, int cmd, void *arg)
if (!priv->pTVTuner)
return TVI_CONTROL_FALSE;
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_SET_NORM:
{
@@ -3420,9 +3420,9 @@ static int control(priv_t * priv, int cmd, void *arg)
hr = OLE_CALL_ARGS(pVD, put_TVFormat, lAnalogFormat);
OLE_RELEASE_SAFE(pVD);
if (FAILED(hr))
- return (TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
else
- return (TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_GET_NORM:
{
@@ -3450,7 +3450,7 @@ static int control(priv_t * priv, int cmd, void *arg)
return TVI_CONTROL_TRUE;
}
}
- return (TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
case TVI_CONTROL_SPC_GET_NORMID:
{
@@ -3539,5 +3539,5 @@ static int control(priv_t * priv, int cmd, void *arg)
return teletext_control(priv->priv_vbi,cmd,arg);
#endif
}
- return (TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
diff --git a/stream/tvi_dummy.c b/stream/tvi_dummy.c
index 7480d82b71..a9877fd653 100644
--- a/stream/tvi_dummy.c
+++ b/stream/tvi_dummy.c
@@ -29,7 +29,7 @@ typedef struct {
/* handler creator - entry point ! */
static tvi_handle_t *tvi_init_dummy(tv_param_t* tv_param)
{
- return(new_handle());
+ return new_handle();
}
/* initialisation */
@@ -37,18 +37,18 @@ static int init(priv_t *priv)
{
priv->width = 320;
priv->height = 200;
- return(1);
+ return 1;
}
/* that's the real start, we'got the format parameters (checked with control) */
static int start(priv_t *priv)
{
- return(1);
+ return 1;
}
static int uninit(priv_t *priv)
{
- return(1);
+ return 1;
}
static int control(priv_t *priv, int cmd, void *arg)
@@ -56,59 +56,59 @@ static int control(priv_t *priv, int cmd, void *arg)
switch(cmd)
{
case TVI_CONTROL_IS_VIDEO:
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_FORMAT:
// *(int *)arg = IMGFMT_YV12;
*(int *)arg = IMGFMT_YV12;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_SET_FORMAT:
{
// int req_fmt = *(int *)arg;
int req_fmt = *(int *)arg;
if (req_fmt != IMGFMT_YV12)
- return(TVI_CONTROL_FALSE);
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_FALSE;
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_SET_WIDTH:
priv->width = *(int *)arg;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_WIDTH:
*(int *)arg = priv->width;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_SET_HEIGHT:
priv->height = *(int *)arg;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_HEIGHT:
*(int *)arg = priv->height;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_CHK_WIDTH:
case TVI_CONTROL_VID_CHK_HEIGHT:
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_TUN_SET_NORM:
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
- return(TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
static double grab_video_frame(priv_t *priv, char *buffer, int len)
{
memset(buffer, 0x42, len);
- return(1);
+ return 1;
}
static int get_video_framesize(priv_t *priv)
{
/* YV12 */
- return(priv->width*priv->height*12/8);
+ return priv->width * priv->height * 12 / 8;
}
static double grab_audio_frame(priv_t *priv, char *buffer, int len)
{
memset(buffer, 0x42, len);
- return(1);
+ return 1;
}
static int get_audio_framesize(priv_t *priv)
{
- return(1);
+ return 1;
}
diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c
index 826fe71f19..72af5c4d14 100644
--- a/stream/tvi_v4l.c
+++ b/stream/tvi_v4l.c
@@ -221,18 +221,18 @@ static int palette2depth(int palette)
{
/* component */
case VIDEO_PALETTE_RGB555:
- return(15);
+ return 15;
case VIDEO_PALETTE_RGB565:
- return(16);
+ return 16;
case VIDEO_PALETTE_RGB24:
- return(24);
+ return 24;
case VIDEO_PALETTE_RGB32:
- return(32);
+ return 32;
/* planar */
case VIDEO_PALETTE_YUV411P:
case VIDEO_PALETTE_YUV420P:
case VIDEO_PALETTE_YUV410P:
- return(12);
+ return 12;
/* packed */
case VIDEO_PALETTE_YUV422P:
case VIDEO_PALETTE_YUV422:
@@ -240,9 +240,9 @@ static int palette2depth(int palette)
case VIDEO_PALETTE_UYVY:
case VIDEO_PALETTE_YUV420:
case VIDEO_PALETTE_YUV411:
- return(16);
+ return 16;
}
- return(-1);
+ return -1;
}
static int format2palette(int format)
@@ -250,22 +250,22 @@ static int format2palette(int format)
switch(format)
{
case IMGFMT_BGR15:
- return(VIDEO_PALETTE_RGB555);
+ return VIDEO_PALETTE_RGB555;
case IMGFMT_BGR16:
- return(VIDEO_PALETTE_RGB565);
+ return VIDEO_PALETTE_RGB565;
case IMGFMT_BGR24:
- return(VIDEO_PALETTE_RGB24);
+ return VIDEO_PALETTE_RGB24;
case IMGFMT_BGR32:
- return(VIDEO_PALETTE_RGB32);
+ return VIDEO_PALETTE_RGB32;
case IMGFMT_YV12:
case IMGFMT_I420:
- return(VIDEO_PALETTE_YUV420P);
+ return VIDEO_PALETTE_YUV420P;
case IMGFMT_YUY2:
- return(VIDEO_PALETTE_YUV422);
+ return VIDEO_PALETTE_YUV422;
case IMGFMT_UYVY:
- return(VIDEO_PALETTE_UYVY);
+ return VIDEO_PALETTE_UYVY;
}
- return(-1);
+ return -1;
}
// sets and sanitizes audio buffer/block sizes
@@ -296,7 +296,7 @@ static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param)
h = new_handle();
if (!h)
- return(NULL);
+ return NULL;
priv = h->priv;
@@ -316,11 +316,11 @@ static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param)
/* allocation failed */
if (!priv->video_device) {
free_handle(h);
- return(NULL);
+ return NULL;
}
priv->tv_param=tv_param;
- return(h);
+ return h;
}
/* retrieves info about audio channels from the BTTV */
@@ -658,7 +658,7 @@ static int init(priv_t *priv)
setup_audio_buffer_sizes(priv);
}
- return(1);
+ return 1;
malloc_failed:
if (priv->channels)
@@ -668,7 +668,7 @@ malloc_failed:
err:
if (priv->video_fd != -1)
close(priv->video_fd);
- return(0);
+ return 0;
}
static int uninit(priv_t *priv)
@@ -751,7 +751,7 @@ static int uninit(priv_t *priv)
free(priv->audio_skew_buffer);
}
- return(1);
+ return 1;
}
static int get_capture_buffer_size(priv_t *priv)
@@ -908,7 +908,7 @@ static int start(priv_t *priv)
if (ioctl(priv->video_fd, VIDIOCGPICT, &priv->picture) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get picture failed: %s\n", strerror(errno));
- return(0);
+ return 0;
}
priv->picture.palette = format2palette(priv->format);
@@ -999,7 +999,7 @@ static int start(priv_t *priv)
if (ioctl(priv->video_fd, VIDIOCSPLAYMODE, &pmode) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set play mode failed: %s\n", strerror(errno));
-// return(0);
+// return 0;
}
}
#endif
@@ -1009,7 +1009,7 @@ static int start(priv_t *priv)
if (ioctl(priv->video_fd, VIDIOCCAPTURE, &one) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "FATAL: ioctl ccapture failed: %s\n", strerror(errno));
- return(0);
+ return 0;
}
#endif
@@ -1130,7 +1130,7 @@ static int start(priv_t *priv)
pthread_mutex_init(&priv->video_buffer_mutex, NULL);
/* we'll launch the video capture later, when a first request for a frame arrives */
- return(1);
+ return 1;
}
@@ -1144,22 +1144,22 @@ static int control(priv_t *priv, int cmd, void *arg)
case TVI_CONTROL_IS_VIDEO:
{
if (priv->capability.type & VID_TYPE_CAPTURE)
- return(TVI_CONTROL_TRUE);
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_TRUE;
+ return TVI_CONTROL_FALSE;
}
case TVI_CONTROL_IS_AUDIO:
- if (priv->tv_param->force_audio) return(TVI_CONTROL_TRUE);
+ if (priv->tv_param->force_audio) return TVI_CONTROL_TRUE;
if (priv->channels[priv->act_channel].flags & VIDEO_VC_AUDIO)
{
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
case TVI_CONTROL_IS_TUNER:
{
// if (priv->capability.type & VID_TYPE_TUNER)
if (priv->channels[priv->act_channel].flags & VIDEO_VC_TUNER)
- return(TVI_CONTROL_TRUE);
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_TRUE;
+ return TVI_CONTROL_FALSE;
}
/* ========== VIDEO controls =========== */
@@ -1181,7 +1181,7 @@ static int control(priv_t *priv, int cmd, void *arg)
*(int *)arg = output_fmt;
mp_msg(MSGT_TV, MSGL_V, "Output format: %s\n", vo_format_name(output_fmt));
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_VID_SET_FORMAT:
priv->format = *(int *)arg;
@@ -1193,16 +1193,16 @@ static int control(priv_t *priv, int cmd, void *arg)
priv->format &= ~IMGFMT_RGB_MASK;
priv->format |= IMGFMT_BGR;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_PLANES:
*(int *)arg = 1; /* FIXME, also not needed at this time */
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_BITS:
*(int *)arg = palette2depth(format2palette(priv->format));
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_WIDTH:
*(int *)arg = priv->width;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_CHK_WIDTH:
{
int req_width = *(int *)arg;
@@ -1210,15 +1210,15 @@ static int control(priv_t *priv, int cmd, void *arg)
mp_msg(MSGT_TV, MSGL_V, "Requested width: %d\n", req_width);
if ((req_width >= priv->capability.minwidth) &&
(req_width <= priv->capability.maxwidth))
- return(TVI_CONTROL_TRUE);
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_TRUE;
+ return TVI_CONTROL_FALSE;
}
case TVI_CONTROL_VID_SET_WIDTH:
priv->width = *(int *)arg;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_HEIGHT:
*(int *)arg = priv->height;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_CHK_HEIGHT:
{
int req_height = *(int *)arg;
@@ -1226,26 +1226,26 @@ static int control(priv_t *priv, int cmd, void *arg)
mp_msg(MSGT_TV, MSGL_V, "Requested height: %d\n", req_height);
if ((req_height >= priv->capability.minheight) &&
(req_height <= priv->capability.maxheight))
- return(TVI_CONTROL_TRUE);
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_TRUE;
+ return TVI_CONTROL_FALSE;
}
case TVI_CONTROL_VID_SET_HEIGHT:
priv->height = *(int *)arg;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_GET_PICTURE:
if (ioctl(priv->video_fd, VIDIOCGPICT, &priv->picture) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get picture failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_SET_PICTURE:
if (ioctl(priv->video_fd, VIDIOCSPICT, &priv->picture) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set picture failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_VID_SET_BRIGHTNESS:
priv->picture.brightness = (327*(*(int *)arg+100)) + 68;
return control(priv, TVI_CONTROL_VID_SET_PICTURE, 0);
@@ -1276,7 +1276,7 @@ static int control(priv_t *priv, int cmd, void *arg)
return 1;
case TVI_CONTROL_VID_GET_FPS:
*(float *)arg=priv->fps;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
/* ========== TUNER controls =========== */
case TVI_CONTROL_TUN_GET_FREQ:
@@ -1286,14 +1286,14 @@ static int control(priv_t *priv, int cmd, void *arg)
if (ioctl(priv->video_fd, VIDIOCGFREQ, &freq) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get freq failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
/* tuner uses khz not mhz ! */
// if (priv->tuner.flags & VIDEO_TUNER_LOW)
// freq /= 1000;
*(unsigned long *)arg = freq;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_SET_FREQ:
{
@@ -1314,7 +1314,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if (ioctl(priv->video_fd, VIDIOCSFREQ, &freq) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set freq failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
usleep(100000); // wait to suppress noise during switching
@@ -1323,28 +1323,28 @@ static int control(priv_t *priv, int cmd, void *arg)
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_GET_TUNER:
{
if (ioctl(priv->video_fd, VIDIOCGTUNER, &priv->tuner) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get tuner failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
mp_msg(MSGT_TV, MSGL_V, "Tuner (%s) range: %lu -> %lu\n", priv->tuner.name,
priv->tuner.rangelow, priv->tuner.rangehigh);
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_SET_TUNER:
{
if (ioctl(priv->video_fd, VIDIOCSTUNER, &priv->tuner) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set tuner failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_SET_NORM:
{
@@ -1356,7 +1356,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(!supported_norms[norm_index].name) {
mp_msg(MSGT_TV, MSGL_ERR, "Unknown norm!\n");
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
if (priv->channels[priv->act_channel].flags & VIDEO_VC_TUNER) {
@@ -1366,7 +1366,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if(!(priv->tuner.flags & supported_norms[norm_index].tuner_flags))
{
mp_msg(MSGT_TV, MSGL_ERR, "Tuner isn't capable to set norm!\n");
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
prev_mode = priv->tuner.mode;
@@ -1375,7 +1375,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if (control(priv, TVI_CONTROL_TUN_SET_TUNER, &priv->tuner) != TVI_CONTROL_TRUE) {
// norm setting failed, but maybe it's only because it's fixed
- if (priv->tuner.mode != prev_mode) return(TVI_CONTROL_FALSE); // no it really failed
+ if (priv->tuner.mode != prev_mode) return TVI_CONTROL_FALSE; // no it really failed
}
}
@@ -1385,12 +1385,12 @@ static int control(priv_t *priv, int cmd, void *arg)
if (ioctl(priv->video_fd, VIDIOCSCHAN, &priv->channels[priv->act_channel]) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set chan failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
if (ioctl(priv->video_fd, VIDIOCGCAP, &priv->capability) == -1) {
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get capabilites failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
priv->fps = supported_norms[norm_index].fps;
@@ -1403,51 +1403,51 @@ static int control(priv_t *priv, int cmd, void *arg)
priv->width = priv->capability.maxwidth;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_GET_NORM:
{
*(int *)arg = priv->tuner.mode;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_TUN_GET_SIGNAL:
{
if (ioctl(priv->video_fd, VIDIOCGTUNER, &priv->tuner) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get tuner failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
*(int*)arg=100*(priv->tuner.signal>>8)/255;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
/* ========== AUDIO controls =========== */
case TVI_CONTROL_AUD_GET_FORMAT:
{
*(int *)arg = AF_FORMAT_S16_LE;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_GET_CHANNELS:
{
*(int *)arg = priv->audio_in.channels;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_GET_SAMPLERATE:
{
*(int *)arg = priv->audio_in.samplerate;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_GET_SAMPLESIZE:
{
*(int *)arg = priv->audio_in.bytes_per_sample;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_AUD_SET_SAMPLERATE:
{
if (audio_in_set_samplerate(&priv->audio_in, *(int *)arg) < 0) return TVI_CONTROL_FALSE;
setup_audio_buffer_sizes(priv);
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
/* ========== SPECIFIC controls =========== */
case TVI_CONTROL_SPC_GET_INPUT:
@@ -1466,9 +1466,9 @@ static int control(priv_t *priv, int cmd, void *arg)
if (ioctl(priv->video_fd, VIDIOCGCHAN, &priv->channels[i]) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl get channel failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
case TVI_CONTROL_SPC_SET_INPUT:
@@ -1481,7 +1481,7 @@ static int control(priv_t *priv, int cmd, void *arg)
{
mp_msg(MSGT_TV, MSGL_ERR, "Invalid input requested: %d, valid: 0-%d\n",
req_chan, priv->capability.channels - 1);
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
for (i = 0; i < priv->capability.channels; i++)
@@ -1493,7 +1493,7 @@ static int control(priv_t *priv, int cmd, void *arg)
if (ioctl(priv->video_fd, VIDIOCSCHAN, &chan) == -1)
{
mp_msg(MSGT_TV, MSGL_ERR, "ioctl set chan failed: %s\n", strerror(errno));
- return(TVI_CONTROL_FALSE);
+ return TVI_CONTROL_FALSE;
}
mp_msg(MSGT_TV, MSGL_INFO, "Using input '%s'\n", chan.name);
@@ -1506,10 +1506,10 @@ static int control(priv_t *priv, int cmd, void *arg)
/* update local channel list */
control(priv, TVI_CONTROL_SPC_GET_INPUT, &req_chan);
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
case TVI_CONTROL_IMMEDIATE:
priv->immediate_mode = 1;
- return(TVI_CONTROL_TRUE);
+ return TVI_CONTROL_TRUE;
}
#ifdef HAVE_TV_TELETEXT
case TVI_CONTROL_VBI_INIT:
@@ -1534,7 +1534,7 @@ static int control(priv_t *priv, int cmd, void *arg)
#endif
}
- return(TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
static int set_mute(priv_t* priv,int value)
@@ -1810,7 +1810,7 @@ static double grab_video_frame(priv_t *priv, char *buffer, int len)
static int get_video_framesize(priv_t *priv)
{
- return(priv->bytesperline * priv->height);
+ return priv->bytesperline * priv->height;
}
static void *audio_grabber(void *data)
@@ -1910,5 +1910,5 @@ static double grab_audio_frame(priv_t *priv, char *buffer, int len)
static int get_audio_framesize(priv_t *priv)
{
- return(priv->audio_in.blocksize);
+ return priv->audio_in.blocksize;
}
diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c
index 638787f416..a13d4c203a 100644
--- a/stream/tvi_v4l2.c
+++ b/stream/tvi_v4l2.c
@@ -1016,7 +1016,7 @@ static int control(priv_t *priv, int cmd, void *arg)
#endif
}
mp_msg(MSGT_TV, MSGL_V, "%s: unknown control: %d\n", info.short_name, cmd);
- return(TVI_CONTROL_UNKNOWN);
+ return TVI_CONTROL_UNKNOWN;
}
@@ -1976,5 +1976,5 @@ out:
static int get_audio_framesize(priv_t *priv)
{
- return(priv->audio_in.blocksize);
+ return priv->audio_in.blocksize;
}
diff --git a/subreader.c b/subreader.c
index 63b0ed3efa..5561639c6a 100644
--- a/subreader.c
+++ b/subreader.c
@@ -68,7 +68,7 @@ unsigned long previous_sub_end;
#endif
static int eol(char p) {
- return (p=='\r' || p=='\n' || p=='\0');
+ return p=='\r' || p=='\n' || p=='\0';
}
/* Remove leading and trailing space */
@@ -1133,6 +1133,11 @@ subtitle* subcp_recode (subtitle *sub)
free(ot);
continue;
}
+ // In some stateful encodings, we must clear the state to handle the last character
+ if (iconv(icdsc, NULL, NULL,
+ &op, &oleft) == (size_t)(-1)) {
+ mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: error recoding line, can't clear encoding state.\n");
+ }
*op='\0' ;
free (sub->text[l]);
sub->text[l] = ot;
diff --git a/tremor/os_types.h b/tremor/os_types.h
index b3ccc85658..6165e17dcf 100644
--- a/tremor/os_types.h
+++ b/tremor/os_types.h
@@ -32,11 +32,68 @@
#define _ogg_realloc realloc
#define _ogg_free free
- #include <inttypes.h>
- typedef int64_t ogg_int64_t;
- typedef int32_t ogg_int32_t;
- typedef uint32_t ogg_uint32_t;
- typedef uint16_t ogg_uint16_t;
+#include <inttypes.h>
+typedef int64_t ogg_int64_t;
+typedef int32_t ogg_int32_t;
+typedef int16_t ogg_int16_t;
+typedef uint32_t ogg_uint32_t;
+typedef uint16_t ogg_uint16_t;
+
+#if 0
+
+#ifdef _WIN32
+
+# ifndef __GNUC__
+ /* MSVC/Borland */
+ typedef __int64 ogg_int64_t;
+ typedef __int32 ogg_int32_t;
+ typedef unsigned __int32 ogg_uint32_t;
+ typedef __int16 ogg_int16_t;
+# else
+ /* Cygwin */
+ #include <_G_config.h>
+ typedef _G_int64_t ogg_int64_t;
+ typedef _G_int32_t ogg_int32_t;
+ typedef _G_uint32_t ogg_uint32_t;
+ typedef _G_int16_t ogg_int16_t;
+# endif
+
+#elif defined(__MACOS__)
+
+# include <sys/types.h>
+ typedef SInt16 ogg_int16_t;
+ typedef SInt32 ogg_int32_t;
+ typedef UInt32 ogg_uint32_t;
+ typedef SInt64 ogg_int64_t;
+
+#elif defined(__MACOSX__) /* MacOS X Framework build */
+
+# include <sys/types.h>
typedef int16_t ogg_int16_t;
+ typedef int32_t ogg_int32_t;
+ typedef u_int32_t ogg_uint32_t;
+ typedef int64_t ogg_int64_t;
+
+#elif defined(__BEOS__)
+
+ /* Be */
+# include <inttypes.h>
+
+#elif defined (__EMX__)
+
+ /* OS/2 GCC */
+ typedef short ogg_int16_t;
+ typedef int ogg_int32_t;
+ typedef unsigned int ogg_uint32_t;
+ typedef long long ogg_int64_t;
+
+#else
+
+# include <sys/types.h>
+# include "config_types.h"
+
+#endif
+
+#endif /* 0 */
#endif /* _OS_TYPES_H */
diff --git a/tremor/tremor.diff b/tremor/tremor.diff
index 7c92fb17a9..393889a450 100644
--- a/tremor/tremor.diff
+++ b/tremor/tremor.diff
@@ -22,71 +22,6 @@
union magic {
struct {
ogg_int32_t hi;
---- os_types.h 2005-01-04 16:29:02.000000000 +0100
-+++ os_types.h 2005-01-05 10:39:07.000000000 +0100
-@@ -32,57 +32,11 @@
- #define _ogg_realloc realloc
- #define _ogg_free free
-
--#ifdef _WIN32
--
--# ifndef __GNUC__
-- /* MSVC/Borland */
-- typedef __int64 ogg_int64_t;
-- typedef __int32 ogg_int32_t;
-- typedef unsigned __int32 ogg_uint32_t;
-- typedef __int16 ogg_int16_t;
--# else
-- /* Cygwin */
-- #include <_G_config.h>
-- typedef _G_int64_t ogg_int64_t;
-- typedef _G_int32_t ogg_int32_t;
-- typedef _G_uint32_t ogg_uint32_t;
-- typedef _G_int16_t ogg_int16_t;
--# endif
--
--#elif defined(__MACOS__)
--
--# include <sys/types.h>
-- typedef SInt16 ogg_int16_t;
-- typedef SInt32 ogg_int32_t;
-- typedef UInt32 ogg_uint32_t;
-- typedef SInt64 ogg_int64_t;
--
--#elif defined(__MACOSX__) /* MacOS X Framework build */
--
--# include <sys/types.h>
-- typedef int16_t ogg_int16_t;
-- typedef int32_t ogg_int32_t;
-- typedef u_int32_t ogg_uint32_t;
-+ #include <inttypes.h>
- typedef int64_t ogg_int64_t;
--
--#elif defined(__BEOS__)
--
-- /* Be */
--# include <inttypes.h>
--
--#elif defined (__EMX__)
--
-- /* OS/2 GCC */
-- typedef short ogg_int16_t;
-- typedef int ogg_int32_t;
-- typedef unsigned int ogg_uint32_t;
-- typedef long long ogg_int64_t;
--
--#else
--
--# include <sys/types.h>
--# include "config_types.h"
--
--#endif
-+ typedef int32_t ogg_int32_t;
-+ typedef uint32_t ogg_uint32_t;
-+ typedef uint16_t ogg_uint16_t;
-+ typedef int16_t ogg_int16_t;
-
- #endif /* _OS_TYPES_H */
--- sharedbook.c 30 Dec 2004 12:09:20 -0000 1.1
+++ sharedbook.c 18 Aug 2005 16:13:54 -0000
@@ -208,7 +211,7 @@
@@ -206,3 +141,28 @@
#ifndef M_PI
# define M_PI (3.1415926536f)
#endif
+--- os_types.h 2008-05-27 14:59:21.000000000 +0200
++++ os_types.h 2008-05-27 15:00:50.000000000 +0200
+@@ -32,6 +32,15 @@
+ #define _ogg_realloc realloc
+ #define _ogg_free free
+
++#include <inttypes.h>
++typedef int64_t ogg_int64_t;
++typedef int32_t ogg_int32_t;
++typedef int16_t ogg_int16_t;
++typedef uint32_t ogg_uint32_t;
++typedef uint16_t ogg_uint16_t;
++
++#if 0
++
+ #ifdef _WIN32
+
+ # ifndef __GNUC__
+@@ -85,4 +94,6 @@
+
+ #endif
+
++#endif /* 0 */
++
+ #endif /* _OS_TYPES_H */
diff --git a/vidix/cyberblade_vid.c b/vidix/cyberblade_vid.c
index 6a0c4231e8..5a323dd163 100644
--- a/vidix/cyberblade_vid.c
+++ b/vidix/cyberblade_vid.c
@@ -238,7 +238,7 @@ static vidix_grkey_t cyberblade_grkey;
static int cyberblade_get_gkeys(vidix_grkey_t *grkey)
{
memcpy(grkey, &cyberblade_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int cyberblade_set_gkeys(const vidix_grkey_t *grkey)
@@ -272,7 +272,7 @@ static int cyberblade_set_gkeys(const vidix_grkey_t *grkey)
SROUTB(0x56, 0x00); /* Colour Key Mask */
}
SROUTB(0x11,protect);
- return(0);
+ return 0;
}
diff --git a/vidix/dha.c b/vidix/dha.c
index 95ffee6eb1..8e3d2ada5d 100644
--- a/vidix/dha.c
+++ b/vidix/dha.c
@@ -80,7 +80,7 @@
#endif
#ifdef CONFIG_DHAHELPER
-#include "kernelhelper/dhahelper.h"
+#include "dhahelper/dhahelper.h"
#endif
#ifdef CONFIG_SVGAHELPER
diff --git a/vidix/kernelhelper/dhahelper.c b/vidix/dhahelper/dhahelper.c
index f5b6fe825c..5d501e94e6 100644
--- a/vidix/kernelhelper/dhahelper.c
+++ b/vidix/dhahelper/dhahelper.c
@@ -106,11 +106,11 @@ static int dhahelper_open(struct inode *inode, struct file *file)
printk(KERN_DEBUG "dhahelper: device opened\n");
if (MINOR(inode->i_rdev) != 0)
- return(-ENXIO);
+ return -ENXIO;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
static int dhahelper_release(struct inode *inode, struct file *file)
@@ -119,11 +119,11 @@ static int dhahelper_release(struct inode *inode, struct file *file)
printk(KERN_DEBUG "dhahelper: device released\n");
if (MINOR(inode->i_rdev) != 0)
- return(-ENXIO);
+ return -ENXIO;
MOD_DEC_USE_COUNT;
- return(0);
+ return 0;
}
static int dhahelper_ioctl(struct inode *inode, struct file *file,
@@ -134,7 +134,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
cmd, arg);
if (MINOR(inode->i_rdev) != 0)
- return(-ENXIO);
+ return -ENXIO;
switch(cmd)
{
@@ -146,7 +146,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -159,7 +159,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
switch(port.operation)
@@ -181,7 +181,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid port read size (%d)\n",
port.size);
- return(-EINVAL);
+ return -EINVAL;
}
break;
}
@@ -202,7 +202,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid port write size (%d)\n",
port.size);
- return(-EINVAL);
+ return -EINVAL;
}
break;
}
@@ -210,7 +210,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid port operation (%d)\n",
port.operation);
- return(-EINVAL);
+ return -EINVAL;
}
/* copy back only if read was performed */
@@ -219,7 +219,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -232,7 +232,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
switch(mem.operation)
@@ -254,14 +254,14 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid memory operation (%d)\n",
mem.operation);
- return(-EINVAL);
+ return -EINVAL;
}
if (copy_to_user((dhahelper_memory_t *)arg, &mem, sizeof(dhahelper_memory_t)))
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -269,10 +269,10 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
default:
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid ioctl (%x)\n", cmd);
- return(-EINVAL);
+ return -EINVAL;
}
- return(0);
+ return 0;
}
static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
@@ -281,7 +281,7 @@ static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: mapping not requested before mmap\n");
- return(-EFAULT);
+ return -EFAULT;
}
if (dhahelper_verbosity > 1)
@@ -293,10 +293,10 @@ static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: error mapping memory\n");
- return(-EFAULT);
+ return -EFAULT;
}
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
@@ -338,10 +338,10 @@ static int __init init_dhahelper(void)
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: unable to register character device (major: %d)\n",
dhahelper_major);
- return(-EIO);
+ return -EIO;
}
- return(0);
+ return 0;
}
#if KERNEL_VERSION < KERNEL_VERSION(2,4,0)
diff --git a/vidix/kernelhelper/dhahelper.h b/vidix/dhahelper/dhahelper.h
index 1ae57d26c8..1ae57d26c8 100644
--- a/vidix/kernelhelper/dhahelper.h
+++ b/vidix/dhahelper/dhahelper.h
diff --git a/vidix/kernelhelper/test.c b/vidix/dhahelper/test.c
index 3dca94c748..8e795f77df 100644
--- a/vidix/kernelhelper/test.c
+++ b/vidix/dhahelper/test.c
@@ -56,5 +56,5 @@ int main(int argc, char *argv[])
ioctl(fd, DHAHELPER_MEMORY, &mem);
}
- return(0);
+ return 0;
}
diff --git a/vidix/dhahelperwin/Makefile b/vidix/dhahelperwin/Makefile
deleted file mode 100644
index a35d5b66e5..0000000000
--- a/vidix/dhahelperwin/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-include ../../config.mak
-
-all: dhasetup.exe dhahelper.sys
-
-dhasetup.exe: dhasetup.c
- $(CC) -o $@ $<
-
-dhahelper.o: dhahelper.c dhahelper.h
- $(CC) -Wall -Os -c $< -o $@
-
-dhahelper-rc.o: dhahelper.rc common.ver ntverp.h
- $(WINDRES) -I. $< $@
-
-base.tmp: dhahelper.o dhahelper-rc.o
- $(CC) -Wl,--base-file,$@ \
- -Wl,--entry,_DriverEntry@8 \
- -nostartfiles -nostdlib \
- -o junk.tmp $^ -lntoskrnl
- -rm -f junk.tmp
-
-temp.exp: base.tmp
- dlltool --dllname dhahelper.sys --base-file $< --output-exp $@
-
-dhahelper.sys: temp.exp dhahelper.o dhahelper-rc.o
- $(CC) -Wl,--subsystem,native \
- -Wl,--image-base,0x10000 \
- -Wl,--file-alignment,0x1000 \
- -Wl,--section-alignment,0x1000 \
- -Wl,--entry,_DriverEntry@8 \
- -Wl,$< \
- -mdll -nostartfiles -nostdlib \
- -o $@ dhahelper.o dhahelper-rc.o \
- -lntoskrnl
- strip $@
-
-clean distclean:
- rm -f *.o *~ dhahelper.sys dhasetup.exe base.tmp temp.exp
-
-.PHONY: all clean distclean
diff --git a/vidix/ivtv_vid.c b/vidix/ivtv_vid.c
index 151f7e9c3f..ca2d4aa046 100644
--- a/vidix/ivtv_vid.c
+++ b/vidix/ivtv_vid.c
@@ -267,7 +267,7 @@ int ivtv_probe(int verbose,int force __attribute__ ((unused)))
if(ivtv_verbose)
printf(IVTV_MSG"Can't find chip\n");
- return(ENXIO);
+ return ENXIO;
card_found:
@@ -283,7 +283,7 @@ card_found:
if(ioctl(fbdev, FBIOGET_VSCREENINFO, &vinfo) < 0) {
printf(IVTV_MSG"Unable to read screen info\n");
close(fbdev);
- return(ENXIO);
+ return ENXIO;
} else {
fb_width = vinfo.xres;
fb_height = vinfo.yres;
@@ -299,7 +299,7 @@ card_found:
}
} else {
printf(IVTV_MSG"Failed to open /dev/fb%u\n", fb_number);
- return(ENXIO);
+ return ENXIO;
}
/* Try to find YUV device */
@@ -318,7 +318,7 @@ card_found:
printf(IVTV_MSG"YUV device not found: /dev/video%u\n", yuv_device);
}
} while(yuv_device-- > yuv_device_number);
- return(ENXIO);
+ return ENXIO;
yuv_found:
if(0 == alpha_disable) {
@@ -327,7 +327,7 @@ yuv_found:
printf(IVTV_MSG"Unable to read fb state\n");
close(yuvdev);
close(fbdev);
- return(ENXIO);
+ return ENXIO;
} else {
if(ivtv_verbose) {
printf(IVTV_MSG"old alpha : %ld\n",fb_state_old.alpha);
@@ -343,7 +343,7 @@ yuv_found:
printf(IVTV_MSG"Unable to read fb state\n");
close(yuvdev);
close(fbdev);
- return(ENXIO);
+ return ENXIO;
} else {
if(ivtv_verbose) {
printf(IVTV_MSG"old alpha : %d\n",format_old.fmt.win.global_alpha);
@@ -354,7 +354,7 @@ yuv_found:
#endif
}
probed = 1;
- return(0);
+ return 0;
}
int ivtv_init(const char *args __attribute__ ((unused)))
@@ -365,15 +365,15 @@ int ivtv_init(const char *args __attribute__ ((unused)))
if (!probed) {
if(ivtv_verbose)
printf(IVTV_MSG"Driver was not probed but is being initialized\n");
- return(EINTR);
+ return EINTR;
}
outbuf = malloc((IVTVMAXHEIGHT * IVTVMAXWIDTH) + (IVTVMAXHEIGHT * IVTVMAXWIDTH / 2));
if(NULL == outbuf) {
if(ivtv_verbose)
printf(IVTV_MSG"Not enough memory availabe!\n");
- return(EINTR);
+ return EINTR;
}
- return(0);
+ return 0;
}
void ivtv_destroy(void)
@@ -395,7 +395,7 @@ int ivtv_get_caps(vidix_capability_t *to)
if(ivtv_verbose)
printf(IVTV_MSG"GetCap\n");
memcpy(to, &ivtv_cap, sizeof(vidix_capability_t));
- return(0);
+ return 0;
}
int ivtv_query_fourcc(vidix_fourcc_t *to)
@@ -415,13 +415,13 @@ int ivtv_query_fourcc(vidix_fourcc_t *to)
if(!supports) {
to->depth = to->flags = 0;
- return(ENOTSUP);
+ return ENOTSUP;
}
to->depth = VID_DEPTH_12BPP |
VID_DEPTH_15BPP | VID_DEPTH_16BPP |
VID_DEPTH_24BPP | VID_DEPTH_32BPP;
to->flags = 0;
- return(0);
+ return 0;
}
int ivtv_config_playback(vidix_playback_t *info)
@@ -452,7 +452,7 @@ int ivtv_config_playback(vidix_playback_t *info)
if(ivtv_verbose)
printf(IVTV_MSG"frame_size: %d, dga_addr: %p\n",
info->frame_size, info->dga_addr);
- return(0);
+ return 0;
}
int ivtv_playback_on(void)
@@ -473,7 +473,7 @@ int ivtv_playback_on(void)
}
#endif
}
- return(0);
+ return 0;
}
int ivtv_playback_off(void)
@@ -494,7 +494,7 @@ int ivtv_playback_off(void)
}
#endif
}
- return(0);
+ return 0;
}
int ivtv_frame_sel(unsigned int frame)
@@ -548,7 +548,7 @@ int ivtv_frame_sel(unsigned int frame)
#endif
printf("Ioctl IVTV_IOC_DMA_FRAME returned failed Error\n");
}
- return(0);
+ return 0;
}
VDXDriver ivtv_drv = {
diff --git a/vidix/kernelhelper/Makefile b/vidix/kernelhelper/Makefile
deleted file mode 100644
index 4b810ec500..0000000000
--- a/vidix/kernelhelper/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-KERNEL_INC = /usr/src/linux/include
-CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INC) \
- -include $(KERNEL_INC)/linux/modversions.h
-VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
-MDIR = /lib/modules/$(VERSION)/misc
-
-all: dhahelper.o test
-
-dhahelper.o: dhahelper.c dhahelper.h
-
-install: dhahelper.o
- -mkdir -p $(MDIR)
- install -m 644 dhahelper.o $(MDIR)/dhahelper.o
- depmod -a
-
-dep depend:
-
-clean distclean:
- rm -f *.o *~ test
-
-.PHONY: all install dep depend *clean
diff --git a/vidix/mach64_vid.c b/vidix/mach64_vid.c
index 162542f313..1c7935a35a 100644
--- a/vidix/mach64_vid.c
+++ b/vidix/mach64_vid.c
@@ -991,7 +991,7 @@ static int mach64_set_eq( const vidix_video_eq_t * eq)
static int mach64_get_gkeys(vidix_grkey_t *grkey)
{
memcpy(grkey, &mach64_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int mach64_set_gkeys(const vidix_grkey_t *grkey)
@@ -1056,7 +1056,7 @@ static int mach64_set_gkeys(const vidix_grkey_t *grkey)
else
OUTREG(OVERLAY_KEY_CNTL,VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND);
- return(0);
+ return 0;
}
VDXDriver mach64_drv = {
diff --git a/vidix/mga_vid.c b/vidix/mga_vid.c
index a2c02d1a2b..b6504fa5df 100644
--- a/vidix/mga_vid.c
+++ b/vidix/mga_vid.c
@@ -364,7 +364,7 @@ static int mga_frame_select(unsigned int frame)
#endif
}
- return(0);
+ return 0;
}
@@ -665,7 +665,7 @@ static int mga_config_playback(vidix_playback_t *config)
if ((sw < 4) || (sh < 4) || (dw < 4) || (dh < 4))
{
printf("[mga] Invalid src/dest dimensions\n");
- return(EINVAL);
+ return EINVAL;
}
//FIXME check that window is valid and inside desktop
@@ -685,7 +685,7 @@ static int mga_config_playback(vidix_playback_t *config)
break;
default:
printf("[mga] Unsupported pixel format: %x\n", config->fourcc);
- return(ENOTSUP);
+ return ENOTSUP;
}
config->offsets[0] = 0;
@@ -707,7 +707,7 @@ static int mga_config_playback(vidix_playback_t *config)
if (mga_src_base < 0)
{
printf("[mga] not enough memory for frames!\n");
- return(EFAULT);
+ return EFAULT;
}
mga_src_base &= (~0xFFFF); /* 64k boundary */
if (mga_verbose > 1) printf("[mga] YUV buffer base: %#x\n", mga_src_base);
@@ -1043,7 +1043,7 @@ switch(config->fourcc){
#endif /* CRTC2 */
mga_vid_write_regs(0);
- return(0);
+ return 0;
}
static int mga_playback_on(void)
@@ -1062,7 +1062,7 @@ static int mga_playback_on(void)
#endif
mga_next_frame=0;
- return(0);
+ return 0;
}
static int mga_playback_off(void)
@@ -1078,7 +1078,7 @@ static int mga_playback_off(void)
regs.besglobctl &= ~(1<<6); /* UYVY format selected */
mga_vid_write_regs(0);
- return(0);
+ return 0;
}
static int mga_probe(int verbose,int force)
@@ -1097,7 +1097,7 @@ static int mga_probe(int verbose,int force)
if (err)
{
printf("[mga] Error occurred during pci scan: %s\n", strerror(err));
- return(err);
+ return err;
}
if (mga_verbose)
@@ -1142,7 +1142,7 @@ static int mga_probe(int verbose,int force)
if (is_g400 == -1)
{
if (verbose) printf("[mga] Can't find chip\n");
- return(ENXIO);
+ return ENXIO;
}
card_found:
@@ -1151,7 +1151,7 @@ card_found:
mga_cap.device_id = pci_info.device; /* set device id in capabilites */
- return(0);
+ return 0;
}
static int mga_init(void)
@@ -1171,7 +1171,7 @@ static int mga_init(void)
if (!probed)
{
printf("[mga] driver was not probed but is being initializing\n");
- return(EINTR);
+ return EINTR;
}
#ifdef MGA_PCICONFIG_MEMDETECT
@@ -1226,7 +1226,7 @@ static int mga_init(void)
if ((mga_ram_size < 4) || (mga_ram_size > 64))
{
printf("[mga] invalid RAMSIZE: %d MB\n", mga_ram_size);
- return(EINVAL);
+ return EINVAL;
}
}
@@ -1264,7 +1264,7 @@ static int mga_init(void)
mga_irq=-1;
#endif
- return(0);
+ return 0;
}
static void mga_destroy(void)
@@ -1304,33 +1304,33 @@ static int mga_query_fourcc(vidix_fourcc_t *to)
break;
default:
to->depth = to->flags = 0;
- return(ENOTSUP);
+ return ENOTSUP;
}
to->depth = VID_DEPTH_12BPP |
VID_DEPTH_15BPP | VID_DEPTH_16BPP |
VID_DEPTH_24BPP | VID_DEPTH_32BPP;
to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY;
- return(0);
+ return 0;
}
static int mga_get_caps(vidix_capability_t *to)
{
memcpy(to, &mga_cap, sizeof(vidix_capability_t));
- return(0);
+ return 0;
}
static int mga_get_gkeys(vidix_grkey_t *grkey)
{
memcpy(grkey, &mga_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int mga_set_gkeys(const vidix_grkey_t *grkey)
{
memcpy(&mga_grkey, grkey, sizeof(vidix_grkey_t));
mga_vid_write_regs(0);
- return(0);
+ return 0;
}
static int mga_set_eq( const vidix_video_eq_t * eq)
@@ -1339,12 +1339,12 @@ static int mga_set_eq( const vidix_video_eq_t * eq)
if (!is_g400)
{
if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
- return(ENOTSUP);
+ return ENOTSUP;
}
// only brightness&contrast are supported:
if(!(eq->cap & (VEQ_CAP_BRIGHTNESS|VEQ_CAP_CONTRAST)))
- return(ENOTSUP);
+ return ENOTSUP;
//regs.beslumactl = readl(mga_mmio_base + BESLUMACTL);
if (eq->cap & VEQ_CAP_BRIGHTNESS) {
@@ -1357,7 +1357,7 @@ static int mga_set_eq( const vidix_video_eq_t * eq)
}
writel(regs.beslumactl,mga_mmio_base + BESLUMACTL);
- return(0);
+ return 0;
}
static int mga_get_eq( vidix_video_eq_t * eq)
@@ -1366,7 +1366,7 @@ static int mga_get_eq( vidix_video_eq_t * eq)
if (!is_g400)
{
if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
- return(ENOTSUP);
+ return ENOTSUP;
}
eq->brightness = (signed short int)(regs.beslumactl >> 16) * 1000 / 128;
@@ -1375,7 +1375,7 @@ static int mga_get_eq( vidix_video_eq_t * eq)
printf("MGA GET_EQ: br=%d c=%d \n",eq->brightness,eq->contrast);
- return(0);
+ return 0;
}
#ifndef CRTC2
diff --git a/vidix/nvidia_vid.c b/vidix/nvidia_vid.c
index 07d698bd92..a895a084c8 100644
--- a/vidix/nvidia_vid.c
+++ b/vidix/nvidia_vid.c
@@ -458,7 +458,7 @@ static unsigned long rivatv_fbsize_nv03 (struct rivatv_chip *chip){
if (((VID_RD32 (chip->PMC, 0) & 0xF0) == 0x20)
&& ((VID_RD32 (chip->PMC, 0) & 0x0F) >= 0x02)) {
/* SDRAM 128 ZX. */
- return ((1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024);
+ return (1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024;
}
else {
return 1024 * 1024 * 8;
diff --git a/vidix/pci.c b/vidix/pci.c
index 7ccedb9adb..a68eae7e32 100644
--- a/vidix/pci.c
+++ b/vidix/pci.c
@@ -107,7 +107,7 @@ static __inline__ unsigned long
static swapl(unsigned long val)
{
unsigned char *p = (unsigned char *)&val;
- return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0));
+ return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0);
}
@@ -534,7 +534,7 @@ int pci_scan(pciinfo_t *pci_list,unsigned *num_pci)
ret = enable_os_io();
if (ret != 0)
- return(ret);
+ return ret;
if((pcr._configtype = pci_config_type()) == 0xFFFF) return ENODEV;
@@ -713,17 +713,17 @@ int pci_config_read(unsigned char bus, unsigned char dev, unsigned char func,
if (len != 4)
{
fprintf(stderr,"pci_config_read: Reading non-dword not supported!\n");
- return(ENOTSUP);
+ return ENOTSUP;
}
ret = enable_os_io();
if (ret != 0)
- return(ret);
+ return ret;
ret = pci_config_read_long(bus, dev, func, cmd);
disable_os_io();
*val = ret;
- return(0);
+ return 0;
}
int enable_app_io( void )
diff --git a/vidix/radeon_vid.c b/vidix/radeon_vid.c
index affa266285..5bb9f082bb 100644
--- a/vidix/radeon_vid.c
+++ b/vidix/radeon_vid.c
@@ -548,7 +548,7 @@ static inline uint32_t INREG (uint32_t addr) {
static __inline__ uint32_t INPLL(uint32_t addr)
{
OUTREG8(CLOCK_CNTL_INDEX, addr & 0x0000001f);
- return (INREG(CLOCK_CNTL_DATA));
+ return INREG(CLOCK_CNTL_DATA);
}
#define OUTPLL(addr,val) OUTREG8(CLOCK_CNTL_INDEX, (addr & 0x0000001f) | 0x00000080); \
@@ -3407,13 +3407,13 @@ static int set_gr_key( void )
static int radeon_get_gkey(vidix_grkey_t *grkey)
{
memcpy(grkey, &radeon_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int radeon_set_gkey(const vidix_grkey_t *grkey)
{
memcpy(&radeon_grkey, grkey, sizeof(vidix_grkey_t));
- return (set_gr_key());
+ return set_gr_key();
}
#ifdef RAGE128
diff --git a/vidix/sis_bridge.c b/vidix/sis_bridge.c
index 6553d105a4..4dd8fe92c3 100644
--- a/vidix/sis_bridge.c
+++ b/vidix/sis_bridge.c
@@ -56,7 +56,7 @@ static int sis_do_sense(int tempbl, int tempbh, int tempcl, int tempch)
inSISIDXREG(SISPART4, 0x03, temp);
temp ^= 0x0e;
temp &= tempch;
- return (temp == tempch);
+ return temp == tempch;
}
diff --git a/vidix/sis_vid.c b/vidix/sis_vid.c
index d13a0f073a..57e934c017 100644
--- a/vidix/sis_vid.c
+++ b/vidix/sis_vid.c
@@ -190,7 +190,7 @@ static uint8_t getvideoreg(uint8_t reg)
{
uint8_t ret;
inSISIDXREG(SISVID, reg, ret);
- return (ret);
+ return ret;
}
static void setvideoreg(uint8_t reg, uint8_t data)
@@ -220,7 +220,7 @@ static void setsrregmask(uint8_t reg, uint8_t data, uint8_t mask)
static uint8_t vblank_active_CRT1(void)
{
/* this may be too simplistic? */
- return (inSISREG(SISINPSTAT) & 0x08);
+ return inSISREG(SISINPSTAT) & 0x08;
}
static uint8_t vblank_active_CRT2(void)
@@ -231,7 +231,7 @@ static uint8_t vblank_active_CRT2(void)
} else {
inSISIDXREG(SISPART1, Index_CRT2_FC_VR, ret);
}
- return ((ret & 0x02) ^ 0x02);
+ return (ret & 0x02) ^ 0x02;
}
static int find_chip(unsigned chip_id)
@@ -344,13 +344,13 @@ static int sis_init(void)
if (!sis_probed) {
printf("[SiS] driver was not probed but is being initialized\n");
- return (EINTR);
+ return EINTR;
}
if (enable_app_io() != 0)
{
printf("[SiS] can't enable register I/O\n");
- return(EINTR);
+ return EINTR;
}
/* JCP: this is WRONG. Need to coordinate w/ sisfb to use correct mem */
diff --git a/vidix/sysdep/AsmMacros_arm32.h b/vidix/sysdep/AsmMacros_arm32.h
index 6fe0b66466..d7973cc48c 100644
--- a/vidix/sysdep/AsmMacros_arm32.h
+++ b/vidix/sysdep/AsmMacros_arm32.h
@@ -84,20 +84,20 @@ static __inline__ void outl(short port,int val)
static __inline__ unsigned int inb(short port)
{
- if ((unsigned short)port >= 0x400) return((unsigned int)-1);
- return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase));
+ if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+ return *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase);
}
static __inline__ unsigned int inw(short port)
{
- if ((unsigned short)port >= 0x400) return((unsigned int)-1);
- return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase));
+ if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+ return *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase);
}
static __inline__ unsigned int inl(short port)
{
- if ((unsigned short)port >= 0x400) return((unsigned int)-1);
- return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
+ if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+ return *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase);
}
#define intr_disable()
diff --git a/vidix/sysdep/AsmMacros_powerpc.h b/vidix/sysdep/AsmMacros_powerpc.h
index 71ab4c6617..7120446afe 100644
--- a/vidix/sysdep/AsmMacros_powerpc.h
+++ b/vidix/sysdep/AsmMacros_powerpc.h
@@ -90,21 +90,21 @@ static __inline__ unsigned char inb(short port)
{
unsigned char val;
val = *((unsigned char *)(ioBase + port)); eieio();
- return(val);
+ return val;
}
static __inline__ unsigned short inw(short port)
{
unsigned short val;
val = *((unsigned short *)(ioBase + port)); eieio();
- return(val);
+ return val;
}
static __inline__ unsigned long inl(short port)
{
unsigned long val;
val = *((unsigned long *)(ioBase + port)); eieio();
- return(val);
+ return val;
}
#define intr_disable()
diff --git a/vidix/sysdep/AsmMacros_x86.h b/vidix/sysdep/AsmMacros_x86.h
index c28b8e5b26..47ebe8bd1c 100644
--- a/vidix/sysdep/AsmMacros_x86.h
+++ b/vidix/sysdep/AsmMacros_x86.h
@@ -70,7 +70,7 @@
#ifdef CONFIG_DHAHELPER
#include <sys/ioctl.h>
-#include "../kernelhelper/dhahelper.h"
+#include "dhahelper/dhahelper.h"
extern int dhahelper_fd;
extern int dhahelper_initialized;
diff --git a/vidix/sysdep/libdha_win32.c b/vidix/sysdep/libdha_win32.c
index c4fece4c19..c20727e50a 100644
--- a/vidix/sysdep/libdha_win32.c
+++ b/vidix/sysdep/libdha_win32.c
@@ -6,7 +6,7 @@
#include <windows.h>
#include <ddk/ntddk.h>
-#include "../dhahelperwin/dhahelper.h"
+#include "dhahelperwin/dhahelper.h"
/*
This is the request structure that applications use
diff --git a/vidix/sysdep/pci_386bsd.c b/vidix/sysdep/pci_386bsd.c
index 76c9fad459..3f7dd0f755 100644
--- a/vidix/sysdep/pci_386bsd.c
+++ b/vidix/sysdep/pci_386bsd.c
@@ -40,13 +40,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
perror("/dev/console");
- return(errno);
+ return errno;
}
if (ioctl(io_fd, KDENABIO, 0) < 0) {
perror("ioctl(KDENABIO)");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -54,8 +54,8 @@ static __inline__ int disable_os_io(void)
if (ioctl(io_fd, KDDISABIO, 0) < 0) {
perror("ioctl(KDDISABIO)");
close(io_fd);
- return(errno);
+ return errno;
}
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_bsdi.c b/vidix/sysdep/pci_bsdi.c
index b6b142054d..982f725a9b 100644
--- a/vidix/sysdep/pci_bsdi.c
+++ b/vidix/sysdep/pci_bsdi.c
@@ -18,13 +18,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
perror("/dev/console");
- return(errno);
+ return errno;
}
if (ioctl(io_fd, PCCONENABIOPL, 0) < 0) {
perror("ioctl(PCCONENABIOPL)");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -32,8 +32,8 @@ static __inline__ int disable_os_io(void)
if (ioctl(io_fd, PCCONDISABIOPL, 0) < 0) {
perror("ioctl(PCCONDISABIOPL)");
close(io_fd);
- return(errno);
+ return errno;
}
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_freebsd.c b/vidix/sysdep/pci_freebsd.c
index 1820da2617..ee3525bc2f 100644
--- a/vidix/sysdep/pci_freebsd.c
+++ b/vidix/sysdep/pci_freebsd.c
@@ -40,13 +40,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
perror("/dev/console");
- return(errno);
+ return errno;
}
if (ioctl(io_fd, KDENABIO, 0) < 0) {
perror("ioctl(KDENABIO)");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -54,8 +54,8 @@ static __inline__ int disable_os_io(void)
if (ioctl(io_fd, KDDISABIO, 0) < 0) {
perror("ioctl(KDDISABIO)");
close(io_fd);
- return(errno);
+ return errno;
}
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_isc.c b/vidix/sysdep/pci_isc.c
index be2ed10556..17fb2b6106 100644
--- a/vidix/sysdep/pci_isc.c
+++ b/vidix/sysdep/pci_isc.c
@@ -41,7 +41,7 @@ static __inline__ int enable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
#endif
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -51,5 +51,5 @@ static __inline__ int disable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, 0);
#endif
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_linux.c b/vidix/sysdep/pci_linux.c
index 5e46f89fe9..07d9566563 100644
--- a/vidix/sysdep/pci_linux.c
+++ b/vidix/sysdep/pci_linux.c
@@ -96,7 +96,7 @@ static __inline__ int enable_os_io(void)
if (svgahelper_fd > 0)
{
svgahelper_initialized = 1;
- return(0);
+ return 0;
}
svgahelper_initialized = -1;
#endif
@@ -106,7 +106,7 @@ static __inline__ int enable_os_io(void)
if (dhahelper_fd > 0)
{
dhahelper_initialized = 1;
- return(0);
+ return 0;
}
dhahelper_initialized = -1;
#endif
@@ -115,9 +115,9 @@ static __inline__ int enable_os_io(void)
/* should be fixed? */
#else
if (iopl(3) != 0)
- return(errno);
+ return errno;
#endif
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -136,9 +136,9 @@ static __inline__ int disable_os_io(void)
/* should be fixed? */
#else
if (iopl(0) != 0)
- return(errno);
+ return errno;
#endif
- return(0);
+ return 0;
}
#if (defined(__powerpc__) || defined(__sparc__) || defined(__sparc64__) \
diff --git a/vidix/sysdep/pci_lynx.c b/vidix/sysdep/pci_lynx.c
index ce2ee0273b..59b8dddb2c 100644
--- a/vidix/sysdep/pci_lynx.c
+++ b/vidix/sysdep/pci_lynx.c
@@ -61,7 +61,7 @@ static __inline__ unsigned long
static swapl(unsigned long val)
{
unsigned char *p = (unsigned char *)&val;
- return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0));
+ return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0);
}
diff --git a/vidix/sysdep/pci_mach386.c b/vidix/sysdep/pci_mach386.c
index d0096faaa6..3445a11f7f 100644
--- a/vidix/sysdep/pci_mach386.c
+++ b/vidix/sysdep/pci_mach386.c
@@ -35,13 +35,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) {
perror("/dev/iopl");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
{
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_netbsd.c b/vidix/sysdep/pci_netbsd.c
index 3fcaad0d5b..fa8f735e87 100644
--- a/vidix/sysdep/pci_netbsd.c
+++ b/vidix/sysdep/pci_netbsd.c
@@ -42,15 +42,15 @@ static __inline__ int enable_os_io(void)
#if !defined(USE_I386_IOPL)
if ((io_fd = open("/dev/io", O_RDWR, 0)) < 0) {
perror("/dev/io");
- return(errno);
+ return errno;
}
#else
if (i386_iopl(1) < 0) {
perror("i386_iopl");
- return(errno);
+ return errno;
}
#endif /* USE_I386_IOPL */
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -60,8 +60,8 @@ static __inline__ int disable_os_io(void)
#else
if (i386_iopl(0) < 0) {
perror("i386_iopl");
- return(errno);
+ return errno;
}
#endif /* NetBSD1_1 */
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_openbsd.c b/vidix/sysdep/pci_openbsd.c
index 029c1e835a..5daef9ff21 100644
--- a/vidix/sysdep/pci_openbsd.c
+++ b/vidix/sysdep/pci_openbsd.c
@@ -36,14 +36,14 @@ static __inline__ int enable_os_io(void)
{
if (i386_iopl(1) < 0) {
perror("i386_iopl");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
{
/* Nothing to do */
- return(0);
+ return 0;
}
#endif
diff --git a/vidix/sysdep/pci_os2.c b/vidix/sysdep/pci_os2.c
index 09227fa573..002494f682 100644
--- a/vidix/sysdep/pci_os2.c
+++ b/vidix/sysdep/pci_os2.c
@@ -44,7 +44,7 @@ static __inline__ int enable_os_io(void)
(ULONG)0) != 0) {
fprintf(stderr,"Error opening fastio$ driver...\n");
fprintf(stderr,"Please install xf86sup.sys in config.sys!\n");
- return(42);
+ return 42;
}
callgate[0] = callgate[1] = 0;
@@ -57,7 +57,7 @@ static __inline__ int enable_os_io(void)
fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n",
rc,dlen);
DosClose(hfd);
- return(42);
+ return 42;
}
/* Calling callgate with function 13 sets IOPL for the program */
@@ -68,11 +68,11 @@ static __inline__ int enable_os_io(void)
: "eax","ebx","ecx","edx","cc");
DosClose(hfd);
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
{
/* Nothing to do */
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_sco.c b/vidix/sysdep/pci_sco.c
index 83a21c1614..b8505e09f0 100644
--- a/vidix/sysdep/pci_sco.c
+++ b/vidix/sysdep/pci_sco.c
@@ -42,7 +42,7 @@ static __inline__ int enable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
#endif
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -52,5 +52,5 @@ static __inline__ int disable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, 0);
#endif
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_svr4.c b/vidix/sysdep/pci_svr4.c
index acf1136c20..ecefd3befd 100644
--- a/vidix/sysdep/pci_svr4.c
+++ b/vidix/sysdep/pci_svr4.c
@@ -51,7 +51,7 @@ static __inline__ int enable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
#endif
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -61,5 +61,5 @@ static __inline__ int disable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, 0);
#endif
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_win32.c b/vidix/sysdep/pci_win32.c
index 4821354d14..41f8a4eb90 100644
--- a/vidix/sysdep/pci_win32.c
+++ b/vidix/sysdep/pci_win32.c
@@ -28,7 +28,7 @@
#include <windows.h>
#include <ddk/ntddk.h>
-#include "../dhahelperwin/dhahelper.h"
+#include "dhahelperwin/dhahelper.h"
static HANDLE hDriver;
extern int IsWinNT();
@@ -44,10 +44,10 @@ static __inline__ int enable_os_io(void)
hDriver = CreateFile("\\\\.\\DHAHELPER",GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if(!DeviceIoControl(hDriver, IOCTL_DHAHELPER_ENABLEDIRECTIO, NULL,0, NULL, 0, &dwBytesReturned, NULL)){
fprintf(stderr,"Unable to enable directio please install dhahelper.sys.\n");
- return(1);
+ return 1;
}
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -57,5 +57,5 @@ static __inline__ int disable_os_io(void)
DeviceIoControl(hDriver, IOCTL_DHAHELPER_DISABLEDIRECTIO, NULL,0, NULL, 0, &dwBytesReturned, NULL);
CloseHandle(hDriver);
}
- return(0);
+ return 0;
}
diff --git a/vidix/unichrome_vid.c b/vidix/unichrome_vid.c
index e146e91702..15b86fc662 100644
--- a/vidix/unichrome_vid.c
+++ b/vidix/unichrome_vid.c
@@ -651,7 +651,7 @@ static int
unichrome_get_gkey (vidix_grkey_t * grkey)
{
memcpy (grkey, &uc_grkey, sizeof (vidix_grkey_t));
- return (0);
+ return 0;
}
/**
@@ -687,7 +687,7 @@ unichrome_set_gkey (const vidix_grkey_t * grkey)
/* Execute the changes */
VIDEO_OUT (vio, V_COMPOSE_MODE, dwCompose | V1_COMMAND_FIRE);
- return (0);
+ return 0;
}
/**