1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-19 14:26:57 +00:00
Commit Graph

52618 Commits

Author SHA1 Message Date
Kacper Michajłow
8e4dcb15ce osdep/endian: add missing byte order defines 2024-06-05 19:07:58 +02:00
Kacper Michajłow
8657b20574 ao_coreaudio_chmap: fix shadowed variable 2024-06-05 19:07:58 +02:00
Kacper Michajłow
2e19420756 stream_cdda: suppress Wundef warning 2024-06-05 19:07:58 +02:00
Kacper Michajłow
fc0d0f10eb fuzzers/common: add prototype for LLVMFuzzerTestOneInput
To suppress warning.
2024-06-05 19:07:58 +02:00
nanahi
16612672fd input: fix grammar errors and typo 2024-06-05 13:35:33 +00:00
nanahi
0509e5b2ed input: only begin VO dragging if the section allows
Otherwise, on sections which don't allow VO dragging, the mouse button
is force released and dragging events won't be generated.

Fixes: 349aac462e
2024-06-05 11:11:00 +02:00
Kacper Michajłow
e7630722d8 autoload.lua: always accept current file as a valid file
This allows loading other types of media from the current directory,
with same_type=no, regardless of whether the current type is enabled for
autoload.

Fixes: #14287
2024-06-04 15:39:18 +02:00
Kacper Michajłow
a64a5c2222 autoload.lua: match also image extension
For clarity, it is already matched if extention is in EXTENSIONS if
pl_count == 1.
2024-06-04 15:39:18 +02:00
Kacper Michajłow
8dcd5ea288 autoload.lua: cosmetic changes 2024-06-04 15:39:18 +02:00
Kacper Michajłow
7d4719704e autoload.lua: fix options update
The extensions list needs to be cleared in this case. Also, add the
missing split_patterns().
2024-06-04 15:39:18 +02:00
Dudemanguy
fa89082f2e sub: avoid unneeded calls to is_animated
4e5d996c3a added this as part of a series
of patches written to avoid wasteful sub redraws when playing a still
image with subs. The is_animated special case was specifically for ASS
subtitles that have animations/effects and would need repeated redraws
in the still image case. This check was done unconditionally for all ASS
subtitles, but for very big ASS subtitles, this text parsing can get a
bit expensive.

Because this function call is only ever needed for the weird edge case
of ASS subtitles over a still image, some additional logic can be added
to avoid calling is_animated in the vast majority of cases. The animated
field in demux_packet can be changed to a tristate instead where -1
indicates "unknown" (the default state). In update_subtitle, we can look
at the current state of the video tracks and decide whether or not it is
neccesary to perform is_animated and pass that knowledge to sd_ass
before any subtitle packets are decoded and thus save us from doing this
potentially expensive call.
2024-06-04 12:29:13 +00:00
nanahi
7e82108bec input: reset doubleclick timer when dragging begins
This prevents doubleclick from activation if a second mouse click comes
quickly after a click which begins dragging.
2024-06-04 12:41:51 +02:00
nanahi
49b5e6d042 input: un-hardcode VO dragging
This adds the --input-builtin-dragging option, which allows the built-in
dragging behavior to be disabled. This allows scripts to implement custom
dragging behavior with left button down events and begin-vo-dragging
command, which could only be done for other mouse buttons before.
2024-06-04 12:41:51 +02:00
nanahi
349aac462e input: prevent MBTN_LEFT conflict with VO dragging
Currently, the built-in VO dragging conflicts with the MBTN_LEFT binding,
so the binding is activated even though the VO dragging begins. Fix this
by releasing the currently down command so that MBTN_LEFT can be bound to
a useful action (such as play/pause).
2024-06-04 12:41:51 +02:00
nanahi
a6683ea3c9 input: implement VO dragging deadzone
This adds the --input-dragging-deadzone option, which adds a deadzone
for the built-in VO deagging. This prevents accidental VO dragging.
2024-06-04 12:41:51 +02:00
nanahi
a23098b555 input: fix mouse position equality check
The stored mouse position mouse_vo_x/y are scaled (currently only for
vo_xv), but the position equality check compares between raw position
and scaled position.

Fix this by storing and checking the raw position instead. The raw
position is useful for the next commit.
2024-06-04 12:41:51 +02:00
nanahi
82c8a98884 input: begin VO dragging when moving mouse while left button is down
Will be used for the VO dragging deadzone.
2024-06-04 12:41:51 +02:00
nanahi
23d9c8dc6a DOCS/man/options.rst: remove DVD menu reference for --input-cursor
Not supported anymore.
2024-06-04 12:41:51 +02:00
Kacper Michajłow
0c716e762f test/meson: remove unneded sources 2024-06-03 19:18:06 +02:00
Kacper Michajłow
8f220067df ci/mingw: resolve pkgconfig deprecation warning in meson
pkgconfig is deprecated in favor of pkg-config. Define both for
compatibility with meson < 1.3.0.

