1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

Merge svn changes up to r29912

This commit is contained in:
Uoti Urpala 2009-11-16 06:54:22 +02:00
commit 287b62163e
85 changed files with 1697 additions and 1000 deletions

View File

@ -21,6 +21,7 @@ MPlayer (1.0)
* -nosub option for disabling auto-selected subtitles
* support for displaying subs in the term (FIXME)
* support for subtitles with audio only files
* support for 8 channel audio
rc3: "BikeshedCounter" March 27, 2009
Decoders:

View File

@ -5897,7 +5897,7 @@ Drehe um 90 Grad gegen den Uhrzeigersinn und stelle es auf den Kopf.
.RE
.
.TP
.B scale[=b:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=b:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Skaliert das Bild mit dem Softwareskalierer (langsam) und führt eine
Farbraumkonvertierung zwischen YUV und RGB durch (siehe auch \-sws).
.RSs
@ -5922,7 +5922,7 @@ originalen Breiten-/H
\-(n+8): wie \-n oben, rundet aber die Abmessung auf das nächste Vielfache von
16.
.REss
.IPs <ilaced>
.IPs <interlaced>
Schalte Interlaced-Skalierung an/\:aus.
.RSss
0: aus (Standard)

View File

@ -401,7 +401,8 @@ Confirm choice.
.RS
.
(The following keys are only valid if teletext support is enabled during
compilation: They are used for controlling TV teletext.)
compilation: They are used for controlling TV teletext, whose data may come
from either an analog TV source or an MPEG Transport Stream.)
.RE
.PP
.PD 0
@ -500,11 +501,12 @@ named 'movie.avi.conf' with the file-specific options in it and put it in
You can also put the configuration file in the same directory as the file to
be played, as long as you give the \-use\-filedir\-conf option (either on the
command line or in your global config file).
If a file-specific configuration file is found in the same directory, no file-specific
configuration is loaded from ~/.mplayer.
In addition, the \-use\-filedir\-conf option enables directory-specific configuration files.
For this, MPlayer first tries to load a mplayer.conf from the same directory as the file played
and then tries to load any file-specific configuration.
If a file-specific configuration file is found in the same directory, no
file-specific configuration is loaded from ~/.mplayer.
In addition, the \-use\-filedir\-conf option enables directory-specific
configuration files.
For this, MPlayer first tries to load a mplayer.conf from the same directory as
the file played and then tries to load any file-specific configuration.
.PP
.I EXAMPLE MPLAYER CONFIGURATION FILE:
.sp 1
@ -1006,7 +1008,7 @@ Display the main menu at MPlayer startup.
Permit MPlayer to receive pointer events reported by the video
output driver.
Necessary to select the buttons in DVD menus.
Supported for X11 based VOs (x11, xv, xvmc, etc.) and the gl, gl2, direct3d and
Supported for X11-based VOs (x11, xv, xvmc, etc) and the gl, gl2, direct3d and
corevideo VOs.
.
.TP
@ -1273,6 +1275,8 @@ stereo
surround
.IPs 6
full 5.1
.IPs 8
full 7.1
.RE
.PD 1
.
@ -1768,7 +1772,7 @@ Not guaranteed to work correctly with \-oac copy.
.
.TP
.B \-srate <Hz>
Selects the output sample rate to be used
Select the output sample rate to be used
(of course sound cards have limits on this).
If the sample frequency selected is different from that
of the current media, the resample or lavcresample audio filter will be inserted
@ -2294,7 +2298,8 @@ If you cannot select one of the subtitles on a DVD, also try \-vobsubid.
.
.TP
.B \-nosub
Disables any otherwise auto-selected subtitles (as e.g. the Matroska/mkv demuxer supports).
Disables any otherwise auto-selected subtitles (as e.g.\& the Matroska/mkv
demuxer supports).
.
.TP
.B \-slang <language code[,language code,...]> (also see \-sid)
@ -2736,8 +2741,8 @@ Useful if you want to have certain connections established automatically.
.IPs (no)estimate
Estimate the audio delay, supposed to make the video playback smoother
(default: enabled).
.IPs (no)autostart (default: disabled)
Automatically start jackd if necessary.
.IPs (no)autostart
Automatically start jackd if necessary (default: disabled).
Note that this seems unreliable and will spam stdout with server messages.
.RE
.PD 1
@ -3058,7 +3063,7 @@ Use the _WIN_LAYER hint with the given layer number.
.IPs netwm
Force NETWM style.
.IPs "none\ "
Do not set fullscreen window layer.
Clear the list of modes; you can add modes to enable afterward.
.IPs stays_on_top
Use _NETWM_STATE_STAYS_ON_TOP hint if available.
.REss
@ -3149,6 +3154,10 @@ A value of 1 means square pixels
(correct for (almost?) all LCDs).
.
.TP
.B \-name (X11 only)
Set the window class name.
.
.TP
.B \-nodouble
Disables double buffering, mostly for debugging purposes.
Double buffering fixes flicker by storing two frames in memory, and
@ -3228,6 +3237,16 @@ If your screensaver supports neither the XSS nor XResetScreenSaver
API please use \-heartbeat\-cmd instead.
.
.TP
.B \-title (also see \-use\-filename\-title)
Set the window title.
Supported by X11-based video output drivers.
.
.TP
.B \-use\-filename\-title (also see \-title)
Set the window title using the media filename, when not set with \-title.
Supported by X11-based video output drivers.
.
.TP
.B "\-vm \ \ \ "
Try to change to a different video mode.
Supported by the dga, x11, xv, sdl and directx video output drivers.
@ -3244,7 +3263,7 @@ Enables VBI for the vesa, dfbmga and svga video output drivers.
This tells MPlayer to attach to an existing window.
Useful to embed MPlayer in a browser (e.g.\& the plugger extension).
This option fills the given window completely, thus aspect scaling,
panscan etc. are no longer handled by MPlayer but must be managed by the
panscan, etc are no longer handled by MPlayer but must be managed by the
application that created the window.
.
.TP
@ -3410,8 +3429,8 @@ Select the driver to use as source to overlay on top of X11.
.PD 1
.
.TP
.B vdpau (with \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau or ffh264vdpau or
ffodivxvdpau)
.B vdpau (with \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau, ffh264vdpau
or ffodivxvdpau)
Video output that uses VDPAU to decode video via hardware.
Also supports displaying of software-decoded video.
.PD 0
@ -3422,21 +3441,21 @@ for negative values a blurring algorithm (default: 0).
.IPs denoise=<0\-1>
Apply a noise reduction algorithm to the video (default: 0, no noise reduction).
.IPs deint=<0\-4>
Chooses the deinterlacer (default: 0).
Select the deinterlacer (default: 0).
All modes > 0 respect \-field\-dominance.
.RSss
.IPs 0
No deinterlacing.
no deinterlacing
.IPs 1
Show only first field, similar to \-vf field.
.IPs 2
Bob deinterlacing, similar to \-vf tfields=1.
.IPs 3
Motion adaptive temporal deinterlacing.
motion adaptive temporal deinterlacing
May lead to A/V desync with slow video hardware and/or high resolution.
This is the default if "D" is used to enable deinterlacing.
.IPs 4
Motion adaptive temporal deinterlacing with edge-guided spatial interpolation.
motion adaptive temporal deinterlacing with edge-guided spatial interpolation
Needs fast video hardware.
.RE
.IPs chroma\-deint
@ -3446,7 +3465,7 @@ Useful with slow video memory.
.IPs pullup
Try to apply inverse telecine, needs motion adaptive temporal deinterlacing.
.IPs colorspace
Select the color space for YUV to RGB conversion (default: 1, BT.601).
Select the color space for YUV to RGB conversion.
In general BT.601 should be used for standard definition (SD) content and
BT.709 for high definition (HD) content.
Using incorrect color space results in slightly under or over saturated and
@ -3463,7 +3482,7 @@ Use ITU-R BT.709 color space.
.IPs 3
Use SMPTE-240M color space.
.RE
IPs hqscaling
.IPs hqscaling
.RSss
.IPs 0
Use default VDPAU scaling (default).
@ -3523,7 +3542,7 @@ Since SDL uses its own X11 layer, MPlayer X11 options do not have
any effect on SDL.
Note that it has several minor bugs (\-vm/\-novm is mostly ignored,
\-fs behaves like \-novm should, window is in top-left corner when
returning from fullscreen, panscan is not supported, ...)
returning from fullscreen, panscan is not supported, ...).
.PD 0
.RSs
.IPs driver=<driver>
@ -3608,7 +3627,7 @@ Force WarpOverlay! mode.
.IPs dive
Force DIVE mode.
.IPs (no)t23
Enable/disable workaround for T23 laptop (default: disabled).
Enable or disable workaround for T23 laptop (default: disabled).
Try to enable this option if your video card supports upscaling only.
.RE
.PD 1
@ -4947,7 +4966,7 @@ Allow (1) or disallow (0) the output frequency to differ slightly
from the frequency given by <srate> (default: 1).
Can be used if the startup of the playback is extremely slow.
.IPs <type>
Selects which resampling method to use.
Select which resampling method to use.
.RSss
0: linear interpolation (fast, poor quality especially when upsampling)
.br
@ -5052,7 +5071,7 @@ Reasonable values are around 0.001.
.PD 1
.
.TP
.B bs2b[=option1:option2]
.B bs2b[=option1:option2:...]
Bauer stereophonic to binaural transformation using libbs2b.
Improves the headphone listening experience by making the sound
similar to that from loudspeakers, allowing each ear to hear both
@ -5067,15 +5086,15 @@ Set cut frequency in Hz.
Set feed level for low frequencies in 0.1*dB.
.IPs profile=<value>
Several profiles are available for convenience:
.PD 0
.RSs
default: will be used if nothing else was specified (fcut=700,
feed=45);
.br
cmoy: Chu Moy circuit implementation (fcut=700, feed=60);
.br
jmeier: Jan Meier circuit implementation (fcut=650, feed=95).
.REss
.PD 1
.IPs default
will be used if nothing else was specified (fcut=700, feed=45)
.IPs "cmoy\ "
Chu Moy circuit implementation (fcut=700, feed=60)
.IPs jmeier
Jan Meier circuit implementation (fcut=650, feed=95)
.RE
.RE
.sp 1
.RS
@ -5159,11 +5178,11 @@ of input channels the exceeding channels are truncated.
.PD 0
.RSs
.IPs <nch>
number of output channels (1\-6)
number of output channels (1\-8)
.IPs "<nr>\ "
number of routes (1\-6)
number of routes (1\-8)
.IPs <from1:to1:from2:to2:from3:to3:...>
Pairs of numbers between 0 and 5 that define where to route each channel.
Pairs of numbers between 0 and 7 that define where to route each channel.
.RE
.sp 1
.RS
@ -5266,7 +5285,7 @@ this filter can be found in the examples section near the end.
.PD 0
.RSs
.IPs "<n>\ \ "
number of output channels (1\-6)
number of output channels (1\-8)
.IPs <Lij>
How much of input channel i is mixed into output channel j (0\-1).
So in principle you first have n numbers saying what to do with the
@ -5309,7 +5328,7 @@ For the best result try setting the cutoff frequency as low as possible.
This will improve the stereo or surround sound experience.
.IPs "<ch>\ "
Determines the channel number in which to insert the sub-channel audio.
Channel number can be between 0 and 5 (default: 5).
Channel number can be between 0 and 7 (default: 5).
Observe that the number of channels will automatically
be increased to <ch> if necessary.
.RE
@ -5334,7 +5353,7 @@ halves the channels instead.
.RSs
.IPs "<ch>\ "
Determines the channel number in which to insert the center channel.
Channel number can be between 0 and 5 (default: 5).
Channel number can be between 0 and 7 (default: 5).
Observe that the number of channels will automatically
be increased to <ch> if necessary.
.RE
@ -5760,7 +5779,7 @@ Rotate by 90 degrees counterclockwise and flip.
.RE
.
.TP
.B scale[=w:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=w:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Scales the image with the software scaler (slow) and performs a YUV<\->RGB
colorspace conversion (also see \-sws).
.RSs
@ -5781,7 +5800,7 @@ incapable of scaling, it defaults to d_width/\:d_height!
.br
\-(n+8): Like \-n above, but rounding the dimension to the closest multiple of 16.
.REss
.IPs <ilaced>
.IPs <interlaced>
Toggle interlaced scaling.
.RSss
0: off (default)
@ -7300,9 +7319,9 @@ Files named 'shotNNNN.png' will be saved in the working directory,
using the first available number \- no files will be overwritten.
The filter has no overhead when not used and accepts an arbitrary
colorspace, so it is safe to add it to the configuration file.
Make sure that screenshot is added after all other filters that
you want to have applied to it.
E.g. it should be the last filter if you want to have an exact
Make sure that the screenshot filter is added after all other filters
whose effect you want to record on the saved image.
E.g.\& it should be the last filter if you want to have an exact
screenshot of what you see on the monitor.
.RE
.
@ -10314,7 +10333,6 @@ trellis (requires trellis, experimental) (default: 0.0)
.RE
.PD 1
.
.
.TP
.B deadzone_inter=<0\-32>
Set the size of the inter luma quantization deadzone for non-trellis

View File

@ -6070,7 +6070,7 @@ Retourne de 90 degr
.RE
.
.TP
.B scale[=l:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=l:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Redimensionne l'image avec le zoom logiciel (lent) et applique une conversion
de palette YUV<\->RGB (voir également l'option \-sws).
.RSs
@ -6095,7 +6095,7 @@ hauteur/\:largeur original.
\-(n+8): Comme \-n ci-dessus, mais en arrondissant les dimensions au plus
proche multiple de 16.
.REss
.IPs <ilaced>
.IPs <interlaced>
Active le redimensionnement entrelacé.
.RSss
0: désactivé (par défaut)

View File

@ -5806,7 +5806,7 @@ A 4\-7 k
.RE
.
.TP
.B scale[=w:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=w:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Átméretezi a képet szoftveres méretezővel (lassú) és végrehajt egy YUV<\->RGB
színtér konverziót (lásd még \-sws).
.RSs
@ -5827,7 +5827,7 @@ m
.br
\-(n+8): Mint a \-n fent, csak a dimenziót 16 legközelebbi többszörösére kerekíti.
.REss
.IPs <ilaced>
.IPs <interlaced>
Beállítja az átlapolt méretezést.
.RSss
0: ki (alapértelmezett)

View File

@ -1,4 +1,4 @@
.\" synced with r27691
.\" synced with r29905
.\" Encoding: iso-8859-1
.\" MPlayer (C) 2000-2009 MPlayer Team
.\" Questa pagina di manuale è stata fatta da Gabucino, Diego Biurrun,
@ -35,7 +35,7 @@
.\" Titolo
.\" --------------------------------------------------------------------------
.
.TH MPlayer 1 "2007-06-01" "The MPlayer Project" "The Movie Player"
.TH MPlayer 1 "2009-03-25" "The MPlayer Project" "The Movie Player"
.
.SH NOME
mplayer \- visualizzatore di film
@ -110,7 +110,7 @@ cue://file[:traccia]
.
.br
.B mplayer
[file|mms[t]|http|http_proxy|rt[s]p|ftp|udp|unsv|smb]://
[file|mms[t]|http|http_proxy|rt[s]p|ftp|udp|unsv|icyx|noicyx|smb]://
[utente:password@]URL[:porta] [opzioni]
.
.br
@ -190,7 +190,11 @@ controllo rumore/\:disturbo, conversioni RGB/\:YUV) ed oltre.
.PP
.B gmplayer
è MPlayer con una interfaccia utente grafica.
Ha le stesse opzioni di MPlayer.
Ha le stesse opzioni di MPlayer, tuttavia alcune potrebbero non funzionare
correttamente a causa di conflitti con la configurazione fatta via GUI (salvata
in gui.conf).
In particolare alcune opzioni potrebbero venire sovrascritte da opzioni nel file
gui.conf mentre altre potrebbero venire salvate definitivamente in gui.conf.
.PP
Esempi di utilizzo per farti partire rapidamente possono essere trovati alla
fine di questa pagina di manuale.
@ -301,7 +305,7 @@ Inizia/\:smette di salvare istantanee.
Mostra il nome del file sull'OSD.
.IPs "! e @"
Va all'inizio del capitolo precedente/\:successivo.
.IPs "D (solo \-vo xvmc, \-vf yadif, \-vf kerndeint)"
.IPs "D (solo \-vo xvmc, \-vo vdpau, \-vf yadif, \-vf kerndeint)"
Attiva/\:disattiva deinterlacciatore.
.IPs "A"
Passa attraverso tutte le angolazioni del DVD.
@ -445,7 +449,9 @@ Conferma la scelta.
.RS
.
(I seguenti tasti sono validi solo se MPlayer è stato compilato col supporto
per televideo (teletext): vengono usati per controllare il televideo della TV)
per televideo (teletext): vengono usati per controllare il televideo della TV,
i cui dati possono arrivare sia da una sorgente TV analogica che da un flusso
MPEG.)
.RE
.PP
.PD 0
@ -540,12 +546,18 @@ a 'yes', '1' oppure 'true' e disabilitate impostandole a 'no', '0' oppure 'false
Anche le sotto-opzioni possono essere specificate in questo modo.
.PP
Puoi anche scrivere configurazioni specifiche per i singoli file.
Se desideri avere un file di configurazione per un file che si chiama 'movie.avi',
crea un file di nome 'movie.avi.conf' con le opzioni specifiche dentro di esso
e salvalo in ~/.mplayer/.
Se desideri avere un file di configurazione per un file che si
chiama 'movie.avi', crea un file di nome 'movie.avi.conf' con le opzioni
specifiche dentro di esso e salvalo in ~/.mplayer/.
Puoi anche mettere tale file di configurazione nella stessa directory in cui si
trova il file relativo, sempre che tu imposti poi l'opzione \-use\-filedir\-conf
(dalla riga comando oppure nel tuo file di configurazione globale).
Se viene trovato un file di configurazione specifico nella stessa directory del
file, nessun file di configurazione specifico viene letto da ~/.mplayer.
Inoltre, l'opzione \-use\-filedir\-conf abilita i file di configurazione
specifici nella directory.
Per questo MPlayer dapprima cerca di caricare un mplayer.conf dalla stessa
directory del file riprodotto e poi cerca un file di configurazione specifico.
.PP
.I ESEMPIO DI UN FILE DI CONFIGURAZIONE PER MPLAYER:
.sp 1
@ -615,6 +627,7 @@ alang=en
profile-desc="profilo per flussi dvdnav://"
profile=protocol.dvd
mouse-movements=yes
nocache=yes
[extension.flv]
profile-desc="profilo per file .flv"
@ -754,9 +767,9 @@ scrittura della linea di stato (cio
Particolarmente utile su terminali lenti oppure che non funzionano correttamente
e non gestiscono in modo giusto il ritorno carrello (cioè \\r).
.TP
.B \-priority <priorità> (solo Windows)
.B \-priority <priorità> (solo Windows e OS/2)
Seleziona la priorità del processo MPlayer in accordo con le priorità
predefinite disponibili sotto Windows.
predefinite disponibili sotto Windows e OS/2.
Possibili valori di <priorità>:
.RSs
idle|belownormal|normal|abovenormal|high|realtime
@ -931,13 +944,15 @@ quindi considera l'utilizzo di "\-vc ffmpeg12,".
.
.TP
.B \-heartbeat\-cmd
Comando da eseguire via system () ogni 30 secondi durante la riproduzione -
per es.\& usando la shell.
Comando da eseguire attraverso system() ogni 30 secondi durante la riproduzione
- per es.\& usando la shell.
.sp 1
.I NOTA:
MPlayer usa questo comando senza fare alcun controllo, è tua responsabilità
assicurarti che non causi problemi di sicurezza (per es.\& assicurati di usare
percorsi assoluti se "." e nella tua PATH come in Windows).
percorsi assoluti se "." e nella tua PATH, come in Windows).
Funziona solamente riproducendo video (per es.\& non funziona con \-novideo,
mentre con \-vo null sì).
.sp 1
Questo può essere usato (male) per disabilitare salvaschermi che non usano le
corrette API di X (vedi anche \-stop\-xscreensaver).
@ -997,6 +1012,8 @@ automaticamente di default).
Ritardo in msec prima di cominciare ad autoripetere un tasto (0 per disabilitare)
.IPs ar-rate
Numero di pressioni di un tasto da generare quando è attivo l'autorepeat.
.IPs (no)default-bindings
Usa i collegamenti ai tasti come sono impostati di default in MPlayer.
.IPs keylist
Stampa tutti i tasti che possono essere collegati ad un comando.
.IPs cmdlist
@ -1075,8 +1092,10 @@ Visualizza il menu principale alla partenza di MPlayer.
.TP
.B \-mouse\-movements
Permette ad MPlayer di ricevere eventi del puntatore riportati dal driver di
uscita video (attualmente sono supportati solo derivati di X11).
uscita video.
Necessario per selezionare i bottoni nei menu dei DVD.
Gestita solo per uscite video basate su X11 (x11, xv, xvmc, etc.) e per gl,
gl2, direct3d e corevideo.
.
.TP
.B \-noar
@ -1173,6 +1192,9 @@ separati dal carattere di nuova linea (newline, \\n) da stdin.
.I NOTA:
Vedi \-input cmdlist per la lista dei comandi in modalità slave e
DOCS/tech/slave.txt per la loro descrizione.
Tra l'altro questa opzione non è indicata per disabilitare altri input,
per es.\& attraverso la finestra del video, per far ciò usa altri metodi come
\-input nodefault\-binds:conf=/dev/null.
.
.TP
.B \-softsleep
@ -1216,6 +1238,17 @@ Quando si riproduce un flusso MPEG-TS, MPlayer/\:MEncoder useranno il primo
programma (se presente) con il flusso audio scelto.
.
.TP
.B \-ausid <ID> (vedi anche \-alang)
Selezione il canale del sottoflussio audio.
Attualmente la gamma valida è 0x55..0x75 e viene applicata solo ad un flusso
MPEG-TS quando viene decodificato dal demuxer nativo (non da libavformat).
Il tipo di formato potrebbe non venir identificato correttamente a causa del
modo in cui questa informazione (o la sua assenza) viene impacchettata nel
flusso, ma decodificherà correttamente i flussi audio quando sono presenti più
sottoflussi.
MPlayer emette gli ID dei sottoflussi disponibili se eseguito con \-identify.
.
.TP
.B \-alang <codice linguaggio[,codice linguaggio,...]> (vedi anche \-aid)
Specifica una lista di priorità dei linguaggi audio da utilizzare.
Formati contenitore diversi utilizzano diversi codici.
@ -1359,6 +1392,8 @@ stereo
surround
.IPs 6
5.1 completo
.IPs 8
7.1 completo
.RE
.PD 1
.
@ -1741,20 +1776,20 @@ frequenza massima permessa (default: 108.00)
Imposta la lista dei canali.
Usa _ per gli spazi nei nomi (o divertiti con il quoting ;-).
I nomi dei canali verranno scritti usando l'OSD e i comandi slave
radio_step_channel e radio_set_channel saranno utilizzabili da un controllo
radio_step_channel e radio_set_channel saranno utilizzabili per un controllo
remoto (dai un'occhiata a LIRC).
Quando fornito, un numero nell'URL del filmato sarà trattato come la posizione
del canale nella lista dei canali.
.br
.I ESEMPIO:
radio://1, radio://104.4, radio_set_channel 1
.IPs adevice=<valore> (solo acquisizione (capture) radio)
.IPs "adevice=<valore> (solo acquisizione (capture) radio)"
Nome del dispositivo da cui catturare l'audio.
Senza tale nome la cattura sarà disabilitata anche se la parola
chiave 'capture' appare nell'URL.
Per i dispositivi ALSA deve essere usato nella forma hw=<scheda>.<dispositivo>.
Se il nome contiene un '=', il modulo userà ALSA per la cattura, se no OSS.
.IPs arate=<valore> (solo acquisizione radio)
.IPs "arate=<valore> (solo acquisizione radio)"
Frequenza in campioni per secondo (default: 44100).
.br
.I NOTA:
@ -1762,7 +1797,7 @@ Quando usi la cattura audio, imposta anche l'opzione \-rawaudio rate=<valore>
con lo stesso valore di arate.
Se hai problemi colla velocità audio (va troppo veloce), prova la riproduzione
con valori di frequenza differenti (per es.\& 48000,44100,32000,...).
.IPs achannels=<valore> (solo acquisizione radio)
.IPs "achannels=<valore> (solo acquisizione radio)"
Numero di canali audio da catturare.
.RE
.
@ -1971,12 +2006,16 @@ Vedi l'output su console per una lista delle norme TV disponibili.
Regola il sintonizzatore sul canale <valore>.
.IPs chanlist=<valore>
disponibili: europe-east, europe-west, us-bcast, us-cable, etc
.IPs channels=<canale>\-<nome>[=<norma>],<canale>\-<nome>[=<norma>],...
.IPs channels=<can>\-<nome>[=<norma>],<can>\-<nome>[=<norma>],...
Imposta la lista dei canali.
.I NOTA:
Se <can> è un intero maggiore di 1000, verrà trattato come fosse una frequenza
(in kHz) invece che un nome di canale della tabella frequenze.
.br
Usa _ per gli spazi nei nomi (o divertiti con il quoting ;-).
I nomi dei canali verranno scritti usando l'OSD e i comandi slave tv_step_channel,
tv_set_channel e tv_last_channel saranno utilizzabili da un controllo
remoto (dai un'occhiata a LIRC).
I nomi dei canali verranno scritti usando l'OSD e i comandi slave
tv_step_channel, tv_set_channel e tv_last_channel saranno utilizzabili per un
controllo remoto (dai un'occhiata a LIRC).
Non è compatibile con il parametro frequency.
.br
.I NOTA:
@ -2163,8 +2202,8 @@ le tracce Matroska.
Potresti voler utilizzare anche \-embeddedfonts.
.br
.I NOTA:
Quando fontconfig è compilato nell'eseguibile, \-ass abilita \-fontconfig
a meno che non venga esplicitamente disabilitata con \-nofontconfig.
Diversamente dagli OSD normali, libass utilizza di default fontconfig.
Per disabilitarlo, usa \-nofontconfig.
.
.TP
.B \-ass\-border\-color <valore>
@ -2325,7 +2364,7 @@ Utilizzalo se le virgole nei sottotitoli sono visualizzate all'inizio di una
frase invece che alla fine.
.
.TP
.B \-font <percorso del file font.desc>
.B \-font <percorso del file font.desc, percorso del font (FreeType), descrizione del font (Fontconfig)>
Cerca i font per OSD/\:SUB in una directory alternativa (default per i
font normali: ~/\:.mplayer/\:font/\:font.desc, default per i font FreeType:
~/.mplayer/\:subfont.ttf).
@ -2333,7 +2372,7 @@ font normali: ~/\:.mplayer/\:font/\:font.desc, default per i font FreeType:
.I NOTA:
Con FreeType, questa opzione determina il percorso del file del font di testo.
.br
Con fontconfig, questa opzione determina il nome del font fontconfig.
Con Fontconfig, questa opzione determina la definizione del font Fontconfig.
.sp 1
.I ESEMPIO:
.PD 0
@ -2343,6 +2382,8 @@ Con fontconfig, questa opzione determina il nome del font fontconfig.
\-font ~/\:.mplayer/\:arialuni.ttf
.br
\-font 'Bitstream Vera Sans'
.br
\-font 'Bitstream Vera Sans:style=Bold'
.RE
.PD 1
.
@ -2351,8 +2392,9 @@ Con fontconfig, questa opzione determina il nome del font fontconfig.
Abilita l'utilizzo dei font gestiti da fontconfig.
.br
.I NOTA:
Abilitata automaticamente da \-ass a meno che non venga esplicitamente
disabilitata con \-nofontconfig.
Fontconfig viene usato automaticamente per i sottotitoli di libass e non per
OSD. Usando \-fontconfig viene utilizzato sia per libass che per OSD, usando
\-nofontconfig non viene proprio usato.
.
.TP
.B \-forcedsubsonly
@ -2407,6 +2449,11 @@ modalit
Se non riesci a selezionare un sottotitolo di un DVD, prova anche \-vobsubid.
.
.TP
.B \-nosub
Disabilita qualsiasi sottotitolo selezionato automaticamente (cosa che per
es.\& il demuxer Matroska/mkv implementa).
.
.TP
.B \-slang <codice linguaggio[,codice linguaggio]> (vedi anche \-sid)
Specifica una lista di priorità dei linguaggi dei sottotitoli da usare.
Formati contenitore diversi (avi, mov, ...) utilizzano diversi codici dei
@ -2592,7 +2639,8 @@ E' lo stesso che \-audiofile, ma per il flusso dei sottotitoli (OggDS?).
.
.TP
.B \-subfont <nomefile> (solo FreeType)
Seleziona il font per i sottotitoli.
.B \-subfont <percorso del font (FreeType), descrizione del font (Fontconfig)> (solo FreeType)
Seleziona il font per i sottotitoli (vedi \-font).
Se \-subfont non è specificato, viene usato \-font.
.
.TP
@ -2758,6 +2806,12 @@ massimo, che, p.es.\&, l'OSD non riuscir
Seleziona l'ampiezza dei passi di cambiamento del volume del mixer
in percentuale sulla gamma totale (default: 3).
.
.TP
.B \-volume <-1\-100> (vedi anche \-af volume)
Imposta sul mixer il volume in apertura, sia hardware o software (se usato con
\-softvol).
Un valore di -1 (default) non modifica il volume.
.
.
.\" --------------------------------------------------------------------------
.\" Driver di uscita audio
@ -2864,6 +2918,9 @@ Utile se vuoi che certe connessioni vengano stabilite automaticamente.
.IPs (no)estimate
Stima il ritardo audio, dovrebbe rendere la riproduzione video più dolce
ed uniforme (default: abilitato).
.IPs (no)autostart
Avvia automaticamente jackd se necessario (default: disabilitato).
Nota che ciò sembra poco affidabile e riempie lo stdout di messaggi del server.
.RE
.PD 1
.
@ -2930,6 +2987,18 @@ dispositivi disponibili.
.PD 1
.
.TP
.B dart (solo OS/2)
driver di uscita video OS/2 DART
.PD 0
.RSs
.IPs (no)share
Apre Dart in modalità condivisa o esclusiva.
.IPs bufsize=<dimensione>
Imposta la dimenzione del buffer a <dimensione> in campioni (default: 2048).
.RE
.PD 1
.
.TP
.B dxr2 (vedi anche \-dxr2) (solo DXR2)
Driver di uscita audio specifico per la scheda Creative DXR2
.
@ -2951,9 +3020,9 @@ se non c'
.RSs
.IPs card=<1\-4>
Scheda DVB da usare quando non ce n'è una sola.
Se non specificata mplayer cercherà la prima scheda utilizzabile.
Se non specificata MPlayer cercherà la prima scheda utilizzabile.
.IPs file=<nomefile>
nome file di uscita
nome del file di uscita
.RE
.PD 1
.
@ -3174,7 +3243,7 @@ Utilizza l'hint _WIN_LAYER hint con il numero di layer specificato.
.IPs netwm
Forza lo stile NETWM.
.IPs "none\ "
Non attivare il layer della finestra a schermo intero.
Pulisce la lista delle modalità; ne puoi aggiungere per abilitarle dopo.
.IPs stays_on_top
Utilizza l'hint _NETWM_STATE_STAYS_ON_TOP se disponibile.
.REss
@ -3204,6 +3273,9 @@ Supporta anche il formato dell'opzione standard di X \-geometry.
Se viene specificata una finestra esterna utilizzando l'opzione \-wid
allora le coordinate x ed y sono relative all'angolo in alto a sinistra
della finestra stessa piuttosto che dello schermo.
Le coordinate sono relative allo schermo indicato con \-xineramascreen per i
driver di uscita video che gestiscono completamente \-xineramascreen (direct3d,
gl, gl2, vdpau, x11, xv, xvmc).
.br
.I NOTA:
Questa opzione è supportata dai driver di uscita video x11, xmga, xv, xvmc,
@ -3272,6 +3344,10 @@ Un valore 1 significa pixel quadrati
(valore corretto per (quasi?) tutti gli schermi LCD).
.
.TP
.B \-name (solo X11)
Imposta il nome classe della finestra.
.
.TP
.B \-nodouble
Disabilita il doppio buffering, fondamentalmente usato a scopi di
debug.
@ -3341,15 +3417,13 @@ Non supportato da tutti i driver di uscita video.
.
.TP
.B \-screenh <pixels>
Specifica la risoluzione verticale dello schermo per quei driver di uscita
video che non riescono a conoscere la risoluzione dello schermo come fbdev,
x11 e TV-out.
Specifica l'altezza dello schermo per quei driver di uscita video che
non conoscono la risoluzione dello schermo come fbdev, x11 e TV-out.
.
.TP
.B \-screenw <pixels>
Specifica la risoluzione orizzontale dello schermo per quei driver di uscita
video che non riescono a conoscere la risoluzione dello schermo come fbdev,
x11 e TV-out.
Specifica la larghezza dello schermo per quei driver di uscita video che
non conoscono la risoluzione dello schermo come fbdev, x11 e TV-out.
.
.TP
.B \-stop\-xscreensaver (solo X11)
@ -3358,6 +3432,17 @@ Se il tuo salvaschermo non gestisce n
perfavore usa al suo posto \-heartbeat\-cmd.
.
.TP
.B \-title (vedi anche \-use\-filename\-title)
Imposta il titolo della finestra.
Gestito dai driver di uscita video basati su X11.
.
.TP
.B \-use\-filename\-title (vedi anche \-title)
Imposta il titolo della finestra usando il nome del file multimediale, se non
è stato impostato con \-title.
Gestito dai driver di uscita video basati su X11.
.
.TP
.B "\-vm \ \ \ "
Cerca di cambiare in un modalità video differente.
Supportato dai driver di uscita video dga, x11, xv, sdl e directx.
@ -3374,6 +3459,9 @@ Abilita il VBI per i driver di uscita video vesa, dfbmga e svga.
Dice ad MPlayer di collegarsi ad una finestra già esistente.
Utile per 'incastrare' MPlayer in un browser (p.es.\& con l'estensione
plugger).
Quest'opzione riempie completamente la finestra indicata, quindi rapporto di
aspetto, panscan, etc non vengono più gestite da MPlayer, ma devono esser
gestire dall'applicazione che ha creato la finestra.
.
.TP
.B \-xineramascreen <\-2\-...>
@ -3387,10 +3475,10 @@ la finestra.
La posizione iniziale selezionata con l'opzione \-geometry è relativa allo
schermo specificato.
Funzionerà solitamente solo con "\-fstype \-fullscreen" o "\-fstype none".
Non conviene usare quest'opzione solo per impostare la schermata di avvio
(e neanche per la modalità a tutto schermo), per far questo la miglior opzione
attualmente disponibilie è \-geometry.
Supportata dai driver di uscita video gl, gl2, x11, ed xv.
Quest'opzione non è utilizzabile per impostare solo la schermata di avvio
(dato che si aprirà sempre a tutto schermo sullo schermo indicato), per far
ciò la miglior opzione attualmente disponibilie è \-geometry.
Supportata almeno dai driver di uscita video direct3d, gl, gl2, x11 e xv.
.
.TP
.B \-zrbw (solo \-vo zr)
@ -3588,18 +3676,97 @@ E' lo stesso che \-vo xv:ck-method (vedi \-vo xv).
.PD 1
.
.TP
.B vdpau (con \-vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau, ffh264vdpau
o ffodivxvdpau)
Driver di uscita video che usa VDPAU per la docodifica video via hardware.
Gestisce anche la visualizzazione di video decodificato via software.
.PD 0
.RSs
.IPs sharpen=<\-1\-1>
Per valori positivi applica un algoritmo di messa a fuoco,
per valori negativi un algoritmo di sfocatura (default: 0).
.IPs denoise=<0\-1>
Applica al video un algoritmo di riduzione del disturbo (default: 0, nessuna
riduzione).
.IPs deint=<0\-4>
Sceglie il deinterlacciatore (default: 0).
Tutte le modalità > 0 rispettano \-field\-dominance.
.RSss
.IPs 0
nessun deinterlacciamento
.IPs 1
Mostra solo il primo campo, simile a \-vf field.
.IPs 2
deinterlacciatore molto semplice, simile a \-vf tfields=1
.IPs 3
Deinterlacciamento temporale adattivo al movimento.
Può portare desincronizzazione A/V con hardware video lento e/o alte
risoluzioni.
E' il default se si usa "D" per deinterlacciare.
.IPs 4
Deinterlacciamento temporale adattivo al movimento, con interpolazione spaziale
legata ai bordi.
Richiede harware video veloce.
.RE
.IPs chroma\-deint
Fa sì che i deinterlacciatori temporali operino sia sulla luminosità che sulla
crominanza (default).
Usa nochroma\-deint per usare solo la luminanza ed accellerare il
deinterlacciamento avanzato.
Utile con memoria video lenta.
.IPs pullup
Cerca di applicare il telecine inverso, richiede un deinterlacciamento
temporale adattivo al movimento.
.IPs colorspace
Seleziona lo spazio colore per la conversione da YUV a RGB (default: 1, BT.601).
In linea di massima si dovrebbero usare BT.601 per contenuto con una
definizione standard (SD) e BT.709 per contenuto ad alta definizione (HD).
L'utilizzo di uno spazio colore errato può portare colori leggermente saturati
o spostati verso l'alto o il basso.
.RSss
.IPs 0
Prova ad indovinare lo spazio colore in base alla risoluzione video.
Un video con larghezza >= 1280 o altezza > 576 viene considerato come HD e
verrà usato lo spazio colore BT.709.
.IPs 1
Usa lo spazio colore ITU-R BT.601 (default).
.IPs 2
Usa lo spazio colore ITU-R BT.709.
.IPs 3
Usa lo spazio colore SMPTE-240M.
.RE
.IPs hqscaling
.RSss
.IPs 0
Utilizza la scalatura di default di VDPAU (default).
.IPs 1\-9
Applica la scalatura VDPAU ad alta qualità (serve hardware abbastanza potente).
.RE
.IPs force\-mixer
Forza l'utilizzo del mixer VDPAU, che implementa tutte le opzioni di cui sopra
(default).
Usa noforce\-mixer per permettere la visualizzazione dello spazio colore BGRA.
(Se viene usato il formato immagine BGRA, disabilita tutte le opzioni sopra e
l'equalizzatore hardware.)
.RE
.PD 1
.
.TP
.B dga (solo X11)
Riproduce il video utilizzando l'estensione Direct Graphics
Access di XFree86.
Considerato obsoleto.
.
.TP
.B sdl (solo SDL)
.B sdl (solo SDL, vecchio/con problemi)
Driver di uscita video molto indipendente dalla piattaforma basato sulla
libreria SDL (Simple Directmedia Layer).
Visto che la libreria SDL utilizza la propria gestione di X11 le opzioni
relative ad X11 di MPlayer non avranno effetto se si utilizza questo driver
di uscita video.
Da notare che ha vari piccoli problemi (\-vm/\-novm viene solitamente ignorata,
\-fs si comporta come dovrebbe fare \-novm, la finestra rimane in alto a
sinistra uscendo dalla modalità a schermo intero, panscan non è gestito, ...).
.PD 0
.RSs
.IPs driver=<driver>
@ -3658,6 +3825,10 @@ Uguale a vidix
.PD 1
.
.TP
.B direct3d (solo Windows) (CODICE BETA!)
Driver di uscita video che usa l'interfaccia Direct3D (utile per Vista).
.
.TP
.B directx (solo Windows)
Driver di uscita video che utilizza l'interfaccia DirectX.
.PD 0
@ -3669,6 +3840,24 @@ Prova questa opzione se hai problemi di visualizzazione.
.PD 1
.
.TP
.B kva (solo OS/2)
Driver di uscita video che usa l'interfaccia libkva.
.PD 0
.RSs
.IPs snap
Forza la modalità SNAP.
.IPs wo
Forza la modalità WarpOverlay!.
.IPs dive
Forza la modalità DIVE.
.IPs (no)t23
Abilita o disabilita i workaround per il laptop T23 (default: disabilita).
Prova ad abilitare questa opzione se la tua scheda video supporta solo
l'ingrandimento.
.RE
.PD 1
.
.TP
.B quartz (solo Mac OS X)
Driver di uscita video per Quartz su Mac OS X.
In certi casi potrebbe essere più efficiente forzare un formato di
@ -3688,7 +3877,16 @@ Driver di uscita video Mac OS X CoreVideo.
.PD 0
.RSs
.IPs device_id=<numero>
Seleziona il dispositivo di visualizzazione da usare a schermo intero.
Seleziona il dispositivo di visualizzazione da usare a schermo intero o
impostalo a \-1 per usare sempre lo stesso schermo su cui sta la finestra del
video (default: \-1 \- automatico).
.IPs shared_buffer
Scrive l'uscita su un buffer di memoria condivisa, invece di mostrarla e cercare
di aprire una connessione NSConnection esistente per comunicare con una GUI.
.IPs buffer_name=<nome>
Nome del buffer condiviso creato con shm_open e il nome della connessione
NSConnection che MPlayer cercherà di aprire (default: "mplayerosx").
Impostare buffer_name abilita implicitamente shared_buffer.
.RE
.PD 1
.
@ -3770,7 +3968,7 @@ ma usa pure estensioni recenti e nuove, che permettono di usare pi
colore e il rendering diretto.
Per una velocità ottimale prova ad usare qualcosa simile a
.br
\-vo gl:yuv=2:force\-pbo:ati\-hack \-dr \-noslices
\-vo gl:yuv=2:rectangle=2:force\-pbo:ati\-hack \-dr \-noslices
.br
Questa parte di codice implementa pochi controlli percio' se una
caratteristica non funziona potrebbe non essere supportata dalla
@ -3870,6 +4068,10 @@ La gamma pu
La velocità dipende più dall'ampiezza di memoria della GPU rispetto agli altri
metodi.
.RE
.IPs ycbcr
Usa l'estenzione GL_MESA_ycbcr_texture per convertire da YUV a RGB.
Nella maggior parte dei casi è probabilmente più lento di una conversione
software verso RGB.
.IPs lscale=<n>
Seleziona la funzione di ridimensionamento da usare per il ridimensionamento
della luminanza.
@ -4232,9 +4434,9 @@ in formato MPEG-PES se non
.IPs card=<1\-4>
Specifica il numero del dispositivo da usare se hai più di una scheda di
uscita DVB (solo API V3, come i driver della serie 1.x.y).
Se non specificata mplayer cercherà la prima scheda utilizzabile.
Se non specificata MPlayer cercherà la prima scheda utilizzabile.
.IPs <nomefile>
Permette di specificare il nome del file di uscita (default: ./grab.mpg).
nome del file di uscita (default: ./grab.mpg)
.RE
.PD 1
.
@ -4534,7 +4736,7 @@ Disabilita la compensazione automatica del rapporto di aspetto del film.
.B "\-field\-dominance <\-1\-1>"
Imposta il primo campo per contenuti interlacciati.
Utile per deinterlacciatori che raddoppiano la frequenza: \-vf tfields=1,
\-vf yadif=1 e \-vo xvmc:bobdeint.
\-vf yadif=1, \-vo vdpau:deint and \-vo xvmc:bobdeint.
.PD 0
.RSs
.IPs \-1
@ -5167,6 +5369,38 @@ Valori ragionevoli sono intorno a 0.001.
.PD 1
.
.TP
.B bs2b[=opzione1:opzione2:...]
Trasformazione di Bauer da stereofonica a binaurale usando libbs2b.
Migliora l'ascolto attraverso le cuffie rendendo simile l'audio a quello degli
altroparlanti, permettendo a ciascun orecchio di sentire entrambi i canali e
percepire la differenza di distanza e l'effetto di allontanamento dalla testa.
E' applicabile solo all'audio a 2 canali.
.PD 0
.RSs
.IPs fcut=<300\-1000>
Imposta la frequenza di taglio in Hz.
.IPs feed=<10\-150>
Imposta il livello di feed per basse frequenze, in 0.1*dB.
.IPs profile=<valore>
Sono disponibili alcuni profili di comodo:
.PD 0
.RSs
.IPs default
usato se non specificato altro (fcut=700, feed=45)
.IPs "cmoy\ "
implementazione del circuito di Chu Moy (fcut=700, feed=60)
.IPs jmeier
implementazione del circuito di Jan Meier (fcut=650, feed=95)
.RE
.RE
.sp 1
.RS
Se le opzioni fcut o feed vengono specificate insieme con un profilo, queste
verranno applicate sul profilo selezionato.
.RE
.PD 1
.
.TP
.B hrtf[=flag]
Funzione di trasferimento riferita alla testa: Converte l'audio multicanale
in una uscita a due canali per le cuffie, preservando la spazialità del
@ -5246,11 +5480,11 @@ canali in eccesso sono troncati.
.PD 0
.RSs
.IPs <numero_canali>
numero di canali di uscita (1\-6)
numero di canali di uscita (1\-8)
.IPs "<numero>\ "
numero di indirizzamenti (1\-6)
numero di indirizzamenti (1\-8)
.IPs <da1:a1:da2:a2:da3:a3:...>
Coppie di numeri tra 0 e 5 che definiscono dove reindirizzare ogni canale.
Coppie di numeri tra 0 e 7 che definiscono dove reindirizzare ogni canale.
.RE
.sp 1
.RS
@ -5356,7 +5590,7 @@ con questo filtro si trova nella sezione degli esempi verso la fine.
.PD 0
.RSs
.IPs "<n>\ \ "
numero di canali di uscita (1\-6)
numero di canali di uscita (1\-8)
.IPs <Lij>
Quanta parte del canale di ingresso i è miscelata nel canale di uscita j (0\-1).
Così all'inizio hai n numeri che dicono cosa fare col primo canale di ingresso,
@ -5401,7 +5635,7 @@ basso possibile.
Questo migliorerà l'esperienza del suono stereo o surround.
.IPs "<ch>\ "
Determina il numero di canale in cui inserire il sotto-canale audio.
Il numero del canale può essere tra 0 e 5 (default: 5).
Il numero del canale può essere tra 0 e 7 (default: 5).
Nota che il numero di canali verrà automaticamente incrementato a <ch>
se necessario.
.RE
@ -5426,7 +5660,7 @@ semplicemente somma e media i canali interessati.
.RSs
.IPs "<ch>\ "
Determina il numero del canale su cui inserire il canale centrale.
Il numero del canale può essere tra 0 e 5 (default: 5).
Il numero del canale può essere tra 0 e 7 (default: 5).
Nota che il numero di canali verrà automaticamente incrementato a <ch>
se necessario.
.RE
@ -5688,6 +5922,13 @@ audio a 1.2x.
.RE
.PD 1
.
.TP
.B "stats\ \ "
Raccoglie ed emette a video statistiche sul flusso audio, in particolare sul
volume.
Queste statistiche sono particolarmente utili per aiutare l'impostazione del
volume ed evitare il clipping.
I volumi vengono scritti in dB e compatibili col filtro audio volume.
.
.
.\" --------------------------------------------------------------------------
@ -5869,7 +6110,7 @@ Ruota di 90 gradi in senso antiorario e ribalta.
.RE
.
.TP
.B scale[=w:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=w:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Scala l'immagine con la modalità software (lento) ed esegue una conversione
dello spazio colore YUV<\->RGB (vedi anche \-sws).
.RSs
@ -5891,7 +6132,7 @@ d_width/\:d_height (d_larghezza / d_altezza)!
.br
\-(n+8): Come \-n sopra ma arrotonda la dimensione al più vicino multiplo di 16.
.REss
.IPs <ilaced>
.IPs <interlaced>
Attiva la scalatura interlacciata.
.RSss
0: non attiva (default)
@ -7473,6 +7714,10 @@ usando il primo numero disponibile \- nessun file sar
Il filtro se non viene usato non appesantisce il programma e accetta uno spazio
colore arbitrario, quindi può esser impostato senza problemi nel file di
configurazione.
Assicurati di aggiungere il filtro screenshot dopo tutti gli altri filtri che
influenzano l'immagine che vuoi salvare.
Per es.\& dovrebbe essere l'ultimo filtro se vuoi un'istantanea corrispondente
a ciò che vedi sul monitor.
.RE
.
.TP
@ -7505,6 +7750,26 @@ La soglia sotto la quale un valore di un pixel viene considerato nero
(default: 32).
.RE
.
.TP
.B gradfun[=valore[:raggio]]
Corregge gli artefatti a bande che appaiono alcune volte in regioni quasi
piane abbassando la profondità colore a 8bit.
Interpola i gradienti che dovrebbero essere al posto delle bande, e li sgrana
col resto.
.sp 1
Questo filtro è pensato solo per la riproduzione.
Non usarlo per compressioni con perdita, perché la compressione tende a
togliere la sgranatura e rendere di nuovo visibili le bande.
.RSs
.IPs <valore>
Massima variazione che il filtro applicherà su ogni pixel.
E' anche la soglia per determinare le regioni quasi piane (default: 1.2).
.IPs <raggio>
Raggio della zona circostante a cui adattare il gradiente.
Raggi più ampi generano gradienti più sfumati, ma impediranno al filtro di
modificare pixel in regioni più dettagliate (default: 16).
.RE
.
.
.\" --------------------------------------------------------------------------
.\" Opzioni generali di codifica
@ -8032,10 +8297,6 @@ Formati PCM adattivi \- vedi la documentazione HTML per i dettagli.
Free Lossless Audio Codec (FLAC)
.IPs "g726\ "
G.726 ADPCM
.IPs libamr_nb
3GPP Adaptive Multi-Rate (AMR) narrow-band
.IPs libamr_wb
3GPP Adaptive Multi-Rate (AMR) wide-band
.IPs libfaac
Advanced Audio Coding (AAC) \- usando FAAC
.IPs libmp3lame
@ -9461,6 +9722,10 @@ Attualmente funziona solo se la rilevazione del cambio scena
(sc_threshold=1000000000).
.
.TP
.B "gmc\ \ \ \ "
Abilita la compensazione del moto globale (Global Motion Compensation).
.
.TP
.B (no)lowdelay
Imposta il flag di basso ritardo per MPEG-1/2 (disabilita i fotogrammi B).
.
@ -10501,19 +10766,21 @@ ricerca esaustiva (molto lenta, e non migliore di umh)
raggio della ricerca esaustiva oppure multi-esagono del movimento (default: 16)
.
.TP
.B subq=<1\-7>
.B subq=<0\-9>
Controlla la qualità della rifinitura dei sotto pixel (subpel).
Questo parametro controlla la qualità rispetto alla velocità coinvolta
nel processo di decisione della stima del movimento.
subq=5 può comprimere fino al 10% meglio rispetto a subq=1.
subq=5 può comprimere fino al 10% in più rispetto a subq=1.
.PD 0
.RSs
.IPs 1
.IPs 0
Esegue una stima del movimento a pixel intero su tutti i tipi di
macroblocchi candidati.
Poi seleziona il tipo migliore.
Infine rifinisce il movimento di quel tipo con una precisione veloce
sul quarto di pixel (più veloce).
Poi seleziona il tipo migliore con una metrica SAD (più veloce di subq=1,
sconsigliato a meno che non si cerchi solo una codifica ultra veloce).
.IPs 1
Opera come 0, poi rifinisce il movimento di quel tipo con una precisione veloce
sul quarto di pixel (veloce).
.IPs 2
Esegue una stima del movimento a mezzo pixel su tutti i tipi di
macroblocchi candidati.
@ -10529,13 +10796,22 @@ Poi seleziona il tipo migliore.
Infine finisce la rifinitura a quarto di pixel per quel tipo.
.IPs 5
Esegue la miglior stima del movimento a quarto di pixel in tutti i
tipi di macroblocchi candidati prima di selezionare il tipo migliore. (default)
tipi di macroblocchi candidati prima di selezionare il tipo migliore.
Inoltre rifinisce con una metrica SATD i due vettori di movimento usati nei
macroblocchi bidirezionali, invece di riutilizzare i vettori delle ricerche
in avanti e all'indietro.
.IPs 6
Abilita l'ottimizzazione rate-distorsion (?) dei tipi di macroblocchi nei
fotogrammi I e P.
Abilita l'ottimizzazione rate-distorsion (?) dei tipi di macroblocco nei
fotogrammi I e P (default).
.IPs 7
Abilita l'ottimizzazione rate-distortion dei vettori di movimento e delle
modalità intra. (qualità migliore)
Abilita l'ottimizzazione rate-distortion dei tipi di macroblocco in tutti i
fotogrammi (qualità migliore).
.IPs 8
Abilita l'ottimizzazione rate-distortion dei vettori di movimento nei
fotogrammi I e P.
.IPs 9
Abilita l'ottimizzazione rate-distortion dei vettori di movimento in tutti i
fotogrammi (qualità migliore).
.RE
.PD 1
.RS
@ -10559,19 +10835,7 @@ di riferimento.
Richiede frameref>1.
.
.TP
.B (no)brdo
Abilita l'ottimizzazione della rate-distorsion per i tipi di macroblocco
nei fotogrammi B.
Richiede subq>=6.
.
.TP
.B (no)bime
Rifinisce i due vettori di movimento usati per i macroblocchi bidirezionali,
piuttosto che riutilizzare vettori da ricerche in avanti e indietro.
Questa opzione non ha effetto senza fotogrammi B.
.
.TP
.B trellis=<0\-2>
.B trellis=<0\-2> (solo cabac)
quantizzazione ottimale della rate-distortion
.PD 0
.RSs
@ -10585,6 +10849,18 @@ abilitata durante ogni decisione di modalit
.PD 1
.
.TP
.B psy-rd=rd[,trell]
Imposta l'incidenza dell'ottimizzazione psicovisuale.
.PD 0
.RSs
.IPs rd=<0.0\-10.0>
incidenza dell'ottimizzazione psi (richiede subq>=6) (default: 1.0)
.IPs trell=<0.0\-10.0>
trellis (richiede trellis, sperimentale) (default: 0.0)
.RE
.PD 1
.
.TP
.B deadzone_inter=<0\-32>
Imposta la dimensione della zona morta di quantizzazione di luminanza inter
per quantizzazione non trellis (default: 21).

View File

@ -5814,7 +5814,7 @@ scale
.RE
.
.TP
.B scale[=w:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=w:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
Масштабирует изображение модулем программного масштабирования (медленно)
и осуществляет YUV<\->RGB преобразование пространства цветов (смотрите
также \-sws).
@ -5839,7 +5839,7 @@ scale
.br
\-(n+8): Как и \-n выше, но округляя размеры до ближайшего кратного 16 значения.
.REss
.IPs <ilaced>
.IPs <interlaced>
Переключает чересстрочное масштабирование.
.RSss
0: выключено (по умолчанию)

View File

@ -1,4 +1,4 @@
.\" sync with en/mplayer.1 r29731
.\" sync with en/mplayer.1 r29905
.\" Encoding: UTF-8
.\" Reminder of hard terms which need better/final solution later:
.\" /capture; playtree in parent list; colorkey; retrace; desync; downmix;
@ -188,7 +188,10 @@ MPlayer 可播放的电影(见上所述)编码成其他的 MPlayer 可播放格
扩展, 反转, 后处理, 旋转, 缩放, 降噪声, RGB/\:YUV 转换)等。
.PP
.B gmplayer
是具有图形用户界面的 MPlayer。其选项与 MPlayer 相同。
其与 MPlayer 具有相同的选项,然而这些选项可能无法全部正常工作,因为与经由 GUI 所作
的配置(保存在 gui.conf 中)有冲突。
特别是有些选项的设置可能被 gui.conf 中的设置覆盖,而另一些可能最终永久保存在
gui.conf 中。
.PP
本手册页最后有用法示例, 能让你迅速上手。
.PP
@ -424,7 +427,7 @@ MPlayer 有个完全可配置的, 命令驱动的控制层,
.RS
.
以下按键只有当编译时启用对于电视字幕的支持teletext时才有效这些按键用于控制电
视字幕。)
视字幕,数据可能来自模拟电视输入或是 MPEG 传输流。)
.RE
.PP
.PD 0
@ -1247,7 +1250,9 @@ MPlayer 要求解码器把音频解码到指定数量的声道。
.IPs 4
环绕立体声
.IPs 6
5.1 立体声
5.1 全声道输出
.IPs 8
7.1 全声道输出
.RE
.PD 1
.
@ -2904,7 +2909,7 @@ VESA 帧缓冲不支持改变模式。
.IPs netwm
锁定 NETWM 风格。
.IPs "none\ "
不设置全屏窗口层
清空模式列表;你可以之后添加要启用的模式
.IPs stays_on_top
如果可用的话, 使用 _NETWM_STATE_STAYS_ON_TOP 提示。
.REss
@ -2997,6 +3002,10 @@ gl、gl2、directx、fbdev 和 tdfxfb 视频输出驱动支持。
值 1 表示正方形像素((几乎?)对所有的 LCD 是正确的)。
.
.TP
.B \-name仅用于 X11
设置窗口类的名字。
.
.TP
.B \-nodouble
停用双缓冲, 多数用于调试目的。
双缓冲通过在内存里储存两帧来解决闪烁问题, 在显示一帧的同时解码另一帧。
@ -3070,6 +3079,16 @@ ggi 和 gl2 的都支持此功能。
如果你的屏保程序不支持 XSS 或 XResetScreenSaver 的 API则请使用 \-heartbeat\-cmd 选项。
.
.TP
.B \-title另见 \-use\-filename\-title
设置窗口的标题。
基于 X11 的视频输出驱动支持。
.
.TP
.B \-use\-filename\-title另见 \-title
当未使用 \-title 设置窗口的标题时,使用媒体的文件名设置。
基于 X11 的视频输出驱动支持。
.
.TP
.B "\-vm \ \ \ "
尝试改变不同的视频模式。
视频输出驱动支持的有 dga, x11, xv, sdl 和 directx。
@ -3232,7 +3251,8 @@ ggi 和 gl2 的都支持此功能。
.PD 1
.
.TP
.B vdpau \-vc ffmpeg12vdpauffwmv3vdpauffvc1vdpau ffh264vdpau 一同使用)
.B vdpau \-vc ffmpeg12vdpauffwmv3vdpauffvc1vdpauffh264vdpau
ffodivxvdpau 一同使用)
使用 VDPAU 硬件解码视频的视频输出方式。
同时支持显示软件解码的视频。
.PD 0
@ -3266,6 +3286,32 @@ ggi 和 gl2 的都支持此功能。
对于低速显存很有用。
.IPs pullup
尝试应用反电视电影模式,需要使用运动自适应的瞬间反隔行扫描算法。
.IPs colorspace
选择 YUV 至 RGB 转换时使用的色彩空间
通常标清SD内容应使用 BT.601而高清HD内容用 BT.709。
使用不正确的色彩空间将导致稍许的饱和度过度或不足,以及色彩偏移。
.RSss
.IPs 0
根据视频分辨率判断色彩空间。
宽度大于 1280 或高度大于 576 的视频将被假定为 HD从而使用 BT.709 色彩空间。
.IPs 1
使用 ITU-R BT.601 色彩空间(默认值)。
.IPs 2
使用 ITU-R BT.709 色彩空间。
.IPs 3
使用 SMPTE-240M 色彩空间。
.RE
.IPs hqscaling
.RSss
.IPs 0
使用默认的 VDPAU 缩放模式(默认值)。
.IPs 1\-9
应用高质量的 VDPAU 缩放模式(需要足够性能的硬件)。
.RE
.IPs force\-mixer
强制使用 VDPAU 混合器,其实现了所有以上选项(默认值)。
要允许显示 BGRA 色彩空间,则使用 noforce\-mixer。
如果实际使用了BGRA则禁用所有以上选项和硬件均衡器。
.RE
.PD 1
.
@ -3389,7 +3435,7 @@ VIDIX 的 Windows 前台
.IPs dive
强制使用 DIVE 模式。
.IPs (no)t23
启用/禁用解决 T23 笔记本问题的变通模式(默认值:禁用)。
启用禁用解决 T23 笔记本问题的变通模式(默认值:禁用)。
如果你的显卡仅支持画面放大输出,尝试开启这个选项。
.RE
.PD 1
@ -4758,7 +4804,7 @@ delta 的正弦, 使用非常低的值听此扫听(sweep)。
.PD 1
.
.TP
.B bs2b[=option1:option2]
.B bs2b[=option1:option2:...]
使用 libbs2b 的 Bauer 立体声至双耳声道转换模式。
通过使声音更类似于如同从扬声器传来以提升耳机的听觉效果。该模式让每个耳朵同时
听见两个声道,并考虑了声音传播距离的差别及头部回响效果。
@ -4771,14 +4817,15 @@ delta 的正弦, 使用非常低的值听此扫听(sweep)。
设置以 0.1*dB 为单位的用于低频率的反馈级别。
.IPs profile=<value>
有许多配置可供方便选用:
.PD 0
.RSs
默认配置如果未指定其它参数将被使用fcut=700feed=45
.br
cmoyChu Moy 回路实现方案fcut=700feed=60
.br
jmeierJan Meier 回路实现方案fcut=650feed=95
.REss
.PD 1
.IPs default
如果未指定其它选项则使用这个选项fcut=700, feed=45
.IPs "cmoy\ "
Chu Moy 回路实现算法fcut=700, feed=60
.IPs jmeier
Jan Meier 回路实现算法fcut=650, feed=95
.RE
.RE
.sp 1
.RS
@ -4853,11 +4900,11 @@ jmeierJan Meier 回路实现方案fcut=650feed=95
.PD 0
.RSs
.IPs <nch>
输出声道数 (1\-6)
输出声道数1\-8
.IPs "<nr>\ "
路由数 (1\-6)
转换路径数1\-8
.IPs <from1:to1:from2:to2:from3:to3:...>
0 到 5 对定义各声道的路由
0 到 7 的数字对定义各声道的转换路径
.RE
.sp 1
.RS
@ -4939,7 +4986,7 @@ s8, floatle, floatbe, floatne, mulaw, alaw, mpeg2, ac3 和 imaadpcm。
.PD 0
.RSs
.IPs "<n>\ \ "
输出声道数 (1\-6)
输出声道数1\-8
.IPs <Lij>
输入声道 i 混音成输出声道 j 的份量 (0\-1)。
所以基本上你先要有 n 个数表示要作用到第一个输入声道,
@ -4976,7 +5023,7 @@ s8, floatle, floatbe, floatne, mulaw, alaw, mpeg2, ac3 和 imaadpcm。
为了最佳结果, 尝试设置截频尽可能低。这能改善立体声或环绕音效的体验。
.IPs "<ch>\ "
决定插入超音声道音频的声道号。
声道号在 0 和 5 之间 (默认是: 5)
声道号在 0 和 7 之间默认值5
观察到声道数会自动增加到 <ch>, 如果必要的话。
.RE
.sp 1
@ -4997,8 +5044,8 @@ s8, floatle, floatbe, floatne, mulaw, alaw, mpeg2, ac3 和 imaadpcm。
.PD 0
.RSs
.IPs "<ch>\ "
决定插入中心声道的声道号。
声道号在 0 和 5 之间 (默认是: 5)
决定插入中心声道的声道号。
声道编号取值于 0 和 7 之间默认值5
观察到声道数会自动增加到 <ch>, 如果必要的话。
.RE
.PD 1
@ -5395,7 +5442,7 @@ w和h的负数值将被视作为相对于原始大小的增量。
.RE
.
.TP
.B scale[=w:h[:ilaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
.B scale[=w:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
使用软件缩放器速度慢缩放图像并执行YUV<\->RGB色彩空间转换另参见\-sws
.RSs
.IPs <w>,<h>
@ -5415,7 +5462,7 @@ d_宽/\:d_高
.br
\-(n+8):与以上的\-n相似但舍入尺寸值至最接近的16的倍数。
.REss
.IPs <ilaced>
.IPs <interlaced>
触发隔行扫描视频的缩放方式。
.RSss
0关闭默认
@ -6834,6 +6881,8 @@ h参数值。
可以用的编号——不会覆盖任何文件。
该滤镜在不用时不占用资源,并且支持任意色彩空间,所以将其添加进
配置文件中很安全。
要确保 screenshot 滤镜是加在所有其效果你希望录在所保存图像中的滤镜之后。
例如,如果你希望截屏与你在显示屏上看到的完全一致,则它应当是最后一个滤镜。
.RE
.
.TP
@ -9647,7 +9696,6 @@ trellis要求 trellis实验性默认值0.0
.RE
.PD 1
.
.
.TP
.B deadzone_inter=<0\-32>
设置非格子因子量化模式中帧间亮度量化无效区的大小默认值21

View File

@ -40,9 +40,9 @@ Man page translations:
* French: Guillaume Poirier
* German: Sebastian Krämer
* Hungarian: Gabor Mizda
* Italian: Daniele Forghieri
* Italian: Paolo Tresoldi
* Polish: Waclaw Schiller
* Spanish: Reynaldo H. Verdejo Pinochet (outdated)
* Spanish: None
* Russian: Vladimir Voroshilov
Documentation translations:
@ -52,7 +52,7 @@ Documentation translations:
* Hungarian: Gabor Mizda
* Italian: Paolo Tresoldi
* Polish: Waclaw Schiller
* Spanish: Reynaldo H. Verdejo Pinochet (outdated)
* Spanish: None
* Chinese (simplified): unmaintained, outdated
* Italian: unmaintained, outdated
* Russian: Vladimir Voroshilov
@ -84,7 +84,7 @@ MPlayer code:
* playtree, input layer: Alban Bedel
* libswscale: Michael Niedermayer, Luca Abeni
* DVB support: Nico Sabbi
* EDL code: Reynaldo H. Verdejo Pinochet, Oded Shimon
* EDL code: Oded Shimon
Imported libs/projects:
* FFmpeg: Michael Niedermayer
@ -143,8 +143,8 @@ video filters:
audio filters:
* general: Alex Beregszaszi
* af_ladspa.c - Ivo van Poorten
* af_equalizer.c - Reynaldo H. Verdejo Pinochet
* af_karaoke.c - Reynaldo H. Verdejo Pinochet
* af_equalizer.c - None
* af_karaoke.c - None
audio encoders:
* ae_toolame.c, ae_twolame.c and ae_faac.c - Nico Sabbi

View File

@ -34,6 +34,15 @@ For "set_mouse_pos" and "key_down_event", "pausing_keep_force" is the default
since other values do not make much sense for them.
Various tips and tricks (please help expand it!):
- Try using something like
pausing_keep_force pt_step 1
get_property pause
to switch to the next file. It avoids audio playback starting to play
the old file for a short time before switching to the new one.
Available commands ('mplayer -input cmdlist' will print a list):

View File

@ -215,7 +215,7 @@ Zachovávejte prosím
<emphasis role="bold">neposílejte HTML mail</emphasis> do žádné z našich
konferencí. Jinak můžete být ignorováni nebo vyhozeni. Pokud nevíte co je to
HTML mail, nebo proč je tak zatracován, přečtěte si tento
<ulink url="http://expita.com/nomime.html">výborný dokument</ulink>. Zde se
<ulink url="http://efn.no/html-bad.html">výborný dokument</ulink>. Zde se
dovíte detaily včetně instrukcí pro vypnutí HTML. Poznamenejme též, že nebudeme
individuálně dělat CC (kopie) lidem, takže je dobré se přihlásit, abyste
obdrželi svou odpověď.

View File

@ -181,7 +181,7 @@ make</screen>
und <emphasis role="bold">sende keine HTML-Mails</emphasis> an eine unserer
Mailinglisten. Du wirst ignoriert oder ausgeschlossen werden. Wenn du nicht
weißt, was eine HTML-Mail ist oder warum sie böse ist, lies dieses
<ulink url="http://expita.com/nomime.html">feine Dokument</ulink>. Es erklärt
<ulink url="http://efn.no/html-bad.html">feine Dokument</ulink>. Es erklärt
alle Details und beinhaltet Instruktionen, wie man HTML abschalten kann. Beachte
auch, dass wir keine Kopien (CC, carbon-copy) verschicken. Es ist daher eine
gute Sache, sich anzumelden, um auch wirklich eine Antwort zu erhalten.

View File

@ -220,7 +220,7 @@ Please follow the standard
and <emphasis role="bold">do not send HTML mail</emphasis> to any of our
mailing lists. You will only get ignored or
banned. If you do not know what HTML mail is or why it is evil, read this
<ulink url="http://expita.com/nomime.html">fine document</ulink>.
<ulink url="http://efn.no/html-bad.html">fine document</ulink>.
It explains all the details and has instructions for turning HTML off. Also
note that we will not individually CC (carbon-copy) people so it is a good idea
to subscribe to actually receive your answer.

View File

@ -92,7 +92,7 @@ El idioma de esta lista es <emphasis role="bold">Inglés</emphasis>. Por favor s
y <emphasis role="bold">no envíe correo en HTML</emphasis> a ninguna de nuestras listas
de correo. Si lo hace puede ser ignorado o expulsado. Si no sabe qué es el correo HTML
o por qué es el demonio, lea este
<ulink url="http://expita.com/nomime.html">buen documento</ulink>. Explica todos los
<ulink url="http://efn.no/html-bad.html">buen documento</ulink>. Explica todos los
detalles y las instrucciones para desactivar el correo HTML. Note también que no
debe hacer CC (carbon-copy) a personas individuales no es buena idea si quiere recibir
una respuesta.

View File

@ -230,7 +230,7 @@ SVP et <emphasis role="bold">n'envoyez de mails en HTML</emphasis> sur
aucune de nos listes de diffusion.
Vous ne serez qu'ignoré ou banni.
Si vous ne savez pas ce qu'est un mail en HTML ou pourquoi c'est mauvais,
lisez ce <ulink url="http://expita.com/nomime.html">sympatique document</ulink>
lisez ce <ulink url="http://efn.no/html-bad.html">sympatique document</ulink>
(en Anglais).
Il explique tous les détails et a des instructions pour désactiver le HTML.
Notez également que nous ne ferons pas de CC (copie conforme) individuelle

View File

@ -220,7 +220,7 @@ Kövesd a szabványos
listánkra se. Ha nem így teszel, akkor vagy egyszerűen figyelmen kívül hagynak
vagy kitiltanak. Ha nem tudod mi az a HTML levél vagy hogy miért rossz az, olvasd
el ezt a
<ulink url="http://expita.com/nomime.html">frankó leírást</ulink>. Mindent
<ulink url="http://efn.no/html-bad.html">frankó leírást</ulink>. Mindent
részletesen megmagyaráz és tanácsokat ad a HTML kikapcsolásához. Szintén tartsd
észben, hogy nem CC-zünk (carbon-copy) egyéneknek, így jól teszed, ha
feliratkozol, hogy megkapd te is a választ.

View File

@ -224,7 +224,7 @@ Per favore segui gli standard delle
e <emphasis role="bold">non inviare email in HTML</emphasis> ad alcuna delle
nostre mailing list. Verrai semplicemente ignorato bandito. Se non sai cosa sia
una mail in HTML o perché sia il male, leggi questo
<ulink url="http://expita.com/nomime.html">buon documento</ulink>.
<ulink url="http://efn.no/html-bad.html">buon documento</ulink>.
Ti spiega tutto in dettaglio e contiene le istruzioni per disabilitare l'HTML.
Inoltre nota che non rispondiamo in CC (copia carbone) alle persone, quindi è
una buona idea iscriversi per poter effettivamente ricevere la risposta.

View File

@ -233,7 +233,7 @@ Językiem obowiązującym na tej liście jest
i <emphasis role="bold">nie wysyłać listów w HTML-u</emphasis> na żadną z naszych
list. W przeciwnym wypadku zostaniesz zignorowany lub wyrzucony z listy. Jeżeli
nie wiesz czym jest list w HTML-u albo dlaczego jest on zły, przeczytaj ten
<ulink url="http://expita.com/nomime.html">świetny dokument</ulink> (znów tylko
<ulink url="http://efn.no/html-bad.html">świetny dokument</ulink> (znów tylko
po angielsku - przyp. tłum.). Wyjaśnia on wszystkie szczegóły i zawiera
instrukcje wyłączania HTML-u. Zauważ również, że nie wysyłamy kopii listów do
użytkowników, więc dobrym pomysłem jest zapisanie się na listę w celu uzyskania

View File

@ -218,7 +218,7 @@ Netiquette Guidelines[Руководство по Сетевому Этикет
<emphasis role="bold">не присылайте HTML почту</emphasis> ни на какую из наших
рассылок. Вас просто проигнорируют или забанят. Если Вы хотите узнать, что такое
HTML почта и почему это &mdash; зло, прочтите
<ulink url="http://expita.com/nomime.html">этот документ</ulink>. Он объяснит
<ulink url="http://efn.no/html-bad.html">этот документ</ulink>. Он объяснит
Вам все детали и содержит инструкции по отключению HTML. Также обратите
внимание, что мы не будем индивидуально CC (отсылать копии) людям, а поэтому
подписаться &mdash; хорошая идея, если Вы хотите получить ответ.

View File

@ -194,7 +194,7 @@ README文件中。如果这未能提供帮助请查询 已知错误
并且<emphasis role="bold">不要发送HTML邮件</emphasis>到我们任何一个邮
件列表上。你将会被忽略或禁止。如果你不知道什么是HTML邮件或为什么他是邪
恶的,阅读这篇
<ulink url="http://expita.com/nomime.html">文章</ulink>
<ulink url="http://efn.no/html-bad.html">文章</ulink>
他解释了所有的细节并有关闭HTML的指示。此外请注意我们不单独CC(抄送)给个
人,所以注册上来以便得到你的答案是个好主意。
</para>

View File

@ -24,15 +24,6 @@ include config.mak
###### variable declarations #######
COMMON_LDFLAGS += $(EXTRA_LIB)\
$(EXTRALIBS) \
LDFLAGS_MPLAYER = $(EXTRALIBS_MPLAYER) \
$(COMMON_LDFLAGS) \
LDFLAGS_MENCODER = $(EXTRALIBS_MENCODER) \
$(COMMON_LDFLAGS) \
SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c
SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c
SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
@ -277,7 +268,6 @@ SRCS_COMMON-$(TV) += stream/stream_tv.c stream/tv.c \
stream/frequencies.c stream/tvi_dummy.c
SRCS_COMMON-$(TV_BSDBT848) += stream/tvi_bsdbt848.c
SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c
SRCS_COMMON-$(TV_TELETEXT) += stream/tvi_vbi.c
SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c
SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
SRCS_COMMON-$(UNRAR_EXEC) += unrar_exec.c
@ -386,6 +376,7 @@ SRCS_COMMON = asxparser.c \
libmpcodecs/ad_msgsm.c \
libmpcodecs/ad_pcm.c \
libmpcodecs/dec_audio.c \
libmpcodecs/dec_teletext.c \
libmpcodecs/dec_video.c \
libmpcodecs/img_format.c \
libmpcodecs/mp_image.c \
@ -754,10 +745,11 @@ checkheaders: $(ALLHEADERS:.h=.ho)
dep depend: $(DEPS)
mencoder$(EXESUF): $(MENCODER_DEPS)
$(CC) -o $@ $^ $(LDFLAGS_MENCODER)
mencoder$(EXESUF): EXTRALIBS += $(EXTRALIBS_MENCODER)
mplayer$(EXESUF): $(MPLAYER_DEPS)
$(CC) -o $@ $^ $(LDFLAGS_MPLAYER)
mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
mencoder$(EXESUF) mplayer$(EXESUF):
$(CC) -o $@ $^ $(EXTRALIBS)
codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
$(HOST_CC) -O -DCODECS2HTML -I. -o $@ $<
@ -961,7 +953,7 @@ mplayer-nomain.o: mplayer.c
TOOLS/netstream$(EXESUF): TOOLS/netstream.c
TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS)
$(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS)
$(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(EXTRALIBS)
REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)

View File

@ -180,7 +180,7 @@
// force video/audio rate:
{"fps", &force_fps, CONF_TYPE_DOUBLE, CONF_MIN, 0, 0, NULL},
{"srate", &force_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, NULL},
{"channels", &audio_output_channels, CONF_TYPE_INT, CONF_RANGE, 1, 6, NULL},
{"channels", &audio_output_channels, CONF_TYPE_INT, CONF_RANGE, 1, 8, NULL},
{"format", &audio_output_format, CONF_TYPE_AFMT, 0, 0, 0, NULL},
OPT_FLOATRANGE("speed", playback_speed, 0, 0.01, 100.0),

View File

@ -119,12 +119,10 @@ const m_option_t tvopts_conf[]={
#endif /* CONFIG_ALSA */
#endif /* defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2) */
{"adevice", &stream_tv_defaults.adevice, CONF_TYPE_STRING, 0, 0, 0, NULL},
#ifdef CONFIG_TV_TELETEXT
{"tdevice", &stream_tv_defaults.tdevice, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"tpage", &stream_tv_defaults.tpage, CONF_TYPE_INT, CONF_RANGE, 100, 899, NULL},
{"tformat", &stream_tv_defaults.tformat, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
{"tlang", &stream_tv_defaults.tlang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
#endif /* CONFIG_TV_TELETEXT */
{"tdevice", &stream_tv_defaults.teletext.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"tpage", &stream_tv_defaults.teletext.page, CONF_TYPE_INT, CONF_RANGE, 100, 899, NULL},
{"tformat", &stream_tv_defaults.teletext.format, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
{"tlang", &stream_tv_defaults.teletext.lang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
{"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
#ifdef CONFIG_TV_DSHOW
{"hidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},

View File

@ -158,6 +158,9 @@ const m_option_t mplayer_opts[]={
{"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
OPT_FLAG_ON("force-window-position", force_window_position, 0),
OPT_FLAG_OFF("noforce-window-position", force_window_position, 0),
// vo name (X classname) and window title strings
{"name", &vo_winname, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"title", &vo_wintitle, CONF_TYPE_STRING, 0, 0, 0, NULL},
// set aspect ratio of monitor - useful for 16:9 TV-out
OPT_FLOATRANGE("monitoraspect", force_monitor_aspect, 0, 0.0, 9.0),
OPT_FLOATRANGE("monitorpixelaspect", monitor_pixel_aspect, 0, 0.2, 9.0),
@ -234,6 +237,8 @@ const m_option_t mplayer_opts[]={
{"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"nouse-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
{"use-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"nouse-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
#ifdef CONFIG_CRASH_DEBUG
{"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},

View File

@ -28,6 +28,7 @@
#include "mpcommon.h"
#include "mixer.h"
#include "libmpcodecs/dec_video.h"
#include "libmpcodecs/dec_teletext.h"
#include "vobsub.h"
#include "spudec.h"
#include "get_path.h"
@ -1567,8 +1568,8 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg,
&& (mpctx->stream->type == STREAMTYPE_DVD
|| mpctx->stream->type == STREAMTYPE_DVDNAV)
&& opts->sub_id < 0 && reset_spu) {
opts->sub_id = -2;
d_sub->id = opts->sub_id;
d_sub->id = -2;
d_sub->sh = NULL;
}
#endif
@ -1944,7 +1945,6 @@ static int mp_property_tv_color(m_option_t *prop, int action, void *arg,
#endif
#ifdef CONFIG_TV_TELETEXT
static int mp_property_teletext_common(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
@ -1955,8 +1955,7 @@ static int mp_property_teletext_common(m_option_t *prop, int action, void *arg,
SET is GET+1
STEP is GET+2
*/
tvi_handle_t *tvh = mpctx->demuxer->priv;
if (mpctx->demuxer->type != DEMUXER_TYPE_TV || !tvh)
if (!mpctx->demuxer || !mpctx->demuxer->teletext)
return M_PROPERTY_UNAVAILABLE;
if(!base_ioctl)
return M_PROPERTY_ERROR;
@ -1965,31 +1964,30 @@ static int mp_property_teletext_common(m_option_t *prop, int action, void *arg,
case M_PROPERTY_GET:
if (!arg)
return M_PROPERTY_ERROR;
result=tvh->functions->control(tvh->priv, base_ioctl, arg);
result=teletext_control(mpctx->demuxer->teletext, base_ioctl, arg);
break;
case M_PROPERTY_SET:
if (!arg)
return M_PROPERTY_ERROR;
M_PROPERTY_CLAMP(prop, *(int *) arg);
result=tvh->functions->control(tvh->priv, base_ioctl+1, arg);
result=teletext_control(mpctx->demuxer->teletext, base_ioctl+1, arg);
break;
case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN:
result=tvh->functions->control(tvh->priv, base_ioctl, &val);
result=teletext_control(mpctx->demuxer->teletext, base_ioctl, &val);
val += (arg ? *(int *) arg : 1) * (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
result=tvh->functions->control(tvh->priv, base_ioctl+1, &val);
result=teletext_control(mpctx->demuxer->teletext, base_ioctl+1, &val);
break;
default:
return M_PROPERTY_NOT_IMPLEMENTED;
}
return result == TVI_CONTROL_TRUE ? M_PROPERTY_OK : M_PROPERTY_ERROR;
return result == VBI_CONTROL_TRUE ? M_PROPERTY_OK : M_PROPERTY_ERROR;
}
static int mp_property_teletext_mode(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
tvi_handle_t *tvh = mpctx->demuxer->priv;
int result;
int val;
@ -1998,7 +1996,8 @@ static int mp_property_teletext_mode(m_option_t *prop, int action, void *arg,
if(result!=M_PROPERTY_OK)
return result;
if(tvh->functions->control(tvh->priv, prop->priv, &val)==TVI_CONTROL_TRUE && val)
if(teletext_control(mpctx->demuxer->teletext,
(int)prop->priv, &val)==VBI_CONTROL_TRUE && val)
mp_input_set_section(mpctx->input, "teletext");
else
mp_input_set_section(mpctx->input, "tv");
@ -2008,17 +2007,17 @@ static int mp_property_teletext_mode(m_option_t *prop, int action, void *arg,
static int mp_property_teletext_page(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
tvi_handle_t *tvh = mpctx->demuxer->priv;
int result;
int val;
if (mpctx->demuxer->type != DEMUXER_TYPE_TV || !tvh)
if (!mpctx->demuxer->teletext)
return M_PROPERTY_UNAVAILABLE;
switch(action){
case M_PROPERTY_STEP_UP:
case M_PROPERTY_STEP_DOWN:
//This should be handled separately
val = (arg ? *(int *) arg : 1) * (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
result=tvh->functions->control(tvh->priv, TV_VBI_CONTROL_STEP_PAGE, &val);
result=teletext_control(mpctx->demuxer->teletext,
TV_VBI_CONTROL_STEP_PAGE, &val);
break;
default:
result=mp_property_teletext_common(prop,action,arg,mpctx);
@ -2026,9 +2025,6 @@ static int mp_property_teletext_page(m_option_t *prop, int action, void *arg,
return result;
}
#endif /* CONFIG_TV_TELETEXT */
///@}
/// All properties available in MPlayer.
@ -2183,8 +2179,6 @@ static const m_option_t mp_properties[] = {
{ "tv_hue", mp_property_tv_color, CONF_TYPE_INT,
M_OPT_RANGE, -100, 100, (void *) TV_COLOR_HUE },
#endif
#ifdef CONFIG_TV_TELETEXT
{ "teletext_page", mp_property_teletext_page, CONF_TYPE_INT,
M_OPT_RANGE, 100, 899, (void*)TV_VBI_CONTROL_GET_PAGE },
{ "teletext_subpage", mp_property_teletext_common, CONF_TYPE_INT,
@ -2195,8 +2189,6 @@ static const m_option_t mp_properties[] = {
M_OPT_RANGE, 0, 3, (void*)TV_VBI_CONTROL_GET_FORMAT },
{ "teletext_half_page", mp_property_teletext_common, CONF_TYPE_INT,
M_OPT_RANGE, 0, 2, (void*)TV_VBI_CONTROL_GET_HALF_PAGE },
#endif
{ NULL, NULL, NULL, 0, 0, 0, NULL }
};
@ -3014,23 +3006,21 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
if (mpctx->file_format == DEMUXER_TYPE_TV)
tv_step_chanlist((tvi_handle_t *) (mpctx->demuxer->priv));
break;
#ifdef CONFIG_TV_TELETEXT
#endif /* CONFIG_TV */
case MP_CMD_TV_TELETEXT_ADD_DEC:
{
tvi_handle_t* tvh=(tvi_handle_t *)(mpctx->demuxer->priv);
if (mpctx->file_format == DEMUXER_TYPE_TV)
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_ADD_DEC,&(cmd->args[0].v.s));
if (mpctx->demuxer->teletext)
teletext_control(mpctx->demuxer->teletext,TV_VBI_CONTROL_ADD_DEC,
&(cmd->args[0].v.s));
break;
}
case MP_CMD_TV_TELETEXT_GO_LINK:
{
tvi_handle_t* tvh=(tvi_handle_t *)(mpctx->demuxer->priv);
if (mpctx->file_format == DEMUXER_TYPE_TV)
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GO_LINK,&(cmd->args[0].v.i));
if (mpctx->demuxer->teletext)
teletext_control(mpctx->demuxer->teletext,TV_VBI_CONTROL_GO_LINK,
&(cmd->args[0].v.i));
break;
}
#endif /* CONFIG_TV_TELETEXT */
#endif /* CONFIG_TV */
case MP_CMD_SUB_LOAD:
if (sh_video) {

150
configure vendored
View File

@ -246,7 +246,6 @@ Optional features:
--disable-tv-v4l1 disable Video4Linux TV interface [autodetect]
--disable-tv-v4l2 disable Video4Linux2 TV interface [autodetect]
--disable-tv-bsdbt848 disable BSD BT848 interface [autodetect]
--disable-tv-teletext disable TV teletext interface [autodetect]
--disable-pvr disable Video4Linux2 MPEG PVR [autodetect]
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
--disable-network disable networking [enable]
@ -620,7 +619,6 @@ _tv_v4l1=auto
_tv_v4l2=auto
_tv_bsdbt848=auto
_tv_dshow=auto
_tv_teletext=auto
_pvr=auto
_network=yes
_winsock2_h=auto
@ -1036,8 +1034,6 @@ for ac_option do
--disable-tv-v4l2) _tv_v4l2=no ;;
--enable-tv-dshow) _tv_dshow=yes ;;
--disable-tv-dshow) _tv_dshow=no ;;
--enable-tv-teletext) _tv_teletext=yes ;;
--disable-tv-teletext) _tv_teletext=no ;;
--enable-radio) _radio=yes ;;
--enable-radio-capture) _radio_capture=yes ;;
--disable-radio-capture) _radio_capture=no ;;
@ -1437,19 +1433,6 @@ echo configuration: $_configuration > "$TMPLOG"
echo >> "$TMPLOG"
if test -z "$_target" && x86 ; then
cat > $TMPC << EOF
int main(void) {
int test[sizeof(char *)-7];
return 0;
}
EOF
cc_check && host_arch=x86_64 || host_arch=i386
fi
echo "Detected operating system: $system_name"
echo "Detected host architecture: $host_arch"
if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then
die "Runtime CPU detection only works for x86, x86-64 and PPC!"
fi
@ -1504,6 +1487,19 @@ else
fi # icc
test "$cc_fail" = yes && die "unsupported compiler version"
if test -z "$_target" && x86 ; then
cat > $TMPC << EOF
int main(void) {
int test[(int)sizeof(char *)-7];
return 0;
}
EOF
cc_check && host_arch=x86_64 || host_arch=i386
fi
echo "Detected operating system: $system_name"
echo "Detected host architecture: $host_arch"
echocheck "host cc"
test "$_host_cc" || _host_cc=$_cc
echores $_host_cc
@ -2497,6 +2493,19 @@ EOF
cc_check && ebx_available=yes && def_ebx_available='#define HAVE_EBX_AVAILABLE 1'
echores $ebx_available
echocheck "PIC"
pic=no
cat > $TMPC << EOF
int main(void) {
#if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
#error PIC not enabled
#endif
return 0;
}
EOF
cc_check && pic=yes && extra_cflags="$extra_cflags -DPIC"
echores $pic
echocheck "yasm"
if test -z "$YASMFLAGS" ; then
if darwin ; then
@ -2509,9 +2518,9 @@ if test -z "$YASMFLAGS" ; then
# currently tested for Linux x86, x86_64
YASMFLAGS="-f $objformat"
x86_64 && YASMFLAGS="$YASMFLAGS -DARCH_X86_64 -m amd64"
test "$pic" = "yes" && YASMFLAGS="$YASMFLAGS -DPIC"
case "$objformat" in
elf) test $_debug && YASMFLAGS="$YASMFLAGS -g dwarf2" ;;
macho64) YASMFLAGS="$YASMFLAGS -DPIC -DPREFIX" ;;
*) YASMFLAGS="$YASMFLAGS -DPREFIX" ;;
esac
else
@ -2598,7 +2607,7 @@ def_xform_asm='#define HAVE_XFORM_ASM 0'
xform_asm=no
echocheck "XFORM ASM support"
cat > $TMPC << EOF
int main(void) { __asm__ volatile ("lwzx 0, %y0" :: "Z"(*(int*)0)); return 0; }
int main(void) { __asm__ volatile ("lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)); return 0; }
EOF
cc_check && xform_asm=yes && def_xform_asm='#define HAVE_XFORM_ASM 1'
echores "$xform_asm"
@ -3859,7 +3868,7 @@ int main(void) {
return 0;
}
EOF
cc_check && tmp_run && _apple_ir=yes
cc_check && _apple_ir=yes
fi
if test "$_apple_ir" = yes ; then
def_apple_ir='#define CONFIG_APPLE_IR 1'
@ -3899,7 +3908,7 @@ EOF
fi
if test "$_smb" = yes; then
def_smb="#define CONFIG_LIBSMBCLIENT"
def_smb="#define CONFIG_LIBSMBCLIENT 1"
_inputmodules="smb $_inputmodules"
else
def_smb="#undef CONFIG_LIBSMBCLIENT"
@ -3992,7 +4001,7 @@ echores "$_tga"
echocheck "md5sum support"
if test "$_md5sum" = yes; then
def_md5sum="#define CONFIG_MD5SUM"
def_md5sum="#define CONFIG_MD5SUM 1"
_vomodules="md5sum $_vomodules"
else
def_md5sum="#undef CONFIG_MD5SUM"
@ -4003,7 +4012,7 @@ echores "$_md5sum"
echocheck "yuv4mpeg support"
if test "$_yuv4mpeg" = yes; then
def_yuv4mpeg="#define CONFIG_YUV4MPEG"
def_yuv4mpeg="#define CONFIG_YUV4MPEG 1"
_vomodules="yuv4mpeg $_vomodules"
else
def_yuv4mpeg="#undef CONFIG_YUV4MPEG"
@ -4833,13 +4842,7 @@ int main(void) {
return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
}
EOF
if cc_check -lpng -lz $_ld_lm ; then
if tmp_run ; then
_png=yes
else
_res_comment="mismatch of library and header versions"
fi
fi
cc_check -lpng -lz $_ld_lm && _png=yes
fi
fi
echores "$_png"
@ -4885,11 +4888,7 @@ cat > $TMPC << EOF
#include <jpeglib.h>
int main(void) { return 0; }
EOF
if cc_check -ljpeg $_ld_lm ; then
if tmp_run ; then
_jpeg=yes
fi
fi
cc_check -ljpeg $_ld_lm && _jpeg=yes
fi
echores "$_jpeg"
@ -4932,7 +4931,7 @@ cat > $TMPC << EOF
int main(void) { return 0; }
EOF
for _ld_gif in "-lungif" "-lgif" ; do
cc_check $_ld_gif && tmp_run && _gif=yes && break
cc_check $_ld_gif && _gif=yes && break
done
fi
@ -4969,7 +4968,7 @@ int main(void) {
return 0;
}
EOF
if cc_check "$_ld_gif" && tmp_run ; then
if cc_check "$_ld_gif" ; then
def_gif_4='#define CONFIG_GIF_4 1'
_res_comment=""
fi
@ -4994,7 +4993,7 @@ int main(void) {
return 0;
}
EOF
if cc_check "$_ld_gif" && tmp_run ; then
if cc_check "$_ld_gif" ; then
def_gif_tvt_hack='#undef CONFIG_GIF_TVT_HACK'
echores "disabled"
else
@ -5259,7 +5258,6 @@ if test "$_v4l2" = auto ; then
int main(void) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#error kernel headers too old, need 2.6.22
bad_kernel_version();
#endif
struct v4l2_ext_controls ctrls;
ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
@ -5352,7 +5350,7 @@ cat > $TMPC << EOF
#include <artsc.h>
int main(void) { return 0; }
EOF
cc_check $(artsc-config --libs) $(artsc-config --cflags) && tmp_run && _arts=yes
cc_check $(artsc-config --libs) $(artsc-config --cflags) && _arts=yes
fi
fi
@ -5394,7 +5392,7 @@ if test "$_esd" = yes ; then
#include <esd.h>
int main(void) { return esd_get_latency(0); }
EOF
cc_check $(esd-config --libs) $(esd-config --cflags) && _esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY'
cc_check $(esd-config --libs) $(esd-config --cflags) && _esd_latency=yes && def_esd_latency='#define CONFIG_ESD_LATENCY 1'
echores "$_esd_latency"
else
def_esd='#undef CONFIG_ESD'
@ -5432,7 +5430,7 @@ cat > $TMPC << EOF
#include <pulse/pulseaudio.h>
int main(void) { return 0; }
EOF
cc_check $($_pkg_config --libs --cflags libpulse) && tmp_run && _pulse=yes
cc_check $($_pkg_config --libs --cflags libpulse) && _pulse=yes
fi
fi
@ -5911,7 +5909,7 @@ EOF
fi
if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
_cdda='yes'
def_libcdio='#define CONFIG_LIBCDIO'
def_libcdio='#define CONFIG_LIBCDIO 1'
def_havelibcdio='yes'
else
if test "$_cdparanoia" = yes ; then
@ -5924,7 +5922,7 @@ echores "$_libcdio"
if test "$_cdda" = yes ; then
test $_cddb = auto && test $_network = yes && _cddb=yes
def_cdparanoia='#define CONFIG_CDDA'
def_cdparanoia='#define CONFIG_CDDA 1'
_inputmodules="cdda $_inputmodules"
else
def_cdparanoia='#undef CONFIG_CDDA'
@ -5932,7 +5930,7 @@ else
fi
if test "$_cddb" = yes ; then
def_cddb='#define CONFIG_CDDB'
def_cddb='#define CONFIG_CDDB 1'
_inputmodules="cddb $_inputmodules"
else
_cddb=no
@ -5970,29 +5968,17 @@ int main(void) {
FT_Library library;
FT_Int major=-1,minor=-1,patch=-1;
int err=FT_Init_FreeType(&library);
if (err) {
printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
exit(err);
}
FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
(int)major,(int)minor,(int)patch );
if (major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR) {
printf("Library and header version mismatch! Fix it in your distribution!\n");
exit(1);
}
return 0;
}
EOF
_freetype=no
cc_check $($_freetypeconfig --cflags) $($_freetypeconfig --libs) && tmp_run && _freetype=yes
cc_check $($_freetypeconfig --cflags) $($_freetypeconfig --libs) && _freetype=yes
else
_freetype=no
fi
fi
if test "$_freetype" = yes ; then
def_freetype='#define CONFIG_FREETYPE'
def_freetype='#define CONFIG_FREETYPE 1'
extra_cflags="$extra_cflags $($_freetypeconfig --cflags)"
extra_ldflags="$extra_ldflags $($_freetypeconfig --libs)"
else
@ -6032,7 +6018,7 @@ EOF
fi
fi
if test "$_fontconfig" = yes ; then
def_fontconfig='#define CONFIG_FONTCONFIG'
def_fontconfig='#define CONFIG_FONTCONFIG 1'
else
def_fontconfig='#undef CONFIG_FONTCONFIG'
fi
@ -6043,7 +6029,7 @@ echocheck "SSA/ASS support"
if test "$_ass" = auto -o "$_ass" = yes ; then
if $_pkg_config libass; then
_ass=yes
def_ass='#define CONFIG_ASS'
def_ass='#define CONFIG_ASS 1'
extra_ldflags="$extra_ldflags $($_pkg_config --libs libass)"
extra_cflags="$extra_cflags $($_pkg_config --cflags libass)"
else
@ -6073,13 +6059,13 @@ int main(void) {
}
EOF
_fribidi=no
cc_check $($_fribidiconfig --cflags) $($_fribidiconfig --libs) && tmp_run && _fribidi=yes
cc_check $($_fribidiconfig --cflags) $($_fribidiconfig --libs) && _fribidi=yes
else
_fribidi=no
fi
fi
if test "$_fribidi" = yes ; then
def_fribidi='#define CONFIG_FRIBIDI'
def_fribidi='#define CONFIG_FRIBIDI 1'
extra_cflags="$extra_cflags $($_fribidiconfig --cflags)"
extra_ldflags="$extra_ldflags $($_fribidiconfig --libs)"
else
@ -6591,7 +6577,7 @@ EOF
cc_check && _ladspa=yes
fi
if test "$_ladspa" = yes; then
def_ladspa="#define CONFIG_LADSPA"
def_ladspa="#define CONFIG_LADSPA 1"
else
def_ladspa="#undef CONFIG_LADSPA"
fi
@ -6631,7 +6617,7 @@ EOF
fi
fi
def_libbs2b="#undef CONFIG_LIBBS2B"
test "$_libbs2b" = yes && def_libbs2b="#define CONFIG_LIBBS2B"
test "$_libbs2b" = yes && def_libbs2b="#define CONFIG_LIBBS2B 1"
echores "$_libbs2b"
@ -7109,22 +7095,22 @@ int main(void) { lame_version_t lv; (void) lame_init();
get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor);
return 0; }
EOF
cc_check -lmp3lame $_ld_lm && tmp_run && _mp3lame=yes
cc_check -lmp3lame $_ld_lm && _mp3lame=yes
fi
if test "$_mp3lame" = yes ; then
def_mp3lame="#define CONFIG_MP3LAME"
def_mp3lame="#define CONFIG_MP3LAME 1"
_ld_mp3lame=-lmp3lame
libs_mencoder="$libs_mencoder $_ld_mp3lame"
cat > $TMPC << EOF
#include <lame/lame.h>
int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; }
EOF
cc_check $_ld_mp3lame $_ld_lm && def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET"
cc_check $_ld_mp3lame $_ld_lm && def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET 1"
cat > $TMPC << EOF
#include <lame/lame.h>
int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; }
EOF
cc_check $_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM"
cc_check $_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
else
def_mp3lame='#undef CONFIG_MP3LAME'
fi
@ -7326,25 +7312,6 @@ fi
echores "$_tv_v4l2"
echocheck "TV teletext interface"
if test "$_tv_teletext" = auto ; then
_tv_teletext=no
if test "$_freetype" = yes && test "$_pthreads" = yes; then
if test "$_tv_v4l2" = yes || test "$_v4l" = yes || test "$_tv_dshow" = yes; then
_tv_teletext=yes
fi
fi
fi
if test "$_tv_teletext" = yes ; then
def_tv_teletext='#define CONFIG_TV_TELETEXT 1'
_inputmodules="tv-teletext $_inputmodules"
else
_noinputmodules="tv-teletext $_noinputmodules"
def_tv_teletext='#undef CONFIG_TV_TELETEXT'
fi
echores "$_tv_teletext"
echocheck "Radio interface"
if test "$_radio" = yes ; then
def_radio='#define CONFIG_RADIO 1'
@ -7790,8 +7757,7 @@ CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
CFLAGS_TREMOR_LOW = $cflags_tremor_low
YASMFLAGS = $YASMFLAGS
EXTRALIBS = $extra_libs
EXTRA_LIB = $extra_ldflags $_ld_static $_ld_lm
EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs
EXTRALIBS_MPLAYER = $libs_mplayer
EXTRALIBS_MENCODER = $libs_mencoder
@ -7930,7 +7896,6 @@ TREMOR_INTERNAL = $_tremor_internal
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
@ -7991,6 +7956,7 @@ CONFIG_AANDCT=yes
CONFIG_FFT=yes
CONFIG_FFT_MMX=$fft_mmx
CONFIG_GOLOMB=yes
CONFIG_LPC=yes
CONFIG_MDCT=yes
CONFIG_RDFT=yes
@ -8283,7 +8249,6 @@ $def_radio_v4l2
$def_tv
$def_tv_bsdbt848
$def_tv_dshow
$def_tv_teletext
$def_tv_v4l
$def_tv_v4l1
$def_tv_v4l2
@ -8442,6 +8407,7 @@ $def_yasm
#define CONFIG_AANDCT 1
#define CONFIG_FFT 1
#define CONFIG_GOLOMB 1
#define CONFIG_LPC 1
#define CONFIG_MDCT 1
#define CONFIG_RDFT 1

View File

@ -1197,7 +1197,7 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
tmp = MGA_VID_VERSION;
if (copy_to_user((uint32_t *) arg, &tmp, sizeof(uint32_t))) {
printk(KERN_ERR "mga_vid: failed copy %p to userspace %p\n", &tmp, (uint32_t *) arg);
return (-EFAULT);
return -EFAULT;
}
break;

View File

@ -1263,6 +1263,8 @@ videocodec ffmjpeg
fourcc MMJP,QIVG
fourcc ACDV ; ACDSee jpeg
fourcc SLMJ ; SL M-JPEG
fourcc MVJP ; Midvid JPEG Video Codec
fourcc IJLV ; Intel JPEG Library Video Codec
driver ffmpeg
dll mjpeg
out 444P
@ -1409,6 +1411,14 @@ videocodec pegasusmwv
dll "pvwv220.dll"
out BGR24 flip
videocodec fffrwu
info "FFmpeg Forward Uncompressed Video Codec"
status working
fourcc FRWU
driver ffmpeg
dll "FRWU"
out UYVY
videocodec frwuvfw
info "Forward Uncompressed Video Codec"
status working
@ -2118,6 +2128,14 @@ videocodec vcr2
out YV12
out BGR24
videocodec slifvfw
info "SoftLab-NSK Forward MPEG2 I-frames"
status working
fourcc slif
driver vfw
dll "slif.dll"
out RGB32 flip
videocodec cjpg
info "Creative Labs Video Blaster Webcam"
comment "sequential jpeg files?"
@ -2847,6 +2865,13 @@ videocodec ffc93
dll c93
out BGR8
videocodec eatgv
info "FFmpeg Electronic Arts TGV"
status working
fourcc fVGT
driver ffmpeg
dll eatgv
out BGR8
; raw formats: (now RGB formats are autodetected)
@ -2978,6 +3003,10 @@ videocodec rawyuy2
format 0x0 0x32595559
format 0x20776172 0x32595559
fourcc yuy2,YUY2
fourcc V422 YUY2
fourcc YUNV YUY2
fourcc VYUY YUY2
fourcc yuvs YUY2
out YUY2
videocodec rawyuv2
@ -2997,6 +3026,11 @@ videocodec rawuyvy
format 0x79757632 0x59565955 # 2vuy as created by QuickTime captures
format 0x20776172 0x59565955
fourcc uyvy,UYVY
fourcc HDYC UYVY
fourcc UYNV UYVY
fourcc UYNY UYVY
fourcc uyv1 UYVY
fourcc 2Vu1 UYVY
out UYVY
videocodec raw444P
@ -3015,6 +3049,8 @@ videocodec raw422P
format 0x0 0x50323234
format 0x20776172 0x50323234
fourcc 422p,422P
fourcc P422 422P
fourcc Y42B 422P
out 422P
videocodec rawyv12
@ -3703,6 +3739,7 @@ audiocodec mp3
format 0x55 ; layer-3
format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
format 0x5000736d ; "ms\0\x50" older mp2 fcc (MOV files)
format 0x55005354 ; broken file
fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
fourcc "MP3 " ; used in .nsv files
fourcc "LAME" ; used in mythtv .nuv files
@ -3772,6 +3809,7 @@ audiocodec ffmp3
status working
format 0x55
format 0x5500736d ; "ms\0\x55" older mp3 fcc (MOV files)
format 0x55005354 ; broken file
fourcc ".mp3" ; CBR/VBR MP3 (MOV files)
fourcc "MP3 " ; used in .nsv files
fourcc "LAME" ; used in mythtv .nuv files

View File

@ -125,7 +125,10 @@
###################
# DVDNAV Settings #
###################
[protocol.dvdnav]
#vc=ffmpeg12,
#mouse-movements=yes
#nocache=yes
# You can also include other configuration files.
#include = /path/to/the/file/you/want/to/include

View File

@ -50,7 +50,7 @@
<txt name="man" file="manpage.txt"/>
<filesel name="open_file"/>
<filesel name="open_list" file-action="loadlist '%p'" auto-close="yes"
<filesel name="open_list" file-action="loadlist '%p'"
title="Open a playlist: %p"
filter="/etc/mplayer/extensions_filter"
actions="d:run 'mp_loader \'%p\' d',c:run 'mp_loader \'%p\' c'" />

View File

@ -211,6 +211,7 @@ static const char help_text[]=
#define MSGTR_OSDosd "OSD: %s"
#define MSGTR_OSDChapter "Chapter: (%d) %s"
#define MSGTR_OSDAngle "Angle: %d/%d"
#define MSGTR_OSDDeinterlace "Deinterlace: %s"
// property values
#define MSGTR_Enabled "enabled"

View File

@ -2,7 +2,7 @@
// Updated by: Roberto Togni <see AUTHORS for email address>
// Updated by: PaulTT <see AUTHORS for email address>
// Updated to help_mp-en.h r29209
// Updated to help_mp-en.h r29742
// ========================= MPlayer help ===========================
@ -1274,9 +1274,7 @@ static const char help_text[]=
#define MSGTR_AO_ALSA_UnableToSetSamplerate2 "[AO_ALSA] Impossibile impostare samplerate-2: %s\n"
// TODO::
//#define MSGTR_AO_ALSA_UnableToSetBufferTimeNear "[AO_ALSA] Unable to set buffer time near: %s\n"
#define MSGTR_AO_ALSA_UnableToSetPeriodTime "[AO_ALSA] Impossibile impostare il tempo del periodo: %s\n"
#define MSGTR_AO_ALSA_UnableToGetPeriodSize "[AO ALSA] Impossibile ricavare la dimensione periodo: %s\n"
#define MSGTR_AO_ALSA_UnableToSetPeriodSize "[AO ALSA] Impossibile impostare la dimensione periodo(%ld): %s\n"
#define MSGTR_AO_ALSA_UnableToSetPeriods "[AO_ALSA] Impossibile impostare i periodi: %s\n"
#define MSGTR_AO_ALSA_UnableToSetHwParameters "[AO_ALSA] Impossibile impostare hw-parameters: %s\n"
#define MSGTR_AO_ALSA_UnableToGetBufferSize "[AO_ALSA] Impossibile ricavare buffersize: %s\n"

View File

@ -184,10 +184,8 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_LOADLIST, "loadlist", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_RUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
{ MP_CMD_VF_CHANGE_RECTANGLE, "change_rectangle", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}}}},
#ifdef CONFIG_TV_TELETEXT
{ MP_CMD_TV_TELETEXT_ADD_DEC, "teletext_add_dec", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } },
{ MP_CMD_TV_TELETEXT_GO_LINK, "teletext_go_link", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
#endif
#ifdef CONFIG_DVDNAV
{ MP_CMD_DVDNAV, "dvdnav", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
@ -443,11 +441,9 @@ static const mp_cmd_bind_t def_cmd_binds[] = {
{ { 'n', 0 }, "tv_step_norm" },
{ { 'u', 0 }, "tv_step_chanlist" },
#endif
#ifdef CONFIG_TV_TELETEXT
{ { 'X', 0 }, "step_property teletext_mode 1" },
{ { 'W', 0 }, "step_property teletext_page 1" },
{ { 'Q', 0 }, "step_property teletext_page -1" },
#endif
#ifdef CONFIG_JOYSTICK
{ { JOY_AXIS0_PLUS, 0 }, "seek 10" },
{ { JOY_AXIS0_MINUS, 0 }, "seek -10" },

View File

@ -39,7 +39,7 @@ struct af_instance_s;
// Number of channels
#ifndef AF_NCH
#define AF_NCH 6
#define AF_NCH 8
#endif
// Audio data chunk

View File

@ -20,7 +20,7 @@
/* This audio filter changes the volume of the sound, and can be used
when the mixer doesn't support the PCM channel. It can handle
between 1 and 6 channels. The volume can be adjusted between -60dB
between 1 and AF_NCH channels. The volume can be adjusted between -60dB
to +20dB and is set on a per channels basis. The is accessed through
AF_CONTROL_VOLUME_LEVEL.

View File

@ -189,6 +189,94 @@ static int reorder_copy_6ch(void *dest, const void *src,
return 1;
}
#define REORDER_COPY_8(DEST,SRC,SAMPLES,S0,S1,S2,S3,S4,S5,S6,S7) \
for (i = 0; i < SAMPLES; i += 8) {\
DEST[i] = SRC[i+S0];\
DEST[i+1] = SRC[i+S1];\
DEST[i+2] = SRC[i+S2];\
DEST[i+3] = SRC[i+S3];\
DEST[i+4] = SRC[i+S4];\
DEST[i+5] = SRC[i+S5];\
DEST[i+6] = SRC[i+S6];\
DEST[i+7] = SRC[i+S7];\
}
static int reorder_copy_8ch(void *dest, const void *src,
unsigned int samples, uint8_t samplesize,
int s0, int s1, int s2, int s3,
int s4, int s5, int s6, int s7)
{
int i;
switch (samplesize) {
case 1:
{
int8_t *dest_8 = dest;
const int8_t *src_8 = src;
REORDER_COPY_8(dest_8,src_8,samples,s0,s1,s2,s3,s4,s5,s6,s7);
break;
}
case 2:
{
int16_t *dest_16 = dest;
const int16_t *src_16 = src;
REORDER_COPY_8(dest_16,src_16,samples,s0,s1,s2,s3,s4,s5,s6,s7);
break;
}
case 3:
{
int8_t *dest_8 = dest;
const int8_t *src_8 = src;
for (i = 0; i < samples; i += 24) {
dest_8[i] = src_8[i+s0*3];
dest_8[i+1] = src_8[i+s0*3+1];
dest_8[i+2] = src_8[i+s0*3+2];
dest_8[i+3] = src_8[i+s1*3];
dest_8[i+4] = src_8[i+s1*3+1];
dest_8[i+5] = src_8[i+s1*3+2];
dest_8[i+6] = src_8[i+s2*3];
dest_8[i+7] = src_8[i+s2*3+1];
dest_8[i+8] = src_8[i+s2*3+2];
dest_8[i+9] = src_8[i+s3*3];
dest_8[i+10] = src_8[i+s3*3+1];
dest_8[i+11] = src_8[i+s3*3+2];
dest_8[i+12] = src_8[i+s4*3];
dest_8[i+13] = src_8[i+s4*3+1];
dest_8[i+14] = src_8[i+s4*3+2];
dest_8[i+15] = src_8[i+s5*3];
dest_8[i+16] = src_8[i+s5*3+1];
dest_8[i+17] = src_8[i+s5*3+2];
dest_8[i+18] = src_8[i+s6*3];
dest_8[i+19] = src_8[i+s6*3+1];
dest_8[i+20] = src_8[i+s6*3+2];
dest_8[i+21] = src_8[i+s7*3];
dest_8[i+22] = src_8[i+s7*3+1];
dest_8[i+23] = src_8[i+s7*3+2];
}
break;
}
case 4:
{
int32_t *dest_32 = dest;
const int32_t *src_32 = src;
REORDER_COPY_8(dest_32,src_32,samples,s0,s1,s2,s3,s4,s5,s6,s7);
break;
}
case 8:
{
int64_t *dest_64 = dest;
const int64_t *src_64 = src;
REORDER_COPY_8(dest_64,src_64,samples,s0,s1,s2,s3,s4,s5,s6,s7);
break;
}
default:
mp_msg(MSGT_GLOBAL, MSGL_WARN,
"[reorder_ch] Unsupported sample size: %d, please "
"report this error on the MPlayer mailing list.\n",samplesize);
return 0;
}
return 1;
}
void reorder_channel_copy(void *src,
int src_layout,
void *dest,
@ -298,6 +386,16 @@ void reorder_channel_copy(void *src,
case AF_CHANNEL_LAYOUT_5_1_F << 16 | AF_CHANNEL_LAYOUT_5_1_B:
reorder_copy_6ch(dest, src, samples, samplesize, 1, 2, 4, 5, 0, 3);
break;
// AF_CHANNEL_LAYOUT_7_1_A L R C LFE Ls Rs Rls Rrs
// AF_CHANNEL_LAYOUT_7_1_B L R Ls Rs C LFE Rls Rrs
// AF_CHANNEL_LAYOUT_7_1_D C L R Ls Rs Rls Rrs LFE
case AF_CHANNEL_LAYOUT_7_1_A << 16 | AF_CHANNEL_LAYOUT_7_1_B:
case AF_CHANNEL_LAYOUT_7_1_B << 16 | AF_CHANNEL_LAYOUT_7_1_A:
reorder_copy_8ch(dest, src, samples, samplesize, 0, 1, 4, 5, 2, 3, 6, 7);
break;
case AF_CHANNEL_LAYOUT_7_1_D << 16 | AF_CHANNEL_LAYOUT_7_1_B:
reorder_copy_8ch(dest, src, samples, samplesize, 1, 2, 3, 4, 0, 7, 5, 6);
break;
default:
mp_msg(MSGT_GLOBAL, MSGL_WARN, "[reorder_channel_copy] unsupport "
"from %x to %x, %d * %d\n", src_layout, dest_layout,
@ -327,6 +425,9 @@ static int reorder_self_2(void *src, unsigned int samples,
if (chnum==6) {
REORDER_SELF_SWAP_2(src_8,tmp,samples,6,s0,s1);
}
else if (chnum==8) {
REORDER_SELF_SWAP_2(src_8,tmp,samples,8,s0,s1);
}
else {
REORDER_SELF_SWAP_2(src_8,tmp,samples,5,s0,s1);
}
@ -342,6 +443,9 @@ static int reorder_self_2(void *src, unsigned int samples,
else if (chnum==3) {
REORDER_SELF_SWAP_2(src_16,tmp,samples,3,s0,s1);
}
else if (chnum==4) {
REORDER_SELF_SWAP_2(src_16,tmp,samples,3,s0,s1);
}
else {
REORDER_SELF_SWAP_2(src_16,tmp,samples,5,s0,s1);
}
@ -374,6 +478,9 @@ static int reorder_self_2(void *src, unsigned int samples,
else if (chnum==3) {
REORDER_SELF_SWAP_2(src_32,tmp,samples,3,s0,s1);
}
else if (chnum==4) {
REORDER_SELF_SWAP_2(src_32,tmp,samples,4,s0,s1);
}
else {
REORDER_SELF_SWAP_2(src_32,tmp,samples,5,s0,s1);
}
@ -389,6 +496,9 @@ static int reorder_self_2(void *src, unsigned int samples,
else if (chnum==3) {
REORDER_SELF_SWAP_2(src_64,tmp,samples,3,s0,s1);
}
else if (chnum==4) {
REORDER_SELF_SWAP_2(src_64,tmp,samples,4,s0,s1);
}
else {
REORDER_SELF_SWAP_2(src_64,tmp,samples,5,s0,s1);
}
@ -516,6 +626,9 @@ static int reorder_self_4_step_1(void *src, unsigned int samples,
if (chnum==6) {
REORDER_SELF_SWAP_4_STEP_1(src_8,tmp,samples,6,s0,s1,s2,s3);
}
else if (chnum==8) {
REORDER_SELF_SWAP_4_STEP_1(src_8,tmp,samples,8,s0,s1,s2,s3);
}
else {
REORDER_SELF_SWAP_4_STEP_1(src_8,tmp,samples,5,s0,s1,s2,s3);
}
@ -528,6 +641,9 @@ static int reorder_self_4_step_1(void *src, unsigned int samples,
if (chnum==6) {
REORDER_SELF_SWAP_4_STEP_1(src_16,tmp,samples,6,s0,s1,s2,s3);
}
else if (chnum==8) {
REORDER_SELF_SWAP_4_STEP_1(src_16,tmp,samples,8,s0,s1,s2,s3);
}
else {
REORDER_SELF_SWAP_4_STEP_1(src_16,tmp,samples,5,s0,s1,s2,s3);
}
@ -563,6 +679,9 @@ static int reorder_self_4_step_1(void *src, unsigned int samples,
if (chnum==6) {
REORDER_SELF_SWAP_4_STEP_1(src_32,tmp,samples,6,s0,s1,s2,s3);
}
else if (chnum==8) {
REORDER_SELF_SWAP_4_STEP_1(src_32,tmp,samples,8,s0,s1,s2,s3);
}
else {
REORDER_SELF_SWAP_4_STEP_1(src_32,tmp,samples,5,s0,s1,s2,s3);
}
@ -575,6 +694,9 @@ static int reorder_self_4_step_1(void *src, unsigned int samples,
if (chnum==6) {
REORDER_SELF_SWAP_4_STEP_1(src_64,tmp,samples,6,s0,s1,s2,s3);
}
else if (chnum==8) {
REORDER_SELF_SWAP_4_STEP_1(src_64,tmp,samples,8,s0,s1,s2,s3);
}
else {
REORDER_SELF_SWAP_4_STEP_1(src_64,tmp,samples,5,s0,s1,s2,s3);
}
@ -922,7 +1044,7 @@ for (i = 0; i < SAMPLES; i += CHNUM) {\
}
static int reorder_self_2_4(void *src, unsigned int samples,
unsigned int samplesize,
unsigned int samplesize, int chnum,
int s0, int s1, int s2, int s3, int s4, int s5)
{
int i;
@ -931,21 +1053,29 @@ static int reorder_self_2_4(void *src, unsigned int samples,
{
int8_t *src_8 = src;
int8_t tmp;
REORDER_SELF_SWAP_2_4(src_8,tmp,samples,6,s0,s1,s2,s3,s4,s5);
if (chnum==6) {
REORDER_SELF_SWAP_2_4(src_8,tmp,samples,6,s0,s1,s2,s3,s4,s5);
} else {
REORDER_SELF_SWAP_2_4(src_8,tmp,samples,8,s0,s1,s2,s3,s4,s5);
}
break;
}
case 2:
{
int16_t *src_16 = src;
int16_t tmp;
REORDER_SELF_SWAP_2_4(src_16,tmp,samples,6,s0,s1,s2,s3,s4,s5);
if (chnum==6) {
REORDER_SELF_SWAP_2_4(src_16,tmp,samples,6,s0,s1,s2,s3,s4,s5);
} else {
REORDER_SELF_SWAP_2_4(src_16,tmp,samples,8,s0,s1,s2,s3,s4,s5);
}
break;
}
case 3:
{
int8_t *src_8 = src;
int8_t tmp0, tmp1, tmp2;
for (i = 0; i < samples; i += 18) {
for (i = 0; i < samples; i += 3*chnum) {
tmp0 = src_8[i+s0*3];
tmp1 = src_8[i+s0*3+1];
tmp2 = src_8[i+s0*3+2];
@ -977,14 +1107,22 @@ static int reorder_self_2_4(void *src, unsigned int samples,
{
int32_t *src_32 = src;
int32_t tmp;
REORDER_SELF_SWAP_2_4(src_32,tmp,samples,6,s0,s1,s2,s3,s4,s5);
if (chnum==6) {
REORDER_SELF_SWAP_2_4(src_32,tmp,samples,6,s0,s1,s2,s3,s4,s5);
} else {
REORDER_SELF_SWAP_2_4(src_32,tmp,samples,8,s0,s1,s2,s3,s4,s5);
}
break;
}
case 8:
{
int64_t *src_64 = src;
int64_t tmp;
REORDER_SELF_SWAP_2_4(src_64,tmp,samples,6,s0,s1,s2,s3,s4,s5);
if (chnum==6) {
REORDER_SELF_SWAP_2_4(src_64,tmp,samples,6,s0,s1,s2,s3,s4,s5);
} else {
REORDER_SELF_SWAP_2_4(src_64,tmp,samples,8,s0,s1,s2,s3,s4,s5);
}
break;
}
default:
@ -1083,7 +1221,7 @@ void reorder_channel(void *src,
reorder_self_5_step_1(src, samples, samplesize, 6, 4, 3, 2, 1, 0);
break;
case AF_CHANNEL_LAYOUT_5_1_B << 16 | AF_CHANNEL_LAYOUT_5_1_E:
reorder_self_2_4(src, samples, samplesize, 2, 4, 5, 3, 1, 0);
reorder_self_2_4(src, samples, samplesize, 6, 2, 4, 5, 3, 1, 0);
break;
case AF_CHANNEL_LAYOUT_5_1_C << 16 | AF_CHANNEL_LAYOUT_5_1_A:
reorder_self_2_3(src, samples, samplesize, 1, 2, 5, 4, 3);
@ -1104,10 +1242,27 @@ void reorder_channel(void *src,
reorder_self_2(src, samples, samplesize, 6, 0, 1);
break;
case AF_CHANNEL_LAYOUT_5_1_E << 16 | AF_CHANNEL_LAYOUT_5_1_B:
reorder_self_2_4(src, samples, samplesize, 2, 4, 0, 1, 3, 5);
reorder_self_2_4(src, samples, samplesize, 6, 2, 4, 0, 1, 3, 5);
break;
case AF_CHANNEL_LAYOUT_5_1_F << 16 | AF_CHANNEL_LAYOUT_5_1_B:
reorder_self_2_4(src, samples, samplesize, 3, 5, 0, 1, 2, 4);
reorder_self_2_4(src, samples, samplesize, 6, 3, 5, 0, 1, 2, 4);
break;
// AF_CHANNEL_LAYOUT_7_1_A L R C LFE Ls Rs Rls Rrs
// AF_CHANNEL_LAYOUT_7_1_B L R Ls Rs C LFE Rls Rrs
// AF_CHANNEL_LAYOUT_7_1_C L C R Ls Rs LFE Rls Rrs
// AF_CHANNEL_LAYOUT_7_1_F C L R LFE Ls Rs Rls Rrs
case AF_CHANNEL_LAYOUT_7_1_A << 16 | AF_CHANNEL_LAYOUT_7_1_B:
case AF_CHANNEL_LAYOUT_7_1_B << 16 | AF_CHANNEL_LAYOUT_7_1_A:
if (samplesize != 3)
reorder_self_2(src, samples/2, samplesize*2, 4, 1, 2);
else
reorder_self_4_step_2(src, samples, samplesize, 8, 2, 3, 4, 5);
break;
case AF_CHANNEL_LAYOUT_7_1_C << 16 | AF_CHANNEL_LAYOUT_7_1_B:
reorder_self_4_step_1(src, samples, samplesize, 8, 1, 2, 3, 4);
break;
case AF_CHANNEL_LAYOUT_7_1_F << 16 | AF_CHANNEL_LAYOUT_7_1_B:
reorder_self_2_4(src, samples, samplesize, 8, 3, 5, 0, 1, 2, 4);
break;
default:
mp_msg(MSGT_GLOBAL, MSGL_WARN,
@ -1123,7 +1278,6 @@ static int channel_layout_mapping_5ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = {
AF_CHANNEL_LAYOUT_WAVEEX_5CH_DEFAULT,
AF_CHANNEL_LAYOUT_LAVC_5CH_DEFAULT,
AF_CHANNEL_LAYOUT_VORBIS_5CH_DEFAULT,
AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_5CH_DEFAULT,
};
static int channel_layout_mapping_6ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = {
@ -1132,7 +1286,14 @@ static int channel_layout_mapping_6ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = {
AF_CHANNEL_LAYOUT_WAVEEX_6CH_DEFAULT,
AF_CHANNEL_LAYOUT_LAVC_6CH_DEFAULT,
AF_CHANNEL_LAYOUT_VORBIS_6CH_DEFAULT,
AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_6CH_DEFAULT,
};
static int channel_layout_mapping_8ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = {
AF_CHANNEL_LAYOUT_ALSA_8CH_DEFAULT,
AF_CHANNEL_LAYOUT_AAC_8CH_DEFAULT,
AF_CHANNEL_LAYOUT_WAVEEX_8CH_DEFAULT,
AF_CHANNEL_LAYOUT_LAVC_8CH_DEFAULT,
AF_CHANNEL_LAYOUT_VORBIS_8CH_DEFAULT,
};
void reorder_channel_copy_nch(void *src,
@ -1143,7 +1304,8 @@ void reorder_channel_copy_nch(void *src,
int samples,
int samplesize)
{
if (chnum < 5 || chnum > 6 || src_layout < 0 || dest_layout < 0 ||
if (chnum < 5 || chnum == 7 || chnum > 8 ||
src_layout < 0 || dest_layout < 0 ||
src_layout >= AF_CHANNEL_LAYOUT_SOURCE_NUM ||
dest_layout >= AF_CHANNEL_LAYOUT_SOURCE_NUM)
fast_memcpy(dest, src, samples*samplesize);
@ -1151,6 +1313,10 @@ void reorder_channel_copy_nch(void *src,
reorder_channel_copy(src, channel_layout_mapping_6ch[src_layout],
dest, channel_layout_mapping_6ch[dest_layout],
samples, samplesize);
else if (chnum == 8)
reorder_channel_copy(src, channel_layout_mapping_8ch[src_layout],
dest, channel_layout_mapping_8ch[dest_layout],
samples, samplesize);
else
reorder_channel_copy(src, channel_layout_mapping_5ch[src_layout],
dest, channel_layout_mapping_5ch[dest_layout],
@ -1164,7 +1330,7 @@ void reorder_channel_nch(void *buf,
int samples,
int samplesize)
{
if (src_layout == dest_layout || chnum < 5 || chnum > 6 ||
if (src_layout == dest_layout || chnum < 5 || chnum == 7 || chnum > 8 ||
src_layout < 0 || dest_layout < 0 ||
src_layout >= AF_CHANNEL_LAYOUT_SOURCE_NUM ||
dest_layout >= AF_CHANNEL_LAYOUT_SOURCE_NUM ||
@ -1174,6 +1340,10 @@ void reorder_channel_nch(void *buf,
reorder_channel(buf, channel_layout_mapping_6ch[src_layout],
channel_layout_mapping_6ch[dest_layout],
samples, samplesize);
else if (chnum == 8)
reorder_channel(buf, channel_layout_mapping_8ch[src_layout],
channel_layout_mapping_8ch[dest_layout],
samples, samplesize);
else
reorder_channel(buf, channel_layout_mapping_5ch[src_layout],
channel_layout_mapping_5ch[dest_layout],

View File

@ -56,22 +56,30 @@
#define AF_CHANNEL_LAYOUT_5_1_F ((117<<8)|6|AF_LFE) // C L R LFE Ls Rs
#define AF_CHANNEL_LAYOUT_6_1_A ((118<<8)|7|AF_LFE) // L R C LFE Ls Rs Cs
#define AF_CHANNEL_LAYOUT_7_1_A ((119<<8)|8|AF_LFE) // L R C LFE Ls Rs Rls Rrs
#define AF_CHANNEL_LAYOUT_7_1_B ((120<<8)|8|AF_LFE) // L R Ls Rs C LFE Rls Rrs
#define AF_CHANNEL_LAYOUT_7_1_C ((121<<8)|8|AF_LFE) // L C R Ls Rs LFE Rls Rrs
#define AF_CHANNEL_LAYOUT_7_1_D ((122<<8)|8|AF_LFE) // C L R Ls Rs Rls Rrs LFE
#define AF_CHANNEL_LAYOUT_7_1_F ((123<<8)|8|AF_LFE) // C L R LFE Ls Rs Rls Rrs
#define AF_CHANNEL_LAYOUT_ALSA_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_B
#define AF_CHANNEL_LAYOUT_ALSA_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_B
#define AF_CHANNEL_LAYOUT_ALSA_8CH_DEFAULT AF_CHANNEL_LAYOUT_7_1_B
#define AF_CHANNEL_LAYOUT_MPLAYER_5CH_DEFAULT AF_CHANNEL_LAYOUT_ALSA_5CH_DEFAULT
#define AF_CHANNEL_LAYOUT_MPLAYER_6CH_DEFAULT AF_CHANNEL_LAYOUT_ALSA_6CH_DEFAULT
#define AF_CHANNEL_LAYOUT_MPLAYER_8CH_DEFAULT AF_CHANNEL_LAYOUT_ALSA_8CH_DEFAULT
#define AF_CHANNEL_LAYOUT_AAC_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_D
#define AF_CHANNEL_LAYOUT_AAC_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_D
#define AF_CHANNEL_LAYOUT_AAC_8CH_DEFAULT AF_CHANNEL_LAYOUT_7_1_D
#define AF_CHANNEL_LAYOUT_WAVEEX_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_A
#define AF_CHANNEL_LAYOUT_WAVEEX_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_A
#define AF_CHANNEL_LAYOUT_WAVEEX_8CH_DEFAULT AF_CHANNEL_LAYOUT_7_1_A
#define AF_CHANNEL_LAYOUT_LAVC_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_A
#define AF_CHANNEL_LAYOUT_LAVC_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_A
#define AF_CHANNEL_LAYOUT_LAVC_8CH_DEFAULT AF_CHANNEL_LAYOUT_7_1_A
#define AF_CHANNEL_LAYOUT_VORBIS_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_C
#define AF_CHANNEL_LAYOUT_VORBIS_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_C
#define AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_D
#define AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_F
#define AF_CHANNEL_LAYOUT_VORBIS_8CH_DEFAULT AF_CHANNEL_LAYOUT_7_1_C
#define AF_CHANNEL_MASK 0xFF
#define AF_GET_CH_NUM(A) ((A)&0x7F)
@ -102,8 +110,7 @@ void reorder_channel(void *buf,
#define AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT 2
#define AF_CHANNEL_LAYOUT_LAVC_DEFAULT 3
#define AF_CHANNEL_LAYOUT_VORBIS_DEFAULT 4
#define AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_DEFAULT 5
#define AF_CHANNEL_LAYOUT_SOURCE_NUM 6
#define AF_CHANNEL_LAYOUT_SOURCE_NUM 5
#define AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT AF_CHANNEL_LAYOUT_ALSA_DEFAULT
/// Optimized channel reorder between different audio sources and targets.

View File

@ -467,6 +467,13 @@ static int init(int rate_hz, int channels, int format, int flags)
device.str = "surround51";
mp_msg(MSGT_AO,MSGL_V,"alsa-init: device set to surround51\n");
break;
case 8:
if (alsa_format == SND_PCM_FORMAT_FLOAT_LE)
device.str = "plug:surround71";
else
device.str = "surround71";
mp_msg(MSGT_AO,MSGL_V,"alsa-init: device set to surround71\n");
break;
default:
device.str = "default";
mp_tmsg(MSGT_AO,MSGL_ERR,"[AO_ALSA] %d channels are not supported.\n",channels);

View File

@ -426,7 +426,12 @@ static int init(int rate, int channels, int format, int flags)
DSBUFFERDESC dsbpridesc;
DSBUFFERDESC dsbdesc;
//check if the format is supported in general
//check if the channel count and format is supported in general
if (channels > 6) {
UninitDirectSound();
mp_msg(MSGT_AO, MSGL_ERR, "ao_dsound: 8 channel audio not yet supported\n");
return 0;
}
switch(format){
case AF_FORMAT_AC3:
case AF_FORMAT_S24_LE:

View File

@ -244,7 +244,7 @@ static int play(void* data,int len,int flags){
}
#endif
if (ao_data.channels == 6 || ao_data.channels == 5) {
if (ao_data.channels == 5 || ao_data.channels == 6 || ao_data.channels == 8) {
int frame_size = le2me_16(wavhdr.bits) / 8;
len -= len % (frame_size * ao_data.channels);
reorder_channel_nch(data, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,

View File

@ -47,7 +47,7 @@ LIBAD_EXTERN(faad)
/* configure maximum supported channels, *
* this is theoretically max. 64 chans */
#define FAAD_MAX_CHANNELS 6
#define FAAD_MAX_CHANNELS 8
#define FAAD_BUFFLEN (FAAD_MIN_STREAMSIZE*FAAD_MAX_CHANNELS)
//#define AAC_DUMP_COMPRESSED
@ -167,7 +167,8 @@ static int init(sh_audio_t *sh)
} else {
mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", sh->a_in_buffer_len); // XXX: remove or move to debug!
mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %ldHz channels: %d\n", faac_samplerate, faac_channels);
sh->channels = faac_channels;
// 8 channels is aac channel order #7.
sh->channels = faac_channels == 7 ? 8 : faac_channels;
if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
sh->samplerate = faac_samplerate;
sh->samplesize=2;

View File

@ -177,17 +177,10 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
if(y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!)
if(len2>0){
if (((AVCodecContext *)sh_audio->context)->channels >= 5) {
int src_ch_layout = AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT;
int samplesize = av_get_bits_per_sample_format(((AVCodecContext *)
sh_audio->context)->sample_fmt) / 8;
const char *codec=((AVCodecContext*)sh_audio->context)->codec->name;
if (!strcasecmp(codec, "aac"))
src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_AAC_DEC_DEFAULT;
else if (!strcasecmp(codec, "vorbis"))
src_ch_layout = AF_CHANNEL_LAYOUT_VORBIS_DEFAULT;
else
src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_DEFAULT;
reorder_channel_nch(buf, src_ch_layout,
reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_LAVC_DEFAULT,
AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
((AVCodecContext *)sh_audio->context)->channels,
len2 / samplesize, samplesize);

View File

@ -39,7 +39,8 @@ static int bind_pcm(audio_encoder_t *encoder, muxer_stream_t *mux_a)
static int encode_pcm(audio_encoder_t *encoder, uint8_t *dest, void *src, int nsamples, int max_size)
{
max_size = FFMIN(nsamples, max_size);
if (encoder->params.channels == 6 || encoder->params.channels == 5) {
if (encoder->params.channels == 5 || encoder->params.channels == 6 ||
encoder->params.channels == 8) {
max_size -= max_size % (encoder->params.channels * 2);
reorder_channel_copy_nch(src, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
dest, AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT,

View File

@ -49,17 +49,17 @@
* 0. stream/tvi_*.c: vbi_grabber(...)
* getting vbi data from video device
* ---decoding stage---
* 1. stream/tvi_vbi.c: decode_raw_line_runin(...) or decode_raw_line_sine(...)
* 1. libmpcodecs/dec_teletext.c: decode_raw_line_runin(...) or decode_raw_line_sine(...)
* decode raw vbi data into sliced 45(?) bytes long packets
* 2. stream/tvi_vbi.c: decode_pkt0(...), decode_pkt_page(...)
* 2. libmpcodecs/dec_teletext.c: decode_pkt0(...), decode_pkt_page(...)
* packets processing (header analyzing, storing complete page in cache,
* only raw member of tt_char is filled at this stage)
* 3. stream/tvi_vbi.c: decode_page(...)
* 3. libmpcodecs/dec_teletext.c: decode_page(...)
* page decoding. filling unicode,gfx,ctl,etc members of tt_char structure
* with appropriate values according to teletext control chars, converting
* text to utf8.
* ---rendering stage---
* 4. stream/tvi_vbi.c: prepare_visible_page(...)
* 4. libmpcodecs/dec_teletext.c: prepare_visible_page(...)
* processing page. adding number of just received by background process
* teletext page, adding current time,etc.
* 5. libvo/sub.c: vo_update_text_teletext(...)
@ -70,7 +70,6 @@
* spu rendering
* is better quality on poor signal possible ?
* link support
* font autoscale
* greyscale osd
* slave command for dumping pages
* fix bcd<->dec as suggested my Michael
@ -89,9 +88,19 @@
#include <math.h>
#include <stdio.h>
#ifdef HAVE_PTHREADS
// pthreads are needed for async updates from v4l(2)
// FIXME: try to avoid using pthread calls when running only a single
// thread as e.g. with DVB teletext
#include <pthread.h>
#else
#define pthread_mutex_init(m, p)
#define pthread_mutex_destroy(m)
#define pthread_mutex_lock(m)
#define pthread_mutex_unlock(m)
#endif
#include "tv.h"
#include "dec_teletext.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "libmpcodecs/img_format.h"
@ -139,7 +148,9 @@ typedef struct {
int pll_fixed;
/// vbi stream properties (buffer size,bytes per line, etc)
tt_stream_props* ptsp;
#ifdef HAVE_PTHREADS
pthread_mutex_t buffer_mutex;
#endif
tt_page** ptt_cache;
unsigned char* ptt_cache_first_subpage;
@ -577,7 +588,7 @@ static void put_to_cache(priv_vbi_t* priv,tt_page* pg,int line){
if(!(pg->raw[i]&0x80))
pgc->raw[i]=pg->raw[i];
else
mp_msg(MSGT_TV,MSGL_DBG3,"char error. pg:%x, c[%d]=0x%x\n",
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"char error. pg:%x, c[%d]=0x%x\n",
pg->pagenum,i,pg->raw[i]);
}
pgc->active=1;
@ -798,13 +809,13 @@ static void prepare_visible_page(priv_vbi_t* priv){
int i;
pthread_mutex_lock(&(priv->buffer_mutex));
mp_msg(MSGT_TV,MSGL_DBG3,"tvi_vbi: prepare_visible_page pg:0x%x, sub:0x%x\n",
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"dec_teletext: prepare_visible_page pg:0x%x, sub:0x%x\n",
priv->pagenum,priv->subpagenum);
if(priv->subpagenum==0x3f7f) //no page yet
priv->subpagenum=get_subpagenum_from_cache(priv,priv->pagenum);
pg=get_from_cache(priv,priv->pagenum,priv->subpagenum);
mp_dbg(MSGT_TV,MSGL_DBG3,"tvi_vbi: prepare_vibible_page2 pg:0x%x, sub:0x%x\n",
mp_dbg(MSGT_TELETEXT,MSGL_DBG3,"dec_teletext: prepare_vibible_page2 pg:0x%x, sub:0x%x\n",
priv->pagenum,priv->subpagenum);
curr_pg=get_from_cache(priv,priv->curr_pagenum,
@ -826,7 +837,7 @@ static void prepare_visible_page(priv_vbi_t* priv){
}
}else{
decode_page(priv->display_page,pg->raw,pg->primary_lang,pg->secondary_lang,pg->flags);
mp_msg(MSGT_TV,MSGL_DBG3,"page #%x was decoded!\n",pg->pagenum);
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"page #%x was decoded!\n",pg->pagenum);
}
PRINT_HEX(priv->display_page,0,(priv->curr_pagenum&0x700)?priv->curr_pagenum>>8:8);
@ -982,11 +993,9 @@ static void dump_page(tt_page* pt)
* \brief checks whether page is ready and copies it into cache array if so
* \param priv private data structure
* \param magAddr page's magazine address (0-7)
*
* Routine also calls decode_page to perform 1st stage of rendering
*/
static void store_in_cache(priv_vbi_t* priv, int magAddr, int line){
mp_msg(MSGT_TV,MSGL_DBG2,"store_in_cache(%d): pagenum:%x\n",
mp_msg(MSGT_TELETEXT,MSGL_DBG2,"store_in_cache(%d): pagenum:%x\n",
priv->mag[magAddr].order,
priv->mag[magAddr].pt->pagenum);
@ -1038,7 +1047,7 @@ static void pll_add(priv_vbi_t* priv,int n,int err){
priv->pll_dir=-1;
priv->pll_lerr=0;
}
mp_msg(MSGT_TV,MSGL_DBG3,"vbi: pll_adj=%2d\n",priv->pll_adj);
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"vbi: pll_adj=%2d\n",priv->pll_adj);
}
priv->pll_cnt=0;
priv->pll_err=0;
@ -1062,9 +1071,9 @@ static void pll_reset(priv_vbi_t* priv,int fine_tune){
if(priv->pll_fixed)
priv->pll_adj=fine_tune;
if(priv->pll_fixed)
mp_msg(MSGT_TV,MSGL_DBG3,"pll_reset (fixed@%2d)\n",priv->pll_adj);
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"pll_reset (fixed@%2d)\n",priv->pll_adj);
else
mp_msg(MSGT_TV,MSGL_DBG3,"pll_reset (auto)\n");
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"pll_reset (auto)\n");
}
/**
@ -1107,7 +1116,7 @@ static int decode_pkt0(priv_vbi_t* priv,unsigned char* data,int magAddr)
if(priv->primary_language)
priv->mag[magAddr].pt->primary_lang=priv->primary_language;
else
priv->mag[magAddr].pt->primary_lang= (d[7]&7)>>1;
priv->mag[magAddr].pt->primary_lang= (d[7]>>1)&7;
priv->mag[magAddr].pt->secondary_lang=priv->secondary_language;
priv->mag[magAddr].pt->subpagenum=(d[2]|(d[3]<<4)|(d[4]<<8)|(d[5]<<12))&0x3f7f;
priv->mag[magAddr].pt->pagenum=(magAddr<<8) | d[0] | (d[1]<<4);
@ -1302,7 +1311,7 @@ static void decode_pkt28(priv_vbi_t* priv,unsigned char*data){
(priv->secondary_language&4)>>2 |
(priv->secondary_language&1)<<2;
mp_msg(MSGT_TV,MSGL_DBG2,"pkt28: language: primary=%02x secondary=0x%02x\n",
mp_msg(MSGT_TELETEXT,MSGL_DBG2,"pkt28: language: primary=%02x secondary=0x%02x\n",
priv->primary_language,priv->secondary_language);
}
@ -1351,7 +1360,7 @@ static int decode_raw_line_runin(priv_vbi_t* priv,unsigned char* buf,unsigned ch
i=hi[5]-hi[1]; // length of 4 periods (8 bits)
if (i<priv->bp8bl || i>priv->bp8bh)
{
mp_msg(MSGT_TV,MSGL_DBG3,"vbi: wrong freq %d (%d,%d)\n",
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"vbi: wrong freq %d (%d,%d)\n",
i,priv->bp8bl,priv->bp8bh);
return 0; // bad frequency
}
@ -1387,7 +1396,7 @@ static int decode_raw_line_runin(priv_vbi_t* priv,unsigned char* buf,unsigned ch
for(i=0;i<43;i++){
data[i]=data[i+1];
}
mp_msg(MSGT_TV,MSGL_DBG3,"thr:%d sync:%d ",thr,sync);
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"thr:%d sync:%d ",thr,sync);
return 1;
}
@ -1456,6 +1465,44 @@ static int decode_raw_line_sine(priv_vbi_t* priv,unsigned char* buf,unsigned cha
}
#endif
/**
* \brief decodes one vbi line from one video frame
* \param priv private data structure
* \param data buffer with raw vbi data in it
*/
static void vbi_decode_line(priv_vbi_t *priv, unsigned char *data) {
int d0,d1,magAddr,pkt;
d0= corrHamm48[ data[0] ];
d1= corrHamm48[ data[1] ];
if(d0&0x80 || d1&0x80){
pll_add(priv,2,4);
mp_msg(MSGT_TELETEXT,MSGL_V,"vbi_decode_line: HammErr\n");
return; //hamError
}
magAddr=d0 & 0x7;
pkt=(d0>>3)|(d1<<1);
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"vbi_decode_line:%x %x (mag:%x, pkt:%d)\n",
d0,d1,magAddr,pkt);
if(!pkt){
decode_pkt0(priv,data+2,magAddr); //skip MRGA
}else if(pkt>0 && pkt<VBI_ROWS){
if(!priv->mag[magAddr].pt)
return;
decode_pkt_page(priv,data+2,magAddr,pkt);//skip MRGA
}else if(pkt==27) {
decode_pkt27(priv,data+2,magAddr);
}else if(pkt==28){
decode_pkt28(priv,data+2);
}else if(pkt==30){
decode_pkt30(priv,data+2,magAddr);
} else {
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"unsupported packet:%d\n",pkt);
}
}
/**
* \brief decodes all vbi lines from one video frame
* \param priv private data structure
@ -1464,13 +1511,10 @@ static int decode_raw_line_sine(priv_vbi_t* priv,unsigned char* buf,unsigned cha
* \note buffer size have to be at least priv->ptsp->bufsize bytes
*/
static void vbi_decode(priv_vbi_t* priv,unsigned char*buf){
int magAddr;
int pkt;
unsigned char data[64];
unsigned char* linep;
int d0,d1;
int i=0;
mp_msg(MSGT_TV,MSGL_DBG3,"vbi: vbi_decode\n");
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"vbi: vbi_decode\n");
for(linep=buf; !priv->cache_reset && linep<buf+priv->ptsp->bufsize; linep+=priv->ptsp->samples_per_line,i++){
#if 0
/*
@ -1483,33 +1527,7 @@ static void vbi_decode(priv_vbi_t* priv,unsigned char*buf){
if(decode_raw_line_runin(priv,linep,data)<=0){
continue; //this is not valid teletext line
}
d0= corrHamm48[ data[0] ];
d1= corrHamm48[ data[1] ];
if(d0&0x80 || d1&0x80){
pll_add(priv,2,4);
mp_msg(MSGT_TV,MSGL_V,"vbi_decode(%d):HammErr after decode_raw_line\n",i);
continue; //hamError
}
magAddr=d0 & 0x7;
pkt=(d0>>3)|(d1<<1);
mp_msg(MSGT_TV,MSGL_DBG3,"vbi_decode(%d):%x %x (mag:%x, pkt:%d)\n",
i,d0,d1,magAddr,pkt);
if(!pkt){
decode_pkt0(priv,data+2,magAddr); //skip MRGA
}else if(pkt>0 && pkt<VBI_ROWS){
if(!priv->mag[magAddr].pt) continue;
decode_pkt_page(priv,data+2,magAddr,pkt);//skip MRGA
}else if(pkt==27) {
decode_pkt27(priv,data+2,magAddr);
}else if(pkt==28){
decode_pkt28(priv,data+2);
}else if(pkt==30){
decode_pkt30(priv,data+2,magAddr);
} else {
mp_msg(MSGT_TV,MSGL_DBG3,"unsupported packet:%d\n",pkt);
}
vbi_decode_line(priv, data);
}
if (priv->cache_reset){
pthread_mutex_lock(&(priv->buffer_mutex));
@ -1519,6 +1537,29 @@ static void vbi_decode(priv_vbi_t* priv,unsigned char*buf){
}
/**
* \brief decodes a vbi line from a DVB teletext stream
* \param priv private data structure
* \param buf buffer with DVB teletext data
*
* No locking is done since this is only called from a single-threaded context
*/
static void vbi_decode_dvb(priv_vbi_t *priv, const uint8_t buf[44]){
int i;
uint8_t data[42];
mp_msg(MSGT_TELETEXT,MSGL_DBG3, "vbi: vbi_decode_dvb\n");
/* Reverse bit order, skipping the first two bytes (field parity, line
offset and framing code). */
for (i = 0; i < sizeof(data); i++)
data[i] = av_reverse[buf[2 + i]];
vbi_decode_line(priv, data);
if (priv->cache_reset)
priv->cache_reset--;
}
/*
---------------------------------------------------------------------------------
Public routines
@ -1530,8 +1571,8 @@ static void vbi_decode(priv_vbi_t* priv,unsigned char*buf){
* \param priv_vbi private data structure
* \param flag new format
* \return
* TVI_CONTROL_TRUE is success,
* TVI_CONTROL_FALSE otherwise
* VBI_CONTROL_TRUE is success,
* VBI_CONTROL_FALSE otherwise
*
* flag:
* 0 - opaque
@ -1543,7 +1584,7 @@ static int teletext_set_format(priv_vbi_t * priv, teletext_format flag)
{
flag&=3;
mp_msg(MSGT_TV,MSGL_DBG3,"teletext_set_format_is called. mode:%d\n",flag);
mp_msg(MSGT_TELETEXT,MSGL_DBG3,"teletext_set_format_is called. mode:%d\n",flag);
pthread_mutex_lock(&(priv->buffer_mutex));
priv->tformat=flag;
@ -1551,7 +1592,7 @@ static int teletext_set_format(priv_vbi_t * priv, teletext_format flag)
priv->pagenumdec=0;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
/**
@ -1647,44 +1688,44 @@ int teletext_control(void* p, int cmd, void *arg)
tt_page* pgc;
if (!priv && cmd!=TV_VBI_CONTROL_START)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
if (!arg && cmd!=TV_VBI_CONTROL_STOP && cmd!=TV_VBI_CONTROL_MARK_UNCHANGED)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
switch (cmd) {
case TV_VBI_CONTROL_RESET:
{
int i;
tv_param_t* tv_param=arg;
struct tt_param* tt_param=arg;
pthread_mutex_lock(&(priv->buffer_mutex));
priv->pagenumdec=0;
clear_cache(priv);
priv->pagenum=steppage(0,tv_param->tpage&0x7ff,1);
priv->tformat=tv_param->tformat;
priv->pagenum=steppage(0,tt_param->page&0x7ff,1);
priv->tformat=tt_param->format;
priv->subpagenum=0x3f7f;
pll_reset(priv,fine_tune);
if(tv_param->tlang==-1){
mp_tmsg(MSGT_TV,MSGL_INFO,"Supported Teletext languages:\n");
if(tt_param->lang==-1){
mp_tmsg(MSGT_TELETEXT,MSGL_INFO,"Supported Teletext languages:\n");
for(i=0; tt_languages[i].lang_code; i++){
mp_msg(MSGT_TV,MSGL_INFO," %3d %s\n",
mp_msg(MSGT_TELETEXT,MSGL_INFO," %3d %s\n",
tt_languages[i].lang_code, tt_languages[i].lang_name);
}
mp_msg(MSGT_TV,MSGL_INFO," %3d %s\n",
mp_msg(MSGT_TELETEXT,MSGL_INFO," %3d %s\n",
tt_languages[i].lang_code, tt_languages[i].lang_name);
}else{
for(i=0; tt_languages[i].lang_code; i++){
if(tt_languages[i].lang_code==tv_param->tlang)
if(tt_languages[i].lang_code==tt_param->lang)
break;
}
if (priv->primary_language!=tt_languages[i].lang_code){
mp_tmsg(MSGT_TV,MSGL_INFO,"Selected default teletext language: %s\n",
mp_tmsg(MSGT_TELETEXT,MSGL_INFO,"Selected default teletext language: %s\n",
tt_languages[i].lang_name);
priv->primary_language=tt_languages[i].lang_code;
}
}
priv->page_changed=1;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_START:
{
@ -1692,7 +1733,7 @@ int teletext_control(void* p, int cmd, void *arg)
tt_stream_props* ptsp=*(tt_stream_props**)arg;
if(!ptsp)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
priv=calloc(1,sizeof(priv_vbi_t));
@ -1711,7 +1752,7 @@ int teletext_control(void* p, int cmd, void *arg)
init_vbi_consts(priv);
pll_reset(priv,fine_tune);
priv->page_changed=1;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_STOP:
{
@ -1721,16 +1762,17 @@ int teletext_control(void* p, int cmd, void *arg)
free(priv->ptsp);
destroy_cache(priv);
priv->page_changed=1;
pthread_mutex_destroy(&priv->buffer_mutex);
free(priv);
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_SET_MODE:
priv->on=(*(int*)arg%2);
priv->page_changed=1;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_GET_MODE:
*(int*)arg=priv->on;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_SET_FORMAT:
priv->page_changed=1;
return teletext_set_format(priv, *(int *) arg);
@ -1738,12 +1780,12 @@ int teletext_control(void* p, int cmd, void *arg)
pthread_mutex_lock(&(priv->buffer_mutex));
*(int*)arg=priv->tformat;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_GET_HALF_PAGE:
if(!priv->on)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
*(int *)arg=priv->zoom;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_SET_HALF_PAGE:
{
int val=*(int*)arg;
@ -1754,21 +1796,21 @@ int teletext_control(void* p, int cmd, void *arg)
priv->zoom=val;
priv->page_changed=1;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_GO_LINK:
{
int val=*(int *) arg;
if(val<1 || val>6)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
pthread_mutex_lock(&(priv->buffer_mutex));
if (!(pgc = priv->ptt_cache[priv->pagenum])) {
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
}
if (!pgc->links[val-1].pagenum || pgc->links[val-1].pagenum>0x7ff) {
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
}
priv->pagenum=pgc->links[val-1].pagenum;
if(pgc->links[val-1].subpagenum!=0x3f7f)
@ -1777,20 +1819,20 @@ int teletext_control(void* p, int cmd, void *arg)
priv->subpagenum=get_subpagenum_from_cache(priv,priv->pagenum);
priv->page_changed=1;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_SET_PAGE:
{
int val=*(int *) arg;
if(val<100 || val>0x899)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
pthread_mutex_lock(&(priv->buffer_mutex));
priv->pagenum=val&0x7ff;
priv->subpagenum=get_subpagenum_from_cache(priv,priv->pagenum);
priv->pagenumdec=0;
priv->page_changed=1;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_STEP_PAGE:
{
@ -1801,11 +1843,11 @@ int teletext_control(void* p, int cmd, void *arg)
priv->pagenumdec=0;
priv->page_changed=1;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
case TV_VBI_CONTROL_GET_PAGE:
*(int*)arg=((priv->pagenum+0x700)&0x7ff)+0x100;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_SET_SUBPAGE:
pthread_mutex_lock(&(priv->buffer_mutex));
priv->pagenumdec=0;
@ -1816,35 +1858,38 @@ int teletext_control(void* p, int cmd, void *arg)
priv->subpagenum=VBI_MAX_SUBPAGES-1;
priv->page_changed=1;
pthread_mutex_unlock(&(priv->buffer_mutex));
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_GET_SUBPAGE:
*(int*)arg=priv->subpagenum;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_ADD_DEC:
vbi_add_dec(priv, *(char **) arg);
priv->page_changed=1;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_DECODE_PAGE:
vbi_decode(priv,*(unsigned char**)arg);
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_DECODE_DVB:
vbi_decode_dvb(priv, arg);
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_GET_VBIPAGE:
if(!priv->on)
return TVI_CONTROL_FALSE;
return VBI_CONTROL_FALSE;
prepare_visible_page(priv);
*(void **)arg=priv->display_page;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_GET_NETWORKNAME:
*(void **)arg=priv->networkname;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_MARK_UNCHANGED:
priv->page_changed=0;
priv->last_rendered=GetTimerMS();
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
case TV_VBI_CONTROL_IS_CHANGED:
if(GetTimerMS()-priv->last_rendered> 250) //forcing page update every 1/4 sec
priv->page_changed=3; //mark that header update is enough
*(int*)arg=priv->page_changed;
return TVI_CONTROL_TRUE;
return VBI_CONTROL_TRUE;
}
return TVI_CONTROL_UNKNOWN;
return VBI_CONTROL_UNKNOWN;
}

148
libmpcodecs/dec_teletext.h Normal file
View File

@ -0,0 +1,148 @@
/*
* Teletext support
*
* Copyright (C) 2007 Vladimir Voroshilov <voroshil@gmail.com>
*
* 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.
*/
#ifndef MPLAYER_DEC_TELETEXT_H
#define MPLAYER_DEC_TELETEXT_H
struct tt_param {
char *device; ///< teletext device
int format; ///< teletext display format
int page; ///< start teletext page
int lang; ///< primary language code
};
#define VBI_CONTROL_FALSE 0
#define VBI_CONTROL_TRUE 1
#define VBI_CONTROL_UNKNOWN -1
int teletext_control(void* p, int cmd, void *arg);
/*
TELETEXT controls (through teletext_control() )
NOTE:
_SET_ should be _GET_ +1
_STEP_ should be _GET_ +2
*/
#define TV_VBI_CONTROL_GET_MODE 0x510 ///< get current mode teletext
#define TV_VBI_CONTROL_SET_MODE 0x511 ///< on/off grab teletext
#define TV_VBI_CONTROL_GET_PAGE 0x513 ///< get grabbed teletext page
#define TV_VBI_CONTROL_SET_PAGE 0x514 ///< set grab teletext page number
#define TV_VBI_CONTROL_STEP_PAGE 0x515 ///< step grab teletext page number
#define TV_VBI_CONTROL_GET_SUBPAGE 0x516 ///< get grabbed teletext page
#define TV_VBI_CONTROL_SET_SUBPAGE 0x517 ///< set grab teletext page number
#define TV_VBI_CONTROL_GET_FORMAT 0x519 ///< get teletext format
#define TV_VBI_CONTROL_SET_FORMAT 0x51a ///< set teletext format
#define TV_VBI_CONTROL_GET_HALF_PAGE 0x51c ///< get current half page
#define TV_VBI_CONTROL_SET_HALF_PAGE 0x51d ///< switch half page
#define TV_VBI_CONTROL_IS_CHANGED 0x540 ///< teletext page is changed
#define TV_VBI_CONTROL_MARK_UNCHANGED 0x541 ///< teletext page is changed
#define TV_VBI_CONTROL_ADD_DEC 0x550 ///< add page number with dec
#define TV_VBI_CONTROL_GO_LINK 0x551 ///< go link (1..6) NYI
#define TV_VBI_CONTROL_GET_VBIPAGE 0x552 ///< get vbi_image for grabbed teletext page
#define TV_VBI_CONTROL_RESET 0x553 ///< vbi reset
#define TV_VBI_CONTROL_START 0x554 ///< vbi start
#define TV_VBI_CONTROL_STOP 0x555 ///< vbi stop
#define TV_VBI_CONTROL_DECODE_PAGE 0x556 ///< decode vbi page
#define TV_VBI_CONTROL_GET_NETWORKNAME 0x557 ///< get current network name
#define TV_VBI_CONTROL_DECODE_DVB 0x558 ///< decode DVB teletext
#define VBI_TFORMAT_TEXT 0 ///< text mode
#define VBI_TFORMAT_BW 1 ///< black&white mode
#define VBI_TFORMAT_GRAY 2 ///< grayscale mode
#define VBI_TFORMAT_COLOR 3 ///< color mode (require color_spu patch!)
#define VBI_MAX_PAGES 0x800 ///< max sub pages number
#define VBI_MAX_SUBPAGES 64 ///< max sub pages number
#define VBI_ROWS 25 ///< teletext page height in rows
#define VBI_COLUMNS 40 ///< teletext page width in chars
#define VBI_TIME_LINEPOS 26 ///< time line pos in page header
typedef
enum{
TT_FORMAT_OPAQUE=0, ///< opaque
TT_FORMAT_TRANSPARENT, ///< transparent
TT_FORMAT_OPAQUE_INV, ///< opaque with inverted colors
TT_FORMAT_TRANSPARENT_INV ///< transparent with inverted colors
} teletext_format;
typedef
enum{
TT_ZOOM_NORMAL=0,
TT_ZOOM_TOP_HALF,
TT_ZOOM_BOTTOM_HALF
} teletext_zoom;
typedef struct tt_char_s{
unsigned int unicode; ///< unicode (utf8) character
unsigned char fg; ///< foreground color
unsigned char bg; ///< background color
unsigned char gfx; ///< 0-no gfx, 1-solid gfx, 2-separated gfx
unsigned char flh; ///< 0-no flash, 1-flash
unsigned char hidden; ///< char is hidden (for subtitle pages)
unsigned char ctl; ///< control character
unsigned char lng; ///< lang: 0-secondary language,1-primary language
unsigned char raw; ///< raw character (as received from device)
} tt_char;
typedef struct tt_link_s{
int pagenum; ///< page number
int subpagenum; ///< subpage number
} tt_link_t;
typedef struct tt_page_s{
int pagenum; ///< page number
int subpagenum; ///< subpage number
unsigned char primary_lang; ///< primary language code
unsigned char secondary_lang; ///< secondary language code
unsigned char active; ///< page is complete and ready for rendering
unsigned char flags; ///< page flags
unsigned char raw[VBI_ROWS*VBI_COLUMNS]; ///< page data
struct tt_page_s* next_subpage;
struct tt_link_s links[6];
} tt_page;
#define TT_PGFL_SUPPRESS_HEADER 0x01
#define TT_PGFL_UPDATE_INDICATOR 0x02
#define TT_PGFL_INTERRUPTED_SEQ 0x04
#define TT_PGFL_INHIBIT_DISPLAY 0x08
#define TT_PGFL_NEWFLASH 0x10
#define TT_PGFL_SUBTITLE 0x20
#define TT_PGFL_ERASE_PAGE 0x40
#define TT_PGFL_MAGAZINE_SERIAL 0x80
typedef struct tt_stream_props_s{
int sampling_rate;
int samples_per_line;
int offset;
int count[2]; ///< number of lines in first and second fields
int interlaced; ///< vbi data are interlaced
int bufsize; ///< required buffer size
} tt_stream_props;
#endif /* MPLAYER_DEC_TELETEXT_H */

View File

@ -1,6 +1,8 @@
#ifndef MPLAYER_IMG_FORMAT_H
#define MPLAYER_IMG_FORMAT_H
#include "config.h"
/* RGB/BGR Formats */
#define IMGFMT_RGB_MASK 0xFFFFFF00

View File

@ -911,7 +911,8 @@ static void uninit(struct vf_instance* vf){
av_freep(&lavc_venc_context->intra_matrix);
av_freep(&lavc_venc_context->inter_matrix);
avcodec_close(lavc_venc_context);
if (lavc_venc_context->codec)
avcodec_close(lavc_venc_context);
if(stats_file) fclose(stats_file);

View File

@ -222,7 +222,7 @@ struct asf_priv {
int scrambling_b;
unsigned packetsize;
double packetrate;
unsigned movielength;
double movielength;
int asf_is_dvr_ms;
uint32_t asf_frame_state;
int asf_frame_start_found;

View File

@ -544,7 +544,7 @@ int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){
asf->packetsize=fileh->max_packet_size;
asf->packet=malloc(asf->packetsize); // !!!
asf->packetrate=fileh->max_bitrate/8.0/(double)asf->packetsize;
asf->movielength=(fileh->play_duration-fileh->preroll)/10000000LL;
asf->movielength=(fileh->play_duration-10000*fileh->preroll)/10000000.0;
}
// find content header

View File

@ -613,7 +613,7 @@ static int demux_asf_control(demuxer_t *demuxer,int cmd, void *arg){
*/
switch(cmd) {
case DEMUXER_CTRL_GET_TIME_LENGTH:
*((double *)arg)=(double)(asf->movielength);
*((double *)arg)=asf->movielength;
return DEMUXER_CTRL_OK;
case DEMUXER_CTRL_GET_PERCENT_POS:

View File

@ -55,9 +55,15 @@ demuxer_t* new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd) {
ret->video = vd->video;
ret->audio = ad->audio;
ret->sub = sd->sub;
if (sd && sd != vd && sd != ad) sd->sub->non_interleaved = 1;
// without these, demux_demuxers_fill_buffer will never be called,
// but they break the demuxer-specific code in video.c
#if 0
if (vd) vd->video->demuxer = ret;
if (ad) ad->audio->demuxer = ret;
if (sd) sd->sub->demuxer = ret;
#endif
// HACK?, necessary for subtitle (and audio and video when implemented) switching
memcpy(ret->v_streams, vd->v_streams, sizeof(ret->v_streams));

View File

@ -49,7 +49,6 @@ static unsigned int opt_probesize = 0;
static unsigned int opt_analyzeduration = 0;
static char *opt_format;
static char *opt_cryptokey;
extern int ts_prog;
static char *opt_avopt = NULL;
const m_option_t lavfdopts_conf[] = {
@ -133,6 +132,7 @@ static int lavf_check_file(demuxer_t *demuxer){
AVProbeData avpd;
uint8_t buf[PROBE_BUF_SIZE];
lavf_priv_t *priv;
int probe_data_size;
if(!demuxer->priv)
demuxer->priv=calloc(sizeof(lavf_priv_t),1);
@ -154,11 +154,12 @@ static int lavf_check_file(demuxer_t *demuxer){
return DEMUXER_TYPE_LAVF;
}
if(stream_read(demuxer->stream, buf, PROBE_BUF_SIZE)!=PROBE_BUF_SIZE)
probe_data_size = stream_read(demuxer->stream, buf, PROBE_BUF_SIZE);
if(probe_data_size <= 0)
return 0;
avpd.filename= demuxer->stream->url;
avpd.buf= buf;
avpd.buf_size= PROBE_BUF_SIZE;
avpd.buf_size= probe_data_size;
priv->avif= av_probe_input_format(&avpd, 1);
if(!priv->avif){
@ -383,6 +384,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
type = 'a';
else if(codec->codec_id == CODEC_ID_DVD_SUBTITLE)
type = 'v';
else if(codec->codec_id == CODEC_ID_DVB_TELETEXT)
type = 'd';
else
break;
sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams);
@ -493,30 +496,12 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
for(i=0; i<avfc->nb_streams; i++)
handle_stream(demuxer, avfc, i);
if(avfc->nb_programs) {
int p, start=0, found=0;
if(ts_prog) {
for(p=0; p<avfc->nb_programs; p++) {
if(avfc->programs[p]->id == ts_prog) {
start = p;
found = 1;
break;
}
}
if(!found) {
mp_msg(MSGT_HEADER,MSGL_ERR,"DEMUX_LAVF: program %d doesn't seem to be present\n", ts_prog);
return NULL;
}
}
p = start;
do {
int p;
for (p = 0; p < avfc->nb_programs; p++) {
AVProgram *program = avfc->programs[p];
t = av_metadata_get(program->metadata, "title", NULL, 0);
mp_msg(MSGT_HEADER,MSGL_INFO,"LAVF: Program %d %s\n", program->id, t ? t->value : "");
if(!priv->cur_program && (demuxer->video->sh || demuxer->audio->sh))
priv->cur_program = program->id;
p = (p + 1) % avfc->nb_programs;
} while(p!=start);
}
}
mp_msg(MSGT_HEADER,MSGL_V,"LAVF: %d audio and %d video streams found\n",priv->audio_streams,priv->video_streams);
@ -717,8 +702,9 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg)
int p, i;
int start;
if(priv->avfc->nb_programs < 2)
return DEMUXER_CTRL_NOTIMPL;
prog->vid = prog->aid = prog->sid = -2; //no audio and no video by default
if(priv->avfc->nb_programs < 1)
return DEMUXER_CTRL_DONTKNOW;
if(prog->progid == -1)
{
@ -733,10 +719,9 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg)
if(priv->avfc->programs[i]->id == prog->progid)
break;
if(i==priv->avfc->nb_programs)
return DEMUXER_CTRL_NOTIMPL;
return DEMUXER_CTRL_DONTKNOW;
p = i;
}
prog->vid = prog->aid = prog->sid = -2; //no audio and no video by default
start = p;
redo:
program = priv->avfc->programs[p];

View File

@ -146,7 +146,9 @@ typedef struct ogg_demuxer {
ogg_syncpoint_t* syncpoints;
int num_syncpoint;
off_t pos, last_size;
int64_t initial_granulepos;
int64_t final_granulepos;
int64_t duration;
/* Used for subtitle switching. */
int n_text;
@ -263,20 +265,23 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,fl
if(os->vorbis) {
if(*pack->packet & PACKET_TYPE_HEADER)
os->hdr_packets++;
else if (os->vi_initialized)
else
{
vorbis_info *vi;
int32_t blocksize;
int32_t blocksize = 0;
// When we dump the audio, there is no vi, but we don't care of timestamp in this case
vi = &(os->vi);
vi = os->vi_initialized ? &os->vi : NULL;
if (vi)
blocksize = vorbis_packet_blocksize(vi,pack) / samplesize;
// Calculate the timestamp if the packet don't have any
if(pack->granulepos == -1) {
pack->granulepos = os->lastpos;
if(os->lastsize > 0)
pack->granulepos += os->lastsize;
}
} else
*flags = 1;
if (vi)
*pts = pack->granulepos / (float)vi->rate;
os->lastsize = blocksize;
os->lastpos = pack->granulepos;
@ -521,12 +526,7 @@ static void demux_ogg_scan_stream(demuxer_t* demuxer) {
pos = last_pos = demuxer->movi_start;
// Reset the stream
if(index_mode == 2) {
stream_seek(s,demuxer->movi_start);
} else {
//the 270000 are just a wild guess
stream_seek(s,FFMAX(ogg_d->pos,demuxer->movi_end-270000));
}
ogg_sync_reset(sync);
// Get the serial number of the stream we use
@ -574,7 +574,18 @@ static void demux_ogg_scan_stream(demuxer_t* demuxer) {
float pts;
int flags;
demux_ogg_read_packet(os,&op,&pts,&flags,samplesize);
if(op.granulepos >= 0) ogg_d->final_granulepos = op.granulepos;
if(op.granulepos >= 0) {
ogg_d->final_granulepos = op.granulepos;
if(ogg_d->initial_granulepos == MP_NOPTS_VALUE && (flags & 1)) {
ogg_d->initial_granulepos = op.granulepos;
if (index_mode != 2 && ogg_d->pos < demuxer->movi_end-2*270000) {
//the 270000 are just a wild guess
stream_seek(s,FFMAX(ogg_d->pos,demuxer->movi_end-270000));
ogg_sync_reset(sync);
continue;
}
}
}
if(index_mode == 2 && (flags || (os->vorbis && op.granulepos >= 0))) {
if (ogg_d->num_syncpoint > SIZE_MAX / sizeof(ogg_syncpoint_t) - 1) break;
ogg_d->syncpoints = realloc_struct(ogg_d->syncpoints,(ogg_d->num_syncpoint+1), sizeof(ogg_syncpoint_t));
@ -1122,6 +1133,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
}
ogg_d->final_granulepos=0;
ogg_d->initial_granulepos = MP_NOPTS_VALUE;
if(!s->end_pos)
demuxer->seekable = 0;
else {
@ -1130,6 +1142,9 @@ int demux_ogg_open(demuxer_t* demuxer) {
demuxer->seekable = 1;
demux_ogg_scan_stream(demuxer);
}
if (ogg_d->initial_granulepos == MP_NOPTS_VALUE)
ogg_d->initial_granulepos = 0;
ogg_d->duration = ogg_d->final_granulepos - ogg_d->initial_granulepos;
mp_msg(MSGT_DEMUX,MSGL_V,"Ogg demuxer : found %d audio stream%s, %d video stream%s and %d text stream%s\n",n_audio,n_audio>1?"s":"",n_video,n_video>1?"s":"",ogg_d->n_text,ogg_d->n_text>1?"s":"");
@ -1362,10 +1377,10 @@ static void demux_ogg_seek(demuxer_t *demuxer,float rel_seek_secs,float audio_de
old_pos = ogg_d->pos;
//calculate the granulepos to seek to
gp = flags & SEEK_ABSOLUTE ? 0 : os->lastpos;
gp = flags & SEEK_ABSOLUTE ? ogg_d->initial_granulepos : os->lastpos;
if(flags & SEEK_FACTOR) {
if (ogg_d->final_granulepos > 0)
gp += ogg_d->final_granulepos * rel_seek_secs;
if (ogg_d->duration > 0)
gp += ogg_d->duration * rel_seek_secs;
else
gp += rel_seek_secs * (demuxer->movi_end - demuxer->movi_start) * os->lastpos / ogg_d->pos;
} else
@ -1392,8 +1407,8 @@ static void demux_ogg_seek(demuxer_t *demuxer,float rel_seek_secs,float audio_de
if(flags & SEEK_FACTOR)
pos += (demuxer->movi_end - demuxer->movi_start) * rel_seek_secs;
else {
if (ogg_d->final_granulepos > 0) {
pos += rel_seek_secs * (demuxer->movi_end - demuxer->movi_start) / (ogg_d->final_granulepos / rate);
if (ogg_d->duration > 0) {
pos += rel_seek_secs * (demuxer->movi_end - demuxer->movi_start) / (ogg_d->duration / rate);
} else if (os->lastpos > 0) {
pos += rel_seek_secs * ogg_d->pos / (os->lastpos / rate);
}
@ -1548,13 +1563,13 @@ static int demux_ogg_control(demuxer_t *demuxer,int cmd, void *arg){
switch(cmd) {
case DEMUXER_CTRL_GET_TIME_LENGTH:
if (ogg_d->final_granulepos<=0) return DEMUXER_CTRL_DONTKNOW;
*(double *)arg=(double)ogg_d->final_granulepos / rate;
if (ogg_d->duration<=0) return DEMUXER_CTRL_DONTKNOW;
*(double *)arg=(double)(ogg_d->duration) / rate;
return DEMUXER_CTRL_GUESS;
case DEMUXER_CTRL_GET_PERCENT_POS:
if (ogg_d->final_granulepos<=0) return DEMUXER_CTRL_DONTKNOW;
*(int *)arg=(os->lastpos*100) / ogg_d->final_granulepos;
if (ogg_d->duration<=0) return DEMUXER_CTRL_DONTKNOW;
*(int *)arg=((os->lastpos - ogg_d->initial_granulepos)*100) / ogg_d->duration;
return DEMUXER_CTRL_OK;
default:

View File

@ -41,6 +41,7 @@
#include "mf.h"
#include "libaf/af_format.h"
#include "libmpcodecs/dec_teletext.h"
#include "ass_mp.h"
@ -186,27 +187,11 @@ void free_demuxer_stream(demux_stream_t *ds)
demux_stream_t *new_demuxer_stream(struct demuxer *demuxer, int id)
{
demux_stream_t *ds = malloc(sizeof(demux_stream_t));
ds->buffer_pos = ds->buffer_size = 0;
ds->buffer = NULL;
ds->pts = 0;
ds->pts_bytes = 0;
ds->eof = 0;
ds->pos = 0;
ds->dpos = 0;
ds->pack_no = 0;
ds->packs = 0;
ds->bytes = 0;
ds->first = ds->last = ds->current = NULL;
ds->id = id;
ds->demuxer = demuxer;
ds->asf_seq = -1;
ds->asf_packet = NULL;
ds->ss_mul = ds->ss_div = 0;
ds->sh = NULL;
*ds = (demux_stream_t){
.id = id,
.demuxer = demuxer,
.asf_seq = -1,
};
return ds;
}
@ -405,6 +390,8 @@ void free_demuxer(demuxer_t *demuxer)
}
free(demuxer->attachments);
}
if (demuxer->teletext)
teletext_control(demuxer->teletext, TV_VBI_CONTROL_STOP, NULL);
talloc_free(demuxer);
}

View File

@ -144,6 +144,8 @@ typedef struct demux_stream {
off_t dpos; // position in the demuxed stream
int pack_no; // serial number of packet
int flags; // flags of current packet (keyframe etc)
int non_interleaved; // 1 if this stream is not properly interleaved,
// so e.g. subtitle handling must do explicit reads.
//---------------
int packs; // number of packets in buffer
int bytes; // total bytes of packets in buffer
@ -255,6 +257,9 @@ typedef struct demuxer {
struct sh_video *v_streams[MAX_V_STREAMS];
struct sh_sub *s_streams[MAX_S_STREAMS];
// pointer to teletext decoder private data, if demuxer stream contains teletext
void *teletext;
demux_chapter_t* chapters;
int num_chapters;

View File

@ -103,6 +103,7 @@ static const struct mp_AVCodecTag mp_bmp_tags[] = {
{ CODEC_ID_RV20, MKTAG('R', 'V', '2', '0')},
{ CODEC_ID_RV30, MKTAG('R', 'V', '3', '0')},
{ CODEC_ID_RV40, MKTAG('R', 'V', '4', '0')},
{ CODEC_ID_TGV, MKTAG('f', 'V', 'G', 'T')},
{ CODEC_ID_THP, MKTAG('T', 'H', 'P', 'V')},
{ CODEC_ID_TIERTEXSEQVIDEO, MKTAG('T', 'S', 'E', 'Q')},
{ CODEC_ID_TXD, MKTAG('T', 'X', 'D', 'V')},

View File

@ -18,6 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@ -27,8 +28,11 @@
#define DEF_ZOOM 1
extern float monitor_aspect;
int vo_dheight;
int vo_dwidth;
int vo_fs;
float vo_panscan;
int64_t WinID = -1;
int main(int argc, char *argv[]) {
int w,h,z=DEF_ZOOM;

View File

@ -25,6 +25,57 @@
#include "osdep/keycodes.h"
#include "input/input.h"
/*
* Define keycodes only found in OSX >= 10.5 for older versions
*/
#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
#define kVK_ANSI_Keypad0 0x52
#define kVK_ANSI_Keypad1 0x53
#define kVK_ANSI_Keypad2 0x54
#define kVK_ANSI_Keypad3 0x55
#define kVK_ANSI_Keypad4 0x56
#define kVK_ANSI_Keypad5 0x57
#define kVK_ANSI_Keypad6 0x58
#define kVK_ANSI_Keypad7 0x59
#define kVK_ANSI_Keypad8 0x5b
#define kVK_ANSI_Keypad9 0x5c
#define kVK_ANSI_KeypadDecimal 0x41
#define kVK_ANSI_KeypadDivide 0x4b
#define kVK_ANSI_KeypadEnter 0x4c
#define kVK_ANSI_KeypadMinus 0x4e
#define kVK_ANSI_KeypadMultiply 0x43
#define kVK_ANSI_KeypadPlus 0x45
#define kVK_Control 0x3b
#define kVK_Delete 0x33
#define kVK_DownArrow 0x7d
#define kVK_End 0x77
#define kVK_Escape 0x35
#define kVK_F1 0x7a
#define kVK_F10 0x6d
#define kVK_F11 0x67
#define kVK_F12 0x6f
#define kVK_F2 0x78
#define kVK_F3 0x63
#define kVK_F4 0x76
#define kVK_F5 0x60
#define kVK_F6 0x61
#define kVK_F7 0x62
#define kVK_F8 0x64
#define kVK_F9 0x65
#define kVK_ForwardDelete 0x75
#define kVK_Help 0x72
#define kVK_Home 0x73
#define kVK_LeftArrow 0x7b
#define kVK_Option 0x3a
#define kVK_PageDown 0x79
#define kVK_PageUp 0x74
#define kVK_Return 0x24
#define kVK_RightArrow 0x7c
#define kVK_Shift 0x38
#define kVK_Tab 0x30
#define kVK_UpArrow 0x7e
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 */
static const struct keymap keymap[] = {
// special keys
{0x34, KEY_ENTER}, // Enter key on some iBooks?

View File

@ -29,7 +29,7 @@
#include "stream/stream_dvdnav.h"
#define OSD_NAV_BOX_ALPHA 0x7f
#include "stream/tv.h"
#include "libmpcodecs/dec_teletext.h"
#include "osdep/timer.h"
#include "talloc.h"
@ -85,13 +85,11 @@ char * const sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "",
//static int vo_font_loaded=-1;
font_desc_t* vo_font=NULL;
#ifdef CONFIG_TV_TELETEXT
void* vo_osd_teletext_page=NULL;
int vo_osd_teletext_half = 0;
int vo_osd_teletext_mode=0;
int vo_osd_teletext_format=0;
int vo_osd_teletext_scale=0;
#endif
int sub_unicode=0;
int sub_utf8=0;
int sub_pos=100;
@ -277,7 +275,6 @@ inline static void vo_update_nav (mp_osd_obj_t *obj, int dxs, int dys, int left_
}
#endif
#ifdef CONFIG_TV_TELETEXT
// renders char to a big per-object buffer where alpha and bitmap are separated
static void tt_draw_alpha_buf(mp_osd_obj_t* obj, int x0,int y0, int w,int h, unsigned char* src, int stride,int fg,int bg,int alpha)
{
@ -318,7 +315,7 @@ inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
int b,ax[6],ay[6],aw[6],ah[6];
tt_char tc;
tt_char* tdp=vo_osd_teletext_page;
unsigned char colors[8]={1,85,150,226,70,105,179,254};
static const uint8_t colors[8]={1,85,150,226,70,105,179,254};
unsigned char* buf[9];
obj->flags|=OSDFLAG_CHANGED|OSDFLAG_VISIBLE;
@ -357,6 +354,7 @@ inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
hm=vo_font->height+1;
wm=dxs*hm*max_rows/(dys*VBI_COLUMNS);
#ifdef CONFIG_FREETYPE
//very simple teletext font auto scaling
if(!vo_osd_teletext_scale && hm*(max_rows+1)>dys){
osd_font_scale_factor*=1.0*(dys)/((max_rows+1)*hm);
@ -365,6 +363,7 @@ inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
obj->flags&=~OSDFLAG_VISIBLE;
return;
}
#endif
cols=dxs/wm;
rows=dys/hm;
@ -519,7 +518,6 @@ TODO: support for separated graphics symbols (where six rectangles does not touc
for(i=0;i<9;i++)
free(buf[i]);
}
#endif
int vo_osd_progbar_type=-1;
int vo_osd_progbar_value=100; // 0..256
@ -1162,11 +1160,9 @@ int osd_update_ext(struct osd_state *osd, int dxs, int dys, int left_border,
case OSDTYPE_SUBTITLE:
vo_update_text_sub(osd, obj,dxs,dys);
break;
#ifdef CONFIG_TV_TELETEXT
case OSDTYPE_TELETEXT:
vo_update_text_teletext(obj,dxs,dys);
break;
#endif
case OSDTYPE_PROGBAR:
vo_update_text_progbar(obj,dxs,dys);
break;
@ -1242,9 +1238,7 @@ struct osd_state *osd_create(void)
#ifdef CONFIG_DVDNAV
new_osd_obj(OSDTYPE_DVDNAV);
#endif
#ifdef CONFIG_TV_TELETEXT
new_osd_obj(OSDTYPE_TELETEXT);
#endif
#ifdef CONFIG_FREETYPE
force_load_font = 1;
#endif
@ -1295,9 +1289,7 @@ void osd_draw_text_ext(struct osd_state *osd, int dxs, int dys,
#ifdef CONFIG_DVDNAV
case OSDTYPE_DVDNAV:
#endif
#ifdef CONFIG_TV_TELETEXT
case OSDTYPE_TELETEXT:
#endif
case OSDTYPE_OSD:
case OSDTYPE_SUBTITLE:
case OSDTYPE_PROGBAR:

View File

@ -70,6 +70,11 @@ int vo_directrendering=0;
int vo_colorkey = 0x0000ff00; // default colorkey is green
// (0xff000000 means that colorkey has been disabled)
// name to be used instead of the vo's default
char *vo_winname;
// title to be applied to movie window
char *vo_wintitle;
//
// Externally visible list of all vo drivers
//

View File

@ -316,6 +316,9 @@ extern char *vo_subdevice;
extern int vo_colorkey;
extern char *vo_winname;
extern char *vo_wintitle;
extern int64_t WinID;
typedef struct {

View File

@ -713,7 +713,7 @@ void vo_x11_classhint(struct vo *vo, Window window, char *name)
XClassHint wmClass;
pid_t pid = getpid();
wmClass.res_name = name;
wmClass.res_name = vo_winname ? vo_winname : name;
wmClass.res_class = "MPlayer";
XSetClassHint(x11->display, window, &wmClass);
XChangeProperty(x11->display, window, x11->XA_NET_WM_PID, XA_CARDINAL,
@ -1210,7 +1210,6 @@ static int vo_x11_get_fs_type(int supported)
if (vo_fstype_list)
{
i = 0;
for (i = 0; vo_fstype_list[i]; i++)
{
int neg = 0;
@ -1268,7 +1267,7 @@ static int vo_x11_get_fs_type(int supported)
else
type |= vo_wm_NETWM;
} else if (!strcmp(arg, "none"))
return 0;
type = 0; // clear; keep parsing
}
}
@ -1293,6 +1292,9 @@ int vo_x11_update_geometry(struct vo *vo)
}
XTranslateCoordinates(x11->display, x11->window, x11->rootwin, 0, 0,
&vo->dx, &vo->dy, &dummy_win);
if (vo_wintitle)
XStoreName(x11->display, x11->window, vo_wintitle);
return depth <= INT_MAX ? depth : 0;
}
@ -1301,6 +1303,10 @@ void vo_x11_fullscreen(struct vo *vo)
struct MPOpts *opts = vo->opts;
struct vo_x11_state *x11 = vo->x11;
int x, y, w, h;
x = x11->vo_old_x;
y = x11->vo_old_y;
w = x11->vo_old_width;
h = x11->vo_old_height;
if (WinID >= 0) {
vo_fs = !vo_fs;
@ -1311,15 +1317,6 @@ void vo_x11_fullscreen(struct vo *vo)
if (vo_fs)
{
// fs->win
if ( ! (x11->fs_type & vo_wm_FULLSCREEN) ) // not needed with EWMH fs
{
x = x11->vo_old_x;
y = x11->vo_old_y;
w = x11->vo_old_width;
h = x11->vo_old_height;
}
vo_x11_ewmh_fullscreen(x11, _NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH
vo_fs = VO_FALSE;
} else

View File

@ -4836,6 +4836,16 @@ static int exp_1Lockit_dummy(void)
return 0;
}
static void * WINAPI expEncodePointer(void *p)
{
return p;
}
static void * WINAPI expDecodePointer(void *p)
{
return p;
}
struct exports
{
char name[64];
@ -5011,6 +5021,8 @@ struct exports exp_kernel32[]=
{"LoadLibraryExA", -1, (void*)&LoadLibraryExA},
FF(SetThreadIdealProcessor,-1)
FF(SetProcessAffinityMask, -1)
FF(EncodePointer, -1)
FF(DecodePointer, -1)
UNDEFF(FlsAlloc, -1)
UNDEFF(FlsGetValue, -1)
UNDEFF(FlsSetValue, -1)

View File

@ -31,9 +31,6 @@
#define attribute_used
#endif
#if ( defined(__PIC__) || defined(__pic__) ) && ! defined(PIC)
# define PIC
#endif
#if ARCH_X86_64 && defined(PIC)
#define MANGLE(a) EXTERN_PREFIX #a "(%%rip)"
#else

View File

@ -559,6 +559,14 @@ if(stream->type==STREAMTYPE_DVDNAV){
mencoder_exit(1,NULL);
}
if (ts_prog) {
demux_program_t prog = { .progid = ts_prog };
if (demux_control(demuxer, DEMUXER_CTRL_IDENTIFY_PROGRAM, &prog) != DEMUXER_CTRL_NOTIMPL) {
opts.audio_id = prog.aid; // switching is handled by select_audio below
opts.video_id = prog.vid;
demuxer_switch_video(demuxer, opts.video_id);
}
}
select_audio(demuxer, opts.audio_id, audio_lang);
if (opts.sub_id < -1 && dvdsub_lang)

View File

@ -75,7 +75,7 @@ int mp3_read(char *buf,int size);
//void mp3_seek(int pos){
// fseek(mp3_file,pos,SEEK_SET);
// return (MP3_fpos=ftell(mp3_file));
// return MP3_fpos = ftell(mp3_file);
//}
/* Frame reader */
@ -164,7 +164,7 @@ LOCAL unsigned int get1bit(void)
bitindex++;
wordpointer += (bitindex>>3);
bitindex &= 7;
return ((rval>>7)&1);
return (rval >> 7) & 1;
}
LOCAL void set_pointer(int backstep)
@ -533,8 +533,8 @@ int MP3_Open(char *filename,int buffsize){
int MP3_DecodeFrame(unsigned char *hova,short single){
pcm_sample = hova;
pcm_point = 0;
if(!read_frame(&fr))return(0);
if(single==-2){ set_pointer(512); return(1); }
if(!read_frame(&fr)) return 0;
if(single==-2){ set_pointer(512); return 1; }
if(fr.error_protection) getbits(16); /* skip crc */
fr.single=single;
switch(fr.lay){
@ -545,7 +545,7 @@ int MP3_DecodeFrame(unsigned char *hova,short single){
return 0; // unsupported
}
// ++MP3_frames;
return(pcm_point?pcm_point:2);
return pcm_point ? pcm_point : 2;
}
// Prints last frame header in ascii.

View File

@ -17,7 +17,7 @@ static inline unsigned int GetTimer(void){
// 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 FILE* mp3file=NULL;

View File

@ -108,6 +108,8 @@ extern int verbose;
#define MSGT_STATUSLINE 45 // playback/encoding status line
#define MSGT_TELETEXT 46 // Teletext decoder
#define MSGT_MAX 64
void mp_msg_init(void);

View File

@ -13,7 +13,7 @@
#include "spudec.h"
#include "version.h"
#include "vobsub.h"
#include "stream/tv.h"
#include "libmpcodecs/dec_teletext.h"
#include "ffmpeg_files/intreadwrite.h"
#include "m_option.h"
@ -144,9 +144,17 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
if (spudec_changed(vo_spudec))
vo_osd_changed(OSDTYPE_SPU);
} else if (opts->sub_id >= 0
&& (type == 't' || type == 'm' || type == 'a')) {
&& (type == 't' || type == 'm' || type == 'a' || type == 'd')) {
double curpts = refpts + sub_delay;
double endpts;
if (type == 'd' && !d_dvdsub->demuxer->teletext) {
tt_stream_props tsp = {0};
void *ptr = &tsp;
if (teletext_control(NULL, TV_VBI_CONTROL_START, &ptr) == VBI_CONTROL_TRUE)
d_dvdsub->demuxer->teletext = ptr;
}
if (d_dvdsub->non_interleaved)
ds_get_next_pts(d_dvdsub);
while (d_dvdsub->first) {
double subpts = ds_get_next_pts(d_dvdsub) + sub_offset;
if (subpts > curpts)
@ -158,6 +166,22 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
len = FFMIN(len - 2, AV_RB16(packet));
packet += 2;
}
if (type == 'd') {
if (d_dvdsub->demuxer->teletext) {
uint8_t *p = packet;
p++;
len--;
while (len >= 46) {
int sublen = p[1];
if (p[0] == 2 || p[0] == 3)
teletext_control(d_dvdsub->demuxer->teletext,
TV_VBI_CONTROL_DECODE_DVB, p + 2);
p += sublen + 2;
len -= sublen + 2;
}
}
continue;
}
#ifdef CONFIG_ASS
if (ass_enabled) {
sh_sub_t* sh = d_dvdsub->sh;
@ -197,6 +221,8 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
sub_add_text(&subs, packet, len, endpts);
set_osd_subtitle(mpctx, &subs);
}
if (d_dvdsub->non_interleaved)
ds_get_next_pts(d_dvdsub);
}
if (sub_clear_text(&subs, curpts))
set_osd_subtitle(mpctx, &subs);
@ -206,31 +232,29 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset)
{
#ifdef CONFIG_TV_TELETEXT
tvi_handle_t* tvh=demuxer->priv;
int page_changed;
if (demuxer->type != DEMUXER_TYPE_TV || !tvh) return;
if (!demuxer->teletext)
return;
//Also forcing page update when such ioctl is not supported or call error occured
if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_IS_CHANGED,&page_changed)!=TVI_CONTROL_TRUE)
if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_IS_CHANGED,&page_changed)!=VBI_CONTROL_TRUE)
page_changed=1;
if(!page_changed)
return;
if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_VBIPAGE,&vo_osd_teletext_page)!=TVI_CONTROL_TRUE)
if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_VBIPAGE,&vo_osd_teletext_page)!=VBI_CONTROL_TRUE)
vo_osd_teletext_page=NULL;
if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_HALF_PAGE,&vo_osd_teletext_half)!=TVI_CONTROL_TRUE)
if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_HALF_PAGE,&vo_osd_teletext_half)!=VBI_CONTROL_TRUE)
vo_osd_teletext_half=0;
if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_MODE,&vo_osd_teletext_mode)!=TVI_CONTROL_TRUE)
if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_MODE,&vo_osd_teletext_mode)!=VBI_CONTROL_TRUE)
vo_osd_teletext_mode=0;
if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_FORMAT,&vo_osd_teletext_format)!=TVI_CONTROL_TRUE)
if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_FORMAT,&vo_osd_teletext_format)!=VBI_CONTROL_TRUE)
vo_osd_teletext_format=0;
vo_osd_changed(OSDTYPE_TELETEXT);
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_MARK_UNCHANGED,NULL);
#endif
teletext_control(demuxer->teletext,TV_VBI_CONTROL_MARK_UNCHANGED,NULL);
}
int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang)

189
mplayer.c
View File

@ -253,6 +253,10 @@ extern char *demuxer_name; // override demuxer
extern char *audio_demuxer_name; // override audio demuxer
extern char *sub_demuxer_name; // override sub demuxer
// this dvdsub_id was selected via slang
// use this to allow dvdnav to follow -slang across stream resets,
// in particular the subtitle ID for a language changes
int dvdsub_lang_id;
int vobsub_id=-1;
char* audio_lang=NULL;
char* dvdsub_lang=NULL;
@ -335,6 +339,7 @@ edl_record_ptr edl_records = NULL; ///< EDL entries memory area
edl_record_ptr next_edl_record = NULL; ///< only for traversing edl_records
FILE* edl_fd = NULL; ///< fd to write to when in -edlout mode.
int use_filedir_conf;
int use_filename_title;
#include "mpcommon.h"
#include "command.h"
@ -562,7 +567,7 @@ static void mp_dvdnav_context_free(MPContext *ctx){
#endif
void uninit_player(struct MPContext *mpctx, unsigned int mask){
mask=mpctx->initialized_flags&mask;
mask &= mpctx->initialized_flags;
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"\n*** uninit(0x%X)\n",mask);
@ -656,7 +661,8 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){
mpctx->initialized_flags&=~INITIALIZED_AO;
current_module="uninit_ao";
if (mpctx->edl_muted) mixer_mute(&mpctx->mixer);
mpctx->audio_out->uninit(mpctx->stop_play != AT_END_OF_FILE);
if (mpctx->audio_out)
mpctx->audio_out->uninit(mpctx->stop_play != AT_END_OF_FILE);
mpctx->audio_out=NULL;
}
@ -1614,72 +1620,69 @@ static void update_osd_msg(struct MPContext *mpctx)
void reinit_audio_chain(struct MPContext *mpctx)
{
struct MPOpts *opts = &mpctx->opts;
if(mpctx->sh_audio){
current_module="init_audio_codec";
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){
mpctx->sh_audio=mpctx->d_audio->sh=NULL; // failed to init :(
mpctx->d_audio->id = -2;
return;
} else
if (!mpctx->sh_audio)
return;
current_module="init_audio_codec";
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){
goto init_error;
}
mpctx->initialized_flags|=INITIALIZED_ACODEC;
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
//const ao_info_t *info=audio_out->info;
current_module="af_preinit";
ao_data.samplerate=force_srate;
ao_data.channels=0;
ao_data.format=audio_output_format;
current_module="af_preinit";
ao_data.samplerate=force_srate;
ao_data.channels=0;
ao_data.format=audio_output_format;
#if 1
// first init to detect best values
if(!init_audio_filters(mpctx->sh_audio, // preliminary init
// input:
mpctx->sh_audio->samplerate,
// output:
&ao_data.samplerate, &ao_data.channels, &ao_data.format)){
mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Error at audio filter chain pre-init!\n");
exit_player(mpctx, EXIT_ERROR);
}
// first init to detect best values
if(!init_audio_filters(mpctx->sh_audio, // preliminary init
// input:
mpctx->sh_audio->samplerate,
// output:
&ao_data.samplerate, &ao_data.channels, &ao_data.format)){
mp_tmsg(MSGT_CPLAYER,MSGL_ERR, "Error at audio filter chain "
"pre-init!\n");
exit_player(mpctx, EXIT_ERROR);
}
#endif
current_module="ao2_init";
if(!(mpctx->audio_out=init_best_audio_out(opts->audio_driver_list,
0, // plugin flag
ao_data.samplerate,
ao_data.channels,
ao_data.format,0))){
// FAILED:
mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Could not open/initialize audio device -> no sound.\n");
uninit_player(mpctx, INITIALIZED_ACODEC); // close codec
mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound
mpctx->d_audio->id = -2;
return;
} else {
// SUCCESS:
current_module="ao2_init";
mpctx->audio_out = init_best_audio_out(opts->audio_driver_list,
0, // plugin flag
ao_data.samplerate,
ao_data.channels,
ao_data.format, 0);
if(!mpctx->audio_out){
mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Could not open/initialize audio device -> no sound.\n");
goto init_error;
}
mpctx->initialized_flags|=INITIALIZED_AO;
mp_msg(MSGT_CPLAYER,MSGL_INFO,"AO: [%s] %dHz %dch %s (%d bytes per sample)\n",
mpctx->audio_out->info->short_name,
ao_data.samplerate, ao_data.channels,
af_fmt2str_short(ao_data.format),
af_fmt2bits(ao_data.format)/8 );
mpctx->audio_out->info->short_name,
ao_data.samplerate, ao_data.channels,
af_fmt2str_short(ao_data.format),
af_fmt2bits(ao_data.format)/8 );
mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Description: %s\nAO: Author: %s\n",
mpctx->audio_out->info->name, mpctx->audio_out->info->author);
mpctx->audio_out->info->name, mpctx->audio_out->info->author);
if(strlen(mpctx->audio_out->info->comment) > 0)
mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", mpctx->audio_out->info->comment);
mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", mpctx->audio_out->info->comment);
// init audio filters:
#if 1
current_module="af_init";
if(!build_afilter_chain(mpctx, mpctx->sh_audio, &ao_data)) {
mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter/ao format!\n");
// mp_msg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter / ao format! -> NOSOUND\n");
// uninit_player(mpctx, INITIALIZED_ACODEC|INITIALIZED_AO); // close codec & ao
// sh_audio=mpctx->d_audio->sh=NULL; // -> nosound
mp_tmsg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter/ao format!\n");
goto init_error;
}
#endif
}
mpctx->mixer.audio_out = mpctx->audio_out;
mpctx->mixer.volstep = volstep;
}
mpctx->mixer.audio_out = mpctx->audio_out;
mpctx->mixer.volstep = volstep;
return;
init_error:
uninit_player(mpctx, INITIALIZED_ACODEC|INITIALIZED_AO); // close codec and possibly AO
mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound
mpctx->d_audio->id = -2;
}
@ -1808,6 +1811,35 @@ static float timing_sleep(struct MPContext *mpctx, float time_frame)
return time_frame;
}
static void select_subtitle(MPContext *mpctx)
{
struct MPOpts *opts = &mpctx->opts;
// find the best sub to use
int vobsub_index_id = vobsub_get_index_by_id(vo_vobsub, vobsub_id);
mpctx->global_sub_pos = -1; // no subs by default
if (vobsub_index_id >= 0) {
// if user asks for a vobsub id, use that first.
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_VOBSUB] + vobsub_index_id;
} else if (opts->sub_id >= 0 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) {
// if user asks for a dvd sub id, use that next.
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + opts->sub_id;
} else if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] >= 0) {
// if there are text subs to use, use those. (autosubs come last here)
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_SUBS];
} else if (opts->sub_id == -1 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) {
// finally select subs by language and container hints
if (opts->sub_id == -1 && dvdsub_lang)
opts->sub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang);
if (opts->sub_id == -1)
opts->sub_id = demuxer_default_sub_track(mpctx->demuxer);
if (opts->sub_id >= 0)
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + opts->sub_id;
}
// rather than duplicate code, use the SUB_SELECT handler to init the right one.
mpctx->global_sub_pos--;
mp_property_do("sub",M_PROPERTY_STEP_UP,NULL, mpctx);
}
#ifdef CONFIG_DVDNAV
#ifndef FF_B_TYPE
#define FF_B_TYPE 3
@ -1864,9 +1896,14 @@ static void mp_dvdnav_reset_stream (MPContext *ctx) {
resync_audio_stream(ctx->sh_audio);
}
if (ctx->d_sub) opts->sub_id = -2;
audio_delay = 0.0f;
if (dvdsub_lang && dvdsub_id == dvdsub_lang_id) {
dvdsub_lang_id = mp_dvdnav_sid_from_lang(ctx->stream, dvdsub_lang);
if (dvdsub_lang_id != dvdsub_id) {
dvdsub_id = dvdsub_lang_id;
select_subtitle(ctx);
}
}
/// clear all EOF related flags
ctx->d_video->eof = ctx->d_audio->eof = ctx->stream->eof = 0;
@ -2443,8 +2480,8 @@ static void pause_loop(struct MPContext *mpctx)
if (mpctx->sh_video && mpctx->video_out)
vo_check_events(mpctx->video_out);
#ifdef CONFIG_MENU
if (vf_menu)
vf_menu_pause_update(vf_menu);
if (vf_menu)
vf_menu_pause_update(vf_menu);
#endif
usec_sleep(20000);
update_osd_msg(mpctx);
@ -3290,9 +3327,12 @@ while (player_idle_mode && !mpctx->filename) {
}
//---------------------------------------------------------------------------
if(mpctx->filename)
if (mpctx->filename) {
mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"\nPlaying %s.\n",
filename_recode(mpctx->filename));
if(use_filename_title && vo_wintitle == NULL)
vo_wintitle = strdup(mp_basename2(mpctx->filename));
}
if (edl_filename) {
if (edl_records) free_edl(edl_records);
@ -3454,7 +3494,9 @@ if(mpctx->stream->type==STREAMTYPE_DVD){
if(mpctx->stream->type==STREAMTYPE_DVDNAV){
current_module="dvdnav lang->id";
if(opts->audio_id==-1) opts->audio_id=mp_dvdnav_aid_from_lang(mpctx->stream,audio_lang);
if(dvdsub_lang && opts->sub_id==-1) opts->sub_id=mp_dvdnav_sid_from_lang(mpctx->stream,dvdsub_lang);
dvdsub_lang_id = -3;
if(dvdsub_lang && opts->sub_id==-1)
dvdsub_lang_id = opts->sub_id = mp_dvdnav_sid_from_lang(mpctx->stream,dvdsub_lang);
// setup global sub numbering
mpctx->global_sub_indices[SUB_SOURCE_DEMUX] = mpctx->global_sub_size; // the global # of the first demux-specific sub.
mpctx->global_sub_size += mp_dvdnav_number_of_subs(mpctx->stream);
@ -3597,6 +3639,10 @@ mpctx->d_audio=mpctx->demuxer->audio;
mpctx->d_video=mpctx->demuxer->video;
mpctx->d_sub=mpctx->demuxer->sub;
if (ts_prog) {
int tmp = ts_prog;
mp_property_do("switch_program", M_PROPERTY_SET, &tmp, mpctx);
}
// select audio stream
select_audio(mpctx->demuxer, opts->audio_id, audio_lang);
@ -3730,30 +3776,7 @@ if(vo_spudec==NULL && mpctx->sh_video &&
if (mpctx->global_sub_size) {
// find the best sub to use
int vobsub_index_id = vobsub_get_index_by_id(vo_vobsub, vobsub_id);
mpctx->global_sub_pos = -1; // no subs by default
if (vobsub_index_id >= 0) {
// if user asks for a vobsub id, use that first.
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_VOBSUB] + vobsub_index_id;
} else if (opts->sub_id >= 0 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) {
// if user asks for a dvd sub id, use that next.
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + opts->sub_id;
} else if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] >= 0) {
// if there are text subs to use, use those. (autosubs come last here)
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_SUBS];
} else if (opts->sub_id == -1 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) {
// finally select subs by language and container hints
if (opts->sub_id == -1 && dvdsub_lang)
opts->sub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang);
if (opts->sub_id == -1)
opts->sub_id = demuxer_default_sub_track(mpctx->demuxer);
if (opts->sub_id >= 0)
mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + opts->sub_id;
}
// rather than duplicate code, use the SUB_SELECT handler to init the right one.
mpctx->global_sub_pos--;
mp_property_do("sub",M_PROPERTY_STEP_UP,NULL, mpctx);
select_subtitle(mpctx);
if(subdata)
switch (stream_dump_type) {
case 3: list_sub_file(subdata); break;

View File

@ -72,7 +72,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
{
int i,j,start_title=-1,end_title=-1;
char *opt,*splitpos=NULL;
char entbuf[10];
char entbuf[15];
int no_more_opts = 0;
int opt_exit = 0; // flag indicating whether mplayer should exit without playing anything
play_tree_t *last_parent, *last_entry = NULL, *root;
@ -217,15 +217,17 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
}
else /* filename */
{
int is_dvdnav = strstr(argv[i],"dvdnav://") != NULL;
play_tree_t* entry = play_tree_new();
mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Adding file %s\n",argv[i]);
// if required expand DVD filename entries like dvd://1-3 into component titles
if ( strstr(argv[i],"dvd://") != NULL )
if ( strstr(argv[i],"dvd://") != NULL || is_dvdnav)
{
splitpos=strstr(argv[i]+6,"-");
int offset = is_dvdnav ? 9 : 6;
splitpos=strstr(argv[i]+offset,"-");
if(splitpos != NULL)
{
start_title=strtol(argv[i]+6,NULL,10);
start_title=strtol(argv[i]+offset,NULL,10);
if (start_title<0) { //entries like dvd://-2 start title implied 1
end_title=abs(start_title);
start_title=1;
@ -239,7 +241,7 @@ m_config_parse_mp_command_line(m_config_t *config, int argc, char **argv)
{
if (j!=start_title)
entry=play_tree_new();
snprintf(entbuf,9,"dvd://%d",j);
snprintf(entbuf,sizeof(entbuf),is_dvdnav ? "dvdnav://%d" : "dvd://%d",j);
play_tree_add_file(entry,entbuf);
add_entry(&last_parent,&last_entry,entry);
last_entry = entry;

View File

@ -320,25 +320,15 @@ play_tree_remove_file(play_tree_t* pt,char* file) {
void
play_tree_set_param(play_tree_t* pt, char* name, char* val) {
int n = 0,ni = -1;
int n = 0;
#ifdef MP_DEBUG
assert(pt != NULL);
assert(name != NULL);
#endif
if(pt->params) {
for( ; pt->params[n].name != NULL ; n++) {
if(strcasecmp(pt->params[n].name,name) == 0)
ni = n;
}
}
if(ni > 0) {
if(pt->params[n].value != NULL) free(pt->params[n].value);
pt->params[n].value = val != NULL ? strdup(val) : NULL;
return;
}
if(pt->params)
for ( ; pt->params[n].name != NULL ; n++ ) { }
pt->params = (play_tree_param_t*)realloc(pt->params,(n+2)*sizeof(play_tree_param_t));
if(pt->params == NULL) {

View File

@ -230,7 +230,7 @@ int dvb_demux_stop(int fd)
mp_msg(MSGT_DEMUX, MSGL_DBG2, "STOPPING FD: %d, RESULT: %d\n", fd, i);
return (i==0);
return i == 0;
}
@ -241,7 +241,7 @@ int dvb_demux_start(int fd)
mp_msg(MSGT_DEMUX, MSGL_DBG2, "STARTING FD: %d, RESULT: %d\n", fd, i);
return (i==0);
return i == 0;
}
@ -265,7 +265,7 @@ int dvb_tune(dvb_priv_t *priv, int freq, char pol, int srate, int diseqc, int to
if(ris != 0)
mp_msg(MSGT_DEMUX, MSGL_INFO, "dvb_tune, TUNING FAILED\n");
return (ris == 0);
return ris == 0;
}
@ -740,5 +740,5 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int
return -1;
}
return(check_status(fd_frontend, timeout));
return check_status(fd_frontend, timeout);
}

View File

@ -245,13 +245,11 @@ int stream_fill_buffer(stream_t *s){
case STREAMTYPE_STREAM:
#ifdef CONFIG_NETWORK
if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) {
len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);break;
} else {
len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;
}
#else
len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;
len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);
} else
#endif
len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);
break;
case STREAMTYPE_DS:
len = demux_read_data((demux_stream_t*)s->priv,s->buffer,STREAM_BUFFER_SIZE);
break;

View File

@ -323,8 +323,9 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
ptr->mod = VSB_8;
else if(! strcmp(mod, "VSB_16") || !strcmp(mod, "16VSB"))
ptr->mod = VSB_16;
else if(! strcmp(mod, "QAM_AUTO"))
ptr->mod = QAM_AUTO;
ptr->inv = INVERSION_AUTO;
#endif
}
@ -342,7 +343,8 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
ptr->trans = TRANSMISSION_MODE_2K;
else if(! strcmp(transm, "TRANSMISSION_MODE_8K"))
ptr->trans = TRANSMISSION_MODE_8K;
else if(! strcmp(transm, "TRANSMISSION_MODE_AUTO"))
ptr->trans = TRANSMISSION_MODE_AUTO;
if(! strcmp(gi, "GUARD_INTERVAL_1_32"))
ptr->gi = GUARD_INTERVAL_1_32;
@ -350,7 +352,9 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
ptr->gi = GUARD_INTERVAL_1_16;
else if(! strcmp(gi, "GUARD_INTERVAL_1_8"))
ptr->gi = GUARD_INTERVAL_1_8;
else ptr->gi = GUARD_INTERVAL_1_4;
else if(! strcmp(gi, "GUARD_INTERVAL_1_4"))
ptr->gi = GUARD_INTERVAL_1_4;
else ptr->gi = GUARD_INTERVAL_AUTO;
if(! strcmp(tmp_lcr, "FEC_1_2"))
ptr->cr_lp =FEC_1_2;

View File

@ -5,25 +5,12 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#ifdef __FreeBSD__
#include <sys/cdrio.h>
#endif
#ifdef __linux__
#include <linux/cdrom.h>
#include <scsi/sg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#endif
#include <libgen.h>
#include <errno.h>
@ -39,84 +26,9 @@
#include "stream_dvd.h"
#include "stream_dvd_common.h"
#include "libmpdemux/demuxer.h"
#include "ffmpeg_files/intreadwrite.h"
extern char* dvd_device;
static char* dvd_device_current;
int dvd_angle=1;
int dvd_speed=0; /* 0 => don't touch speed */
static void dvd_set_speed(char *device, unsigned speed)
{
#if defined(__linux__) && defined(SG_IO) && defined(GPCMD_SET_STREAMING)
int fd;
unsigned char buffer[28];
unsigned char cmd[12];
struct sg_io_hdr sghdr;
struct stat st;
memset(&st, 0, sizeof(st));
if (stat(device, &st) == -1) return;
if (!S_ISBLK(st.st_mode)) return; /* not a block device */
switch (speed) {
case 0: /* don't touch speed setting */
return;
case -1: /* restore default value */
if (dvd_speed == 0) return; /* we haven't touched the speed setting */
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
break;
default: /* limit to <speed> KB/s */
// speed < 100 is multiple of DVD single speed (1350KB/s)
if (speed < 100)
speed *= 1350;
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
memset(&sghdr, 0, sizeof(sghdr));
sghdr.interface_id = 'S';
sghdr.timeout = 5000;
sghdr.dxfer_direction = SG_DXFER_TO_DEV;
sghdr.dxfer_len = sizeof(buffer);
sghdr.dxferp = buffer;
sghdr.cmd_len = sizeof(cmd);
sghdr.cmdp = cmd;
memset(cmd, 0, sizeof(cmd));
cmd[0] = GPCMD_SET_STREAMING;
cmd[10] = sizeof(buffer);
memset(buffer, 0, sizeof(buffer));
/* first sector 0, last sector 0xffffffff */
AV_WB32(buffer + 8, 0xffffffff);
if (speed == -1)
buffer[0] = 4; /* restore default */
else {
/* <speed> kilobyte */
AV_WB32(buffer + 12, speed);
AV_WB32(buffer + 20, speed);
}
/* 1 second */
AV_WB16(buffer + 18, 1000);
AV_WB16(buffer + 26, 1000);
fd = open(device, O_RDWR | O_NONBLOCK);
if (fd == -1) {
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;
}
if (ioctl(fd, SG_IO, &sghdr) < 0)
mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n");
else
mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n");
close(fd);
#endif
}
#define LIBDVDREAD_VERSION(maj,min,micro) ((maj)*10000 + (min)*100 + (micro))
/*
@ -133,9 +45,6 @@ static void dvd_set_speed(char *device, unsigned speed)
#endif
#endif
const char * const dvd_audio_stream_types[8] = { "ac3","unknown","mpeg1","mpeg2ext","lpcm","unknown","dts" };
const char * const dvd_audio_stream_channels[6] = { "mono", "stereo", "unknown", "unknown", "5.1/6.1", "5.1" };
static struct stream_priv_s {
int title;

View File

@ -1,7 +1,103 @@
#include "config.h"
#include <fcntl.h>
#include <inttypes.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <dvdread/ifo_types.h>
#ifdef __FreeBSD__
#include <sys/cdrio.h>
#endif
#ifdef __linux__
#include <linux/cdrom.h>
#include <scsi/sg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#endif
#include "mp_msg.h"
#include "help_mp.h"
#include "stream_dvd_common.h"
#include "ffmpeg_files/intreadwrite.h"
const char * const dvd_audio_stream_types[8] = { "ac3","unknown","mpeg1","mpeg2ext","lpcm","unknown","dts" };
const char * const dvd_audio_stream_channels[6] = { "mono", "stereo", "unknown", "unknown", "5.1/6.1", "5.1" };
int dvd_speed=0; /* 0 => don't touch speed */
void dvd_set_speed(char *device, unsigned speed)
{
#if defined(__linux__) && defined(SG_IO) && defined(GPCMD_SET_STREAMING)
int fd;
unsigned char buffer[28];
unsigned char cmd[12];
struct sg_io_hdr sghdr;
struct stat st;
memset(&st, 0, sizeof(st));
if (stat(device, &st) == -1) return;
if (!S_ISBLK(st.st_mode)) return; /* not a block device */
switch (speed) {
case 0: /* don't touch speed setting */
return;
case -1: /* restore default value */
if (dvd_speed == 0) return; /* we haven't touched the speed setting */
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Restoring DVD speed... ");
break;
default: /* limit to <speed> KB/s */
// speed < 100 is multiple of DVD single speed (1350KB/s)
if (speed < 100)
speed *= 1350;
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
memset(&sghdr, 0, sizeof(sghdr));
sghdr.interface_id = 'S';
sghdr.timeout = 5000;
sghdr.dxfer_direction = SG_DXFER_TO_DEV;
sghdr.dxfer_len = sizeof(buffer);
sghdr.dxferp = buffer;
sghdr.cmd_len = sizeof(cmd);
sghdr.cmdp = cmd;
memset(cmd, 0, sizeof(cmd));
cmd[0] = GPCMD_SET_STREAMING;
cmd[10] = sizeof(buffer);
memset(buffer, 0, sizeof(buffer));
/* first sector 0, last sector 0xffffffff */
AV_WB32(buffer + 8, 0xffffffff);
if (speed == -1)
buffer[0] = 4; /* restore default */
else {
/* <speed> kilobyte */
AV_WB32(buffer + 12, speed);
AV_WB32(buffer + 20, speed);
}
/* 1 second */
AV_WB16(buffer + 18, 1000);
AV_WB16(buffer + 26, 1000);
fd = open(device, O_RDWR | O_NONBLOCK);
if (fd == -1) {
mp_tmsg(MSGT_OPEN, MSGL_INFO, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;
}
if (ioctl(fd, SG_IO, &sghdr) < 0)
mp_tmsg(MSGT_OPEN, MSGL_INFO, "failed\n");
else
mp_tmsg(MSGT_OPEN, MSGL_INFO, "successful\n");
close(fd);
#endif
}
/**
\brief Converts DVD time structure to milliseconds.

View File

@ -5,6 +5,12 @@
#include <inttypes.h>
#include <dvdread/ifo_types.h>
extern char *dvd_device;
extern const char * const dvd_audio_stream_channels[6];
extern const char * const dvd_audio_stream_types[8];
extern int dvd_speed;
void dvd_set_speed(char *device, unsigned speed);
int mp_dvdtimetomsec(dvd_time_t *dt);
#endif /* MPLAYER_STREAM_DVD_COMMON_H */

View File

@ -47,10 +47,6 @@ typedef struct {
unsigned int state;
} dvdnav_priv_t;
extern char *dvd_device;
extern char *audio_lang, *dvdsub_lang;
extern char *dvd_audio_stream_channels[6], *dvd_audio_stream_types[8];
static struct stream_priv_s {
int track;
char* device;
@ -91,6 +87,8 @@ static dvdnav_priv_t * new_dvdnav_stream(char * filename) {
return NULL;
}
dvd_set_speed(priv->filename, dvd_speed);
if(dvdnav_open(&(priv->dvdnav),priv->filename)!=DVDNAV_STATUS_OK)
{
free(priv->filename);
@ -295,6 +293,7 @@ static void stream_dvdnav_close(stream_t *s) {
dvdnav_priv_t *priv = s->priv;
dvdnav_close(priv->dvdnav);
priv->dvdnav = NULL;
dvd_set_speed(priv->filename, -1);
free(priv);
}
@ -350,8 +349,10 @@ static int fill_buffer(stream_t *s, char *but, int len)
if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK) {
mp_msg(MSGT_CPLAYER,MSGL_V, "\r\nDVDNAV, NEW TITLE %d\r\n", tit);
dvdnav_get_highlight (priv, 0);
if(priv->title > 0 && tit != priv->title)
if(priv->title > 0 && tit != priv->title) {
priv->state |= NAV_FLAG_EOF;
return 0;
}
}
break;
}
@ -365,8 +366,10 @@ static int fill_buffer(stream_t *s, char *but, int len)
priv->state |= NAV_FLAG_WAIT_READ;
if(priv->title > 0 && dvd_last_chapter > 0) {
int tit=0, part=0;
if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK && part > dvd_last_chapter)
if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK && part > dvd_last_chapter) {
priv->state |= NAV_FLAG_EOF;
return 0;
}
}
dvdnav_get_highlight (priv, 1);
}
@ -517,9 +520,9 @@ static void show_audio_subs_languages(dvdnav_t *nav)
uint8_t lg;
uint16_t i, lang, format, id, channels;
int base[7] = {128, 0, 0, 0, 160, 136, 0};
char tmp[3];
for(i=0; i<8; i++)
{
char tmp[] = "unknown";
lg = dvdnav_get_audio_logical_stream(nav, i);
if(lg == 0xff) continue;
channels = dvdnav_audio_stream_channels(nav, lg);
@ -528,41 +531,37 @@ static void show_audio_subs_languages(dvdnav_t *nav)
else
channels--;
lang = dvdnav_audio_stream_to_lang(nav, lg);
if(lang == 0xFFFF)
tmp[0] = tmp[1] = '?';
else
if(lang != 0xFFFF)
{
tmp[0] = lang >> 8;
tmp[1] = lang & 0xFF;
tmp[2] = 0;
}
tmp[2] = 0;
format = dvdnav_audio_stream_format(nav, lg);
if(format == 0xFFFF || format > 6)
format = 1; //unknown
id = i + base[format];
if (lang != 0xFFFF) {
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n", i,
dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id);
if(lang && tmp[0])
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"audio stream: %d format: %s (%s) language: %s aid: %d.\n", i,
dvd_audio_stream_types[format], dvd_audio_stream_channels[channels], tmp, id);
if (lang != 0xFFFF && lang && tmp[0])
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", id, tmp);
}
}
for(i=0; i<32; i++)
{
char tmp[] = "unknown";
lg = dvdnav_get_spu_logical_stream(nav, i);
if(lg == 0xff) continue;
lang = dvdnav_spu_stream_to_lang(nav, lg);
if(lang == 0xFFFF)
tmp[0] = tmp[1] = '?';
else
lang = dvdnav_spu_stream_to_lang(nav, i);
if(lang != 0xFFFF)
{
tmp[0] = lang >> 8;
tmp[1] = lang & 0xFF;
tmp[2] = 0;
}
tmp[2] = 0;
if (lang != 0xFFFF)
mp_tmsg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", i+0x20, tmp);
mp_msg(MSGT_OPEN,MSGL_STATUS,"subtitle ( sid ): %d language: %s\n", lg, tmp);
if (lang != 0xFFFF && lang && tmp[0])
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", lg, tmp);
}
}
@ -698,11 +697,11 @@ static int mp_dvdnav_get_aid_from_format (stream_t *stream, int index, uint8_t l
format = dvdnav_audio_stream_format(priv->dvdnav, lg);
switch(format) {
case DVDNAV_FORMAT_AC3:
return (index + 128);
return index + 128;
case DVDNAV_FORMAT_DTS:
return (index + 136);
return index + 136;
case DVDNAV_FORMAT_LPCM:
return (index + 160);
return index + 160;
case DVDNAV_FORMAT_MPEGAUDIO:
return index;
default:
@ -712,27 +711,6 @@ static int mp_dvdnav_get_aid_from_format (stream_t *stream, int index, uint8_t l
return -1;
}
/**
* \brief mp_dvdnav_aid_from_audio_num() returns the audio id corresponding to the logical number
* \param stream: - stream pointer
* \param audio_num: - logical number
* \return -1 on error, current subtitle id if successful
*/
int mp_dvdnav_aid_from_audio_num(stream_t *stream, int audio_num) {
dvdnav_priv_t * priv = stream->priv;
int k;
uint8_t lg;
for(k=0; k<32; k++) {
lg = dvdnav_get_audio_logical_stream(priv->dvdnav, k);
if (lg == 0xff) continue;
if (lg != audio_num) continue;
return mp_dvdnav_get_aid_from_format (stream, k, lg);
}
return -1;
}
/**
* \brief mp_dvdnav_aid_from_lang() returns the audio id corresponding to the language code 'lang'
* \param stream: - stream pointer
@ -801,9 +779,9 @@ int mp_dvdnav_sid_from_lang(stream_t *stream, unsigned char *language) {
for(k=0; k<32; k++) {
lg = dvdnav_get_spu_logical_stream(priv->dvdnav, k);
if(lg == 0xff) continue;
lang = dvdnav_spu_stream_to_lang(priv->dvdnav, lg);
lang = dvdnav_spu_stream_to_lang(priv->dvdnav, k);
if(lang != 0xFFFF && lang == lcode) {
return k;
return lg;
}
}
language += 2;
@ -820,12 +798,16 @@ int mp_dvdnav_sid_from_lang(stream_t *stream, unsigned char *language) {
* \return 0 on error, 1 if successful
*/
int mp_dvdnav_lang_from_sid(stream_t *stream, int sid, unsigned char *buf) {
uint8_t lg;
uint8_t k;
uint16_t lang;
dvdnav_priv_t *priv = stream->priv;
if(sid < 0) return 0;
lg = dvdnav_get_spu_logical_stream(priv->dvdnav, sid);
lang = dvdnav_spu_stream_to_lang(priv->dvdnav, lg);
for (k=0; k<32; k++)
if (dvdnav_get_spu_logical_stream(priv->dvdnav, k) == sid)
break;
if (k == 32)
return 0;
lang = dvdnav_spu_stream_to_lang(priv->dvdnav, k);
if(lang == 0xffff) return 0;
buf[0] = lang >> 8;
buf[1] = lang & 0xFF;
@ -846,7 +828,7 @@ int mp_dvdnav_number_of_subs(stream_t *stream) {
for(k=0; k<32; k++) {
lg = dvdnav_get_spu_logical_stream(priv->dvdnav, k);
if(lg == 0xff) continue;
n++;
if(lg >= n) n = lg + 1;
}
return n;
}

View File

@ -29,6 +29,7 @@
#include "libaf/af_format.h"
#include "libmpcodecs/img_format.h"
#include "libmpcodecs/dec_teletext.h"
#include "libavutil/avstring.h"
#include "osdep/timer.h"
@ -333,7 +334,8 @@ int tv_set_norm(tvi_handle_t *tvh, char* norm)
mp_tmsg(MSGT_TV, MSGL_ERR, "Error: Cannot set norm!\n");
return 0;
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
&tvh->tv_param->teletext);
return 1;
}
@ -347,8 +349,9 @@ static int tv_set_norm_i(tvi_handle_t *tvh, int norm)
return 0;
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
return(1);
teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
&tvh->tv_param->teletext);
return 1;
}
static int open_tv(tvi_handle_t *tvh)
@ -675,7 +678,11 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
if(!(tvh=tv_begin(demuxer->stream->priv))) return NULL;
if (!tvh->functions->init(tvh->priv)) return NULL;
tvh->functions->control(tvh->priv,TVI_CONTROL_VBI_INIT,&(tvh->tv_param->tdevice));
tvh->demuxer = demuxer;
tvh->functions->control(tvh->priv,TVI_CONTROL_VBI_INIT,
&(tvh->tv_param->teletext.device));
tvh->functions->control(tvh->priv,TVI_CONTROL_GET_VBI_PTR,
&demuxer->teletext);
if (!open_tv(tvh)){
tv_uninit(tvh);
@ -818,7 +825,8 @@ no_audio:
if(funcs->control(tvh->priv,TVI_CONTROL_VID_SET_GAIN,&tvh->tv_param->gain)!=TVI_CONTROL_TRUE)
mp_msg(MSGT_TV,MSGL_WARN,"Unable to set gain control!\n");
funcs->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
teletext_control(demuxer->teletext,TV_VBI_CONTROL_RESET,
&tvh->tv_param->teletext);
return demuxer;
}
@ -830,6 +838,7 @@ static void demux_close_tv(demuxer_t *demuxer)
tv_uninit(tvh);
free(tvh);
demuxer->priv=NULL;
demuxer->teletext=NULL;
}
/* utilities for mplayer (not mencoder!!) */
@ -899,7 +908,8 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq)
mp_tmsg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n",
freq, (float)freq/16);
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
&tvh->tv_param->teletext);
return 1;
}
@ -1080,7 +1090,8 @@ int tv_step_norm(tvi_handle_t *tvh)
return 0;
}
}
tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param);
teletext_control(tvh->demuxer->teletext,TV_VBI_CONTROL_RESET,
&tvh->tv_param->teletext);
return 1;
}

