Commit Graph
54067 Commits
Author SHA1 Message Date
Kacper Michajłow a418d21635 github/workflows/lint: exclude font.props from xml check 2025-06-06 10:45:52 +02:00
sfan5 6b178e4f5a misc/path_utils: create folders with 0777 mode
This better matches other Unix tools.
Note that in practice the umask downgrades this to 0755 or 0775, so folders don't actually end up world-readable.
2025-06-02 15:59:05 +02:00
sfan5 9db49973f2 misc/path_utils: check existence first in mp_mkdirp() 2025-06-02 15:59:05 +02:00
sfan5 013e76e1c0 player: create missing folders for watch-history-path
fixes: #16357
2025-06-02 15:59:05 +02:00
sfan5 c4a00b2c85 player: handle unavailable options while writing watch-later file
fixes: #16410
2025-06-02 15:59:05 +02:00
sfan5 7182991bc4 sub/lavc_conv: also log decoder used 2025-06-02 15:59:05 +02:00
sfan5 6c6e81314a DOCS/libmpv: clarify that handle used by cplugin cannot be destroyed 2025-06-02 15:59:05 +02:00
sfan5 0f26d9f1ee sub/sd_lavc: fix condition for probing output type
This fixes decoding with libaribb24.
closes #16384
2025-06-02 15:59:05 +02:00
nanahi 730062b510 command: fix frame step with mouse buttons
c7c09fdb8b made frame step with seek flag
ignore key ups. However, for commands with emit_on_up flag set, which can
happen with mouse buttons, command should only be triggered on key ups.
This results in frame-step command with seek flag triggered on mouse down
instead of mouse up, and frame-back-step command not working with mouse.

Fix this by making sure that step is triggered depending on the emit_on_up
flag.

Fixes: c7c09fdb8b
2025-05-31 10:01:22 +02:00
sfan5 063a9b8c89 sd_lavc: log some useful information 2025-05-31 09:59:54 +02:00
sfan5 c0efee0512 video/image_writer: improve logging of conversions and encoder 2025-05-31 09:59:54 +02:00
sfan5 cf00b07536 various: use MP_ARRAY_SIZE macro 2025-05-31 09:59:54 +02:00
Kacper Michajłow 1d1535ff91 ci/openbsd: bump to 7.7 and remove ffmpeg subproject 2025-05-23 00:13:23 +02:00
Patrick Wang 43e83dc74b options: parse tls-related options as path 2025-05-21 14:43:24 +00:00
Kacper Michajłow 8407df979f sub/osd_libass: don't rerender OSD if not changed
Rendering OSD on every frame draw is quite heavy, even if some of the
rendering parts are cached, it still takes significant amount of time,
depending of payload can take 8-10 ms just to do the text shaping.

