1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00
Commit Graph

46 Commits

Author SHA1 Message Date
Uoti Urpala
33cac12954 options: change --ass-hinting default to 0
With current typical video sizes, font sizes are large enough that
they don't really need hinting (and particularly so for font sizes in
display-resolution rendered subtitles in fullscreen mode), and hinting
apparently causes problems with some fonts.
2011-12-07 00:25:38 +02:00
Uoti Urpala
83fc5b6004 options: move libass-related options to struct 2011-09-03 14:26:14 +03:00
harklu
9e6933440a options, subs: add --ass-vsfilter-aspect-compat
Add option --ass-vsfilter-aspect-compat and corresponding property
ass_vsfilter_aspect_compat. The setting controls whether to enable the
emulation of traditional VSFilter behavior where subtitles are
stretched if the video is anamorphic (previously always enabled for
native SSA/ASS subtitles). Enabled by default. Add 'V' as a new
default keybinding to toggle the property.
2011-08-12 14:19:10 +03:00
Uoti Urpala
82b8f89bae input: rework event reading and command queuing
Rework much of the logic related to reading from event sources and
queuing commands. The two biggest architecture changes are:
- The code buffering keycodes in mp_fifo.c is gone. Instead key input
  is now immediately fed to input.c and interpreted as commands, and
  then the commands are buffered instead.
- mp_input_get_cmd() now always tries to read every available event
  from every event source and convert them to (buffered) commands.
  Before it would only process new events until one new command became
  available.

Some relevant behavior changes:
- Before commands could be lost when stream code called
  mp_input_check_interrupt() which read commands (to see if they were
  of types that triggered aborts during slow IO tasks) and then threw
  them away. This was especially an issue if cache was enabled and slow
  to read. Fixed - now it's possible to check whether there are queued
  commands which will abort playback of the current file without
  throwing other commands away.
- mp_input_check_interrupt() now prints a message if it returns
  true. This is especially useful because the failures caused by
  aborted stream reads can trigger error messages from other code that
  was doing the read; the new message makes it more obvious what the
  cause of the subsequent error messages is.
- It's now possible to again avoid making stdin non-blocking (which
  caused some issues) without reintroducing extra latency. The change
  will be done in a subsequent commit.
- Event sources that do not support select() should now have somewhat
  lower latency in certain situations as they will be checked both
  before and after select()/sleep in input reading; before the sleep
  always happened first even if such sources already had queued
  input. Before the key fifo was also handled in this manner (first
  key triggered select, but if multiple were read then rest could be
  delayed; however in most cases this didn't add latency in practice
  as after central code started doing command handling it queried for
  further commands with a max sleep time of 0).
- Key fifo limiting is more accurate now: it now counts actual
  commands intead of keycodes, and all queued keys are read
  immediately from input devices so they can be counted correctly.
- Since keypresses are now interpreted immediately, commands which
  change keybindings will no longer affect following keypresses that
  have already been read before the command is executed. This should
  not be an issue in practice with current keybinding behavior.
2011-07-17 07:36:09 +03:00
Clément Bœsch
4587f030cc options: move sub_name, sub_auto and vobsub_name to struct 2011-04-20 04:22:52 +03:00
Uoti Urpala
f50f34245e Merge branch 'sub'
* sub:
  sub/OSD: move some related files to sub/
  subtitles: options: enable -ass by default
  subtitles: change default libass rendering style
  demux_mkv, chapters: change millisecond arithmetic to ns
  cleanup: rename ass_* functions to mp_ass_*
  subs: use correct font aspect ratio for libass + converted subs
  cleanup: some random minor code simplification and cleanup
  vf_vo: fix EOSD change detection bug
  sd_ass: remove subreader use, support plaintext markup
  subtitles: style support for common SubRip tags and MicroDVD
  core: ordered chapters: fix bad subtitle parameter
  subs/demux: don't try to enable sub track when creating it
  subtitles/demux: store duration instead of endpts in demux packets
  subtitles: add framework for subtitle decoders
  options: add special -leak-report option
  subtitles: remove code trying to handle text subs with libavcodec
  cleanup: move MP_NOPTS_VALUE definition to mpcommon.h
  subtitles: move global ass_track to struct osd_state
  core: move most mpcommon.c contents to mplayer.c
  core: move global "subdata" and "vo_sub_last" to mpctx
  subtitles: remove sub_last_pts hack
  options: move -noconfig to option struct, simplify
2011-01-26 20:42:15 +02:00
Uoti Urpala
ebd2058d03 subtitles: options: enable -ass by default
There are still some problems with -ass. For example some other
subtitle options won't work the same way or at all with it enabled,
and inserting the video filter for VOs that lack native rendering
support won't work with different colorspaces. However I think that
the benefit from styling support outweights those disadvantages, and
also that the "discoverability" of features is better this way; it
will be easier for people who encounter problems to find -noass than
for people who see no styling to find out that they could add it with
-ass.