View File

@ -25,6 +25,9 @@
#ifndef MPLAYER_TV_H
#define MPLAYER_TV_H
#include "libmpcodecs/dec_teletext.h"
#include "libmpdemux/demuxer.h"
typedef struct tv_param_s {
char *freq;
char *channel;
@ -62,10 +65,7 @@ typedef struct tv_param_s {
int hue;
int saturation;
int gain;
char *tdevice; ///< teletext device
int tformat; ///< teletext display format
int tpage; ///< start teletext page
int tlang; ///< primary language code
struct tt_param teletext;
int scan;
int scan_threshold;
@ -125,6 +125,7 @@ typedef struct tvi_handle_s {
const tvi_functions_t *functions;
void *priv;
int seq;
demuxer_t *demuxer;
/* specific */
int norm;
@ -218,42 +219,9 @@ typedef struct {
#define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */
#define TVI_CONTROL_SPC_GET_NORMID 0x403 /* get normid from norm name */
//tvi_* ioctl (not tvi_vbi.c !!!)
//tvi_* ioctl (not dec_teletext.c !!!)
#define TVI_CONTROL_VBI_INIT 0x501 ///< vbi init
/*
TELETEXT controls (through teletext_control() )
NOTE:
_SET_ should be _GET_ +1
_STEP_ should be _GET_ +2
*/
#define TV_VBI_CONTROL_GET_MODE 0x510 ///< get current mode teletext
#define TV_VBI_CONTROL_SET_MODE 0x511 ///< on/off grab teletext
#define TV_VBI_CONTROL_GET_PAGE 0x513 ///< get grabbed teletext page
#define TV_VBI_CONTROL_SET_PAGE 0x514 ///< set grab teletext page number
#define TV_VBI_CONTROL_STEP_PAGE 0x515 ///< step grab teletext page number
#define TV_VBI_CONTROL_GET_SUBPAGE 0x516 ///< get grabbed teletext page
#define TV_VBI_CONTROL_SET_SUBPAGE 0x517 ///< set grab teletext page number
#define TV_VBI_CONTROL_GET_FORMAT 0x519 ///< get teletext format
#define TV_VBI_CONTROL_SET_FORMAT 0x51a ///< set teletext format
#define TV_VBI_CONTROL_GET_HALF_PAGE 0x51c ///< get current half page
#define TV_VBI_CONTROL_SET_HALF_PAGE 0x51d ///< switch half page
#define TV_VBI_CONTROL_IS_CHANGED 0x540 ///< teletext page is changed
#define TV_VBI_CONTROL_MARK_UNCHANGED 0x541 ///< teletext page is changed
#define TV_VBI_CONTROL_ADD_DEC 0x550 ///< add page number with dec
#define TV_VBI_CONTROL_GO_LINK 0x551 ///< go link (1..6) NYI
#define TV_VBI_CONTROL_GET_VBIPAGE 0x552 ///< get vbi_image for grabbed teletext page
#define TV_VBI_CONTROL_RESET 0x553 ///< vbi reset
#define TV_VBI_CONTROL_START 0x554 ///< vbi start
#define TV_VBI_CONTROL_STOP 0x555 ///< vbi stop
#define TV_VBI_CONTROL_DECODE_PAGE 0x556 ///< decode vbi page
#define TV_VBI_CONTROL_GET_NETWORKNAME 0x557 ///< get current network name
#define TVI_CONTROL_GET_VBI_PTR 0x502 ///< get teletext private pointer
int tv_set_color_options(tvi_handle_t *tvh, int opt, int val);
int tv_get_color_options(tvi_handle_t *tvh, int opt, int* val);
@ -292,78 +260,4 @@ void tv_start_scan(tvi_handle_t *tvh, int start);
#define TV_NORM_PALN 6
#define TV_NORM_NTSCJP 7
#define VBI_TFORMAT_TEXT 0 ///< text mode
#define VBI_TFORMAT_BW 1 ///< black&white mode
#define VBI_TFORMAT_GRAY 2 ///< grayscale mode
#define VBI_TFORMAT_COLOR 3 ///< color mode (require color_spu patch!)
#define VBI_MAX_PAGES 0x800 ///< max sub pages number
#define VBI_MAX_SUBPAGES 64 ///< max sub pages number
#define VBI_ROWS 25 ///< teletext page height in rows
#define VBI_COLUMNS 40 ///< teletext page width in chars
#define VBI_TIME_LINEPOS 26 ///< time line pos in page header
typedef
enum{
TT_FORMAT_OPAQUE=0, ///< opaque
TT_FORMAT_TRANSPARENT, ///< transparent
TT_FORMAT_OPAQUE_INV, ///< opaque with inverted colors
TT_FORMAT_TRANSPARENT_INV ///< transparent with inverted colors
} teletext_format;
typedef
enum{
TT_ZOOM_NORMAL=0,
TT_ZOOM_TOP_HALF,
TT_ZOOM_BOTTOM_HALF
} teletext_zoom;
typedef struct tt_char_s{
unsigned int unicode; ///< unicode (utf8) character
unsigned char fg; ///< foreground color
unsigned char bg; ///< background color
unsigned char gfx; ///< 0-no gfx, 1-solid gfx, 2-separated gfx
unsigned char flh; ///< 0-no flash, 1-flash
unsigned char hidden; ///< char is hidden (for subtitle pages)
unsigned char ctl; ///< control character
unsigned char lng; ///< lang: 0-secondary language,1-primary language
unsigned char raw; ///< raw character (as received from device)
} tt_char;
typedef struct tt_link_s{
int pagenum; ///< page number
int subpagenum; ///< subpage number
} tt_link_t;
typedef struct tt_page_s{
int pagenum; ///< page number
int subpagenum; ///< subpage number
unsigned char primary_lang; ///< primary language code
unsigned char secondary_lang; ///< secondary language code
unsigned char active; ///< page is complete and ready for rendering
unsigned char flags; ///< page flags
unsigned char raw[VBI_ROWS*VBI_COLUMNS]; ///< page data
struct tt_page_s* next_subpage;
struct tt_link_s links[6];
} tt_page;
#define TT_PGFL_SUPPRESS_HEADER 0x01
#define TT_PGFL_UPDATE_INDICATOR 0x02
#define TT_PGFL_INTERRUPTED_SEQ 0x04
#define TT_PGFL_INHIBIT_DISPLAY 0x08
#define TT_PGFL_NEWFLASH 0x10
#define TT_PGFL_SUBTITLE 0x20
#define TT_PGFL_ERASE_PAGE 0x40
#define TT_PGFL_MAGAZINE_SERIAL 0x80
typedef struct tt_stream_props_s{
int sampling_rate;
int samples_per_line;
int offset;
int count[2]; ///< number of lines in first and second fields
int interlaced; ///< vbi data are interlaced
int bufsize; ///< required buffer size
} tt_stream_props;
#endif /* MPLAYER_TV_H */

View File

@ -15,8 +15,6 @@ static int get_video_framesize(priv_t *priv);
static double grab_audio_frame(priv_t *priv, char *buffer, int len);
static int get_audio_framesize(priv_t *priv);
int teletext_control(void* p, int cmd, void *arg);
static const tvi_functions_t functions =
{
init,

View File

@ -76,6 +76,7 @@
#include <stdio.h>
#include "libmpcodecs/img_format.h"
#include "libmpcodecs/dec_teletext.h"
#include "libaf/af_format.h"
#include "help_mp.h"
#include "osdep/timer.h"
@ -2263,7 +2264,6 @@ static int get_audio_framesize(priv_t * priv)
return priv->chains[1]->rbuf->blocksize;
}
#ifdef CONFIG_TV_TELETEXT
static int vbi_get_props(priv_t* priv,tt_stream_props* ptsp)
{
if(!priv || !ptsp)
@ -2309,7 +2309,6 @@ static void vbi_grabber(priv_t* priv)
}
free(buf);
}
#endif /* CONFIG_TV_TELETEXT */
/**
* \brief fills given buffer with video data (usually one frame)
@ -2354,9 +2353,7 @@ static double grab_video_frame(priv_t * priv, char *buffer, int len)
rb->count--;
LeaveCriticalSection(rb->pMutex);
#ifdef CONFIG_TV_TELETEXT
vbi_grabber(priv);
#endif
return pts;
}
@ -2545,13 +2542,12 @@ static HRESULT build_audio_chain(priv_t *priv)
*/
static HRESULT build_vbi_chain(priv_t *priv)
{
#ifdef CONFIG_TV_TELETEXT
HRESULT hr;
if(priv->chains[2]->rbuf)
return S_OK;
if(priv->tv_param->tdevice)
if(priv->tv_param->teletext.device)
{
priv->chains[2]->rbuf=calloc(1,sizeof(grabber_ringbuffer_t));
if(!priv->chains[2]->rbuf)
@ -2565,7 +2561,6 @@ static HRESULT build_vbi_chain(priv_t *priv)
return 0;
}
}
#endif
return S_OK;
}
@ -2901,10 +2896,8 @@ static int init(priv_t * priv)
OLE_QUERYINTERFACE(priv->pBuilder,IID_IBaseFilter,pBF);
OLE_CALL_ARGS(pBF,SetSyncSource,rc);
}
#ifdef CONFIG_TV_TELETEXT
if(vbi_get_props(priv,&(priv->tsp))!=TVI_CONTROL_TRUE)
break;
#endif
result = 1;
} while(0);
@ -2974,9 +2967,7 @@ static int uninit(priv_t * priv)
if (priv->dwRegister) {
RemoveFromRot(priv->dwRegister);
}
#ifdef CONFIG_TV_TELETEXT
teletext_control(priv->priv_vbi,TV_VBI_CONTROL_STOP,(void*)1);
#endif
//stop audio grabber thread
if (priv->state && priv->pMediaControl) {
@ -3481,20 +3472,19 @@ static int control(priv_t * priv, int cmd, void *arg)
case TVI_CONTROL_IMMEDIATE:
priv->immediate_mode = 1;
return TVI_CONTROL_TRUE;
#ifdef CONFIG_TV_TELETEXT
case TVI_CONTROL_VBI_INIT:
{
void* ptr;
ptr=&(priv->tsp);
if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==TVI_CONTROL_TRUE)
if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==VBI_CONTROL_TRUE)
priv->priv_vbi=ptr;
else
priv->priv_vbi=NULL;
return TVI_CONTROL_TRUE;
}
default:
return teletext_control(priv->priv_vbi,cmd,arg);
#endif
case TVI_CONTROL_GET_VBI_PTR:
*(void **)arg=priv->priv_vbi;
return TVI_CONTROL_TRUE;
}
return TVI_CONTROL_UNKNOWN;
}

