summaryrefslogtreecommitdiffstats
path: root/options/m_option.h
Commit message (Collapse)AuthorAgeFilesLines
* options: handle terminal/logging settings eagerlywm42015-11-041-0/+3
| | | | | | | | | | | Update msg.c state immediately if a terminal or logging setting is set. Until now, this was delayed until mp[v]_initialize() was called. When using the client API, you could easily miss logged error messages, even when logging was initialized early on by calling mpv_request_log_messages(). (Properties can't be used for this either, because properties do not work before mpv_initialize().)
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* video: cleanup stereo mode parsingwm42015-04-021-4/+0
| | | | | | | | | Use OPT_CHOICE_C() instead of the custom parser. The functionality is pretty much equivalent. (On a side note, it seems --video-stereo-mode can't be removed, because it controls whether to "reduce" stereo video to mono, which is also the default. In fact I'm not sure how this should be handled at all.)
* video: move colorspace overrides to vf_format, simplifywm42015-03-311-0/+8
| | | | | | | | | | | | | | | | | | | Remove the colorspace-related top-level options, add them to vf_format. They are rather obscure and not needed often, so it's better to get them out of the way. In particular, this gets rid of the semi-complicated logic in command.c (most of which was needed for OSD display and the direct feedback from the VO). It removes the duplicated color-related name mappings. This removes the ability to write the colormatrix and related properties. Since filters can be changed at runtime, there's no loss of functionality, except that you can't cycle automatically through the color constants anymore (but who needs to do this). This also changes the type of the mp_csp_names and related variables, so they can directly be used with OPT_CHOICE. This probably ended up a bit awkward, for the sake of not adding a new option type which would have used the previous format.
* options: add flag option typewm42015-03-041-0/+4
|
* options: handle choice -> flag fallback automaticallywm42015-02-271-3/+0
| | | | | | | | | | | | | | | In the past it happened quite often that flag options (yes/no) were changed to choice options (yes/no/some more). The problem with this was that while flag options don't need a parameter, this wasn't the case with choice options. A hack was introduced to compensate for this: setting M_OPT_OPTIONAL_PARAM on the option, and an empty string ("") was added as choice, so that the choice could be used like a flag. So, for example, "--mute" would set the choice "". Fix this by 1. not requiring a parameter if there's a "yes" choice, and 2. redirect an empty parameter to "yes". The effect is that a choice option with the choices ["yes", "no"] is pretty much equivalent to a flag option.
* options: add slightly more sophistcated mechanism for option deprecationwm42014-12-111-0/+13
|
* options: allow selecting track ID 0 toowm42014-10-211-1/+1
| | | | Blergh. Now needed for --ff-aid and friends.
* options: add M_OPT_FILE flag to mark options that want a file(list)Alessandro Ghedini2014-09-131-0/+3
|
* video: initial Matroska 3D supportwm42014-08-301-1/+5
| | | | | | | | | | | | | | | | | | | | | This inserts an automatic conversion filter if a Matroska file is marked as 3D (StereoMode element). The basic idea is similar to video rotation and colorspace handling: the 3D mode is added as a property to the video params. Depending on this property, a video filter can be inserted. As of this commit, extending mp_image_params is actually completely unnecessary - but the idea is that it will make it easier to integrate with VOs supporting stereo 3D mogrification. Although vo_opengl does support some stereo rendering, it didn't support the mode my sample file used, so I'll leave that part for later. Not that most mappings from Matroska mode to vf_stereo3d mode are probably wrong, and some are missing. Assuming that Matroska modes, and vf_stereo3d in modes, and out modes are all the same might be an oversimplification - we'll see. See issue #1045.
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-291-1/+1
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* options: support setting start time relative to start PTSTsukasa OMOTO2014-06-291-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* options: remove some more stuffwm42014-06-131-8/+2
| | | | | | | | 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-131-10/+6
| | | | | No options pointing to global variables are in use anymore, so that part can be removed.
* options: remove OPT_FLAG_CONSTANTSwm42014-06-131-10/+4
| | | | | | | 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: change --sub-file behaviorwm42014-06-081-0/+4
| | | | | | | | | | | | | | | | | | | --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.
* options: allow changing options at runtimewm42014-02-251-5/+11
| | | | | Allow changing all options at runtime, except some cherry-picked options, which are disabled with M_OPT_FIXED.
* m_option: add a way to convert values to/from mpv_nodewm42014-02-241-1/+37
| | | | | | | 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.
* options: handle escape sequences in e.g. --playing-msg differentlywm42014-02-201-3/+0
| | | | | | | | | | 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".
* options: add key/value pair list option typewm42014-01-161-0/+5
|
* options: simplify handling of some help optionswm42013-12-261-16/+10
|
* m_option: add mp_log context to sub-module print_help callbackwm42013-12-211-1/+1
|
* m_option: add mp_log callback to OPT_STRING_VALIDATE optionswm42013-12-211-2/+2
| | | | | And also convert a bunch of other code, especially ao_wasapi and ao_portaudio.
* m_option, m_config: mp_msg conversionswm42013-12-211-6/+12
| | | | | | | | 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.
* msg: change --msglevel, reduce legacy gluewm42013-12-201-1/+1
| | | | | | | | | | | | 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.
* 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-181-7/+3
| | | | Requires a small workaround.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Move options/config related files from mpvcore/ to options/wm42013-12-171-0/+648
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.