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

52373 Commits

Author SHA1 Message Date
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
Kacper Michajłow
281c66a815 ci/win32: remove Strawberry Perl from path
It provides broken tools like diff, patch.

Also fix PATH in test stage
2024-05-18 23:22:18 +02:00
der richter
541e00fcdb github/issue_template: ask for possible sample files on feature request 2024-05-17 20:30:43 +02:00
der richter
ae894d9b9b github/issue_template: rework system info section and provide commands 2024-05-17 20:30:43 +02:00
der richter
247eac729c github/issue_template: move mpv information into its own section 2024-05-17 20:30:43 +02:00
der richter
ea66507dd1 github/issue_template: add information on how to create backtraces 2024-05-17 20:30:43 +02:00
der richter
3058028168 github/issue_template: mention (nightly) builds and packages for testing
mention our windows and macOS nightly builds and also link to our mpv.io
installation page.
2024-05-17 20:30:43 +02:00
der richter
e9c98c1f2f github/issue_template: reword file upload instruction 2024-05-17 20:30:43 +02:00
der richter
9f2590b6d1 github/issue_template: reword log file instructions 2024-05-17 20:30:43 +02:00
der richter
704863a016 github/issue_template: be more specific about performance-related issues 2024-05-17 20:30:43 +02:00
der richter
2a68a6cd9e github/issue_template: add checkboxes as instruction check 2024-05-17 20:30:43 +02:00
der richter
d4d5fa0084 github/issue_template: rework issue templates with github forms 2024-05-17 20:30:43 +02:00
der richter
7fd305d4ea github/issue_template: mention github Discussions for questions 2024-05-17 20:30:43 +02:00
Dudemanguy
47f60d1c52 wayland: cap xdg_wm_base at 4 if wm_capabilities aren't supported
Fixes #13986.
2024-05-16 16:23:18 +00:00
Dudemanguy
d59f4fd3ec Revert "player: do not exit when a seek gets queued"
In various edge cases, this causes an assertion that was added later in
8816e1117e to be hit. The actual purpose
of the special case is not really clear. mp_seek already will change the
mpctx->stop_play value, so there shouldn't be any need to do it in
queue_seek. And it is known to cause problems so revert it. Also, remove
the special play direction logic that works around this behavior.
Fixes #13778.

This reverts commit dbdc46c97a.
2024-05-16 13:26:34 +00:00
sfan5
03ca340835 stream: remove directory playlist hint
The stream layer is the wrong place to handle this and the benefit
seems dubious.
2024-05-15 22:45:18 +02:00
sfan5
553fb024d4 stream: check file descriptor passed to fd:// or fdclose:// 2024-05-15 22:45:18 +02:00
sfan5
54c755b08d various: add missing checks for directory streams
All of this code opens a stream and expects to read stuff from a file.
But streams can also be directories and that has to be handled.
2024-05-15 22:45:18 +02:00
sfan5
b69b58a12a {options,player}: fix stream leaks 2024-05-15 22:45:18 +02:00
sfan5
ae23556b6f stream: disallow reading or writing to directories
Reading an entire file is a common operation, meanwhile
stream_file will happily open a directory. This doesn't match well.

Analogously for open_output_stream().
2024-05-15 22:45:18 +02:00
Kacper Michajłow
7a93a584fc fuzzer: add dedicated fuzzers for each demuxer
This will help drill deeper into specific code.
2024-05-15 20:09:54 +02:00
Kacper Michajłow
6ede789092 fuzzer_load: use memfd_create instead of real file
Should be slightly faster. Also fixes leaking temporary file on errors.
2024-05-15 20:09:54 +02:00
Kacper Michajłow
3c26389312 fuzzer_load: merge file and config load into one file
Removes code duplication. Add missing unlink while at it.
2024-05-15 20:09:54 +02:00
Kacper Michajłow
fd1c13f9b3 fuzzers: don't build binaries for disabled protocols
While there is a merit to test if disabled protocols doesn't crash or
something, such test can be made as simple unit tests, no fuzzing needed.
2024-05-15 20:09:54 +02:00
Kacper Michajłow
1f7c223749 av_common: fix integer overflow when adjusting timebase
Found by OSS-Fuzz.
2024-05-15 01:25:18 +02:00
Guido Cella
4d32db21c5 select.lua: strip brackets in select-subtitle-line 2024-05-13 16:36:27 +02:00
Guido Cella
61f72bd512 select.lua: add this script
This adds script messages to select playlist entries, tracks, chapters,
subtitle lines, bindings and properties using the newly introduced
mp.input.select().

