0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

52564 Commits

Author SHA1 Message Date
nanahi
85b3a6e567 {stats,osc}.lua: respect --osd-scale-by-window by default
This lets these scripts scale the elements with OSD by default.
2024-05-20 18:29:44 +02:00
nanahi
1f29d037a0 stats.lua: add add auto value to vidscale option
This adds auto to vidscale script option, which lets the scale be
inherited from OSD --osd-scale-by-window option.
2024-05-20 18:29:44 +02:00
nanahi
0c74199a8f osc.lua: add auto value to vidscale option
This adds auto to vidscale script option, which lets the scale be
inherited from OSD --osd-scale-by-window option.
2024-05-20 18:29:44 +02:00
nanahi
e61911c513 DOCS/man/options.rst: recommend --osd-scale-by-window for UI scale
This recommends querying the value of this option when drawing UI elements.
This allows a greater level of consistency by using a single flag which
already controls the scaling behavior of the OSD to control the behavior
of all scripts.

Also fix a capitalization nearby.
2024-05-20 18:29:44 +02:00
Kacper Michajłow
b11f236eb9 meson: limit concurrent link jobs to 16
Statically linking, especially with LTO can use a lot of memory. Limit
to 16 jobs by default, which is more than enough. Only fuzzers are
affected as we don't produce that much binaries otherwise.
2024-05-20 18:25:05 +02:00
Misaki Kasumi
4d03efb4b0 ao: don't call driver->set_paused after reset
This commit adds a state `hw_paused` for pull-based AO.
`driver->set_paused(false)` is only called if `hw_paused` is true.
`hw_paused` is cleared after `ao_reset`, so `set_paused` will
not be called after a reset; instead, `driver->start()` will
be called, which properly starts the AO.
2024-05-20 18:22:31 +02:00
Kacper Michajłow
d31543a7e6 osdep/path-win: fix leak of portable_path 2024-05-20 18:18:42 +02:00
Kacper Michajłow
9ffbc1eef9 osdep/io: fix leak of environment strings on win32 2024-05-20 18:18:42 +02:00
nanahi
4ad1fa28b4 DOCS/interface-changes.rst: document loadfile breaking change 2024-05-20 18:07:38 +02:00
nanahi
8143779e24 DOCS/man/input.rst: document breaking change of loadfile index argument
As an instance of "extraordinary circumstances", such incompatibility
must be extensively documented.
2024-05-20 18:07:38 +02:00
nanahi
d890f369df DOCS/man: note that default autoprobe order is unrealiable
The default values for --ao, --vo, --gpu-api, --gpu-context change from
time to time, but some libmpv clients rely on the existing autoprobe order
and breaks as a result when the value changes. This specifies that the
default autoprobe order should not be relied upon.
2024-05-20 18:07:38 +02:00
nanahi
46dbaff961 DOCS/compatibility.rst: add requirement when changing default values
Documented default values are relied upon by scripts, so changing these
values can casuse incompatible changes. This makes documenting them
required.
2024-05-20 18:07:38 +02:00
nanahi
eb38c3cb87 DOCS/compatibility.rst: add provision for dealing with severe breakages
Currently there is no policy on what should be done when an immediate,
severe breakage happens for "important/often used parts", which can cause
serious concerns especially if such changes remain obscured.

This adds a provision for this kind of incompatible changes under
"extraordinary circumstances", which allows for the breaking change to happen
if there is a critical reason to do so. Such changes must be extensively
documented, and should be avoided as much as possible.
2024-05-20 18:07:38 +02:00
nanahi
c489f34060 DOCS/compatibility.rst: require more details about breaking changes
Currently incompatible changes are not clearly outlined in the related
documentations, such as interface-changes.rst. The impacts and suggested
actions to address the compatibility concerns also rarely exist.