Enable -ass by default. Also fix other outdated information in the
manpage entries for -ass and -fontconfig.
2011-01-26 20:39:05 +02:00
Uoti Urpala
8612c771fc cleanup: some random minor code simplification and cleanup 2011-01-26 13:04:17 +02:00
Clément Bœsch
83f37b54de cleanup: remove unused MEncoder-related code
Remove some code and variables that were no longer used after MEncoder
removal. Also remove some MEncoder references in comments.
2011-01-25 02:29:31 +02:00
Uoti Urpala
2bc2399797 vd_ffmpeg: set thread count to number of cores on machine by default
Make "-lavdopts threads=0" mean an autodetected number of threads, and
make that the default value of the option. Also increase the upper
limit of the option from 8 to 16. Add new file osdep/numcores.c which
tries to determine the number of cores available on the machine.

numcores.c is based (heavily modified) on public domain numcpus.c by
Philip Willoughby <pgw99@doc.ic.ac.uk>, downloaded from
http://csgsoft.doc.ic.ac.uk/numcpus/
2010-12-20 05:53:28 +02:00
Uoti Urpala
7001c2d994 core: ordered chapters: add heuristic for merging inaccurate chapters
Some Matroska files have inaccurate ordered chapter endpoints, and so
parts where one chapter should end and the next begin at the same
timestamp were not merged. This resulted in an unnecessary seek over a
minimal distance. Add a heuristic to merge parts with a minimal gap or
overlap between them.

Based on patch by Hector Martin <hector@marcansoft.com>.
2010-11-26 16:58:10 +02:00
Clément Bœsch
7eb48343d4 options: more mplayer.c options moved to option struct
Following options were moved: autoq, benchmark, [no]term-osd,
term-osd-esc, playing-msg, [no]idle, [no]consolecontrols,
list-properties.
2010-11-14 00:14:56 +02:00
Uoti Urpala
a4ce95de81 core: do initial A-V sync by modifying audio stream
Add code to enforce matching pts with video when (re)starting the
audio stream, by either cutting away the first samples or inserting
silence at the beginning. New option -noinitial-audio-sync can be used
to disable this and return to old behavior.
2010-11-13 19:46:02 +02:00
Uoti Urpala
3d999246e4 audio: add -gapless-audio option
If the option is enabled and all audio has been buffered to the AO,
then the player will move to the next file without waiting for the
buffered audio to drain, while leaving the AO initialized. If the
playback of the next file starts quickly enough (before the AO buffer
empties) then it should continue writing audio to the same AO with no
gap in between.
2010-11-12 18:29:09 +02:00
Clément Bœsch
e7d3e63a3f options: move -cache-min and cache-seek-min to option struct 2010-11-11 17:53:44 +02:00
Clément Bœsch
6526bee39b options: move some demux options to option struct
Following options were moved: audiofile, audiofile-cache, subfile,
demuxer, audio-demuxer, sub-demuxer, [no]extbased.
2010-11-11 16:31:46 +02:00
Uoti Urpala
2be10f22b2 options: move -dumpfile to option struct 2010-11-02 04:18:38 +02:00
Uoti Urpala
4de0369e8d options: move audio_output_channels, audio_output_format to struct 2010-11-02 04:18:07 +02:00
Uoti Urpala
a1f9878c3d options: fix -a52drc default value (should be 1)
Commit 3f076c0fb3 ("options: move -a52drc to option struct") from
yesterday left out setting the default value of the option,
effectively changing the default from 1 to 0. Add the missing part to
change it back to 1.
2010-06-03 15:43:42 +03:00
Uoti Urpala
a2133d7684 options: move -chapter values to option struct
-chapter can optionally take a range with a start and an end. Add a
new option type which supports such values and use that instead of a
custom per-option function.