This fully closes #13964.
2024-05-12 23:13:48 +02:00
Guido Cella
367a6b561a console.lua: close when pressing enter with input.select
When you select an item, due to the submit handler being called
asynchronously, the default item list is redrawn before the console
closes, which is jarring. Fix this by always closing the console as soon
as enter is pressed, as keeping it open is unlikely to be useful with a
fuzzy selector (unlike with input.get() where it can be used e.g. to
implement a Lua REPL). If desired we can later add a close_on_submit
flag defaulting to true.

Also fix a crash when pressing enter without any match.
2024-05-12 23:13:48 +02:00
Guido Cella
30fd3c1a96 console.lua: fix ctrl+f and ctrl+b keybindings
With mp.input.select() these keybindings were both scrolling and moving
the cursor because of how the condition was written and
handle_pgup()/handle_pgdown() not returning a truthy value.
2024-05-12 23:13:48 +02:00
Guido Cella
1ebe11d06f console.lua: don't crash when scrolling without matches
selected_match can become 0 when pressing certain scrolling
keybindings without any match, and

for i = first_match_to_print, last_match_to_print do

in populate_log_with_matches() runs from 0 to 0 and accessing
matches[0].text crashes console.lua. Return early when it is 0.
2024-05-12 23:13:48 +02:00
Guido Cella
9d75289ced console.lua: truncate lines longer than the maximum width
Avoid messing up the max_log_lines calculation when mp.input.select() is
called with very long items.

This doesn't work with Japanese characters because they are bigger.
2024-05-12 23:13:48 +02:00
Guido Cella
eb4c6be630 console.lua: don't convert integers for mp.input to string
I misunderstood CogentRedTester's review in
https://github.com/mpv-player/mpv/pull/10282#discussion_r1428972352 as
referring to the cursor_position in mp.input's arguments instead of the
one received by the closed callback.

The cursor_position passed to input.get doesn't need to be converted to
a number because it was already JSON, while the cursor_position received
by the closed callback is currently a string, and we need to pass JSON
in input-event script messages to keep it as an integer to work around
mpv converting integer script message arguments to string.

This is more noticeable after implementing mp.input.select(): its submit
argument currently receives the selected index as a string, and this
makes Lua error if you use it as an index of a numerical table, e.g.:

submit = function (id)
    mp.set_property(property, tracks[tonumber(id)].selected and "no"
                              or tracks[tonumber(id)].id)
    ...
end,

This commit avoids having to call tonumber(id).
2024-05-12 23:13:48 +02:00
Guido Cella
994a08f5a7 input: fix builtin sequence bindings
If g-p is a builtin binding and p is bound in input.conf, pressing g-p
triggers the p binding. Fix this by searching for builtin bindings that
match a longer key sequence even after a user-defined binding has been
found.

Even after changing the condition from >= to > bindings of the same key
defined later in input.conf are still preferred over earlier ones,
because bind_keys() overwrites duplicate bindings. Bindings defined by
later mp.add_key_binding calls are also still preferred.
2024-05-12 23:13:48 +02:00
Guido Cella
e6af31dc0c console.lua: implement a command parser to complete more things
This allows more completions than patterns:

Both single and double quotes are recognized.
Quotes around the first token are recognized.
Command prefixes are recognized.
Choice options are completed after change-list/vf/af add/append/pre/set.
File paths are completed after set/cycle-values/change-list with options
that expect files, including cycling between paths with spaces, e.g.
cycle-values glsl-shaders 'foo bar' 'baz qux'.
File paths are completed in the fourth argument of dump-cache.
Items that have been set are completed after change-list remove.
2024-05-12 22:29:40 +02:00
Guido Cella
c4b03700e1 player: add option-info/<name>/expects-file
This will allow console.lua to complete files after e.g. set
glsl-shaders <Tab>.
2024-05-12 22:29:40 +02:00
Guido Cella
4e5845ad03 osc.lua: remove scaleforcedwindow
This is unused since 4e013afd37 because the mpv logo and the "Drop files
or URLs to play here." message are shown instead of the OSC controls. It
has the adverse affect of making the OSC twice as big when playing
videos with --lavfi-complex, because that makes the video property which
osc.lua checks unavailable.
2024-05-12 21:00:38 +02:00
Kacper Michajłow
f220f0fb89 autocrop.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
Kacper Michajłow
e5e17c80ba ytdl_hook.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
Kacper Michajłow
f348a8b303 stats.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
Kacper Michajłow
8fa0e09b27 osc.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
Kacper Michajłow
e17546333a options.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00
Kacper Michajłow
fe488151dc defaults.lua: fix some lint warnings 2024-05-12 20:06:39 +02:00