1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-03 21:42:18 +00:00
Commit Graph

52509 Commits

Author SHA1 Message Date
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
4e5d996c3a3f74a7308aee53614c2b94c71daebc 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
x9a
481e498427 mpv.desktop: add Arabic translation
Added Arabic translation for "Name", "GenericName", "Comment", and
"Keywords" entries in the .desktop file.
2024-05-30 12:54:44 +00:00
llyyr
c2968244e4 TOOLS/gen-interface-changes: wrap long lines to 80 col 2024-05-29 17:48:50 +00:00
llyyr
7aaa7b221f input.conf: change 'u' binding to cycle between 'force' and default 2024-05-29 17:48:50 +00:00
llyyr
de8bce33ed options: make sub-ass-override default to 'scale'
Previous commit changed the semantics of 'yes', so change the default to
scale to prevent unexpected user facing changes
2024-05-29 17:48:50 +00:00
llyyr
f37691a156 options: move sub-ass-override 'scale' above 'force'
Also make it an enum for clarity

This is the right order in terms of both destructiveness and also the
total number of --sub-* options applied.
2024-05-29 17:48:50 +00:00
llyyr
af7ab6f603 sd_ass: only set sub-scale for 'scale', 'force' or 'strip'
Currently we also set it for sub-ass-override=yes which is unintended
2024-05-29 17:48:50 +00:00
Dudemanguy
42181a8769 DOCS/input: clarify the difference between audio-pts and time-pos
In light of the changes in the recent commits.
2024-05-29 13:48:40 +00:00
Dudemanguy
5988473b76 player: replace get_current_time with get_playback_time in some spots
The problem with using get_current_time is that it can return negative
values. Interally in mpv, we need this but for some spots negative
values are not great. Since the previous commit enforced nonnegative
returns for get_playback_time, we can use that instead. The two areas
changed here are watch later configfile writing (clearly should always
be a positive number) and the time-pos property (negative numbers are
nonsense for users). This fully fixes #10346.
2024-05-29 13:48:40 +00:00
Dudemanguy
d93f53b324 player/playloop: force get_playback_time to be at least 0
Except for MP_NOPTS_VALUE. We keep that as is. When this was originally
added in a73415584c9dbf920ec14d26d0b0629cae81b3d5, it appears like
having the time always start at 0 was the intent. In cases where
get_current_time returns a negative that isn't MP_NOPTS_VALUE, force
this to 0.
2024-05-29 13:48:40 +00:00