View File

@ -40,6 +40,7 @@
#include "mp_msg.h"
#include "libaf/af_format.h"
#include "libmpcodecs/img_format.h"
#include "libmpcodecs/dec_teletext.h"
#include "libvo/fastmemcpy.h"
#include "libvo/videodev_mjpeg.h"
@ -141,14 +142,12 @@ typedef struct {
long audio_recv_blocks_total;
long audio_sent_blocks_total;
long mjpeg_bufsize;
#ifdef CONFIG_TV_TELETEXT
char *vbi_dev;
int vbi_fd;
int vbi_bufsize;
int vbi_shutdown;
pthread_t vbi_grabber_thread;
void *priv_vbi;
#endif
tv_param_t *tv_param;
} priv_t;
@ -675,7 +674,6 @@ static int uninit(priv_t *priv)
{
unsigned long num;
#ifdef CONFIG_TV_TELETEXT
priv->vbi_shutdown=1;
if(priv->vbi_grabber_thread)
pthread_join(priv->vbi_grabber_thread, NULL);
@ -693,8 +691,6 @@ static int uninit(priv_t *priv)
priv->vbi_dev=0;
}
#endif
priv->shutdown = 1;
mp_msg(MSGT_TV, MSGL_V, "Waiting for threads to finish... ");
@ -781,7 +777,6 @@ static int get_capture_buffer_size(priv_t *priv)
return cnt;
}
#ifdef CONFIG_TV_TELETEXT
static int vbi_init(priv_t* priv,char* device)
{
int vbi_fd=0;
@ -897,7 +892,6 @@ static void *vbi_grabber(void *data)
free(buf);
return NULL;
}
#endif /* CONFIG_TV_TELETEXT */
static int start(priv_t *priv)
{
@ -1111,13 +1105,11 @@ static int start(priv_t *priv)
ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]);
}
#ifdef CONFIG_TV_TELETEXT
/* start vbi thread */
if(priv->priv_vbi){
priv->vbi_shutdown = 0;
pthread_create(&priv->vbi_grabber_thread, NULL, vbi_grabber, priv);
}
#endif
/* launch capture threads */
priv->shutdown = 0;
@ -1511,7 +1503,6 @@ static int control(priv_t *priv, int cmd, void *arg)
priv->immediate_mode = 1;
return TVI_CONTROL_TRUE;
}
#ifdef CONFIG_TV_TELETEXT
case TVI_CONTROL_VBI_INIT:
{
void* ptr;
@ -1522,16 +1513,16 @@ static int control(priv_t *priv, int cmd, void *arg)
if(vbi_get_props(priv,&tsp)==TVI_CONTROL_TRUE)
{
ptr=&tsp;
if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==TVI_CONTROL_TRUE)
if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==VBI_CONTROL_TRUE)
priv->priv_vbi=ptr;
else
priv->priv_vbi=NULL;
}
return TVI_CONTROL_TRUE;
}
default:
return teletext_control(priv->priv_vbi,cmd,arg);
#endif
case TVI_CONTROL_GET_VBI_PTR:
*(void **)arg=priv->priv_vbi;
return TVI_CONTROL_TRUE;
}
return TVI_CONTROL_UNKNOWN;

