summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* options: simplify handling of some help optionswm42013-12-264-54/+26
|
* player: fix initial selection with --secondary-sidwm42013-12-251-0/+1
| | | | | | | | 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 streamwm42013-12-242-0/+2
| | | | | | | 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 modewm42013-12-231-0/+5
| | | | | So we will know whether someone uses broken config file options when posting a log with -v.
* options: disable joystick by defaultwm42013-12-231-1/+0
|
* path: add function to split URL into prefix and pathwm42013-12-222-0/+13
| | | | Used in the following commit.
* path: don't accept empty protocol as validwm42013-12-221-1/+1
| | | | mp_is_url("://") returned true.
* path: change mp_splitext() semanticswm42013-12-222-7/+7
| | | | | | | | | 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.cwm42013-12-221-3/+1
| | | | | | | | | 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 MPOptswm42013-12-222-29/+17
|
* options: make --msglevel extend previous settingswm42013-12-221-3/+10
| | | | | | 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 statewm42013-12-214-12/+20
|
* path lookup functions: mp_msg conversionswm42013-12-212-22/+33
| | | | | | | | | | | | | | | | | There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
* playlist_parser: mp_msg conversionwm42013-12-211-2/+1
|
* options: some more mp_msg conversionswm42013-12-213-41/+30
|
* m_option: add mp_log context to sub-module print_help callbackwm42013-12-212-2/+2
|
* m_option: add mp_log callback to OPT_STRING_VALIDATE optionswm42013-12-212-3/+3
| | | | | And also convert a bunch of other code, especially ao_wasapi and ao_portaudio.
* m_option, m_config: mp_msg conversionswm42013-12-216-247/+219
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* m_property: mp_msg conversionswm42013-12-212-20/+28
| | | | | Includes some semi-crappy hacks to avoid changing too much code for this conversion (allowing NULL log argument for m_property_do()).
* input: rework how input sources are addedwm42013-12-212-4/+1
| | | | | | | | | | | | | | Until now, there were two functions to add input sources (stuff like stdin input, slave mode, lirc, joystick). Unify them to a single function (mp_input_add_fd()), and make sure the associated callbacks always have a context parameter. Change the lirc and joystick code such that they take store their state in a context struct (probably worthless), and use the new mp_msg replacements (the point of this refactoring). Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in the terminal handling code.
* m_config: add custom context to includefunc callbackwm42013-12-212-2/+3
|
* msg: change --msglevel, reduce legacy gluewm42013-12-204-102/+47
| | | | | | | | | | | | Basically, reimplement --msglevel. Instead of making the new msg code use the legacy code, make the legacy code use the reimplemented functionality. The handling of the deprecated --identify switch changes. It temporarily stops working; this will be fixed in later commits. The actual sub-options syntax (like --msglevel-vo=...) goes away, but I bet nobody knew about this or used this anyway.
* msg: change hack to silence command line pre-parse error messageswm42013-12-201-5/+2
| | | | mp_msg_levels[] will go away.
* options: use M_OPT_EXIT with -Vwm42013-12-191-1/+1
| | | | | Otherwise, output will actually be muted during pre-pase stage, and it will exit before running it again with output enabled.
* m_option.h: actually remove config.h includewm42013-12-191-1/+0
| | | | This was supposed to be done in commit 80b34ebe.
* m_option: don't include config.h in headerwm42013-12-182-7/+11
| | | | Requires a small workaround.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-179-13/+13
|
* Move options/config related files from mpvcore/ to options/wm42013-12-1714-0/+6747
Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.