summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* video: add --video-rotate option for controlling auto-rotationwm42014-05-242-0/+4
|
* stream: kill start_pos, remove --sb optionwm42014-05-242-3/+0
| | | | | | | | | | | | | | | | | | | | 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-draggingwm42014-05-202-0/+4
| | | | Requested in github issue #608.
* cache: redo options and default settingswm42014-05-203-21/+26
| | | | | | | | | | | | Some options change from percentages to number of kilobytes; there are no cache options using percentages anymore. Raise the default values. The cache is now 25000 kilobytes, although if your connection is slow enough, the maximum is probably never reached. (Although all the memory will still be used as seekback-cache.) Remove the separate --audio-file-cache option, and use the cache default settings for it.
* options: unify code for setting string and "raw" optionswm42014-05-182-43/+94
| | | | | | | | | The code paths for setting options by string and by direct "raw" value were too different, which resulted in some weird code. Make the code paths closer to each other. Also, use this to remove the weirdness in the mpv_set_option() implementation.
* x11: replace--[x11-]fstype option with --x11-netwmwm42014-05-162-2/+3
| | | | | Simplifies the code a lot. You can still use --x11-netwm=no to disable NetWM for whatever reasons.
* player: reorganize how lua scripts are loadedwm42014-05-131-0/+2
| | | | | | Make loading of scripts independent of Lua. Move some of the loading code from lua.c to scripting.c, and make it easier to add new scripting backends.
* options: add --hr-seek-framedrop optionwm42014-05-072-0/+3
| | | | | | | | This allows disabling of decoder framedrop during hr-seek. It's basically another useless option, but it will help exploring whether this framedropping really makes seeking faster, or whether disabling it helps with precise seeking (especially frame backstepping).
* vo: remove old stuffwm42014-05-061-2/+0
|
* options: fix "-" (stdin) inputwm42014-05-061-1/+1
| | | | | Input through stdin requires disabling the terminal layer, and commit 32c63f forgot to rename the option correctly.
* options: print replacement for renamed/replaced optionswm42014-05-051-1/+87
| | | | | | | | | Basically, extract the option table from DOCS/man/en/changes.rst, and search the table if an option wasn't found. If there's an entry about it, print it. Hopefully this behavior is slightly more userfriendly. This is strictly bound to option names. It doesn't work for option values, nor does it attempt to emulate the old option.
* options: let unknown option case be handled by final option parserwm42014-05-052-9/+6
| | | | | | | If an option is completely missing, let m_config_parse_option() handle this case, instead of erroring out early. Needed for the following commit.
* options: merge ---sub-auto-match with --sub-autowm42014-05-042-5/+3
| | | | There's no reason why these should be separate.
* options: remove deprecated --identifyMartin Herkt2014-05-042-2/+0
| | | | | | | Also remove MSGL_SMODE and friends. Note: The indent in options.rst was added to work around a bug in ReportLab that causes the PDF manual build to fail.
* options: remove obsolete --fsmode-dontuseMartin Herkt2014-05-042-4/+0
|
* options: rename device-specific optionsMartin Herkt2014-05-041-2/+2
| | | | | --dvdangle → --dvd-angle --tvscan → --tv-scan
* options: rename msg-related optionsMartin Herkt2014-05-041-6/+6
| | | | | | | | | --msgcolor → --msg-color --msglevel → --msg-level --msgmodule → --msg-module --msgtime → --msg-time (also document this one) --playing-msg → --term-playing-msg --status-msg → --term-status-msg
* options: rename video-related options/propertiesMartin Herkt2014-05-042-6/+6
| | | | | | | | | | | Renamed options: --aspect → --video-aspect --fstype → --x11-fstype --native-fs → --fs-missioncontrol --name → --x11-name Renamed properties: aspect → video-aspect
* options: rename audio-related options/propertiesMartin Herkt2014-05-041-5/+5
| | | | | | | | | | | | | Renamed options: --audiofile → --audio-file --audiofile-cache → --audio-file-cache --channels → --audio-channels --format → --audio-format --srate → --audio-samplerate Renamed properties: samplerate → audio-samplerate channels → audio-channels
* options: rename subtitle-related optionsMartin Herkt2014-05-041-6/+6
| | | | | | | | | --ass → --sub-ass --autosub → --sub-auto --autosub-match → --sub-auto-match --sub → --sub-file --subcp → --sub-codepage --subfps → --sub-fps
* options: rename input-related optionsMartin Herkt2014-05-043-5/+5
| | | | | | | | | | | --ar → --input-appleremote --consolecontrols → --input-terminal --media-keys → --input-media-keys --joystick → --input-joystick --lirc → --input-lirc --lircconf → --input-lirc-conf --mouse-movements → --input-cursor --right-alt-gr → --input-right-alt-gr
* command: allow native access to "vf" propertywm42014-04-241-0/+101
| | | | | | This allows client API users and Lua scripts to side-step the pretty horrible video filter string "language" (although it's back and can't be avoided when using libavfilter).
* client API: make mpv_set_option set options nativelywm42014-04-222-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | This should fix some issues, such as not being able to set the "no-video" option with MPV_FORMAT_FLAG. Note that this changes semantics a bit. Now setting an option strictly overwrite it, even if the corresponding command line option does not. For example, if we change --sub to append by default, then setting the "sub" option via the client API would still never append. (Oddly, this also applies to --vf-add, which will overwrite the old value when using the client API.) I'm doing this because there's no proper separation between the command line parser and setting an option using the MPV_FORMAT_STRING format. Maybe the solution to this mess would be adding format aware code (i.e. m_option_set_node) to every option type, and falling back to strings only if needed - but this would mean that you couldn't set e.g. an integer option using MPV_FORMAT_STRING, which doesn't seem to be ideal either. In conclusion, the current approach seems to be most robust, but I'm open to suggestions should someone find that these semantics are a problem.
* build: glob() is always availablewm42014-04-221-2/+0
| | | | | | | | | glob() is mandated by POSIX. For the only non-POSIX platform we support, Windows, we have our own replacement. So the ifdeffery is not needed. Still leave the checks in the configure scripts, because they have to decide whether to compile the replacement or not. (Although this could be special cased to mingw-only, the wscript seems to make this hard.)
* parse_commandline: glob filenames on WindowsJames Ross-Gowan2014-04-211-2/+26
| | | | | | The Windows port uses CommandLineToArgvW, which doesn't expand wildcards in command line arguments. Use glob to expand them instead, but only for non-option arguments.
* encode: don't apply default config optionswm42014-04-194-14/+12
| | | | | | | | | | | | Often, user configs set options that are not suitable for encoding. Usually, playback and encoding are pretty different things, so it makes sense to keep them strictly separate. There are several possible solutions. The approach taken by this commit is to basically ignore the default config settings, and switch to an [encoding] config profile section instead. This also makes it impossible to have --o in a config file, because --o enables encode mode. See github issue #727 for discussion.
* player: add a --loop-file optionwm42014-04-172-0/+2
| | | | Unlike --loop, loops a file instead of the playlist.
* player: add a --dump-stats optionwm42014-04-172-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This collects statistics and other things. The option dumps raw data into a file. A script to visualize this data is included too. Litter some of the player code with calls that generate these statistics. In general, this will be helpful to debug timing dependent issues, such as A/V sync problems. Normally, one could argue that this is the task of a real profiler, but then we'd have a hard time to include extra information like audio/video PTS differences. We could also just hardcode all statistics collection and processing in the player code, but then we'd end up with something like mplayer's status line, which was cluttered and required a centralized approach (i.e. getting the data to the status line; so it was all in mplayer.c). Some players can visualize such statistics on OSD, but that sounds even more complicated. So the approach added with this commit sounds sensible. The stats-conv.py script is rather primitive at the moment and its output is semi-ugly. It uses matplotlib, so it could probably be extended to do a lot, so it's not a dead-end.
* options: don't allow --no-foo=yeswm42014-04-141-2/+2
| | | | | | | | | It's a bit strange to allow this, so get rid of it. This probably breaks a bunch of user config files. The client API still allows setting them with MPV_FORMAT_FLAG with a value of 1 (i.e. true), but I guess this is tolerable.
* video: change image format names, prefer mostly FFmpeg nameswm42014-04-141-2/+4
| | | | | | | | | | | | | | | The most user visible change is that "420p" is now displayed as "yuv420p". This is what FFmpeg uses (almost), and is also less confusing since "420p" is often confused with "420 pixels vertical resolution". In general, we return the FFmpeg pixel format name. We still use our own old mechanism to keep a list of exceptions to provide compatibility for a while. Also, never return NULL for image format names. If the format is unset (0/IMGFMT_NONE), return "none". If the format has no name (probably never happens, FFmpeg seems to guarantee that a name is set), return "unknown".
* New option --no-ometadata to opt out of including metadata when encoding.Rudolf Polzer2014-04-142-0/+5
| | | | | | | This re-allows the previous behaviour of being able to reencode with metadata removed, which is useful when encoding "inconsistently" tagged data for a device/player that shows file names when tags are not present.
* Remove radio://wm42014-04-131-17/+1
| | | | | It was disabled by default, works only for analogue radio, and I bet nobody uses it.
* player: remove ASX, SMIL and NSC playlist parserswm42014-04-131-1/+0
| | | | | | | | | | | | | | | | | | | These playlist parsers are all what's left from the old mplayer playlist parsing code. All of it is old code that does little error checking; the type of C string parsing code that gives you nightmare. Some playlist parsers have been rewritten and are located in demux_playlist.c. The removed formats were not reimplemented. ASX and SMIL use XML, and since we don't want to depend on a full blown XML parser, this is not so easy. Possibly these formats could be supported by writing a very primitive XML-like lexer, which would lead to success with most real world files, but I haven't attempted that. As for NSC, I couldn't find any URL that worked with MPlayer, and in general this formats seems to be more than dead. Move playlist_parse_file() to playlist.c. It's pretty small now, and basically just opens a stream and a demuxer. No use keeping playlist_parser.c just for this.
* options: don't sort sub-option help outputwm42014-04-121-1/+2
| | | | | | Commit 2c2c1203 sorted the output of --list-options, but the same code ias also used for listing sub-options, such as --vo=scale:help. For sub- options, the order actually matters.
* options: sort --list-optionswm42014-04-111-1/+13
| | | | | | | | | | | | Until now, --list-options printed options in random order. There literally wasn't any logic in its order, they just appeared as they were declared. So just sort them. Note that we can't sort them in advance, because for certain things internal to m_config, the order actually matters. Also we're using strcasecmp(), which is bad (locale dependent), but this is output intended for human consumption, so it's not a problem.
* command: remove extended information from --list-propertieswm42014-04-111-19/+4
| | | | | | This used to display the property type, but it was not always correct or even available. The way the property mechanism works, we can know this only at runtime.
* vd_lavc: by default, do not show corrupt frameswm42014-04-081-1/+1
| | | | This flips the default value. Use --vd-lavc-show-all=yes to revert.
* command: fix access to "metadata/list" propertywm42014-03-301-0/+14
| | | | | | | | | The function tag_property() in command.c passed a key action with empty path to m_property_read_list. This is normally not valid, because key actions are supposed to access sub-paths. But it's kind of inconvenient to check for this case in tag_property(). So make it valid by providing a m_property_unkey() function, which turns a key access to "" into a top-level action.
* command: add helper function to split property pathswm42014-03-302-0/+20
| | | | | | We've just checked whether a sub-path started with "name/", but that changes behavior whether the property name has a trailing '/' or not. Using a helper function to split of path components avoids this problem.
* m_property: don't parse empty string as 0wm42014-03-301-1/+2
| | | | Nice strtol() usage error.
* player: remove confusing argc/argv adjustmentwm42014-03-231-2/+2
| | | | It's better if argc/argv always mean the same thing.
* options: fix allowed DVD start titlewm42014-03-171-1/+1
|
* audio: make --channels option always force the output layoutwm42014-03-101-1/+1
| | | | | | Use the --channels value directly on the AO, instead of doing it only in the --channels=stereo (default) case and if the decoder output is not stereo.
* m_option: fix handling of empty channel layoutswm42014-03-101-2/+2
| | | | | Even if a channel map option signaled that empty layouts are accepted, the option parser never actually accepted them.
* m_property: allow setting string properties via M_PROPERTY_SET_STRINGwm42014-03-031-2/+1
| | | | | | | | | | | | | | | | | Setting string options to strings over the m_option fallback (i.e. M_PROPERTY_SET_STRING is called if the option type is CONF_TYPE_STRING) failed. This was because m_option_parse() returns 0. 0 still means success, but the property code tried to be clever, and considered 0 not a success in order to disallow setting flags to an emtpy string (which in turn is allowed, because the command line allows flag options without parameters). Fix this by removing the overly clever code. This could happen when e.g. using the "set" command on options/title (a string option), and also was a problem for the client API. Closes #610.
* sd_ass: add a very simple and evil way to override ASS subtitle styleswm42014-03-011-1/+1
| | | | | | --ass-style-override=force now attempts to override the 'Default' style. May or may not work. In some situations it will work, but also mess up seemingly unrelated things like signs typeset with ASS.
* msg: add --msgtime option to add timestamps to each output messagewm42014-02-282-0/+2
| | | | | | | Will be helpful to track down strange wait times and such issues, as well when you have develop something timing related. (Then you may print timestamps in your debug output, and the --msgtime timestamps will help giving context.)
* lua: add option to disable auto-loading of lua scriptswm42014-02-282-0/+3
|
* config: fix --config-dir logic for global config fileswm42014-02-281-1/+1
| | | | | Global config files should be loaded only when --no-config is missing _and_ --config-dir is not set.
* m_option: make converting mpv_node to string always failwm42014-02-261-1/+1
|
* m_option: fix key/value list string conversionwm42014-02-261-1/+1
| | | | Meh.
* options: fix --list-options outputwm42014-02-261-2/+2
| | | | This was a bit damaged by commit f3c933e5.
* m_property: fix confused error codewm42014-02-261-1/+1
| | | | This broke the client API.
* m_option: don't make "unset" string and string list return NULL stringswm42014-02-261-2/+2
| | | | | | | | | | This is a bit weird: m_option_string types (i.e. char*) can be NULL. But they're supposed to be treated just like empty strings. So don't make the m_option_type.print function return NULL for these values. Returning NULL would mean failure. This didn't matter much before, but was quite visible through the client API.
* options: allow changing options at runtimewm42014-02-252-34/+43
| | | | | Allow changing all options at runtime, except some cherry-picked options, which are disabled with M_OPT_FIXED.
* config: always print resolved config paths in verbose modewm42014-02-251-50/+63
| | | | | Restructure the code to make that easier. There should be no functional changes, other than the log call at the end of each function.
* config: add a --config-dir option to force config directorywm42014-02-253-0/+18
| | | | Useful for slave-mode like uses, and not as radical as --no-config.
* command: make options property return the list of all optionswm42014-02-242-0/+23
|
* client API: implement setting options using their native type toowm42014-02-242-0/+37
| | | | | | | | | | | This is only half-implemented: actually the option will first be converted from mpv_node to its native type, then it's converted to a string, and then back to its native type. This is because the option API was made for strings and not anything else. Other than being grossly inelegant, the only downside is probably with string lists and key/value lists, which don't escape strings containing syntax elements correctly.
* m_property: retrieve chapter lists etc. as mpv_nodewm42014-02-241-4/+54
| | | | | | This automatically allows accessing properties like chapter-list and track-list to be read as mpv_node. This affects all properties which use m_property_read_sub() and m_property_read_list().
* m_property: add mechanism to access properties as mpv_nodewm42014-02-242-0/+47
| | | | | | | | Allows retrieving properties by their native values (or something close to it), rather than having to go through string conversion. The caller could actually just copy the value itself and then use the m_option functions to convert it to mpv_node, but maybe it's more flexible this way.
* m_option: add a way to convert values to/from mpv_nodewm42014-02-242-15/+462
| | | | | | | m_option is basically the mechanism to handle C data types in a dynamic way. Add functions to convert values to and from mpv_node. For example, string lists are turned into mpv_node using MPV_FORMAT_NODE_ARRAY, and so on.
* m_property: simplify some codewm42014-02-241-10/+6
|
* m_option: fix printf format specifierwm42014-02-241-1/+2
|
* command: don't use option name in propertieswm42014-02-231-15/+5
| |