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

51272 Commits

Author SHA1 Message Date
Kacper Michajłow
dffaa9cf6b demux/lavf: don't use deprecated side data
Fixes rotation metadata no longer works.

See: 5432d2aaca
Fixes: #12836
2023-11-09 21:30:50 +00:00
NRK
04b220731e editorconfig: add max line
if we're going to have an editorconfig, might as well make it accurately
reflect the coding guide.

also set trim trailing whitespace to true.
2023-11-09 21:30:25 +00:00
der richter
23de1deaaa mac: remove runtime checks and compatibility for macOS older than 10.15
we stopped supporting macOS older than 10.15 and hence can remove all
the unnecessary runtime checks and compatibility layers.
2023-11-09 18:12:25 +00:00
Dudemanguy
a5bf211e12 meson: remove several macos-10-* build options
These have been build options since the waf build, but that doesn't
really make sense. The build can detect whatever macOS sdk version is
available and then use that information to determine whether to enable
the features or not. Potentially disabling multiple sdk versions doesn't
really make any sense. Because f5ca11e12b
effectively made macOS 10.15 the minimum supported version, we can drop
all of these checks and bump the required sdk version to 10.15. The rest
of the build simplifies from there.
2023-11-09 18:12:25 +00:00
Kacper Michajłow
051ba909b4 player/loadfile: remove blank line on exit 2023-11-08 21:55:08 +00:00
Kacper Michajłow
82451bdf04 msg: ensure status line is always visible
Restore last status line if it has been cleared by another message.
2023-11-08 21:55:08 +00:00
Kacper Michajłow
5c3faf71e8 msg: factor out print code
Will be useful for next commit.
2023-11-08 21:55:08 +00:00
Kacper Michajłow
773f72e6c6 msg: convert dump_stats to bstr 2023-11-08 21:55:08 +00:00
Kacper Michajłow
0853c719f1 msg: use bstr for partial msg 2023-11-08 21:55:08 +00:00
Kacper Michajłow
2fdb1d31ae msg: check isatty separately per each stream 2023-11-08 21:55:08 +00:00
Kacper Michajłow
db77d7836e Revert "player: cut off status line on terminal width"
No longer needed, wrapped status line is supported now. Also this didn't
work correctly if status were decorated with module name or time.

This reverts commit ab6fac43b4.
2023-11-08 21:55:08 +00:00
Kacper Michajłow
54a7acb7dc Revert "player: don't print status line again when quitting"
This workaround is not longer needed.

This reverts commit cdc05c33b3.
2023-11-08 21:55:08 +00:00
Kacper Michajłow
24270b8587 msg: refactor how terminal messages are printed
- prepare string before printing
- reduce amount of fflush(), especially for multiline messages
- clear status line and keep it always at the bottom
- indent module name to the longest value
- disable cursor for status line
- properly support wrapped status line

Overall makes status line less flickering and remove stray status
instead of scrolling them up.
2023-11-08 21:55:08 +00:00
Kacper Michajłow
e682834234 stats.lua: disable ASS formatting when printing to terminal 2023-11-08 21:55:08 +00:00
Kacper Michajłow
d0b8472e5a msg: don't mix partial log messages, with unrelated log levels 2023-11-08 21:55:08 +00:00
Kacper Michajłow
477a0f8318 vo: replace VOCTRL_HDR_METADATA with direct VO params read
Currently VOCTRL are completely unusable for frequent data query. Since
the HDR parameter addition to video-params, the parameters can change
each frame. In which case observe on those parameter would be triggered
constantly. The problem is that quering those parameters involves VOCTRL
which in turn involves whole render cycle of delay.

Instead update VO params on each draw_frame. This requires changes to VO
reconfiguration condition, but in practice it should only be triggered
when image size or data layout changes. In other cases it will be
handled internal by VO driver.

I'm not quite happy with this solution, but don't see better one without
changing observe/notify logic significantly. There is no good way
currently to handle VOCTRL that are constantly queried.

This adds unfortunate synchronization of player command with VO thread,
but there is not way around that and if too frequent queries of this
param becomes a problem we can thing of other solutions.

Changes the way to get data from VO driver added by a98c5328dc