This commit also fixes a build configuration bug: before the
availability of the -chapter option depended on DVD functionality
being enabled in the binary, even though the option works with other
sources too.
2010-04-25 22:48:10 +03:00
Daniel Dawson
c3c0309eec Support for multiple editions in Matroska
Add code to intelligently choose an appropriate Matroska edition when
there are several. Will choose, in descending order of preference: the
edition chosen by the user through the option "-edition <edition id>"
if it exists, the first edition with EditionFlagDefault set to 1 if
there is one, or the first edition.
2009-12-04 19:43:17 +02:00
Uoti Urpala
7fd3eb0f74 Merge svn changes up to r29752
As part of merging subtitle-in-terminal changes make
update_subtitles() only clear existing subtitles if called with the
reset argument, and not try to set new ones. Later calls should set
the needed new subtitles, and this change avoids some problems with
trying to set subtitles when mp_property_sub() in command.c gets
called from initialization code before full initialization.
2009-10-06 04:48:00 +03:00
Uoti Urpala
d9066294f9 defaultopts.c: Minor simplification
This happens to avoid a compiler bug in the current GCC development
branch.
2009-04-09 04:19:40 +03:00
Uoti Urpala
53eeb0e412 Merge branch 'ordered_chapters' 2009-04-08 02:43:44 +03:00
Uoti Urpala
96daf7ed5e Add option -noordered-chapters. 2009-04-08 02:42:19 +03:00
Uoti Urpala
861d6d2bd9 Make -fixed-vo the default
Lack of -fixed-vo causes the output window to be recreated not only
when changing files but also when switching the video stream, and that
happens when moving from one ordered chapter source to another. Having
the window disappear and reappear (likely at another location if it
was ever moved) is just too annoying.
2009-04-02 06:51:26 +03:00
Uoti Urpala
cf9edda1d3 Merge svn changes up to r29117 2009-04-01 02:43:47 +03:00
Uoti Urpala
694c067e19 options: Move osd_level and osd_duration to options struct 2009-03-31 18:24:10 +03:00
Uoti Urpala
ae2faad666 Merge svn changes up to r28951 2009-03-14 23:52:45 +02:00
Uoti Urpala
41ac08d2b4 options: fix -ar default back to enabled if available
Due to a missed config variable rename -noar was always the default.
Make it default to enabled if available as it was before.
2009-02-16 23:16:11 +02:00
Uoti Urpala
d5c868325c Merge svn changes up to r26979
Most of the conflicts are trivial.

Conflicts:

	Makefile
	cfg-mplayer.h
	input/input.c
	libmenu/vf_menu.c
	libmpcodecs/dec_video.c
	libmpcodecs/vf_expand.c
	libmpcodecs/vf_vo.c
	libmpdemux/demux_mkv.c
	libmpdemux/demuxer.c
	libmpdemux/demuxer.h
	libvo/vo_directfb2.c
	libvo/vo_gl.c
	libvo/vo_winvidix.c
	libvo/vo_xv.c
	libvo/vo_xvidix.c
	libvo/vo_xvmc.c
	libvo/x11_common.c
	mplayer.c
	osdep/timer-linux.c
	stream/cache2.c
2008-06-04 08:10:48 +03:00
Uoti Urpala
1d1ddcb593 Move aspect.c options to option struct 2008-05-01 11:14:29 +03:00
Uoti Urpala
8de8be1536 Move input options to option struct 2008-04-30 19:34:48 +03:00
Uoti Urpala
06405a5ba5 Move key_fifo_size & doubleclick_time to options struct 2008-04-29 15:52:29 +03:00
Uoti Urpala
4db72f6a80 Move vo_gamma_* to options struct 2008-04-26 01:19:29 +03:00
Uoti Urpala
7dc4226348 Move vd_use_slices to options struct 2008-04-25 07:15:07 +03:00
Uoti Urpala
60e2c8604d Move movie_aspect to options struct 2008-04-25 03:34:28 +03:00
Uoti Urpala
1351b50ea5 Move flip and softzoom to options struct 2008-04-25 03:34:27 +03:00
Uoti Urpala
3fa6f2d3e1 Move -lavdopts to options struct 2008-04-25 03:31:57 +03:00
Uoti Urpala
66bd120a3a Move dvdsub_id to options struct
Name the field "sub_id" as it's not specific to DVD subs.

Remove some other unused extern declarations together with dvdsub_id
from demux_mkv.c and demux_lavf.c.
2008-04-23 13:48:38 +03:00
Uoti Urpala
c0c914effd Move audio_id and video_id to options struct 2008-04-23 13:48:38 +03:00
Uoti Urpala
d9aa368a6d Move playback_speed to options struct 2008-04-23 13:48:37 +03:00
Uoti Urpala
ef74d21b1f Move loop_times to option struct 2008-04-23 13:47:44 +03:00
Uoti Urpala
9b06b5ed85 Move correct_pts to options struct 2008-04-23 13:41:05 +03:00
Uoti Urpala
732ee3474a Move options "vo" and "ao" to common struct 2008-04-23 13:41:05 +03:00
Uoti Urpala
9db0c118d3 Start of new option system
First part of option restructuring. The aim is to move option values
from a huge number of separate globals to a single non-global struct.

This part adds some support for parsing option values into such struct
instances, and moves one example option (fixed-vo) to the struct.
2008-04-23 13:41:05 +03:00