This adds a requirement to include these information for incompatible
changes, so that such changes are clearly conveyed to the users, with
suggested actions to minimize the impacts of such changes.
2024-05-20 18:07:38 +02:00
nanahi
c5c68333e9 DOCS/compatibility.rst: fix formatting 2024-05-20 18:07:38 +02:00
Kacper Michajłow
b03fa20015 ci: save cache also on failures
This makes rebuilds after build failures significantly faster. There is
no reason to discard newly acquired ccache entries.
2024-05-20 18:06:35 +02:00
rcombs
843259ad0f playloop: don't redraw without subs on quit
handle_osd_redraw is called while we're in the middle of the cleanup portion
of play_current_file (via kill_demuxers_reentrant and mp_idle). This happens
after we've torn down the subtitle track, so we end up requesting a redraw
from the vo, which results in a 1-frame flash of the video without subs
before we either quit or switch to the next file (or the force-window state).
This detects that condition and skips the redraw, without interfering with
drawing the osd during idle (eg for pseudo-gui mode).
2024-05-20 18:05:38 +02:00
Kacper Michajłow
7924afcba0 workflows/cleanup_caches: minor cosmetic changes 2024-05-20 18:04:54 +02:00
Kacper Michajłow
2697a8c362 workflows/comment: refactor comment workflow to not use github-script
It is not actively maintained, third-party, javascript wrapper for GitHub
API. The v7 version has issues and most importantly, we don't need a
JavaScript interface to create a comment. Use the first-party CLI tool
and jq.

Sort artifacts by name while at it.
2024-05-20 18:04:54 +02:00
Guido Cella
d3800a67fc console.lua: fix completing change-list ao/vo/gpu-context remove
The value of list options is a table not just for vf and af but for all
object settings lists. Extract just the names from the tables returned
when retrieving these options.
2024-05-20 17:58:28 +02:00
Guido Cella
3f83671f20 input: prioritize builtin bindings matching longer key sequences
This fixes 2 different bugs:

- mp.add_key_binding('c', ...) taking priority over the builtin g-c
  binding.

This follows up 994a08f5a7 which fixed this within the same input
section. This fixes it across different input sections.

- mp.add_key_binding('g-c', ...) not taking priority over a c binding
  defined in input.conf.

This happened because is_builtin of bindings added with
mp.add_key_binding is true though they're not actually builtin.
2024-05-20 17:57:12 +02:00
Guido Cella
5e65999eb2 console.lua: fix the max log lines calculation 2024-05-20 17:56:42 +02:00
Guido Cella
daba15b272 stats.lua: prevent freeze in certain cases with vidscale=no
If using --script-opts=stats-vidscale=no, until osd-height changes from
0 to the correct value, stats.lua's text sizes are multiplied by a scale
of 720, which with the default font size results in a font size of 5760.
Depending on the order of operations, if the stats are drawn at this
size before osd-height is updated, mpv freezes. I get this with
--input-commands=script-message-to stats display-stats-toggle in
conditional profiles, e.g.:

mpv --script-opts=stats-vidscale=no --include=<(echo $'[test]\nprofile-cond=true\ninput-commands=script-message-to stats display-stats-toggle') av://lavfi:testsrc

Fix this by setting a scale to 1 until osd-height is updated to the
correct value.
2024-05-20 17:56:17 +02:00
Guido Cella
657ad9db00 console.lua: use all available lines for selection
Refine populate_log_with_matches()'s logic to not reserve 2 lines for "n
hidden items" when it is not necessary. This avoids printing "1 hidden
items", and doesn't leave an empty line when there are hidden items only
in one direction.
2024-05-20 17:55:36 +02:00
Guido Cella
b82d437ea4 select.lua: strip trailing zeros from FPS values
Show e.g. "30 fps" instead of "30.000 fps".

Also switch to %.4f for consistency with pretty_print_double().
2024-05-20 17:54:57 +02:00
Guido Cella
78b2de677b select.lua: handle sub-start being earlier than ffmpeg's timestamps 2024-05-20 17:54:40 +02:00
Guido Cella
8f596b44be select.lua: don't needlessly initialize default_item 2024-05-20 17:54:40 +02:00
Guido Cella
99fd55ad75 select.lua: preselect the previous sub line without a current line 2024-05-20 17:54:40 +02:00
Guido Cella
ce2f501c23 select.lua: fix preselecting the current subtitle line
Fixes 4d32db21c5.
2024-05-20 17:54:40 +02:00
nanahi
07e5d69351 console.lua: add nonrepeatable prefix to command_prefixes 2024-05-20 17:47:01 +02:00
nanahi
bc5863a631 input/cmd: add nonrepeatable prefix
This allows forcing certain commands to be non-repeatable, e.g. volume.
2024-05-20 17:47:01 +02:00
Kacper Michajłow
e6e0aaa6c6 ad_spdif: add missing codec_desc initialization 2024-05-19 22:09:13 +02:00
Kacper Michajłow
0c85b9915f ci/cleanup_caches: group by cache prefixes too
I've simplified this too much during refactoring, forgot about this. We
need to preserve the latest cache with each prefix.