Instead render only when we need it.
2025-05-21 09:45:43 +02:00
Kacper Michajłow 817372ac96 demux_lavf: check if context is correctly passed to callbacks by ffmpeg
To catch ffmpeg bugs early, instead of crashing or worse.
2025-05-17 21:33:58 +02:00
Dudemanguy f9ec3d2c25 wayland: allow potential dragging of maximized windows
The locked_size restriction also prevents dragging from working on
maximized and tiled windows. A compositor may choose to restrict this
anyway (esp. tiling window managers), but there's no harm in sending the
request if it supports it. The only thing we really need to block here
is the fullscreen case. Fixes #16338.
2025-05-14 13:49:37 +00:00
Kacper Michajłow 4522929741 ci/win32: revert back ffmpeg to meson-7.1 branch
Also fixes jpegxl build after upstream changes. It wasn't enabled
correctly before.
2025-05-13 20:11:34 +02:00
Attila Fidan c399422722 clipboard-wayland: flush display after creating data sources
The data source requests are prepared inside create_data_sources from a
different thread than the clipboard thread, so it is necessary to flush
here. Otherwise, if mpv is not already managing the current selection,
we'll have to wait until the clipboard thread reenters
clipboard_wayland_dispatch_events for the request to be sent to the
compositor and have the other clients be sent new the new selection,
which may take up to 10 seconds.
2025-05-13 13:41:48 +00:00
Christopher Degawa b3070d1255 build: move check for DXGI_DEBUG_D3D11 down
video/out/gpu/d3d11_helpers.c requires it as well, and it's possible to
have egl-angle-win32 enabled without d3d11.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2025-05-09 12:47:44 +02:00
Kacper Michajłow 95c882dddc ci/win32: pin ffmpeg revision to the latest working one
Until this is fixed upstream:
https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/issues/56
2025-05-09 12:44:47 +02:00
xyfish 139591a078 libarchive: try to use utf8 pathname 2025-05-08 00:46:23 +02:00
Ryan Hendrickson 3baf2e1ef8 DOCS/man/options: equivalent -> analogous 2025-05-08 00:45:57 +02:00
Guido Cella d702e5fec8 console.lua: set compute_bounds and hidden at startup
There is no need to set them every time the width is calculated.
2025-05-03 22:45:10 +02:00
Guido Cella 4194522344 console.lua: rename option_color_to_ass to color_option_to_ass
It is more correct English.
2025-05-03 22:45:10 +02:00
sfan5 e663cbc037 vo: move vo_mediacodec_embed to not be the default on Android 2025-05-03 18:13:35 +03:00
Kacper Michajłow 61be670716 ra_d3d11: mark cache_magic as nonstring for GCC 15 2025-04-28 15:54:12 +02:00
Kacper Michajłow cf3e332abb osdep/win32/smtc: workaround GCC 15 bogus template warning
Drop it to warning, even if -Werror is in effect. Interesting part is
that this makes this warning disappear completely. GCC diagnostics at
its finest.
2025-04-28 15:54:12 +02:00
Kacper Michajłow 22aacb4008 misc/language: mark arrays as nonstring for GCC 15
Fixes unterminated-string-initialization warnings.
2025-04-28 15:54:12 +02:00
Kacper Michajłow f8cef99033 demux_lavf: replace deprecated usage of stack allocated AVPackets
sizeof(AVPacket) being part of an ABI is deprecated. This was the last
remaining stack usage, missed in previous related change.

Note that we still use sizeof(AVPacket) and sizeof(AVBufferRef) in
demux_packet_estimate_total_size(). But it's safe, the worse that can
happen is that we underestimate the size on mismatch.

Fixes: cb15bc4324
2025-04-27 16:53:57 +02:00
Kacper Michajłow b72d6aa0e1 demux_lavf: fix unconstrained cache size with wrapped AVFrame packets
Fixes excessive memory usage with avdevice input. After [1] packets
returned from avdevice contains wrapped AVFrame. mpv estimates packet
size to limit how many of them are cached. The size were not correctly
calculated, because packed contained only AVFrame* and not the actual
data in buffer. Fix this by calculating wrapped size and add it to our
size estimation.

[1] https://github.com/FFmpeg/FFmpeg/commit/6ca43a9675d651d7ea47c7ba2fafb1bf831c4d0b
2025-04-27 16:53:57 +02:00
nanahi b47c805fa2 various: remove redundant return
void return type functions don't need a final return statement.
2025-04-27 00:10:31 +02:00
Leo Izen 2b38b382cf video/image_writer: tag bits_per_raw_sample when pixfmt changes
This populates the AVCodecContext->bits_per_raw_sample field value
when the pixel format of the screenshot being written doesn't match the
pixel format of the original video. For example, if the original video
was 10-bit and the screenshot is 16-bit, it populates this field so the
encoder can make use of it.

Currently libjxl and png encoders are known to accept this tag and set
the corresponding metadata (via BitDepthHeader, or sBIT).

