aboutsummaryrefslogtreecommitdiffhomepage
path: root/options
Commit message (Collapse)AuthorAge
...
* options: support setting start time relative to start PTSGravatar Tsukasa OMOTO2014-06-29
| | | | Signed-off-by: wm4 <wm4@nowhere>
* config: use the same signature for win32/OSX specific path functionsGravatar wm42014-06-26
| | | | | | | | 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()Gravatar wm42014-06-26
| | | | | 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 contextsGravatar wm42014-06-26
| | | | | IMO a semi-bad concept, that the mpv code unfortunately uses way too much.
* config: make passing talloc context optional for some functionsGravatar wm42014-06-26
| | | | | | | | | | | | | | | | 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 existGravatar wm42014-06-26
| | | | | | | 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'tGravatar wm42014-06-26
| | | | | | | | | | | 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 implementationGravatar Kenneth Zhou2014-06-26
| | | | | | | | | | 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 defaultsGravatar wm42014-06-23
| | | | | | This is hopefully better for web streams. Temporary workaround for #870.
* video: Support BT.2020 constant luminance systemGravatar Niklas Haas2014-06-22
| | | | Signed-off-by: wm4 <wm4@nowhere>
* options: Expose --colormatrix-primaries to the userGravatar Niklas Haas2014-06-22
| | | | Signed-off-by: wm4 <wm4@nowhere>
* video: Add BT.2020-NCL colorspace and transfer functionGravatar Niklas Haas2014-06-22
| | | | 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 classesGravatar James Ross-Gowan2014-06-22
|
* stream: add a file cacheGravatar wm42014-06-22
| | | | | | | | | 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-fileGravatar wm42014-06-18
| | | | At least 1 person expected that this works this way.
* sub: add --sub-scale-with-window optionGravatar wm42014-06-14
| | | | Implements the feature requested in #839 and #186.
* options: remove some more stuffGravatar wm42014-06-13
| | | | | | | | 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 stuffGravatar wm42014-06-13
| | | | | No options pointing to global variables are in use anymore, so that part can be removed.
* command: redo the property typeGravatar wm42014-06-13
| | | | | | | | | | | | | | | | | | | | | | | 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_CONSTANTSGravatar wm42014-06-13
| | | | | | | 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 valueGravatar wm42014-06-13
| | | | | Now MPOpts.sub_fix_timing corresponds to the commandline switch directly, instead of storing the inverted value.
* options: turn --idx, --forceidx into --indexGravatar wm42014-06-13
| | | | | | | | | | | | 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 differentlyGravatar wm42014-06-12
| | | | | | | 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 disabledGravatar xylosper2014-06-12
| | | | | HAVE_* flags are always defined so ifdef will never work. They should be checked with their values.
* encode: make option struct localGravatar wm42014-06-11
| | | | Similar to previous commits.
* input: make option struct localGravatar wm42014-06-11
| | | | | | | | | 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 localGravatar wm42014-06-11
| | | | Similar to previous commits.
* ad_lavc: make option struct localGravatar wm42014-06-11
| | | | Similar to previous commit.
* vd_lavc: make option struct localGravatar wm42014-06-11
| | | | | Removes specifics from options.h and options.c, and puts everything into vd_lavc.c.
* options: remove a global variableGravatar wm42014-06-11
| | | | This is probably the last one, at least with my current configuration.
* Add more constGravatar wm42014-06-11
| | | | | | | 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 variablesGravatar wm42014-06-11
|
* demux_mf: remove global option variablesGravatar wm42014-06-11
|
* options: remove global variables for swscale options; rename themGravatar wm42014-06-11
| | | | | | 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 variablesGravatar wm42014-06-11
|
* stream_dvb: remove global option variablesGravatar wm42014-06-11
|
* stream_cdda: remove global option variablesGravatar wm42014-06-11
|
* stream_pvr: remove global option variablesGravatar wm42014-06-11
|
* tv: remove global option variablesGravatar wm42014-06-11
| | | | | | 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-structGravatar wm42014-06-11
|
* audio: add a "weak" gapless mode, and make it defaultGravatar wm42014-06-09
| | | | | | | | | | | | | | Basically, this allows gapless playback with similar files (including the ordered chapter case), while still being robust in general. The implementation is quite simplistic on purpose, in order to avoid all the weird corner cases that can occur when creating the filter chain. The consequence is that it might do not-gapless playback in more cases when needed, but if that bothers you, you still can use the normal gapless mode. Just using "--gapless-audio" or "--gapless-audio=yes" selects the old mode.
* player: show "neutral" position markers for OSD barsGravatar wm42014-06-08
| | | | This commit implements them for volume and some video properties.
* options: change --sub-file behaviorGravatar wm42014-06-08
| | | | | | | | | | | | | | | | | | | --sub-file is actually a string list, so you can add multipel external subtitle files. But to be able to set a list, the option value was split on ",". This made it impossible to add filenames. One possible solution would be adding escaping. That's probably a good idea (and some other options already do this), but it's also complicated both to implement and for the user. The simpler solution is making --sub-file appending, and make it take only a single entry. I'm not quite sure about this yet. It breaks the invariant that if a value is printed and parsed, you get the same value back. So for now, just go with the simple solution. Fixes #840.
* sub: remove old style override optionGravatar wm42014-06-05
| | | | Didn't work too well.
* sub: add --ass-style-override=force optionGravatar wm42014-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (The old "force" choice of that option is renamed to "force-default".) This allows overriding native ASS script subtitle styles with the style provided by the --sub-text-* options (like --sub-text-font etc.). This is disabled by default, and needs to be explicitly enabled with the --ass-style-override=force option and input property. This uses in fact exactly the same options (--sub-text-*) and semantics as the ones used to configure unstyled text subtitles. It's recommended to combine this with this in the mpv config file: ass-force-style="ScaledBorderAndShadow=1" # work around dumb libass behavior Also, adding a key binding to toggle this behavior should be added, because overriding can easily break: L cycle ass-style-override This would cycle override behavior on Shift+L and allows quickly disabling/enabling style overrides. Note: ASS should be considered a vector format rather than a subtitle format. There is no easy or reliable way to determine whether the style of a given subtitle event can be changed without destroying visuals or not. This patch relies on a simple heuristic, which often works and often breaks.
* player: write file name to the watch later config fileGravatar Alessandro Ghedini2014-06-01
| | | | | | | | | This simply writes the file name as a comment to the top of the watch later config file. It can be useful to the user for determining whether a watch later config file can be manually removed (e.g. in case the corresponding media file has been deleted) or not.
* m_option: use isfinite() instead of isnormal()Gravatar wm42014-06-01
| | | | | | This accidentally rejected d==0. We can actually deal with sub-normals fine, we just want to exclude nan and infinity (although infinity is already accounted for, but anyway).
* video: add --video-rotate option for controlling auto-rotationGravatar wm42014-05-24
|
* stream: kill start_pos, remove --sb optionGravatar wm42014-05-24
| | | | | | | | | | | | | | | | | | | | stream.start_pos was needed for optical media only, and (apparently) not for very good reasons. Just get rid of it. For stream_dvd, we don't need to do anything. Byte seeking was already removed from it earlier. For stream_cdda and stream_vcd, emulate the start_pos by offsetting the stream pos as seen by the rest of mpv. The bits in discnav.c and loadfile.c were for dealing with the code seeking back to the start in demux.c. Handle this differently by assuming the demuxer is always initialized with the stream at start position, and instead seek back if initializing the demuxer fails. Remove the --sb option, which worked by modifying stream.start_pos. If someone really wants this option, it could be added back by creating a "slice" stream (actually ffmpeg already has such a thing).
* input: allow disabling window dragging with --no-window-draggingGravatar wm42014-05-20
| | | | Requested in github issue #608.