summaryrefslogtreecommitdiffstats
path: root/options
Commit message (Collapse)AuthorAgeFilesLines
* options: flag geometry/autofit options with force_updateDudemanguy22 hours1-4/+4
| | | | | Same reasoning as window-scale. This still requires that the windowing backend correctly reacts to the notification.
* player: always notify when writing window-scale optionDudemanguy22 hours1-1/+1
| | | | | | As described in the previous commit, update_window_scale will always execute whenever window-scale is written even if the value doesn't change.
* m_option: add a force_update booleanDudemanguy22 hours2-8/+44
| | | | | | | | | | | | | | | | | | | | | | mpv's core does not propagate option notifications unless they actually change to the rest of the player. Most of the time, this makes perfect sense. If the user sets fullscreen multiple times, there's no reason to care about anything other than the change in state. However, there are certain options where it makes sense to always broadcast a notification even if the value doesn't change. For example, consider the window-scale case. A user may set window-scale to some value, resize the window further through some other means (such as mouse resizing) and then want to set the window-scale again to the same value as earlier. The window-scale value did not change from before so no notification is sent and nothing happens even though it is desirable and expected that it operates again. This was solved by making the current-window-scale property writable a few years ago, but actually the easier solution is to just always force the option to update on any write. For the big callback, the needed changes are trivial. Unfortunately, it requires a hot mess in order to have this work with the m_config_cache_update APIs. Spooky stuff in there, but it does send the notification now.
* m_option: change confusing error messages for obj_settings_listnanahi25 hours1-7/+7
| | | | | | | | | This option type is not used only by filter options: they're already used by --ao, --vo, and --gpu-context. Replace the mentions of "filter" to "item" instead, and changes some languages to improve clarity. Also change the documentation on "Filter options" to describe what it really is, and fix a typo.
* sd_ass: add `sub-vsfilter-bidi-compat` to enable vsfilter bidi compatllyyr41 hours2-0/+2
| | | | | | | | | | | | | | | | Enable ASS_FEATURE_{WHOLE_TEXT_LAYOUT, BIDI_BRACKETS} and auto base detection by default, and add an option to disable this if needed. This is strictly an improvement for webvtt files as they always use auto base detection. This _fixes_ right-to-left text rendering for webvtt files which correctly mark rtl/ltr. Webvtt files obtained from sources which sideload the RTL information through css also see an improvement due to the auto detection. Generally SRT files also want this, but some are also written to workaround VSFilter quirks. See also: https://github.com/mpv-player/mpv/pull/12985#issuecomment-1839565138
* x11_common: implement --show-in-taskbar optionnanahi42 hours2-0/+3
| | | | | | | | | This adds a new option --show-in-taskbar, which controls whether mpv appears in taskbars. This is useful for picture-in-picture setups where the video window should not appear in taskbars. On X11, this can be controled by setting the _NET_WM_STATE_SKIP_TASKBAR window state.
* options: fix runtime update of teletext-pageKacper Michajłow42 hours1-1/+1
|
* options: add --input-commands optionDudemanguy2024-03-212-0/+2
| | | | | | | Basically a simple way to perform any command/property action from the command line. This takes the exact same syntax as input.conf but not including the key naturally. Potentially useful for weird properties that don't map well to options (like ao-volume). Fixes #12353.
* m_property: add `>` for fixed precision floating-point expansionKacper Michajłow2024-03-215-20/+30
| | | | | | | | | | | | | | This enhancement makes it easier to create constant width property expansions, useful for the `--term-status-msg`. Additionally, it changes to `%f` printing with manual zero trimming, which is easier to control than `%g`. With this method, we can directly specify precision, not just significant numbers. This approach also avoids overly high precision for values less than 1, which is not necessary for a generic floating-point print function. A new print helper function is added, which can be used with adjusted precision for specific cases where a different default is needed. This also unifies the code slightly.
* options/m_config: fix no newline at end of filenanahi2024-03-191-1/+1
|
* various: use static assertions where appropriatesfan52024-03-171-1/+1
|
* path: don't load any files if --no-config is passedllyyr2024-03-111-1/+5
| | | | | | | | | | `--no-config` should prevent loading any user files, whether it be config, cache, watch_later state etc. This functionality was changed by df758880e26c because internally `--no-config` is equivalent to passing `--config-dir=""` which resulted in cache and state being auto-detected even if `--no-config` was passed. Fixes: df758880e26c ("path: don't override "cache" and "state" paths with configdir")
* options: remove trailing whitespacesder richter2024-03-101-3/+3
|
* options: remove --focus-on-open and add --focus-onder richter2024-03-102-3/+4
| | | | | | | | | replaces the old focus-on-open option with a more generic focus-on options that can be extended. adjust the only platform that uses that option. Fixes #8337
* options: add --deinterlace-field-parity option1nsane0002024-03-042-0/+9
| | | | | | | | Previously there was no way to specify the field order of interlaced videos when deinterlacing with inbuilt filters. Lavfi deinterlacers seemed to prefer top field order while inbuilt ones (vdpaupp, vavpp, d3d11vpp) seemed to prefer bottom field order. The default "auto" option should work exactly as before while specifying either "tff" or "bff" should force the specified field order
* Revert "player: add ao-volume option, to set the system volume at startup"Dudemanguy2024-03-012-3/+0
| | | | | | | | Ended up being a bad idea. As a property, this inherently has more functionality and the tradeoff of being able to do --ao-volume wasn't worth it. This reverts commit 58ed620c064971535e60778612777750aa5e2f4d.
* various: avoid function pointer castsKacper Michajłow2024-02-282-15/+17
| | | | | | | | | | | | | The opt validator functions are casted to generic validator, which has erased type for value. Calling function by pointer of different definition is an UB. Avoid that by generating wrapper function that does proper argument type conversion and calls validator function. Type erased functions have mangled type in the name. Fixes UBSAN failures on Clang 17, which enabled fsanitize=function by default.
* osdep/mac: make mac naming of files, folders and function consistentder richter2024-02-281-1/+1
| | | | | rename all macOS namings (osx, macosx, macOS, macos, apple) to mac, to make naming consistent.
* osd_libass: update the OSD bar's dent and border sizeGuido Cella2024-02-261-1/+1
| | | | | Make the OSD bar markers bigger so we can default to a smaller, better-looking border size, without sacrificing markers' visibility.
* player: change insert_next to insert_atDavid Vaughan2024-02-261-3/+3
| | | | | | | | | | Change the `playlist_insert_next` function to `playlist_insert_at` (ie, insert at the location of an entry, rather than after it, and rename to be clearer that it doesn't have anything to do with the currently-playing entry). Also, replace calls to `playlist_add` with calls to `playlist_insert_at`, since the former has become redundant.
* input: add insert-next support for drag-and-dropDavid Vaughan2024-02-261-1/+3
| | | | | | | This commit adds a DND_INSERT_NEXT action option for drag-and-drop, allows for selecting it through the --drag-and-drop=insert-next option, and adds the necessary plumbing to make that happen when something is dragged onto the player.
* player: add ao-volume option, to set the system volume at startupLeonardo Boss2024-02-252-0/+3
| | | | closes #12353
* player: set hidpi-window-scale to no by defaultDudemanguy2024-02-241-1/+0
| | | | | | | | | | | | | | | | | | This has defaulted to yes for a very long time, but evidentally it annoys a lot of people (including myself). My argument is that this makes no sense. mpv is for videos; not text. A 1920x1080 video should open as 1920x1080 regardless of whatever the DPI settings of the OS is. This can get very silly when you consider watching a 4k video which will get this additional scale factor which is virtually never desirable. Whether or not the OS and/or WM prevents it from getting larger than the screen depends on a lot of things. Previously some windowing backends required that this option be set to yes in order to report a dpi scale value other than 1, but this should be fixed with the previous commits. The only difference is whether or not to scale the window by the additional factor. Fixes #13465.
* options/path: move path utility functions to misc/path_utilsnanahi2024-02-232-224/+2
| | | | | These utility functions have nothing to do with user and config dir/file. Move them to a separate file.
* various: make mentions of macOS consistentder richter2024-02-211-1/+1
| | | | | change all mentions and variations of OSX, OS X, MacOSX, MacOS X, etc consistent. use the official naming macOS.
* vo_gpu_next: move gpu-next opts to specific sub optionDudemanguy2024-02-172-0/+3
| | | | | | | This matches the general workflow in the codebase. We keep a cache of these new options and update them if needed. Fixes #13481 and fixes #11518.
* m_option: fix memory leak in parse_obj_settings_listKacper Michajłow2024-02-151-3/+10
| | | | Found by fuzzing.
* sub: allow setting lavc txt_page special values via teletext_pageMohammad AlSaleh2024-02-131-2/+2
| | | | | | | | * Range of accepted values for teletext_page now include 0 and -1. * 0 means "subtitle" and -1 means "*". * Make 0 the default. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* player: add an auto option to deinterlaceDudemanguy2024-02-072-2/+3
| | | | | | | | | | Deinterlacing required that the user set it on/off themselves, but we actually have handy flags for detecting if a frame is interlaced. So it's pretty simple to make an auto option using that. Unfortunately, life is not quite that simple and there are known cases of false positives from the ffmpeg flags so we can't make auto the default value. However, it still may have some utility for some people, and the detection could potentially be improved upon later. Closes #10358.
* player: ensure runtime updates of certain rendering optionsDudemanguy2024-02-051-1/+2
| | | | | | | | | | When adding things like brightness or gamma, the video obviously needs a redraw if paused. This happened to work in the normal case because the OSD notification triggered a redraw, but if you use no-osd the picture won't change. Fix this by adding another option flag, UPDATE_VIDEO, and simply signalling we want a redraw. This gets handled along with the normal osd redrawing check in the playloop so something like "no-osd add gamma 1" actually works.
* options/m_option: suppress warning about validate function callKacper Michajłow2024-01-261-0/+5
| | | | | | | It is expected. Last argument of validate functions is always a pointer, but not always void* which triggers UBSAN warning. meson since 1.3.1 halts on UBSAN errors in tests, which is good thing.
* sub: add `--sub-lavc-o` optionMohammad AlSaleh2024-01-212-0/+2
| | | | | | | We have `--vd-lavc-o` and `--ad-lavc-o`, but no equivalent option for subtitles. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* player: remove --term-remaining-playtime optionDudemanguy2024-01-202-3/+0
| | | | | This wasn't useful and didn't even really do what it said anyway. Closes #12167.
* audio: add --volume-gain options to control volume in decibelsnanahi2024-01-202-0/+10
| | | | | | This adds volume-gain, volume-gain-max, volume-gain-min options, which can be used to control audio volume and target dynamic range in decibels. The gain is applied on top of the existing volume setting.
* player: add forced choice to subs-with-matching-audioDudemanguy2024-01-132-3/+4
| | | | | | | | | | fe875083b3d30b06ef77745f40570e8f63afec2 confused things a bit and made --no-subs-with-matching-audio actually mean what it says: no subtitles if the languages match. However, the option actually meant no non-forced subtitles not no subtitles at all. This isn't really intuitive so instead of changing the behavior back to the old way (we already have a release since then), add a third option "forced" which is equivalent to the old meaning of --no-subs-with-matching audio. Fixes #13151.
* options: add --secondary-sub-ass-overridedyphire2023-12-182-5/+10
| | | | Default: strip. preserve the old behavior
* player: refactor secondary subtitle options and propertiesDudemanguy2023-12-162-15/+32
| | | | | | | | | | | | Over the years, we've accumulated several secondary subtitle related options and properties, but the implementation was not really consistent and it wasn't clear what the right process for adding more should be. So to make things nicer, let's refactor all of the subtitle options with secondary variants (sub-delay, sub-pos, and sub-visibility) and split them off to a new, separate struct. All of the underlying values are stored in an array instead for simplicity. Additionally, the implementation of some secondary-sub-* properties were slightly changed so there would be less redundancy.
* options: add --secondary-sub-poskarelrooted2023-12-132-0/+4
| | | | The default value is 0 (on the top of the screen)
* playlist: correctly populate playlist-path with the --playlist optionDudemanguy2023-12-131-1/+0
| | | | | | | | | | When using the --playlist option on the commandline, it would mark all entries on the command as having the playlist-path of the value of that passed option, not just the ones that were expanded from it. Fix this by moving the playlist_populate_playlist_path to the same place where the playlist file gets expanded. Ref https://github.com/mpv-player/mpv/issues/13075#issuecomment-1852179164
* filter_sdh: add full width parentheses to the enclosures stringDudemanguy2023-12-081-1/+1
| | | | | Since these are technically parentheses, we'll treat them the same way as normal parenthesis. Fixes #11155.
* filter_sdh: add --sub-filter-sdh-enclosures optionDudemanguy2023-12-082-0/+3
| | | | | | | | | | | This filter is a bit complicated, but one of the essential parts of it is removing text enclosed by particular set of characters (e.g. text inbetween []). This was previously hardcoded to only take into account parenthesis and brackets, but people may want to filter more things so make this customizable. The option only takes "left hand characters" so the right pair is mapped internally if applicable. If not, then we just use the same character. Fixes #8268 since the unicode character in question can just be passed to this option.
* m_option: respect pathlist seperator when printingllyyr2023-12-041-1/+2
| | | | Apparently we never did this
* options: add --osd-bar-border-sizeGuido Cella2023-11-272-0/+3
| | | | | Closes #1484. The default size is smaller than the previous --osd-border-size default value of 3 with the default --osd-bar-h.
* options: add secondary-sub-delayRipose2023-11-262-2/+3
| | | | | | | | | | | | | Add --secondary-sub-delay option and decouple --sub-delay from secondary subtitles. This produces desirable behavior in most cases as secondary and primary subtitles tracks tend to be timed independently of one another. This feature is implemented by turning the sub_delay field in mp_subtitle_opts into an array of 2 floats. From here the track index is either passed around or derived when sub_delay is needed. There are some cases in dec_sub.c where it is possible for dec_sub.order (equivalent to track index) to be -1. In these cases, sub_delay is inferred as 0.
* options: add more properties to default watch-later-optionsKacper Michajłow2023-11-121-0/+12
| | | | | | | | | | | | | | | | | | | Adds: --secondary-sub-visibility --video-aspect-method --video-unscaled --video-pan-x --video-pan-y --video-rotate --video-crop --video-zoom --video-scale-x --video-scale-y --video-align-x --video-align-y Those properties are related to playback state and are likely expected to be restored when resuming playback.
* options: remove not relevant props from default watch-later-optionsKacper Michajłow2023-11-121-5/+0
| | | | | | | | | | | | Removes: --border --fullscreen --ontop --osd-level --pause Those options are not really content related. I don't see much gain to save them per each watch later entry.
* m_option: remove leftovers of del actionGuido Cella2023-11-121-8/+2
| | | | | | | | | | b56e63e2a9 removed -del for list options but it is still listed in the list structs, which means that it is still tab completed on the CLI like the other actions, and seems to behave like -set. Remove it so it is no longer tab completed. Also remove the description of -del from the help output of object settings lists --(ao|vo|af|vf)-help, and update a comment.
* sub: add --sub-stretch-durations optionMohammad AlSaleh2023-11-072-0/+2
| | | | | | | | | Stretch a subtitle duration so it ends when the next one starts. Should help with subtitles which erroneously have zero durations. I found such a subrip substitles stream in the wild. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* vo: replace max swapchain depth magic numberDudemanguy2023-11-071-1/+1
|
* ALL: use new mp_thread abstractionKacper Michajłow2023-11-052-22/+22
|
* options: add UPDATE_SUB_HARD flag to sub-ass-overrideDudemanguy2023-11-051-1/+2
| | | | | | | | The other options that have to do with ass styles also uses this flag. It's needed since we have to destroy the ass objects and reinit them. It's a bit incomplete since it will technically only properly work when paused (while playing, the current subtitle gets discarded). That fix is in the next commit.
* m_option: don't try to remove all filter matchesDudemanguy2023-11-011-8/+6
| | | | | | | | | | | | Probably should have actually tested the filter changes but I didn't. This was the wrong spot anyway since labels are unique. Something like this should have been done further down when finding it by content. On second thought, having multiple filters with the same content does have a usecase (e.g. stacking multiple rotations) so removing all of them at once probably isn't great. There's no practical usecase for having duplicates in a string list, so we'll leave that change alone. Fixes #12791.
* m_option: drop support for -del for list optionsDudemanguy2023-10-301-101/+11
| | | | | | 5f74ed58286a1339412554932f31844ec1b64280 deprecated this many years ago. The utility is questionable at best given that -remove exists and is more natural to use. Free up some code and drop it.
* m_option: remove all matches when using -removeDudemanguy2023-10-301-13/+22
| | | | | | | | When using -remove with list options, it previously only removed the first match. Technically, it is possible for there to be more than entry with the same name. They should all be removed. key/value lists specifically only allow unique keys so we don't need to do anything there.
* options: make --screenshot-directory/--watch-later-directory aliasesDudemanguy2023-10-301-2/+2
| | | | By popular demand I guess.
* javascript: use --js-memory-report option instead of MPV_LEAK_REPORTDudemanguy2023-10-262-0/+4
| | | | | | | | The MPV_LEAK_REPORT environment variable was previously read in order to determine whether or not to enable memory reporting for javascript scripts. This is kind of weird and deviates from the norm of exposing an option to the user. So let's just add --js-memory-report and disable it by default instead.
* options: rename --play-dir to --play-directionDudemanguy2023-10-251-1/+2
| | | | | | --play-dir sounds like it has something to do with directories so change it. The play_dir variable is used a bunch everywhere internally so whatever just leave it alone instead of renaming that.
* options: rename --watch-later-directory to --watch-later-dirDudemanguy2023-10-252-2/+3
| | | | Same logic as the previous commit.
* options: rename --screenshot-directory to --screenshot-dirDudemanguy2023-10-252-2/+3
| | | | | Less characters is better? Other options use -dir for directory so consistency I guess.
* options: rename --sub-ass-force-style to --sub-ass-style-overridesDudemanguy2023-10-252-2/+3
| | | | | | | This option has exactly the same semantics are other mpv options that override a particular thing with something from the user. So instead of the "force-style" name, use "-overrides" which is more consistent. The plural form is used since it's a list option.
* options: rename --override-display-fps to --display-fps-overrideDudemanguy2023-10-252-2/+3
| | | | | | Other similar options are in the form of --foo-override not --override-foo. The display-fps one was backwards so flip it around the other way for consistency reasons.
* m_option: initialize m_option_value union properlyKacper Michajłow2023-10-234-10/+12
| | | | | |