This feature is only enabled if screenshot-sw=yes is enabled, because
screenshots from a hardware buffer are always natively at max-depth.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-04-25 05:39:48 -04:00
nanahi f147df1393 wayland: print errno strerror for data offer read/write 2025-04-22 22:07:48 +00:00
nanahi 26cb87a2d7 DOCS/man/input: add documentation for Wayland and macOS clipboard write
Wayland clipboard writing is added. macOS clipboard writing was
already implemented but it was forgotten to update the documentation.
2025-04-22 22:07:48 +00:00
nanahi 788b362d5f clipboard-wayland: support clipboard writing
This adds clipboard writing support for the native Wayland clipboard
backend for the ext-data-control-v1 protocol. Both clipboard and
primary selection are supported.
2025-04-22 22:07:48 +00:00
nanahi 688922ee85 video/out/wayland_common: support clipboard writing
This adds clipboard writing support for the VO clipboard backend
when a Wayland VO is active for the wayland core protocol.
2025-04-22 22:07:48 +00:00
nanahi ccd52142f5 video/out/wayland_common: rename dnd_ddev to data_device
The data device is used for both dnd and clipboard, so change it to
a better name.
2025-04-22 22:07:48 +00:00
nanahi 615ee4d9f5 video/out/wayland_common: save last user input serial
This is required for setting selection for clipboard writing.
2025-04-22 22:07:48 +00:00
llyyr b8ab1074eb wayland: log output user-friendly wl_output name
make and model aren't guaranteed to be available, so print the name as
well. This is usually just the connector name e.g. HDMI-A-1.
2025-04-21 15:33:52 +00:00
llyyr 35a98de55e wayland: log when direct scanout is active
Useful for debugging issues with certain AMD GPUs that have problems
that are only present in zero copy scenarios
2025-04-21 15:33:45 +00:00
Guido Cella 3600c716ea console.lua: fix crash when pressing Ctrl+l
Pressing Ctrl+l with selectable items without having called input.get()
earlier caused a crash.

Fixes a6024b562a.
2025-04-18 12:02:47 +02:00
Kacper Michajłow 94bc7315bd video/zimg: set alpha to ZIMG_ALPHA_STRAIGHT in all cases except premul
Fixes: 6a96b15cf4 ("video/csputils: add missing alpha choice")
Fixes: #16255
2025-04-17 21:50:18 +02:00
Guido Cella 01b51d1f72 options: add cue to --playlist-exts's defaut value 2025-04-17 21:40:04 +02:00
llyyr 0dc24a2301 sub/osd: set osd-shaper to complex by default
I'd rather not argue about which is better so go back to status quo,
users can use the more sensible option of "simple" if it doesn't break
anything (which it won't).

Using simple has benefits of growing memory usage slower and much faster
OSD rendering when complex isn't needed.

Simple breaks rendering complex glyphs like Material font icons

Fixes: https://github.com/tomasklaen/uosc/issues/1086
Fixes: f24611980c ("sub/osd: add osd-shaper and set it to simple by default")
2025-04-17 15:44:15 +02:00
yumcookiez df1e71a7cc ytdl_hook: add option to extract chapters 2025-04-17 00:37:13 +02:00
Guido Cella 498a9bf464 console.lua: center correctly within OSC margins
Center in the middle of the rectangle surrounded by the OSC instead of
in the center of the window.
2025-04-17 00:17:01 +02:00
Guido Cella 4dfe92fa27 console.lua: replace font script-opt with monospace_font
Allow configuring the monospace font without also changing the
proportional font. The proportional font is configured with the standard
--osd-font.
2025-04-17 00:13:19 +02:00
Guido Cella 42660a8c23 console.lua: say focused instead of selected
The selected term was causing confusion e.g. in
https://github.com/mpv-player/mpv/pull/15711#issuecomment-2676060139.
Saying either focused or current makes more sense since the item is not
actually selected until you click or press Enter.
2025-04-17 00:08:16 +02:00
Kacper Michajłow 1f809734b2 options: add ivf to video extensions 2025-04-17 00:07:49 +02:00