summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* video: enable framedropping by defaultwm42014-08-171-0/+1
|
* demux: enable thread by defaultwm42014-08-161-3/+3
| | | | And change the defaults for the other queue options to reduce latency.
* demux: add option to control the readahead buffer by a duration valuewm42014-08-162-0/+3
| | | | | | | | | | | | | --demuxer-readahead-secs now controls how much the demuxer should readahead by an amount of seconds. This is based on the raw packet timestamps. It's not always very exact. For example, h264 in Matroska does not store any linear timestamps (only PTS values which are going to be reordered by the decoder), so this heuristic is usually off by several hundred milliseconds. The decision whether to readahead is basically OR-ed with the other --demuxer-readahead-packets options. Change the manpage descriptions to subtly convey these semantics.
* video: add --display-fps switch to control framedrop FPSwm42014-08-162-0/+3
| | | | | | Since the display FPS is currently detected on X11 only (and even there it's known to be wrong on certain setups), it seems like a good idea to make this user-configurable.
* audio: add a mode to insert silence on severe A/V desyncwm42014-08-152-0/+3
| | | | | | This is probably a stupid idea, but it can't be denied that this actually allows playing video without larger desync, even if video is too slow.
* video: add VO framedropping modewm42014-08-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This mostly uses the same idea as with vo_vdpau.c, but much simplified. On X11, it tries to get the display framerate with XF86VM, and limits the frequency of new video frames against it. Note that this is an old extension, and is confirmed not to work correctly with multi-monitor setups. But we're using it because it was already around (it is also used by vo_vdpau). This attempts to predict the next vsync event by using the time of the last frame and the display FPS. Even if that goes completely wrong, the results are still relatively good. On other systems, or if the X11 code doesn't return a display FPS, a framerate of 1000 is assumed. This is infinite for all practical purposes, and means that only frames which are definitely too late are dropped. This probably has worse results, but is still useful. "--framedrop=yes" is basically replaced with "--framedrop=decoder". The old framedropping mode is kept around, and should perhaps be improved. Dropping on the decoder level is still useful if decoding itself is too slow.
* sub: add option to workaround broken mkv fileswm42014-08-142-0/+2
| | | | See additions to options.rst.
* video: move display and timing to a separate threadwm42014-08-122-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VO is run inside its own thread. It also does most of video timing. The playloop hands the image data and a realtime timestamp to the VO, and the VO does the rest. In particular, this allows the playloop to do other things, instead of blocking for video redraw. But if anything accesses the VO during video timing, it will block. This also fixes vo_sdl.c event handling; but that is only a side-effect, since reimplementing the broken way would require more effort. Also drop --softsleep. In theory, this option helps if the kernel's sleeping mechanism is too inaccurate for video timing. In practice, I haven't ever encountered a situation where it helps, and it just burns CPU cycles. On the other hand it's probably actively harmful, because it prevents the libavcodec decoder threads from doing real work. Side note: Originally, I intended that multiple frames can be queued to the VO. But this is not done, due to problems with OSD and other certain features. OSD in particular is simply designed in a way that it can be neither timed nor copied, so you do have to render it into the video frame before you can draw the next frame. (Subtitles have no such restriction. sd_lavc was even updated to fix this.) It seems the right solution to queuing multiple VO frames is rendering on VO-backed framebuffers, like vo_vdpau.c does. This requires VO driver support, and is out of scope of this commit. As consequence, the VO has a queue size of 1. The existing video queue is just needed to compute frame duration, and will be moved out in the next commit.
* video: remove "hard" framedrop modewm42014-08-091-2/+1
| | | | | | | | | Completely useless, and could accidentally be enabled by cycling framedrop modes. Just get rid of it. But still allow triggering the old code with --vd-lavc-framedrop, in case someone asks for it. If nobody does, this new option will be removed eventually.
* options: fix key-value-list optionswm42014-08-051-6/+11
| | | | | | | | The parser can be called with dst (the target) set to NULL if the option should be verified only. The code didn't respect this, and could result in crashes when used in config profiles or filter sub-options. Fixes #981.
* Remove the last remains of slave modewm42014-08-012-2/+0
| | | | | | | | | | | Almost nothing was left of it. The only thing this commit actually removes is support for reading input commands from stdin. But you can emulate this via: --input-file=/dev/stdin --input-terminal=no However, this won't work on Windows. Just use a named pipe.
* stream_lavf: allow setting AVOptions with --stream-lavf-owm42014-07-302-0/+3
| | | | | This commit also creates a private option struct for stream_lavf.c, but since I'm lazy, I'm not moving any existing options to it.
* vo: remove vo_mouse_movement() wrapperwm42014-07-272-4/+0
| | | | So that VO backends don't have to access the VO just for that.
* sub: add detection via BOMwm42014-07-221-5/+1
| | | | | | | | | | | Useful for Windows stuff. Actually, ENCA support should catch this, but, well, whatever, everyone seems to hate ENCA. Detection with BOM is trivial, although it needs some hackery to integrate it with the existing autodetection support. For one, change the default value of --sub-codepage to make this easier. Probably fixes issue #937 (the second part).
* demux: add a demuxer threadwm42014-07-162-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a thread to the demuxer which reads packets asynchronously. It will do so until a configurable minimum packet queue size is reached. (See options.rst additions.) For now, the thread is disabled by default. There are some corner cases that have to be fixed, such as fixing cache behavior with webradios. Note that most interaction with the demuxer is still blocking, so if e.g. network dies, the player will still freeze. But this change will make it possible to remove most causes for freezing. Most of the new code in demux.c actually consists of weird caches to compensate for thread-safety issues (with the previously single-threaded design), or to avoid blocking by having to wait on the demuxer thread. Most of the changes in the player are due to the fact that we must not access the source stream directly. the demuxer thread already accesses it, and the stream stuff is not thread-safe. For timeline stuff (like ordered chapters), we enable the thread for the current segment only. We also clear its packet queue on seek, so that the remaining (unconsumed) readahead buffer doesn't waste memory. Keep in mind that insane subtitles (such as ASS typesetting muxed into mkv files) will practically disable the readahead, because the total queue size is considered when checking whether the minimum queue size was reached.
* Revert "Remove DVD and Bluray support"wm42014-07-152-0/+17
| | | | | | This reverts commit 4b93210e0c244a65ef10a566abed2ad25ecaf9a1. *shrug*
* Remove DVD and Bluray supportwm42014-07-142-17/+0
| | | | It never worked well. Just remux your DVD and BD images to mkv.
* config: adjust config parser messageswm42014-07-131-5/+4
| | | | Some cleanup. Also, try not to call mp_msg multiple times for 1 line.
* config: skip BOMwm42014-07-121-0/+4
|
* build: include <strings.h> for strcasecmp()wm42014-07-101-0/+1
| | | | | | | It happens to work without strings.h on glibc or with _GNU_SOURCE, but the POSIX standard requires including <strings.h>. Hopefully fixes OSX build.
* options: remove bogus replacement message for --fstypewm42014-07-051-1/+0
| | | | CC: @mpv-player/stable
* options: add --autosub-match to option replacement listwm42014-07-051-0/+1
| | | | CC: @mpv-player/stable
* tv: move demuxer parts to separate filewm42014-07-051-1/+0
| | | | | Now all demuxer implementations (at least demuxer API-wise) are in the demux directory.
* Audit and replace all ctype.h useswm42014-07-012-9/+8
| | | | | | | | | | | | | | | | Something like "char *s = ...; isdigit(s[0]);" triggers undefined behavior, because char can be signed, and thus s[0] can be a negative value. The is*() functions require unsigned char _or_ EOF. EOF is a special value outside of unsigned char range, thus the argument to the is*() functions can't be a char. This undefined behavior can actually trigger crashes if the implementation of these functions e.g. uses lookup tables, which are then indexed with out-of-range values. Replace all <ctype.h> uses with our own custom mp_is*() functions added with misc/ctype.h. As a bonus, these functions are locale-independent. (Although currently, we _require_ C locale for other reasons.)
* options: add --list-protocols optionAlessandro Ghedini2014-06-301-0/+2
|
* options: fix --gapless-audio default valuewm42014-06-301-0/+1
| | | | | | | | | It was intended to be set to "weak" (and that was even documented), but the actual setting was "no". Closes #890. CC: @mpv-player/stable
* options: support setting start time relative to start PTSTsukasa OMOTO2014-06-292-3/+6
| | | | Signed-off-by: wm4 <wm4@nowhere>
* config: use the same signature for win32/OSX specific path functionswm42014-06-261-6/+7
| | | | | | | | Seems like a good idea, even if it's basically unused (yet). Also document requirements on the functions (they're not obvious). OSX changes untested.
* config: handle --no-config case directly in mp_config_dirs()wm42014-06-261-26/+23
| | | | | Requires less special-casing, and probably also avoids that starting mpv with --no-config creates a config dir (even if nothing is loaded).
* config, player: avoid some temporary talloc contextswm42014-06-261-13/+14
| | | | | IMO a semi-bad concept, that the mpv code unfortunately uses way too much.
* config: make passing talloc context optional for some functionswm42014-06-261-17/+21
| | | | | | | | | | | | | | | | Until now, the config functions added various allocations to the user- provided talloc context. Make it so that they're all under the returned allocation instead. This allows avoiding having to create an extra temporary context for some callers, and also avoids adding random memory leaks by accidentally passing a NULL context. mp_find_all_config_files() has to be changed not to return a pointer into the middle array for this to work. Make it add paths in order (instead of reverse), and then reverse the array entries after that. Also remove the declarations for the win-specific private functions. Remove STRNULL(); it's barely needed anymore and the functions are not called with NULL filenames anymore.
* player: create config dir if it doesn't existwm42014-06-261-4/+1
| | | | | | | This was dropped in the commit adding XDG support, probably accidentally. Also normalize some whitespace.
* config: prefer the old config dir if it exists, but XDG doesn'twm42014-06-261-6/+14
| | | | | | | | | | | This means normally the XDG config dir will be used. But if the old config dir (~/.mpv) exists and the XDG config dir does not, then don't create it. To simplify the code, also make mp_path_exists() accept NULL paths. In that case it's considered as not existing. (Funnily, on Linux this already worked, because the string is passed directly to the kernel, and the kernel will just return EFAULT on invalid memory.)
* Basic xdg directory implementationKenneth Zhou2014-06-262-78/+136
| | | | | | | | | | Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files. This also negates the need to have separate user and global variants of mp_find_config_file() Closes #864, #109. Signed-off-by: wm4 <wm4@nowhere>
* cache: change auto-pause/resume defaultswm42014-06-231-2/+2
| | | | | | This is hopefully better for web streams. Temporary workaround for #870.
* video: Support BT.2020 constant luminance systemNiklas Haas2014-06-221-1/+2
| | | | Signed-off-by: wm4 <wm4@nowhere>
* options: Expose --colormatrix-primaries to the userNiklas Haas2014-06-222-0/+7
| | | | Signed-off-by: wm4 <wm4@nowhere>
* video: Add BT.2020-NCL colorspace and transfer functionNiklas Haas2014-06-221-0/+1
| | | | Source: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-I!!PDF-E.pdf
* win32: add missing priority classesJames Ross-Gowan2014-06-221-0/+2
|
* stream: add a file cachewm42014-06-222-0/+5
| | | | | | | | | For remarks, pretty much see the manpage additions. Could help with network streams that require too much seeking (maybe), or might be extended to help with the use case of watching and downloading a file at the same time. In general, it might be a useless feature and could be removed again.
* options: allow adding multiple files with --audio-filewm42014-06-182-2/+2
| | | | At least 1 person expected that this works this way.
* sub: add --sub-scale-with-window optionwm42014-06-142-0/+2
| | | | Implements the feature requested in #839 and #186.
* options: remove some more stuffwm42014-06-134-39/+15
| | | | | | | | The "classic" sub-option stuff is not really needed anymore. The only remaining use can be emulated in a simpler way. But note that this breaks the --screenshot option (instead of the "flat" options like --screenshot-...). This was undocumented and discouraged, so it shouldn't affect anyone.
* options: remove some unneeded stuffwm42014-06-133-28/+21
| | | | | No options pointing to global variables are in use anymore, so that part can be removed.
* command: redo the property typewm42014-06-132-57/+86
| | | | | | | | | | | | | | | | | | | | | | | Instead of absuing m_option to store the property list, introduce a separate type for properties. m_option is still used to handle data types. The property declaration itself now never contains the option type, and instead it's always queried with M_PROPERTY_GET_TYPE. (This was already done with some properties, now all properties use it.) This also fixes that the function signatures did not match the function type with which these functions were called. They were called as: int (*)(const m_option_t*, int, void*, void*) but the actual function signatures were: int (*)(m_option_t*, int, void*, MPContext *) Two arguments were mismatched. This adds one line per property implementation. With additional the reordering of the parameters, this makes most of the changes in this commit.
* options: remove OPT_FLAG_CONSTANTSwm42014-06-133-24/+15
| | | | | | | This means use of the min/max fields can be dropped for the flag option type, which makes some things slightly easier. I'm also not sure if the client API handled the case of flag not being 0 or 1 correctly, and this change gets rid of this concern.
* options: remove use of an inverted option valuewm42014-06-132-4/+3
| | | | | Now MPOpts.sub_fix_timing corresponds to the commandline switch directly, instead of storing the inverted value.
* options: turn --idx, --forceidx into --indexwm42014-06-133-5/+5
| | | | | | | | | | | | Also clarify the semantics. It seems --idx didn't do anything. Possibly it used to change how the now removed legacy demuxers like demux_avi used to behave. Or maybe it was accidental. --forceidx basically becomes --index=force. It's possible that new index modes will be added in the future, so I'm keeping it extensible, instead of e.g. creating --force-index.
* win32: implement --priority differentlywm42014-06-122-6/+15
| | | | | | | Does anyone actually use this? For now, update it, because it's the only case left where an option points to a global variable (and not a struct offset).
* options: fix for compilation when encoding disabledxylosper2014-06-121-1/+1
| | | | | HAVE_* flags are always defined so ifdef will never work. They should be checked with their values.
* encode: make option struct localwm42014-06-112-46/+6
| | | | Similar to previous commits.
* input: make option struct localwm42014-06-112-34/+3
| | | | | | | | | Similar to previous commits. This also renames --doubleclick-time to --input-doubleclick-time, and --key-fifo-size to --input-key-fifo-size. We could keep the old names, but these options are very obscure, and renaming them seems better for consistency.
* demux_lavf: make option struct localwm42014-06-112-18/+3
| | | | Similar to previous commits.
* ad_lavc: make option struct localwm42014-06-112-15/+3
| | | | Similar to previous commit.
* vd_lavc: make option struct localwm42014-06-112-17/+3
| | | | | Removes specifics from options.h and options.c, and puts everything into vd_lavc.c.
* options: remove a global variablewm42014-06-112-5/+5
| | | | This is probably the last one, at least with my current configuration.
* Add more constwm42014-06-111-2/+2
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* demux_raw: remove global option variableswm42014-06-112-6/+7
|
* demux_mf: remove global option variableswm42014-06-112-9/+7
|
* options: remove global variables for swscale options; rename themwm42014-06-112-22/+5
| | | | | | Additionally to removing the global variables, this makes the options more uniform. --ssf-... becomes --sws-..., and --sws becomes --sws- scaler. For --sws-scaler, use choices instead of magic integer values.
* stream_dvd, stream_dvdnav, stream_bluray: remove global option variableswm42014-06-112-5/+13
|
* stream_dvb: remove global option variableswm42014-06-112-2/+3
|
* stream_cdda: remove global option variableswm42014-06-112-3/+6
|
* stream_pvr: remove global option variableswm42014-06-112-26/+3
|
* tv: remove global option variableswm42014-06-112-60/+4
| | | | | | Pretty much nothing changes, but using -tv-scan with suboptions doesn't work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat options ("-tv-scan-x") stay compatible.
* m_config: add function to copy subopt-structwm42014-06-112-0/+43
|
* audio: add a "weak" gapless mode, and make it defaultwm42014-06-091-1/+4
| | | | | | | | | | | | | | Basically, this al