summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* 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.)
* options: remove legacy global sub-option syntaxwm42016-11-222-60/+3
| | | | | | A bit of sanity, although a very small one. --vo sub-options are not affected by this yet.
* options: clarify --softvol deprecation message and manpage entrywm42016-11-191-1/+2
| | | | | People seem to think that the softvol behavior is deprecated, but what is deprecated is actually disabling softvol.
* cocoa: option to scale window by HiDPI scale factorAkemi2016-11-112-0/+3
| | | | | | | | | | Deactivating this options makes it possible to circumvent the default OS X behavior of using points. Windows on HiDPI resolutions won't open in double the size anymore and videos are display in their native resolution when windowed. Fixes #3716
* options: fnmatch: check existence instead of posixAvi Halachmi (:avih)2016-11-081-1/+0
|
* options: make --load-scripts runtime changeablewm42016-10-221-1/+1
| | | | | | | | | | | | | | | | Just that actually changing it at runtime won't do anything. This deals with a nasty initialization order issue with encoding. Encoding is initialized after options have initialized, but before --load-scripts is checked and executed. Encoding initialization accesses FFmpeg API, thus it has to run after FFmpeg is initialized (which also implies it's initialized after options/logging init). On the other hand, it sets the encoding builtin profile, which possibly sets --load-scripts to "no". That failed at this point because --load-scripts was marked as fixed. Just marking it as not fixed gets rid of the headache, even if it's not perfectly orthodox.
* options: handle legacy no-* sub-optionswm42016-10-211-8/+21
| | | | | | | | These accidentally did nothing. They must be handled explicitly. Example: --vo=vdpau:no-composite-detect (Can't wait to get rid of this crap.)
* video: add --hwdec=vdpau-copy modewm42016-10-201-0/+1
| | | | | | | At this point, all other hwaccels provide -copy modes, and vdpau is the exception with not having one. Although there is vf_vdpaurb, it's less convenient in certain situations, and exposes some issues with the filter chain code as well.
* vd_lavc: Add hwdec wrapper for crystalhdPhilip Langdale2016-10-151-0/+1
| | | | This hardware decodes to system memory so it only requires a wrapper.
* vo_drm: change CLI options + refactorsrr-2016-10-072-0/+12
| | | | | | | | | | - Change connector selection to accept human readable names (such as eDP-1, HDMI-A-2) rather than arbitrary numbers. - Change GPU selection to accept GPU number rather than device paths. - Merge connector and GPU selection into one --drm-connector. - Add support for --drm-connector=help. - Add support for --drm-* in EGL backend. - Refactor KMS; reduce state sharing across drm_common.
* options: handle --audio-device changes like the other optionswm42016-10-051-2/+2
| | | | | | Don't require special property code for handling updates, and simply use the UPDATE_AUDIO flag instead. Also make runtime changes to --audio-client-name take effect.
* audio: make setting audio-exclusive update the audio chainKevin Mitchell2016-10-041-1/+1
| | | | | This is required since exclusive mode requires entirely different initializaiton.
* options: rename subtitle optionsDan Oscarsson2016-10-032-13/+40
| | | | | | | | | | | Rename the text subtitle options from --sub-text- to --sub- and --ass- options to --sub-ass-. The intention is to common sub options to prefixed --sub- and special ASS option be seen as a special version of sub options. The OSD options that work like the --sub- options are still named --osd-. Man page updated including a short note about renamed --sub-text-* and --ass-* options to --sub-* and --sub-ass-*.
* player: make --stop-screensaver runtime-changeablewm42016-10-022-2/+3
| | | | | | | | | | Move the screensaver enable/disable determination to a central place, and call it if the stop-screensaver property is changed. Also, do not stop the screensaver when in idle mode (i.e. no file is loaded). Fixes #3615.
* rpi: add --hwdec=rpi-copywm42016-09-301-0/+1
| | | | | | This means it can be used with normal video filters. Might help out with #3604.
* path: default ~~ paths to home directorywm42016-09-291-0/+6
| | | | | | | | | | | | | The code for expanding the ~~ prefix used mp_find_config_file(), which strictly looks for _existing_ files in any config path (e.g. not just the user-local one, but also system-wide config). If no such file exists, it simply returns NULL, which makes the code below just return the literal, unexpanded path. Change this so that it'll resolve the path to the user-local config directory instead. Requested in #3591.
* win32: make --priority runtime-settableJames Ross-Gowan2016-09-282-2/+3
| | | | | | | | | | I'm not sure if this option affects anything or if it's a placebo, especially since the VO thread is now registered with MMCSS. Still, I think --priority=high may have helped back when I used mplayer2 on a netbook. It's also possible that encoding-mode users would want to set --priority=idle. Anyway, it was one of the last M_OPT_FIXED options, so fix that.
* options: do not mark --profile/--include as M_OPT_FIXEDwm42016-09-241-2/+2
| | | | | | | | | The intention of M_OPT_FIXED is to make options not runtime-changeable, so trying to set them at runtime will always error. This is not wanted for --profile and --include, for which there is no reason to block them at runtime. Fixes #3581.
* player: do not let pseudo-gui override user config settingswm42016-09-234-0/+15
| | | | | | | | Seems like this confused users quite often. Instead of --profile=pseudo-gui, --player-operation-mode=pseudo-gui now has to be used to invoke pseudo GUI mode. The old way still works, and still behaves in the old way.
* m_config, command: remove some minor code duplicationwm42016-09-232-3/+9
| | | | | | I would have been fine with this, but now I want to add another flag, and the duplication would become more messy than having a strange function for deduplication.
* player: make audio-channels etc. runtime settablewm42016-09-222-5/+6
| | | | | | | | | If one of the audio output format options is set, brually reinit the audio chain. Since the audio-channels property is still mapped to the deprecated read-only property, "options/audio-channels" currently has to be used, e.g. "cycle-values options/audio-channels 2 7.1".
* player: add --watch-later-directory optionDavid Logie2016-09-222-0/+2
| | | | | | | This option allows the user to set the directory where "watch later" files are stored. Signed-off-by: wm4 <wm4@nowhere>
* client API: more or less deprecate mpv_set_option()wm42016-09-213-15/+14
| | | | | | | | | | | | | | | | | | | | | | With the merging of options and properties, the mpv_set_option() function is close to being useless, and mpv_set_property() can be used for everything instead. There are certain conflicts remaining, which are explained in depth in the docs. For now, none of this should affect existing code using the client API. Make mpv_set_property() redirect to mpv_set_option() before initialization. Remove some options marked as M_OPT_FIXED. The "pause" and "speed" options cannot be written anymore without the playloop being notified by it, so the M_OPT_FIXED does nothing. For "vo-mmcss-profile", the problem was lack of synchronization, which has been added. I'm not sure what the problem was with "frames" - I think it was only marked as M_OPT_FIXED because changing it during playback will have no effect. Except for pause/speed, these changes are needed to make them writable as properties after mpv_initialize(). Also replace all remaining uses of CONF_GLOBAL with M_OPT_FIXED.
* options: make input options generally runtime-settablewm42016-09-213-8/+5
|
* command: change update handling of some video-related propertieswm42016-09-202-6/+8
| | | | | | | | Use the new mechanism, instead of wrapped properties. As usual, extend the update handling to some options that were forgotten/neglected before. Rename video_reset_aspect() to video_reset_params() to make it more "general" (and we can amazingly include write access to video-aspect as well in this).
* options: fix window-scale propertywm42016-09-202-2/+2
| | | | | | | A recent change merged the window-scaler option and property, but forgot that the option is float for some reason, while the property uses double. This led to undefined behavior. Fix it by changing the option to double too.
* m_option: resort M_OPT_ flag valueswm42016-09-201-11/+11
| | | | Remove the gaps that have been added over time.
* player: make --osc/--ytdl settable during playbackwm42016-09-202-3/+4
| | | | | | | | | Setting the osc or ytdl properties will now load/unload the associated scripts. (For ytdl this does not mean the currently played URL will be reloaded.) Also add a changelog entry for this, which also covers the preceding work for --terminal.
* options, command: simplify some option updateswm42016-09-192-39/+41
| | | | | | | Remove wrapper properties for OSD and video position updates, use the new mechanism for them. We can mark the options directly. Update behavior will work for more options (since I've casually marked more affected options than the old less direct mechanism covered).
* player: make --terminal freetly settable at runtimewm42016-09-191-2/+2
| | | | | | | | | | | | | | | | | | | So client API users don't have to care about whether to set this before or after mpv_initialize(). We still don't enable terminal at any point before mpv_initialize(), because reasons. This also subtly changes some behavior how terminal options are applied while parsing. This essentially reverts the behavior as it was reported in issue #2588. Originally, I was hoping to get rid of the pre-parse option pass, but it seems this is absolutely not possible due to the way config and command line parsing are entangled. Command line options take priority over configfile options, so they have to be applied later - but we also want to apply logging and terminal options as specified on the command-line, but _before_ parsing the config files. It has to be this way to see config file error messages on the terminal, or to hide them if --no-terminal is used. libmpv considerations also factor into this.
* options: slightly better option update mechanismwm42016-09-194-17/+45
| | | | | | | | | | | | | | Extend the flag-based notification mechanism that was used via M_OPT_TERM. Make the vo_opengl update mechanism use this (which, btw., also fixes compilation with OpenGL renderers forcibly disabled). While this adds a 3rd mechanism and just seems to further the chaos, I'd rather have a very simple mechanism now, than actually furthering the mess by mixing old and new update mechanisms. In particular, we'll be able to remove quite some property implementations, and replace them with much simpler update handling. The new update mechanism can also more easily refactored once we have a final mechanism that handles everything in an uniform way.
* options: remove some M_OPT_FIXED flagswm42016-09-191-9/+9
| | | | | | | | | | | --quiet can be always set - the playloop checks it whenever rendering the status line. Nothing special about it. The ytdl- options are simply refetched by the Lua script every time a stream is opened, so it makes sense to be able to change them at runtime as well. The VO options don't have a real reason to be marked with it anymore.
* command: fix "cycle"/"add" not working on most propertieswm42016-09-181-1/+2
| | | | | | | | Oops, this is kind of important, isn't it? Stopped working for properties which don't implement M_PROPERTY_GET_CONSTRICTED_TYPE directly, as do_action() goes to the property directly, while m_property_do() does a fallback.
* player: more option/property consistency fixeswm42016-09-185-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some properties had a different type from their equivalent options (such as mute, volume, deinterlace, edition). This wasn't really sane, as raw option values should be always within their bounds. On the other hand, these properties use a different type to reflect runtime limits (such as range of available editions), or simply to improve the "UI" (you don't want to cycle throuhg the completely useless "auto" value when cycling the "mute" property). Handle this by making them always return the option type, but also allowing them to provide a "constricted" type, which is used for UI purposes. All M_PROPERTY_GET_CONSTRICTED_TYPE changes are related to this. One consequence is that you can set the volume property to arbitrary high values just like with the --volume option, but using the "add" command it still restricts it to the --volume-max range. Also deprecate --chapter, as it is grossly incompatible to the chapter property. We pondered renaming it to --chapters, or introducing a more powerful --range option, but concluded that --start --end is actually enough. These changes appear to take care of the last gross property/option incompatibilities, although there might still be a few lurking.
* options: rename/deprecate --playlist-poswm42016-09-181-1/+3
| | | | | | Conflicts with the "playlist-pos" property. They're really a bit too different, and since the --playlist-pos option is relatively new and obscure, just rename it to get this out of the way.
* options: actually deprecate --mute=autowm42016-09-181-2/+2
| | | | Also, make it internally actually an alias to "no".
* options: take care of propertly updating options on runtime changeswm42016-09-172-5/+31
| | | | | | | | | | | | | | | | | | | | | | All option write accesses are now put through the property interface, which means runtime option value verification and runtime updates are applied. This is done even for command line arguments and config files. This has many subtle and not-so-subtle consequences. The potential for unintended and intended subtle or not-subtle behavior changes is very large. Architecturally, this is us literally jumping through hoops. It really should work the other way around, with options being able to have callbacks for value verification and applying runtime updates. But this would require rewriting the entirety of command.c. This change is more practical, and if anything will at least allow incremental changes. Some options are too incompatible for this to work - these are excluded with an explicit blacklist. This change fixes many issues caused by the mismatch between properties and options. For example, this fixes #3281.
* options: fix pseudo-options like -vwm42016-09-171-1/+1
| | | | | | | Some pseudo-options do not have associated storage, which made m_config_set_option_raw() return failure. Regression due to commit d1d5e9dd.
* options: simplify M_OPT_EXITwm42016-09-174-21/+17
| | | | | | | | | | | | | There were multiple values under M_OPT_EXIT (M_OPT_EXIT-n for n>=0). Somehow M_OPT_EXIT-n either meant error code n (with n==0 no error?), or the number of option valus consumed (0 or 1). The latter is MPlayer legacy, which left it to the option type parsers to determine whether an option took a value or not. All of this was changed in mpv, by requiring the user to use explicit syntax ("--opt=val" instead of "-opt val"). In any case, the n value wasn't even used (anymore), so rip this all out. Now M_OPT_EXIT-1 doesn't mean anything, and could be used by a new error code.
* m_config: make option setting always call m_config_set_option_raw()wm42016-09-171-14/+20
| | | | | | | | | | This makes m_config_set_option_raw() the function that is always called on the lowest level (as leaf function for all other functions). To do this, m_config_parse_option() has to do something special to deal with "impure" options like --vf-add, which work on the previous option value, instead of fully replacing it. m_config_set_option_raw() itself always completely replaced the previous value.
* options: kill M_OPT_GLOBAL flagwm42016-09-173-21/+7
| | | | | | This meant "cannot be used as per-file option" (wrt. playlist items). Doesn't make too much sense anymore, especially given how obscure per-file options are.
* options: add --hwdec=yes as alias for --hwdec=autowm42016-09-151-0/+1
| | | | | | This also lets you just do "mpv --hwdec file.mkv", with the minor caveat that the legacy syntax "--hwdec val" or "-hwdec val" (without "=") does not work as expected anymore.
* player: move builtin profiles to a separate filewm42016-09-151-0/+2