View File

@ -53,6 +53,7 @@ known issues:
#include <linux/videodev2.h>
#include "mp_msg.h"
#include "libmpcodecs/img_format.h"
#include "libmpcodecs/dec_teletext.h"
#include "libaf/af_format.h"
#include "tv.h"
#include "audio_in.h"
@ -88,14 +89,12 @@ typedef struct {
/* video */
char *video_dev;
int video_fd;
#ifdef CONFIG_TV_TELETEXT
char *vbi_dev;
int vbi_fd;
int vbi_bufsize;
int vbi_shutdown;
pthread_t vbi_grabber_thread;
void *priv_vbi;
#endif
int mp_format;
struct v4l2_capability capability;
struct v4l2_input input;
@ -591,7 +590,6 @@ static int get_control(priv_t *priv, struct v4l2_control *control, int val_signe
return TVI_CONTROL_TRUE;
}
#ifdef CONFIG_TV_TELETEXT
static int vbi_init(priv_t* priv,char* device)
{
int vbi_fd=0;
@ -714,7 +712,6 @@ static void *vbi_grabber(void *data)
free(buf);
return NULL;
}
#endif /* CONFIG_TV_TELETEXT */
static int control(priv_t *priv, int cmd, void *arg)
{
@ -1038,7 +1035,6 @@ static int control(priv_t *priv, int cmd, void *arg)
if (audio_in_set_samplerate(&priv->audio_in, *(int*)arg) < 0) return TVI_CONTROL_FALSE;
// setup_audio_buffer_sizes(priv);
return TVI_CONTROL_TRUE;
#ifdef CONFIG_TV_TELETEXT
case TVI_CONTROL_VBI_INIT:
{
void* ptr;
@ -1049,16 +1045,16 @@ static int control(priv_t *priv, int cmd, void *arg)
if(vbi_get_props(priv,&tsp)==TVI_CONTROL_TRUE)
{
ptr=&tsp;
if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==TVI_CONTROL_TRUE)
if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==VBI_CONTROL_TRUE)
priv->priv_vbi=ptr;
else
priv->priv_vbi=NULL;
}
return TVI_CONTROL_TRUE;
}
default:
return teletext_control(priv->priv_vbi,cmd,arg);
#endif
case TVI_CONTROL_GET_VBI_PTR:
*(void **)arg=priv->priv_vbi;
return TVI_CONTROL_TRUE;
}
mp_msg(MSGT_TV, MSGL_V, "%s: unknown control: %d\n", info.short_name, cmd);
return TVI_CONTROL_UNKNOWN;
@ -1105,7 +1101,6 @@ static int uninit(priv_t *priv)
{
int i, frames, dropped = 0;
#ifdef CONFIG_TV_TELETEXT
priv->vbi_shutdown=1;
if(priv->vbi_grabber_thread)
pthread_join(priv->vbi_grabber_thread, NULL);
@ -1122,9 +1117,6 @@ static int uninit(priv_t *priv)
free(priv->vbi_dev);
priv->vbi_dev=0;
}
#endif
priv->shutdown = 1;
if(priv->video_grabber_thread)
pthread_join(priv->video_grabber_thread, NULL);
@ -1560,13 +1552,11 @@ static int start(priv_t *priv)
}
}
#ifdef CONFIG_TV_TELETEXT
/* start vbi thread */
if(priv->priv_vbi){
priv->vbi_shutdown = 0;
pthread_create(&priv->vbi_grabber_thread, NULL, vbi_grabber, priv);
}
#endif
/* start audio thread */
priv->shutdown = 0;
priv->audio_skew_measure_time = 0;