Fixes: 84de84b
Fixes: #12825
2023-11-08 21:45:07 +00:00
Thomas Weißschuh
a96d26e63a audio: avoid unnecessary silence padding in read_buffer()
Not all callers of read_buffer() require the buffer to be padded with
silence.
2023-11-08 20:26:23 +01:00
Thomas Weißschuh
0b43b74c15 ao_audiotrack: switch to ao_read_data_nonblocking() 2023-11-08 20:26:23 +01:00
Thomas Weißschuh
36d5b52612 ao_coreaudio: switch to ao_read_data_nonblocking() 2023-11-08 20:26:23 +01:00
Thomas Weißschuh
5aa2068270 ao_pipewire: switch to ao_read_data_nonblocking()
Avoid blocking the process callback as it runs with realtime privileges.
2023-11-08 20:26:23 +01:00
Thomas Weißschuh
4a134f441d audio: introduce ao_read_data_nonblocking()
This behaves similar to ao_read_data() but does not block and may return
partial data.
2023-11-08 20:26:23 +01:00
Kacper Michajłow
a5c32ea52e threads-win32: add comment about local decl of a function 2023-11-08 04:32:10 +00:00
Kacper Michajłow
2ae56e78dd threads-win32: support UWP in mp_thread_set_name 2023-11-08 04:32:10 +00:00
Kacper Michajłow
add2f3c8c9 meson: add missing source file for UWP 2023-11-08 04:32:10 +00:00
Kacper Michajłow
fa0929bf71 osdep/threads-posix: use CLOCK_MONOTONIC if supported 2023-11-08 04:32:10 +00:00
Kacper Michajłow
0a6c179026 osdep/timer-linux: check clock availability on init 2023-11-08 04:32:10 +00:00
Dudemanguy
468b9bede7 DOCS/option: discourage the use of video-latency-hacks a bit more
Who knows why this exists but maybe it's possibly useful in some obscure
case. Probably worth mentioning that it could break other options.
2023-11-08 00:11:34 +00:00
Niklas Haas
293fe9d74a vo_gpu_next: add --target-gamut option
Fixes: https://github.com/mpv-player/mpv/issues/12777
2023-11-08 00:55:39 +01:00
Guido Cella
c798f66343 stats.lua: remove unused variable
056072bf95 deleted the only use of property_list.
2023-11-07 20:58:30 +00:00
Guido Cella
5c2cdb749d console.lua: don't print the console log to the OSD when switching VO
Fixes #12735, fixes #12839.
2023-11-07 20:49:44 +00:00
Dudemanguy
00533ccdae player/command: handle force window on runtime vo changes
Without this, changing the vo at runtime with --force-window --idle
would kill the vo.
2023-11-07 20:49:36 +00:00
Christoph Heinrich
69c4ed585d stats: don't overwrite color and alpha of osd-back-color 2023-11-07 20:48:37 +00:00
Christoph Heinrich
2406a89e00 console: don't overwrite color and alpha of osd-back-color 2023-11-07 20:48:37 +00:00
Mohammad AlSaleh
d470766000 sub: add --sub-stretch-durations option
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>
2023-11-07 20:46:40 +00:00
Kacper Michajłow
c2b3d967ba player/command: fix typo in sig-peak value computation
Fixes: 73fbe09a49
2023-11-07 20:59:46 +02:00
Kacper Michajłow
6dafc44ed0 win32: fix hit test using client rc instead window
windowrc in vo_w32_state is actually client size, for hit test we need
proper window size. When border is disabled those sizes are the same,
but when only title bar is disabled it is not.

Reduce the hit area to more sane values when the border is not
drawn to minimize amount of covered client area in borderless mode.
2023-11-07 16:42:28 +00:00
sfan5
242066a5ef vo_gpu: apply ICC profile and dithering only to window screenshots 2023-11-07 16:15:19 +01:00
sfan5
ff521dfbd1 vo_gpu_next: drop alpha channel from screenshots if unneeded 2023-11-07 16:15:19 +01:00
sfan5
8c751a0d78 image_writer: improve format conversion logging 2023-11-07 16:15:19 +01:00
Christoph Heinrich
f41805081b console: wrap rows at the top
The previous commit was already a big improvement, but it was still
somewhat slow on the lua interpreter. By wrapping the table at the top
we loose the consistent placement of items while resizing (at least as
long as the column count didn't change), but we avoid taking all the
off screen items into account.

The fewer items fit on screen the faster this becomes.
2023-11-07 01:36:59 +00:00
Christoph Heinrich
ff131d7a20 console: optimize table generation
Showing all properties was terribly slow.
Instead of starting at one row and increasing the row count until it
fits, the column count can be increased until it doesn't fit anymore.

That alone already reduces the required iterations, but from the column
count an upper and lower bound for the row count can be calculated.

For large tables this dramatically reduces the amount of iterations.
2023-11-07 01:36:59 +00:00
Christoph Heinrich
bca0b20c09 console: enable completions without a prefix
This way it is possible to get a list of all options or all properties,
instead of having to guess the first letter before any suggestions are
shown.
2023-11-07 01:36:59 +00:00
Guido Cella
386de3f275 console.lua: complete raw properties 2023-11-07 00:59:16 +00:00
Christoph Heinrich
43ed0a83d0 console: avoid redundant completion appendage
So far completing something like `${some-pro}` with the cursor between
`o}` would result in `${some-property}}`. Adding that superfluous `}` can
be avoided by checking if it's already in the string after the cursor.
2023-11-07 00:55:15 +00:00
Dudemanguy
4aa3866400 present_sync: remove unneeded clear_values function
This was specifically special logic for drm. Before present_sync, it
would also clear out all of its vsync values like this. The old drm code
would save a bunch of samples which would confuse vo.c when unpausing
since it got old, bogus values. Since we make sure to match successive
vsync samples with the swapchain depth and that present sync samples
also match the swapchain depth, this is unneeded.
2023-11-07 00:52:46 +00:00
Dudemanguy
506e8d9eaf vo: require successive vsyncs to be more than swapchain depth
To make sure that present_sync is in line with the vsync timings here.
2023-11-07 00:52:46 +00:00
Dudemanguy
2872e929bb present_sync: only save as many entries as the swapchain depth
Saving more than the swapchain depth is just wasteful. We can just save
a copy of the vo_opts here and check the value whenever we're updating
values.
2023-11-07 00:52:46 +00:00
Dudemanguy
cf69fa03ca vo: replace max swapchain depth magic number 2023-11-07 00:52:46 +00:00
Christoph Heinrich
bd4bf6e383 DOCS/mpv: consistent formatting of keybindings 2023-11-07 00:43:38 +00:00
Christoph Heinrich
d3355679b3 DOCS/console: correct capitalization of keybindings 2023-11-07 00:43:38 +00:00