https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig
2024-06-03 19:18:06 +02:00
Kacper Michajłow
bec3f606cf ci/mingw: run meson tests 2024-06-03 19:18:06 +02:00
Kacper Michajłow
bb078b8303 ci/mingw: add exe_wrapper to cross file
Allows running complied binaries on build machine.
2024-06-03 19:18:06 +02:00
Kacper Michajłow
7e8c887873 ci/mingw: support encode mode 2024-06-03 19:18:06 +02:00
Kacper Michajłow
edcc72ba02 ci/mingw: use ninja for cmake builds 2024-06-03 19:18:06 +02:00
Kacper Michajłow
4caca3e6c0 test/paths: skip normalize tests if pathcch library is not available
If pathcch is not available paths are not normalized on Windows.

Fixes tests on ancient mingw.
2024-06-03 19:18:06 +02:00
Kacper Michajłow
734846c123 test_utils: don't use subprocess for diffing test results
Helps with testing during cross-compilation and avoids external
dependency.

Output maybe is not that nice, but this output in our tests is not
useful anyway. We know if it changes it is beacuse one of the dependency
version changed.
2024-06-03 19:18:06 +02:00
Kacper Michajłow
09c359e1d3 test/libmpv_encode: print logs also during initialize 2024-06-03 19:18:06 +02:00
Kacper Michajłow
8a9901963d test/libmpv_encode: don't use mpv internals for test
mktemp is good enough for this test purposes and also tests if libmpv is
able to create a file that doesn't exist.
2024-06-03 19:18:06 +02:00
Kacper Michajłow
d70a0b4494 player/playloop: remove now unused get_percent_pos() 2024-06-03 19:16:35 +02:00
Kacper Michajłow
37127276cc win32: quantize taskbar playback position into uint8 range
Also, if the position is valid, set it to 1 / INF. Windows interprets 0
as non-progress.

Progress is quantized into uint8 range, it is good enough for this
use-case. This avoids unnecessary vo_control and
ITaskbarList3::SetProgressValue calls and should be visually
indistinguishable in practice.

Fixes #14282
2024-06-03 19:16:35 +02:00
Kacper Michajłow
d3b251bb99 Revert "d3d11: calc vsync interval on real stats, not just last interval"
The values provided since last disjoint event may include significant
error in case there are periods of slower presentation. We should look
at more localized/current values of presentation.

For more accurate approximation of vsync rate I plan to add better
algorithm to calculate it.

Revert this commit alone as it is not neccessary and gives as separation
from other changes for better regression testing.

This reverts commit f27767f59e.
2024-06-03 19:16:01 +02:00
Guido Cella
e95af5b607 TOOLS/autoload.lua: fix directory_mode and ext options
Operations on option values need to be performed after they are read.

Fixes 843161d96e.
2024-06-03 15:25:51 +02:00
nanahi
cfc651a805 osd: don't use get_percent_pos function
Use get_current_pos_ratio instead, and round the value to integer with
printf precision specifier.
2024-06-03 15:14:40 +02:00
nanahi
b77c5168b4 command: simplify printing floats as integers
For this purpose, the printf precision specifier can be used.
No need to call lrint.
2024-06-03 15:14:40 +02:00
Guido Cella
9fa8101847 README: link to discussions 2024-06-02 22:53:49 +02:00
Guido Cella
525fa85932 osc.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
c5468ba5ff TOOLS/test-hooks.lua: fix lint warning 2024-06-02 22:26:00 +02:00
Guido Cella
3613070380 TOOLS/status-line.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
c28525ac9d TOOLS/osd-test.lua: fix lint warning 2024-06-02 22:26:00 +02:00
Guido Cella
1f356d6784 TOOLS/observe-all.lua: fix lint warning 2024-06-02 22:26:00 +02:00
Guido Cella
5977722adc TOOLS/nan-test.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
c12e437d43 TOOLS/cycle-deinterlace-pullup.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
f3f77353f2 TOOLS/command-test.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
843161d96e TOOLS/autoload.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
44d7100296 TOOLS/autodeint.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
142b75a95f TOOLS/autocrop.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
ee514c6acf TOOLS/ao-null-reload.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
62868beffe ytdl_hook.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Guido Cella
fe760f2b8a console.lua: fix lint warnings 2024-06-02 22:26:00 +02:00
Dudemanguy
df166c1333 mpv.desktop: fix capitalization error
Missed in 481e498427
2024-06-01 15:08:59 -05:00