summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* options/path: fallback to USERPROFILE if HOME isn't setRicardo Constantino2017-07-061-1/+4
| | | | | | | HOME isn't set by default on Windows. But if the user does set it, prefer it by default. Enables stuff like --log-file=~/mpv.log to work, even if HOME isn't set.
* m_option: deprecate multiple items for -add etc.wm42017-07-021-2/+10
| | | | | | | | This is more confusing than it helps, and forces escaping more stuff. For example, for string lists we could remove all need for escaling with -add and -pre. The user can simply use multiple of those options.
* options: change everything againwm42017-07-024-43/+50
| | | | Fucking bullshit.
* m_option: remove unused error codewm42017-07-022-9/+1
| | | | | The situation in the str_list_* functions can never happen, and they were the only users of this error code.
* m_option: remove redundant indirectionswm42017-07-024-51/+28
| | | | | | Remove the various redundant m_config_set_option* calls, rename the remaining one to m_config_set_option_cli(), and merge the m_config_parse_option() function.
* d3d: make DXVA2 support optionalwm42017-06-301-1/+1
| | | | | | | | | | | | This partially reverts the change from a longer time ago to always build DXVA2 and D3D11VA together. To make it simpler, we change the following: - building with ANGLE headers is now required to build D3D hwaccels - if DXVA2 is enabled, D3D11VA is still forcibly built - the CLI vo_opengl ANGLE backend is now under --egl-angle-win32 This is done to reduce the dependency mess slightly.
* options: change path list options, and document list optionswm42017-06-303-13/+14
| | | | | | | | | | | | | | | | | | | | | | | The changes to path list options is basically getting rid of the need to pass multiple paths to a single option. Instead, you can use the option multiple times. The old behavior can be used by using the -set suffix with the option. Change some options to path lists. For example --script is now append by default, and if you use --script-set, you need to use ":"/";" as separator instead of ",". --sub-paths/--audio-file-paths is a deprecated alias now, and will break if the user tries to pass multiple paths to it. I'm assuming that if these are used, most users will pass only 1 path anyway. --opengl-shaders has more compatibility handling, since it's probably rather common that users pass multiple options to it. Also document all that in the manpage. I'll probably regret this later, as it somewhat increases the complexity of the option parser, rather than increasing it.
* video: change --video-aspect-method default value againwm42017-06-291-1/+1
| | | | | | I noticed that the previous default, bitstream, actually breaks with some shitty anamorphic DVD rips that signal square pixel aspect in the bitstream. So I think the "container" method is a better default.
* Universal Windows Plaform (UWP) supportPedro Pombeiro2017-06-291-1/+3
| | | | | | | | libmpv only. Some things are still missing. Heavily reworked. Signed-off-by: wm4 <wm4@nowhere>
* build: change how some OS specific source files are selectedwm42017-06-291-2/+2
| | | | | | | | | | | | | | | | | | In a bunch of cases, we emulate highly platform specific APIs on a higher level across all OSes, such as IPC, terminal, subprocess handling, and more. We have source files for each OS, and they implement all the same mpv internal API. Selecting which source file to use on an OS can be tricky, because there is partially overlapping and emulated APIs (consider Cygwin on Windows). Add a pick_first_matching_dep() function to make this slightly easier and more structured. Also add dummy backends in some cases, to deal with APIs not being available. Clarify the Windows dependency identifiers, as these are the most confusing.
* build: replace glob() check and assume it's always in POSIXwm42017-06-291-1/+1
| | | | | POSIX requires glob(), so no need to check for it. Together with the fact that we can emulate glob() on Windows, glob() is always available.
* options: sort action list alphabeticallywm42017-06-271-11/+11
| | | | | | There is no technical need for this, but it's nicer if --list-options appears to output them sorted (it only actually sorts the actual option list, while actions are output in the order they are defined).
* options: expose string list actions for --sub-file optionwm42017-06-271-23/+38
| | | | | | | | | | | | This means you can use --sub-file-set=a,b,c to set a string list separated by ',', while --sub-file=filename,with,commas.srt still works (the original motivation for changing the --sub-file option this way). You can also use it to append strings to string list options without the need for escale, e.g.: --opengl-shaders-add-str=unescapesdfilename.glsl (The normal -add for some reason expects a ',' separated list as argument.)
* options: list suffix actions as options toowm42017-06-271-2/+7
| | | | | | | These are not "really" separate actions, but on the command line they're obserable as such. So it would be a good idea to list them too. Adds about 117 options (holy fuck).
* options: handle suffixes like -add in a more generic waywm42017-06-264-125/+148
| | | | | | | | | | | | | | | | This affects options like --vf or --display-tags. These used a "*" suffix to match all options starting with a specific name, and handled the rest in the option parser. Change this to remove the "*" special case, and require every option parser to declare a list of allowed suffixes via m_option_type.actions. The new way is conceptually simpler, because we don't have to account for the "*" in a bunch of places anymore, and instead everything is centrally handled in the CLI part of the option parser, where it's actually needed. It automatically enables suffixes like -add for a bunch of other stringlist options.
* client API: drop old "no-" option emulationwm42017-06-261-22/+2
| | | | | | | You could do mpv_set_option(h, "no-fs", ""), which would behave like "--no-fs" on the command line. At one point, this had to be emulated for compatibility, and printed a deprecation warning. This was almost a year ago, so remove it.
* options: suggest a replacement for --field-dominancewm42017-06-251-1/+1
|
* Revert "parse_commandline: fail gracefully on bad args"wm42017-06-242-6/+3
| | | | | | This reverts commit 38b05daf7d16898f4a63e4ccf48479d8964e6e19. There was actually no LGPL relicensing agreement with wd0.
* options: simplify and rename m_option_type_storewm42017-06-233-50/+27
| | | | | | | | | | This was an annoying option type. And still is. But at least it's on the same level as m_option_type_print_fn now, and can probably cleaned up further like it. Both types are for options that are only on the command line, always have special handling (i.e. do something with them in parse_commandline.c before passing them to the generic m_config.c/m_option.c layers), and are m_options only for --list-options and (oddly) the split_opt_silent() function.
* options: remove weird --really-quiet special behaviorwm42017-06-232-2/+2
| | | | | | | | | This was especially grating because it causes problems with the option/property unification, uses as only thing OPT_FLAG_STORE, and behaves weird with the client API or scripts. It can be reimplemented in a much simpler way, although it needs slightly more code. (Simpler because less special cases.)
* options: unbreak -hwm42017-06-233-4/+9
| | | | Sure is a simple thing to break.
* player: change license of most core files to LGPLwm42017-06-231-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These files have all in common that they were fully or mostly taken from mplayer.c. (mplayer.c was a huge file that contains almost all of the playback core, until it was split into multiple parts.) This was probably the hardest part to relicense, because so much code was moved around all the time. player/audio.c still does not compile. We'll have to redo audio filtering. Once that is done, we can probably actually provide an actual LGPL configure switch. Here is a relatively detailed list of potential issues: 8d190244: author did not reply, parts were made GPL-only in a previous commit. 7882ea9b: author could not be reached, but the code is gone. wscript still has --datadir switch, but I don't think this is relevant to copyright. f197efd5: unclear origin, but I consider the code gone anyway (replaced with generic OSD mechanisms). 8337d9c2: author did not reply, but only the option still exists (under a different name), other code was removed. d8fd7131: did not reply. Disabled in a previous commit. 05258251: same author as above. Both fields actually seem to have vanished (even when tracking renames), so no action taken. d459e644, 268b2c1a: author did not reply, but we reuse only the options (with different names and slightly or fully different semantics, and completely different implementations), so I don't think this is relevant for copyright. 09e742fe, 17c39c4e: same as above. e8a173de, bff4b3ee: author could not be reached. The commands were reworked to properties, and the code outside of the TV code were moved back to the TV code. So I don't think copyright applies to the current command.c parts (mp_property_tv_color, mp_property_tv_freq, mp_property_tv_scan). The TV parts remain GPL. 0810e427: could not be reached. Disabled in a previous commit. 43744a2d: unknown author, but this was replaced by dynamic alloc (if the change is even copyrightable). 116ca0c7: unknown author; reasoning see input.c relicensing commit. e7e4d1d8: these semantics still exist, but as generic code, and this code was fully removed. f1175cd9: the author of the cited patch is unknown, and upon inspection it turns out that I was only using the idea to pause the player on EOF, so I claim it's not copyright relevant. 25affdcc: author could not be reached (yet) - but it's only a function rename, not copyrightable. 5728504c was committed by Arpi (who agreed), but hints that it might be by a different author. In fact it seems to be mostly this patch: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2001-November/002041.html The author did not respond, but it all seems to have been removed later. It's a terrible mess though. Arpi reverted the A-V sync code at first, but left the RTC code for a while. The following commits remove these changes 100%: 14b35442, 7181a091, 31482783, 614f8475, df58e822. cehoyos did explicitly not agree to LGPL, but was involved in the following changes: c99d8fc8: applied a patch and didn't modify it, the original author agreed. 40ac0d31: author could not be reached, but all code is gone anyway. The "af" command has a similar function, but works completely different and actually reuses a mechanism older than this patch. 54350436: applied a patch, but didn't modify it, except for adding a German translation, which was removed later. a2dda036: same situation as above 240b743e: this was made GPL-only in a previous commit 7b25afd7: same as above (for now) kirijua could not be reached, but was a regular patch contributor: c2c997fd: video equalizer code move; probably not copyrightable. Is GPL due to Nick anyway. be54f481: technically, this became the audio track property later. But all what is left is the fact that you pass a track ID to it, so consider the original coypright non-relevant. 2f376d1b: this was rewritten in b7052b43, but for now we can afford to be careful, so this was marked as GPL only in a previous commit. 43844d09: remaining parts in main.c were reverted in a previous commit. anders has mostly disagreed with the LGPL relicensing. Does not want libaf to become LGPL, but made some concessions. In particular, he granted us permission to relicense 4943e9c52c and 242aa6ebd4. We also consider some of his changes remaining in mpv not relevant for copyright (such as 735de602 - we won't remove the this option completely). We will completely remove his other contributions, including the entire audio filter chain. For now, this stuff is marked as GPL only. The remaining question is how much code in player/audio.c (based on the former mplayer.c and dec_audio.c) is under his copyright. I made claims about this in a previous commit. Nick(ols) Kurshev, svn username "nick" and "nickols_k", could not be reached. He had a lot of changes in early MPlayer. It seems all of that was removed, at least in mpv. His main work, like VIDIX or libswscale work, does not exist in mpv anymore, but the changes to mplayer.c and other core parts still deserve attention: a4119f6b, fb927549, ad3529b8, e11b23dc, 5f2178be, 93c371d5: removed in b43d67e0, d1628d12, 24ed01fe, df58e822. 0a83c6ec, 104c125e, 4e067f62, aec5dcc8, b587a3d6, f3de6e6b: DR, VAA, and "tune" stuff was fully removed later on or replaced with other mechanisms. 340183b0: screenshots were redone later (the VOCTRL was even removed, with an independent implementation using the same VOCTRL a few years later), so not relevant anymore. Basically only the 's' shortcut remains (but not its implementation). 92c5c274, bffd4007, 555c6766: for now marked as GPL only in a previous commit. Might contain some trace amounts of "michael"'s copyright, who agreed to LGPL only once the core is relicensed. This will still be respected, but I don't think it matters at this in this case. (Some code touched by him was merged into mplayer.c, and then disappeared after heavy refactoring.) I tried to be as careful and as complete as possible. It can't be excluded that amends to this will be made later. This does not make the player LGPL yet.
* player: disable --frames in WIP LGPL modewm42017-06-231-0/+3
| | | | | | | Commit d8fd7131 changes this. "tibcu" did not reply. While I'm not sure whether copyrightable code remains, I'd tend towards saying yes (the basic idea is still intact after years of refactoring), so make it GPL-only for now.
* player: disable video equalizer frontend code for WIP LGPL modewm42017-06-231-0/+2
| | | | | | | | | | Nick and kiriuja could not be reached, and created/changed this in 92c5c274, 6441a5ad, bffd4007, 555c6766, c2c997fd. The video equalizer stuff was redone fully later, but there are still parts that look too similar and basically use the same approach. I'm more comfortable with declaring it GPL only for now. I plan to redo them later in a way that will remove copyright.
* options: disable --field-dominance for WIP LGPL mode, also deprecatewm42017-06-231-1/+4
| | | | | | | | | | | | cehoyos, who did not agree to the LGPL relicensing, added this in commit 240b743e. The actual implementation of it is already guarded with HAVE_GPL. The field_dominance field in the option struct won't be guarded. We won't keep GPL-only core code forever, so deprecate it as well. To apply forced deinterlacing, a libavfilter filter can probably be removed, or we merge this functionality into the --deinterlace option (without using copyrighted stuff).
* player: disable --priority for WIP LGPL modewm42017-06-231-1/+1
| | | | | Due to commit 14ecebe9: author could not be reached. I don't think anything copyrightable is left, but to be sure make it GPL-only.
* stream: move cache option declarations to cache.cwm42017-06-231-28/+1
| | | | | | | | If they are copyrightable, iive's changes (commits listed in cache.c) would make them LGPL 3+. To avoid that options.c becoming LGPL 3, move the option declarations to cache.c. struct mp_cache_opts is still in options.h, but we consider that irrelevant, and options.h will become LGPL 2.1+ later.
* Revert "m_option: make geometry code GPL-only"wm42017-06-221-32/+0
| | | | | | | | | | | | | | | | | | This reverts commit e30fe38a212d52bca4693941a7cfa9e44b675a66. The original author as well as the author from d568eaa2 agreed to LGPL now. The only one missing is 0842caf6 (Henk could not be reached, and that will probably stay this way). When I discussed this with someone else who knows a lot about copyright (j-b), the conclusion was that the rewrite was actually enough to remove all past copyright. Only the syntax and the option name remained the same, but code, code structure, and architecture all changed radically. So I'm content with dropping the GPL part. (m_option.c is still formally GPL due to the special agreement with michael, but once this is fullfilled, we will change the license to LGPL without further checks.)
* m_option: make geometry code GPL-onlywm42017-06-211-0/+32
| | | | | | | | | | | In commit eb22569ff082b, I claimed that the geometry parsing code was rewritten. But I'm not sure if it's rewritten enough, or if copyright claims could still be made. Given that the original code was self-contained, and could be considered a separate work, it's probably safer (and more up to the standards applied to this relicensing) to leave this as GPL code. The rewrite/code move can be seen with: git diff f2dcdca...ccaed5e
* dec_video: change license to LGPL (almost)wm42017-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Almost" because this might contain copyright by michael, who agreed with LGPL, but only once the core is LGPL. This is preparation for that to happen. Apart from that, the usual remarks apply. In particular, dec_video.c started out quite chaotic with no modularization, but was later basically gutted, and in general rewritten a bunch of times. Not going to give a history lesson. Special attention needs to be given to 3 patches by cehosos, who did not agree to the relicensing: 240b743ebdf: --field-dominance e32cbbf7dc3: reinit VO if aspect ratio changes 306f6243fdf: use container aspect if codec aspect unset (?) The first patch is pretty clearly still in the current code, and needs to be disabled for LGPL. The functionality of the second patch is still active, but implemented completely different, and as part of general frame parameter changes (at the time of the patch, MPlayer already reinitialized the VO on frame size and pixel format changes - all this was merged into a single check for changing image parameters). The third patch makes me a bit more uncomfortable. It appears the code was moved to dec_video.c in de68b8f23c8c, and further changed in 82f0d373, 0a0bb905, and bf13bd0d. You could claim that cehoyos' copyright still sticks. Fortunately, we implement alternative aspect detection, which is simpler and probably preferable, and which arguably contains none of the original code and logic, and thus should be fully safe. While I don't know if cehoyos' copyright actually still applies, I'm more comfortable with making the code GPL-only for now. Also change the default to use the (in future) plain LGPL code, and deprecate the one associated with the GPL code, so we can eventually remove the GPL code. But it's also possible we decide that the copyright doesn't apply, and undo the deprecation and GPL guards. I expect that users won't notice anything. If you ask me, the old aspect method was probably an accidental bug instead of intentional behavior. Although, the new aspect method was broken too, so I had to fix it.
* img_format: minor simplificationwm42017-06-181-1/+1
|
* command: avoid going through prop->opt bridge from opt->prop bridgewm42017-06-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | The option->property bridge can't (and shouldn't) preserve option flags. This is a problem if the flags are actually used by the option implementation, beyond calling m_config_mark_co_flags(). This was true so far, but b8193e40719 changed this. Now setting the --profile option (usually from a config file or as recursive profile) can have side-effects that depend on the flags contents. Solve this by avoiding going through the "double bridge" altogether. This fixes a regression if an auto-profile is active, and the user specifies an option on the command line that is supposed to override an item in a profile recursively referenced by the auto-profile. The command line option will not override it, because the auto-profile is set later, and during application of the auto-profile, the M_SETOPT_PRESERVE_CMDLINE flag gets lost. Having to add something to m_property is not nice, and I'll probbaly regret later. On the other hand, there is a chance that this helps towards true option/property unification.
* command: add all options to property->option bridgewm42017-06-152-9/+13
| | | | | | | | | | | | | | | | Before this, options with co->data==NULL (i.e. no storage) were not added to the bridge (except alias options). There are a few options which might make sense to allow via the bridge ("profile" and "include"). So allow them. In command_init(), we merely remove the co->data check, the rest of the diff is due to switching the if/else branches for convenience. We also must explicitly error on M_PROPERTY_GET if co->data==NULL. All other cases check it in some way. Explicitly exclude options from the property bridge, which would be added due this, and the result would be pointless.
* options: make mess to allow setting profile option with libmpvwm42017-06-152-94/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain options, such as --profile, --help, and many others require special-handling, because they don't fit conceptually into the option and property model. They don't store data, but perform actions. This caused the situation that profiles could not be set when using libmpv in encoding mode (although you should probably not used libmpv in encoding mode). Using libmpv always ends up in calling m_config_set_option_raw_direct(), while --profile was handled in m_config_parse_option(). Solve this by moving the handling of this from m_config_parse_option() to m_config_set_option_raw_direct(). Actually we just stuff most of this into m_config_handle_special_options(), which is only called by the aforementioned function. Strangely this also means that the --h/--help option declarations need to be changed, because they used OPT_PRINT, and now the option "parser" is always invoked before the special code. Thus, make them a string. Them being OPT_PRINT was apparently always redundant. (The other option declarations are moved for cosmetic purposes only.) The most weird change is how co->data==NULL is handled. We now allow passing down involved options to m_config_set_option_raw_direct(). The thing is that we don't want them to error if the command line parser is using them (with special handling done there), while all other code paths should raise an error. We try using M_SETOPT_FROM_CMDLINE to distinguish these cases. Note that normal libmpv users are supposed to use the "apply-profile" command instead. This probably contains a bunch of bugs, which you should report.
* js: add javascript scripting support using MuJSAvi Halachmi (:avih)2017-06-141-2/+4
| | | | | | | | | | | | | | | Implements JS with almost identical API to the Lua support. Key differences from Lua: - The global mp, mp.msg and mp.utils are always available. - Instead of returning x, error, return x and expose mp.last_error(). - Timers are JS standard set/clear Timeout/Interval. - Supports CommonJS modules/require. - Added at mp.utils: getenv, read_file, write_file and few more. - Global print and dump (expand objects) functions. - mp.options currently not supported. See DOCS/man/javascript.rst for more details.
* options: change license of most files to LGPL (except options.c/.h)wm42017-06-128-52/+58
| | | | | | | | | | | | | | | | | | | | | | | All authors of the current code have agreed (as far as this commit requires). options.c/options.h will take more effort, because it contains all the option declarations, and thus is touched extremely often. m_option.c is technically still GPL, because of commit 2c82d5a1d85378dd0 (michael has agreed to LGPL, but only once the core of mpv is LGPL). The geometry parsing code in m_option.c was originally by someone who could not be reached. However, it was heavily rewritten anyway, and only the syntax remains (i.e. not copyright-relevant). parse_commandline.c contains a change by "adland" (commit 1d0ac71ae8ba), who could not be reached - this this specific part is GPL only. Fortunately, it matters only for DVD (and even then is more like a hack, but whatever). There are some other relevant changes, but they have all been reverted, moved somewhere else, deleted, or replaced.
* m_option: revert commit 2793a70e0fb3wm42017-06-121-3/+2
|
* m_property: change license to LGPLwm42017-06-122-14/+14
| | | | All involved authors have agreed.
* path: change license to LGPLwm42017-06-122-21/+16
| | | | | | | | The history goes back to 2001 or so, but everyone involved with still existing code has agreed. One person who could not be reached yet (elevengu) has changes in this, which as far as I can tell were overwritten anyway at a later point.
* m_option: fix leaks with OPT_KEYVALUELIST optionswm42017-06-081-0/+3
| | | | | For example, specifying --script-opts multiple times could leak some data.
* options: slight cleanup of --sub-ass-style-overrideNiklas Haas2017-06-071-2/+3
| | | | | | | | | | | | | | | | | | List of changes: 1. Rename `signfs` to `scale`, to better match what it actually does (force --sub-scale to apply to ASS subtitles), and fix the blatantly wrong documentation (it actually specifically does *not* apply to signs) 2. Rename `--sub-ass-style-override` to `--sub-ass-override` to help reduce confusion between it and `--sub-ass-force-style`, as well as pointing out that it doesn't necessarily actually override styles. (The new `scale` option, for example, only sets ASS_OVERRIDE_BIT_FONT_SIZE, but not ASS_OVERRIDE_BIT_STYLE) 3. Mention that `--sub-ass-override` is generally sort of smart about only overriding dialog, not signs.
* options: change --sub-fix-timing defaultwm42017-06-061-1/+0
| | | | | | Why? Better than wasting time by arguing with idiots. Fixes #4484.