aboutsummaryrefslogtreecommitdiffhomepage
path: root/options
Commit message (Collapse)AuthorAge
* msg: add --msgtime option to add timestamps to each output messageGravatar wm42014-02-28
| | | | | | | 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 scriptsGravatar wm42014-02-28
|
* config: fix --config-dir logic for global config filesGravatar wm42014-02-28
| | | | | 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 failGravatar wm42014-02-26
|
* m_option: fix key/value list string conversionGravatar wm42014-02-26
| | | | Meh.
* options: fix --list-options outputGravatar wm42014-02-26
| | | | This was a bit damaged by commit f3c933e5.
* m_property: fix confused error codeGravatar wm42014-02-26
| | | | This broke the client API.
* m_option: don't make "unset" string and string list return NULL stringsGravatar wm42014-02-26
| | | | | | | | | | 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 runtimeGravatar wm42014-02-25
| | | | | 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 modeGravatar wm42014-02-25
| | | | | 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 directoryGravatar wm42014-02-25
| | | | Useful for slave-mode like uses, and not as radical as --no-config.
* command: make options property return the list of all optionsGravatar wm42014-02-24
|
* client API: implement setting options using their native type tooGravatar wm42014-02-24
| | | | | | | | | | | 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_nodeGravatar wm42014-02-24
| | | | | | 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_nodeGravatar wm42014-02-24
| | | | | | | | 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_nodeGravatar wm42014-02-24
| | | | | | | 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 codeGravatar wm42014-02-24
|
* m_option: fix printf format specifierGravatar wm42014-02-24
|
* command: don't use option name in propertiesGravatar wm42014-02-23
| | | | | | | | | | | | | Some code accessed m_option.name to get the property name. (Maybe only show_property_osd() had a significant use of it.) Remove that, and remove setting names and dummy names as well. The old code usually assumed that the name was set, and show_property_osd() used it to get the proper name of deprecated aliases. The "vf" property was listed as "vf*". Not sure why that was done, but it works without anyway.
* m_option: explicitly allow m_option.name==NULLGravatar wm42014-02-23
| | | | | | | | Doesn't require other code to care about this, which will allow us to simplify the property code. Only "wildcard" options like "vf" and string lists used this, and m_option_list_findb() (which is excused).
* options: handle escape sequences in e.g. --playing-msg differentlyGravatar wm42014-02-20
| | | | | | | | | | M_OPT_PARSE_ESCAPES was pretty stupid, and broke the (useful) assumption that string variables contain exactly the same value as set by the option. Simplify it, and move escape handling to the place where it's used. Escape handling itself is not terribly useful, but still allows useful things like multiline custom OSD with "\n".
* m_property: add a mechanism to organize a list of sub-propertiesGravatar wm42014-02-16
| | | | | This automatically adds a "count" sub-property, and for each entry in the range [0, count), a numbered sub-property to access the item.
* m_property: add a sub-property mechanismGravatar wm42014-02-16
| | | | | | | This adds a mechanism for easier export of sub-properties. The following commits will make use of it to export fine grained information about certain things. The sub-property mechanism reduces the amount of code needed to export a data value to 1 line.
* options: make --no-config block all auto-loaded configuration filesGravatar wm42014-02-14
| | | | | | | | | | | | Until now, the --no-config was explicitly checked in multiple places to suppress loading of config files. Add such a check to the config path code itself, and refuse to resolve _any_ configuration file locations if the option is set. osc.lua needs a small fixup, because it didn't handle the situation when no path was returned. There may some of such cases in the C code too, but I didn't find any on a quick look.
* options: add --no-terminal switchGravatar wm42014-02-10
| | | | | Mostly useful for internal reasons. This code will be enabled by default if mpv is started via the client API.
* quvi: disable subtitle fetching by defaultGravatar wm42014-01-31
| | | | This is slow and unreliable, basically unusable.
* options: alternative way to specify color optionsGravatar wm42014-01-31
| | | | | | | | | | | | | | | | Try to make it more intuitive by not requiring hex values. The new way uses float values in the range 0.0-1.0, separated by '/' (':' was suggested, but that wouldn't allow color options in sub-options). Example: --osd-color=1.0/0.0/0.0/0.75 Using the range 0.0-1.0 has the advantage that it could be easily extended to colors beyond 8 bit. Details see manpage. Suggestions for alternative syntax or value ranges are welcome, but be quick with it.
* lua: add a --lua-opts option, which can be queried by scriptsGravatar wm42014-01-16
| | | | | | | The values set by this new option can be queried by Lua scripts using the mp.getopt() function. The function takes a string parameter, and returns the value of the first key that matches. If no key matches, nil is returned.
* options: add key/value pair list option typeGravatar wm42014-01-16
|
* msg: move special declarations to msg_control.hGravatar wm42014-01-16
| | | | | While almost everything uses msg.h, the moved definitions are rarely needed by anything.
* player: add --term-osd-bar, which shows a status bar on the terminalGravatar wm42014-01-15
| | | | | Feature request from github issue #451. Disabled by default, will probably stay this way.
* player: redo terminal OSD and status line handlingGravatar wm42014-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The terminal OSD code includes the handling of the terminal status line, showing player OSD messages on the terminal, and showing subtitles on terminal (the latter two only if there is no video window, or if terminal OSD is forced). This didn't handle some corner cases correctly. For example, showing an OSD message on the terminal always cleared the previous line, even if the line was an important message (or even just the command prompt, if most other messages were silenced). Attempt to handle this correctly by keeping track of how many lines the terminal OSD currently consists of. Since there could be race conditions with other messages being printed, implement this in msg.c. Now msg.c expects that MSGL_STATUS messages rewrite the status line, so the caller is forced to use a single mp_msg() call to set the status line. Instead of littering print_status() all over the place, update the status only once per playloop iteration in update_osd_msg(). In audio- only mode, the status line might now be a little bit off, but it's perhaps ok. Print the status line only if it has changed, or if another message was printed. This might help with extremely slow terminals, although in audio+video mode, it'll still be updated very often (A-V sync display changes on every frame). Instead of hardcoding the terminal sequences, use terminfo/termcap to get the sequences. Remove the --term-osd-esc option, which allowed to override the hardcoded escapes - it's useless now. The fallback for terminals with no escape sequences for moving the cursor and clearing a line is removed. This somewhat breaks status line display on these terminals, including the MS Windows console: instead of querying the terminal size and clearing the line manually by padding the output with spaces, the line is simply not cleared. I don't expect this to be a problem on UNIX, and on MS Windows we could emulate escape sequences. Note that terminal OSD (other than the status line) was broken anyway on these terminals. In osd.c, the function get_term_width() is not used anymore, so remove it. To remind us that the MS Windows console apparently adds a line break when writint the last column, adjust screen_width in terminal- win.c accordingly.
* options: remove --screenw and --screenhGravatar wm42014-01-11
| | | | | | | | | Doesn't make any sense anymore. X11 (which was mentioned in the manpage) autodetects it, and everything else ignored the option values. Since for incomprehensible reasons the backends and vo.c still need to exchange information about the screensize using the option fields, they're not removed yet.
* options: don't reset pause mode when switching to next fileGravatar wm42014-01-09
| | | | | | This basically reverts the default as set by commit 812798c5. This seems to be a matter of taste, but personally I think keeping the pause setting is better.
* quvi: add option to not fetch subtitlesGravatar Andre D2014-01-05
| | | | Signed-off-by: wm4 <wm4@nowhere>
* options: make --msglevel=help print something helpfulGravatar wm42014-01-01
|
* common: simplify and optimize string escape parsingGravatar wm42013-12-30
| | | | | | | | | | | This code is shared between input.conf parser and option parser. Until now, the performance didn't really matter. But I want to use this code for JSON parsing too, and since JSON will have to be parsed a lot, it should probably try to avoid realloc'ing too much. This commit moves parsing of C-style escaped strings into a common function, and allows using it in a way realloc can be completely avoided, if the already allocated buffer is large enough.
* vd_lavc: by default, output all frames, even corrupted onesGravatar wm42013-12-29
| | | | | | | | | | | | | | | | Set the flag CODEC_FLAG_OUTPUT_CORRUPT by default. Note that there is also CODEC_FLAG2_SHOW_ALL, which is older, but this seems to be ffmpeg only. Note that whether you want this enabled depends on the user. Some might prefer that only good frames are output, while others want the decoder to try as hard as possible to output _anything_. Since mplayer/mpv is rather the kind of player that tries hard instead of being "clever", set the new default to override libavcodec's default. A nice way to test this is switching video tracks. Since mpv doesn't wait for the next key frame, it'll start feeding the decoder with a packet from the middle of the stream.
* options: simplify handling of some help optionsGravatar wm42013-12-26
|
* player: fix initial selection with --secondary-sidGravatar wm42013-12-25
| | | | | | | | Also, make sure that a track can't be selected twice. While this might work in some situations, it certainly won't work with subtitles demuxed from a stream. Fixes #425.
* player: add --secondary-sid for displaying a second subtitle streamGravatar wm42013-12-24
| | | | | | | This is relatively hacky, but it's Christmas, so it's ok. This does two things: 1. allow selecting two subtitle tracks, and 2. include a hack that renders the second subtitle always as toptitle. See manpage additions how to use this.
* options: print any options set in verbose modeGravatar wm42013-12-23
| | | | | So we will know whether someone uses broken config file options when posting a log with -v.
* options: disable joystick by defaultGravatar wm42013-12-23
|
* path: add function to split URL into prefix and pathGravatar wm42013-12-22
| | | | Used in the following commit.
* path: don't accept empty protocol as validGravatar wm42013-12-22
| | | | mp_is_url("://") returned true.
* path: change mp_splitext() semanticsGravatar wm42013-12-22
| | | | | | | | | Including the "." in the returned extension was too inconvenient. I think originally, the semantics were supposed to work like in Python, but screw this. Also, return NULL instead of "" on failure (which is what its only user actually seems to expect).
* Don't include version.h from make options.cGravatar wm42013-12-22
| | | | | | | | | I find this annoying. It's the reason common/version.c exists at all. options.c did this for the user agent, which contains the version number. Because not including version.h means you can't build the user agent and use it in mp_default_opts anymore, do something rather awkward in main.c to initialize the default user agent.
* options: move network related options to MPOptsGravatar wm42013-12-22
|
* options: make --msglevel extend previous settingsGravatar wm42013-12-22
| | | | | | Make it so --msglevel extends previous --msglevel uses, instead of overwriting them. Do this by literally appending the --msglevel option value to the previous one.
* msg: remove global stateGravatar wm42013-12-21
|