Fixes: c6b950ae1e
2024-05-19 21:34:37 +02:00
Kacper Michajłow
c6b950ae1e ci: clear old caches to avoid master branch cache trashing
GitHub cache action doesn't allow updating cache with the same key. We
workaround this by saving the cache with a unique key each time (added
timestamp). This works fine, but since there is a limit on cumulative
storage size for all caches, it can force the master branch cache to be
evicted if a lot of PRs are updated. Cache is evicted with LRU policy,
so as long as master branch cache is used it should stay alive, but it
can happen that only PR specifc caches were only used. As a reminder,
PRs can access the master cache, but they are isolated from each other.
Because of this, it is important to keep the master cache, which is
available to all, alive longer.

The solution is to remove all old caches per branch. This is done in a
separate workflow that validates all cache items and removes ones that
would never be used anyway. If PR is closed all caches per branch are
removed. In other cases most recently used one is preserved.

It is done in a separate workflow to limit cache manipulation access.
GitHub workflows triggered by pull_request event are run in the context
of the fork and does not have access to our token, which is good thing.
Also it is quite awkward to get PR number which triggered build
workflow, so just do a full cleanup pass.
2024-05-19 20:35:34 +02:00
Kacper Michajłow
a16f653eb5 msg: clear status line only if needed 2024-05-19 19:10:58 +02:00
Kacper Michajłow
895dd9e4e2 msg: split mp_msg_flush_status_line into private and public variant 2024-05-19 19:10:58 +02:00
Kacper Michajłow
243c1d6d91 msg: check target stream before printing
After f18ce7eca0 status is not always
printed to stderr.
2024-05-19 19:10:58 +02:00
Kacper Michajłow
0988ac85b5 ci: don't pin Ubuntu version where it doesn't matter
Use ubuntu-latest for all jobs that uses container under the hood
anyway, exact Ubuntu version does not matter, so use latest stable one.
2024-05-19 19:10:19 +02:00
Kacper Michajłow
29388538f3 ci/mingw: clean installed packages 2024-05-19 19:10:19 +02:00
Kacper Michajłow
f2f62c5436 ci/mingw: use meson for libass build 2024-05-19 19:10:19 +02:00
Kacper Michajłow
0f93a6934f ci/mingw: remove non-existent cmake option 2024-05-19 19:10:19 +02:00
Dudemanguy
2c68e6cb1f wayland: also log version numbers with protocol interface names
Might be useful for debugging.
2024-05-19 00:05:48 +00:00
Kacper Michajłow
875378ff01 ci/win32: override link args only for the target that needs them
Fixes compilation after USE_GAS related fixes upstream. It links
asm_offset.exe, which shouldn't use a .def file.

Fixes: 0125d35954
2024-05-19 01:29:14 +02:00
Kacper Michajłow
0125d35954 ci/win32: add Vulkan-Loader
vulkan-1.dll is packaged, but is not neccessary in most cases where
Vulkan Loader is already instaled by GPU driver.
2024-05-18 23:22:18 +02:00
Kacper Michajłow
89ed75e63e meson: assume vkCreateDisplayPlaneSurfaceKHR is available when internal
When Vulkan loader is build internally, let's assume it is available.
2024-05-18 23:22:18 +02:00
Kacper Michajłow
2b4c64e321 ci/win32: build shaderc
Instead of linking binary blobs, build everything ourselves.
2024-05-18 23:22:18 +02:00
Kacper Michajłow
85db6a9f15 ci/win32: use ccache 2024-05-18 23:22:18 +02:00
Kacper Michajłow
a0195d335d ci/win32: enable all available projects from meson's wrapdb
Rubber Band is disabled because it pulls more dependencies and it is not
worth build. Might be reconsidered later.
2024-05-18 23:22:18 +02:00
Kacper Michajłow
58d9f565c4 ci/win32: add spirv-cross 2024-05-18 23:22:18 +02:00
Kacper Michajłow
8c4b081da9 ci/win32: add shaderc
Use pre-built binaries to reduce CI build time.
2024-05-18 23:22:18 +02:00