summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* vo_opengl: hwdec_cuda: Support separate decode and display devicesPhilip Langdale2017-06-032-0/+9
| | | | | | | | | | | | | | | | | In a multi GPU scenario, it may be desirable to use different GPUs for decode and display responsibilities. For example, if a secondary GPU has better video decoding capabilities. In such a scenario, we need to initialise a separate context for each GPU, and use the display context in hwdec_cuda, while passing the decode context to avcodec. Once that's done, the actually hand-off between the two GPUs is transparent to us (It happens during the cuMemcpy2D operation which copies the decoded frame from a cuda buffer to the OpenGL texture). In the end, the bulk of the work is around introducing a new configuration option to specify the decode device.
* audio: merge --replaygain-track and --replaygain-album into one optionwm42017-04-272-4/+5
| | | | | This is probably better than separate options. For example, the user does not have to guess which one is applied if both options are enabled.
* audio: move replaygain control to top-level optionswm42017-04-263-3/+14
| | | | | | | | | | | | | | | | | | | | | af_volume is deprecated, and so are its replaygain sub-options. To make it possible to use replaygain without deprecated options (and of course to make it available at all after af_volume is dropped), reintroduce them as top-level options. This also means that they are easily changeable at runtime by using them as properties. Change the "volume" property to use the new update mechanism as well. We don't actually bother sharing the implementation between new and deprecated mechanisms, as the deprecated one will simply be deleted. For the from_dB() functions, we mention anders' copyright, although I'm not sure if a mere formula is copyrightable. This will have to be determined later. This whole change is mostly untested. Our distributed human CI will take care of it.
* options: change --audio-file-auto default to not to load any fileswm42017-04-201-1/+1
| | | | | There have been user complaints, and I'm annoyed by this behavior myself.
* player: add --keep-open-pause=no optionDan Oscarsson2017-04-142-0/+3
| | | | | | | | | | | Instead of pausing if --keep-open is active, stop at end but continue playing if seeking backwards. And then stop again when end is reached. Signed-off-by: wm4 <wm4@nowhere> Over the PR, the option was renamed, and the manpage additions were slightly changed/enhanced.
* options: deprecate --loopwm42017-04-103-8/+17
| | | | | | | | | | Also "announce" the plans to undeprecate it with changed semantics later. The deprecation period is needed to warn script authors and client API users (etc.) of the change. This is done because everyone seems to expect --loop to loop the current file, not the playlist. Even in cases when only 1 file is on the playlist, the --loop-file semantics seem to be preferred.
* options: assing proper default value for --audio-channelswm42017-04-051-0/+5
| | | | | This will make --list-options (and some other code paths) actually return the proper default. Shouldn't change behavior.
* parse_commandline: guard glob() usewm42017-04-041-1/+1
| | | | Might make porting to batshit environments simpler.
* video: support positional arguments for automatic lavfi option bridgewm42017-04-031-5/+22
| | | | | | Now e.g. --vf=pad=1000:1000 works. All in all pretty ugly and hacky. Just look away.
* command: change and simplify filter toggle syntaxwm42017-03-261-5/+23
| | | | | | | | | | | "@name:!" becomes simply "@name". This is actually slightly more complex to parse, but makes for a much simpler syntax and will be less weird to the user. Suggested by haasn. The old syntax is now rejected with an error. Also add some more explicit error checks, instead of e.g. allowing empty filter names and erroring only when it's not found.
* m_option: consistent af/vf filter entry "enabled" flag default valuewm42017-03-251-0/+1
| | | | | | | It should default to true, but setting the filter list via mpv_node (relevant for client API and Lua scripting) left it to false. Also "document" the flag.
* command: add better runtime filter toggling methodwm42017-03-252-7/+42
| | | | | | | | | | Basically, see the example in input.rst. This is better than the "old" vf-toggle method, because it doesn't require the user to duplicate the filter string in mpv.conf and input.conf. Some aspects of this changes are untested, so enjoy your alpha testing.
* sub: add SDH subtitle filterDan Oscarsson2017-03-252-0/+4
| | | | | | | | | | Add subtitle filter to remove additions for deaf or hard-of-hearing (SDH). This is for English, but may in part work for others too. This is an ASS filter and the intention is that it can always be enabled as it by default do not remove parts that may be normal text. Harder filtering can be enabled with an additional option. Signed-off-by: wm4 <wm4@nowhere>
* options: add M_OPT_FILE to some more file optionsPhilip Sequeira2017-03-061-3/+3
| | | | (Helps shell completion.)
* hw_videotoolbox: allow using native decoder output formatwm42017-03-021-1/+1
| | | | | | | Depends on FFmpeg commit ade7c1a2326e2bb9b. It has yet to show whether it actually does what it should. Probably doesn't.
* m_option: optionally allow passing "no" to imgfmt option typeswm42017-03-021-4/+7
| | | | | | Needed for the following commit. Also, fix that uint32_t type - we always assumed int.
* cocoa: add option to force dedicated GPUAkemi2017-02-272-0/+6
| | | | Fixes #3242
* cocoa: add --ontop-level option for modifying ontop window levelAkemi2017-02-132-0/+4
| | | | | | | | | | since there are different views on what ontop is, we make the ontop window level modifiable. at the moment only support for macOS was added. the default for macOS was changed from 'system' to 'window' since this fixes an unwanted behaviour in fullscreen and in general causes less issues with expected behaviour. Fixes #2376 #3974
* Fix build with HAVE_GL==0Michael Forney2017-02-131-1/+4
| | | | | video/out/opengl/hwdec.h includes video/out/opengl/common.h, which tries to include opengl headers.
* player: add experimental stream recording featurewm42017-02-072-0/+3
| | | | | This is basically a WIP, but it can't remain in a branch forever. A warning is print when using it as it's still a bit "shaky".
* sub: add justify of subtitlesDan Oscarsson2017-02-012-0/+2
| | | | | | | | To make it easier for the eyes, multi line subtitles should be left justified (for most languages). This adds an option to define how subtitles are to be justified inpendently of how they are aligned. Also add option to enable --sub-justify to be applied on ASS subtitles.
* win32: snap to screen edgespavelxdd2017-01-272-0/+3
| | | | | | | Disabled by default. The snap sensitivity value depends on the screen DPI. The default value is 16px on a 96 DPI screen. Fixes #2248
* sub: add option to force using video resolution for image subtitleswm42017-01-232-0/+2
| | | | Basically for debugging and dealing with broken files.
* player: remove --stream-capture option/propertywm42017-01-212-3/+2
| | | | | | | | | | | | | | | This was excessively useless, and I want my time back that was needed to explain users why they don't want to use it. It captured the byte stream only, and even for types of streams it was designed for (like transport streams), it was rather questionable. As part of the removal, un-inline demux_run_on_thread() (which has only 1 call-site now), and sort of reimplement --stream-dump to write the data directly instead of using the removed capture code. (--stream-dump is also very useless, and I struggled coming up with an explanation for it in the manpage.)
* options: refacactor how --opengl-dwmflush is declaredwm42017-01-202-0/+7
| | | | | Same deal as previous commit, except this time we just readd it as lone global option, and read it directly.
* options: refactor how --opengl-dcomposition is declaredwm42017-01-202-0/+7
| | | | | | | | | | | | | | | | | vo_opengl used to have it as sub-option, which made it very hard to pass down option values to backends in a generic way (even if these options were completely backend-specific). For --opengl-dcomposition we used a VOFLAG to deal with this. Fortunately, sub-options are gone, and we can just add it as global option. Move the option to context_angle.c and add it as global option. I thought about adding a mechanism to let backends declare options, which would get magically picked up my m_config instead of having to add them to the global option list manually (similar to VO vo_driver.options), but decided against this complexity just for 1 or 2 backends. Likewise, it could have been added as a single option to avoid the boilerplate of an option struct, but then again there are probably going to be more angle suboptions, and it's cleaner.
* player: add prefetching of the next playlist entrywm42017-01-182-0/+2
| | | | | | | | | | | | Since for mpv CLI, the player state is a singleton, full prefetching is a bit tricky. We do it only on the demuxer layer. The implementation reuses the old "open thread". This means there is significant potential for regressions even if the new option is not used. This is made worse by the fact that I barely tested this code. The generic mpctx_run_reentrant() wrapper is also removed - this was its only user, and its remains become part of the new implementation.
* vo_opengl, vo_opengl_cb: better hwdec interop backend selectionwm42017-01-172-3/+7
| | | | | | | | | | | Introduce the --opengl-hwdec-interop option, which replaces --hwdec-preload. The new option allows explicit selection of the interop backend. This is relatively complex, and I would have preferred not to add this, but it's probably useful to debug certain problems. In exchange, the "new" option documents that pretty much any but the simplest use of it will not be forward compatible.
* config: do not resolve default profile during "include" processingwm42017-01-131-1/+2
| | | | | | | | | | | | | | | | Application of options in the default section is "delayed" until the whole config file is read in order to allow profile forward references. This was run at the end of parsing a config file - but because of "include" options, this means it's not always called at the end of the main config file. Use the recursion counter to prevent it from being processed after each "include" option. This also gets rid of the resulting unintended infinite recursion (which eventually stopped and failed loading the config file) due to m_config_finish_default_profile() processing the "include" option again. Fixes #4024.
* options: explicitly deprecate --ad-spdif-dtshdwm42016-12-231-1/+2
| | | | Has been less formally deprecated for a longer time.
* audio: change how spdif codecs are selectedwm42016-12-231-1/+1
| | | | | | | | | | | | | | Remove ad_spdif from the normal codec list, and select it explicitly. One goal was to decouple this from the normal codec selection, so they're less entangled and the decoder selection code can be simplified in the far future. This means spdif codec selection is now done explicitly via select_spdif_codec(). We can also remove the weird requirements on "dts" and "dts-hd" for the --audio-spdif option, and it can just do the right thing. Now both video and audio codecs consist of a single codec family each, vd_lavc and ad_lavc.
* options: change --h=... behaviorwm42016-12-161-7/+1
| | | | | Does not match a shell pattern anymore. Instead, a simple sub-string search is done.
* cocoa: fullscreen refactoringAkemi2016-12-152-2/+1
| | | | | | | | | | this replaces the old fullscreen with the native macOS fullscreen. additional the --fs-black-out-screens was removed since the new API doesn't support it in a way the old one did. it can possibly be re-added if done manually. Fixes #2857 #3272 #1352 #2062 #3864
* options: remove weird RPI-only fullscreen defaultwm42016-12-081-1/+0
| | | | As announced by interface-changes.rst.
* options: some simplificationswm42016-11-293-110/+20
| | | | | | | | Remove more stuff that was needed only for legacy suboptions. One user-visible change is that parent-options like --tv are now not visible anymore. They lead to a special error message when used before, but now they're simply not part of the option list anymore.
* options: remove deprecated sub-option handling for --vo and --aowm42016-11-256-84/+124
| | | | | | | | Long planned. Leads to some sanity. There still are some rather gross things. Especially g_groups is ugly, and a hack that can hopefully be removed. (There is a plan for it, but whether it's implemented depends on how much energy is left.)
*