Commit Graph
54080 Commits
Author SHA1 Message Date
MarieVelter42 89427a4201 osc.lua: fix volume icon not updating while paused
Volume icon in the OSC did not update when mute toggled or
volume changed while playback was paused and mouse was idle.

This commit adds observers for mute and volume properties to
request_tick(), ensuring OSC updates immediately on mute or
volume changes, even if playback is paused and mouse is idle.
2025-07-04 10:17:04 +02:00
jsaowji 89c3f4d5c1 demux_cue: ignore mcn 2025-07-04 10:16:45 +02:00
nanahi a043624ea6 osc.lua: fix element touch handling
On some compositors, when all touch points disappear the compositors
reset the mouse position, which moves the mouse out of the osc element
trigger area so mouse up events do not happen.

Fix this by tracking the last touch position and use that as the virt
mouse position if the screen is recently touched.
2025-06-29 18:16:54 +02:00
rkscv 5f8d5f8e8b DOCS/man/lua: fix spacing issues 2025-06-29 11:41:44 +02:00
llyyr 591522c38f wayland: check if we have color representation manager first
before using it
2025-06-28 21:30:24 +00:00
Dudemanguy ed8954e8cf wayland: add support for wp-color-representation-v1
This is yet another color-related protocol for wayland. It's pretty
simple compared to the color-management protocol, and there's no real
reason to not advertise the color representation to compositors that
might find it useful.
2025-06-27 23:38:48 +00:00
nanahi 18defc8530 stats.lua: fix append_property exclusions
f676a9ff20 changed some append_property
calls to append, but append does not support the exclusion feature
which results in "HW: no" shown when no hwdec is active when this
was not displayed before.

Fix this by adding option to append_property to use get_property_cached.

Fixes: f676a9ff20
2025-06-20 16:13:14 +02:00
Dudemanguy 494afa4115 test/libmpv_test_track_selection: add a test for regional languages
Relevant for the forced subtitle case where we want a regional audio
language like en-US to match eng language subtitles. The general
matching logic is covered in the language test already.
2025-06-19 20:18:02 +00:00
Dudemanguy 580f2ecbd5 player/loadfile: match audio and subtitle language with mp_match_lang
For matching the audio language with the track subtitle language,
strcasecmp is insufficient since it only allows exact matches and misses
the language regional variant. Fix this by simply using mp_match_lang
instead.

Fixes #16461.
2025-06-19 20:18:02 +00:00
Norgerman e8ade130fa ci/win32: enable libaom 2025-06-12 18:08:32 +02:00
Norgerman e612f419f3 ci/win32: manually install cmake to fix cpu detection issue 2025-06-12 18:08:32 +02:00
Kacper Michajłow 47bc7b2a07 ytdl_hook.lua: add support for HEVC 2025-06-10 17:52:25 +02:00
Roman Bochagov 59d5f774a4 ao_avfoundation: fix memory leak
Fix memory leak in ao_avfoundation caused by audio device switching.

Fixes #16283
2025-06-09 19:31:48 +02:00
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