Commit Graph
54443 Commits
Author SHA1 Message Date
der richter f93df58a8e osxbundle: add new macOS 26 compatible App icon
generated with the Icon Composer project:

actool ./icon.icon \
  --compile ./ \
  --app-icon icon \
  --enable-on-demand-resources NO \
  --development-region en \
  --target-device mac \
  --platform macosx \
  --include-all-app-icons \
  --minimum-deployment-target 10.15 \
  --output-partial-info-plist /dev/null \
  --standalone-icon-behavior all

actool will generate an Assets.car file which is compatible with all the
new Theme variants of macOS 26 (default, dark, monochrome, tinted, etc).
it also generates an old icns file as a fallback, only default style.

since the new Assets.car file can't be used from cocoa directly, without
using private APIs, we still use the icns file when used from CLI.
this also means that from CLI only the default icon is used and the
macOS theming doesn't have any effect.

the macOS theming mechanism only works with the bundle and a Assets.car
file. all icons are generated on the fly depending on the Theme. this
generation has no public API and the mechanism would need to be
replicated by hand. to replicate this behaviour at least three different
icns would need to be generated, tinting needs to be implemented,
several system events need to be subscribed, and this wouldn't guarantee
the same look as the system mechanism. also none of the tools make it
possible to generate macOS 26 compatible icns file, besides for the
default file, since it at least is missing the necessary padding.
2025-12-21 11:48:52 +01:00
Kacper Michajłow efc44d05ff vo: trigger manual redraws at most at slightly over display fps
This is workaround for some windowing platforms that break when they get
too many present requests.

Fixes: #17082
2025-12-21 11:30:31 +01:00
NewUserHa 08dbdd8486 DOCS/man/options: clearify that gpu-next support d3d11va and everything 2025-12-19 19:19:09 +01:00
Niklas Haas 02f47c8825 mp_image: check all components for pl_bit_encoding in mp_image_setfmt
This matches the full logic used in vo_gpu_next.
2025-12-19 18:17:46 +01:00
Kacper Michajłow a310a65d35 vo: put vo states into union
They won't be used together. Could be refactored to put them into priv,
but for now, let's avoid doing bigger refactor.
2025-12-19 18:08:20 +01:00
Kacper Michajłow 93b68d7fe2 meson: remove png icons from win32 resource depend
They are not used, everything is already packed in mpv-icon.ico.
2025-12-19 18:08:20 +01:00
Kacper Michajłow c35e10c2da vo: remove unused configs from context 2025-12-19 18:08:20 +01:00
Julian Orth ae211f7f1b wayland: convert luminance values to libplacebo space
Signed-off-by: Julian Orth <ju.orth@gmail.com>
2025-12-19 18:08:02 +01:00
Guido Cella a58e9e596b Revert "ytdl_hook: add chapters by parsing video's description"
This reverts commit e9c43258b8.

yt-dlp implemented its own parsing to extract chapters from the
descriptions of videos without chapter markers in the player over 3
years ago in https://github.com/yt-dlp/yt-dlp/commit/0fe51254 (the PR is
even inspired by mpv). Actually it was present even earlier in
youtube-dl but was removed for unknown reasons in
https://github.com/ytdl-org/youtube-dl/commit/67299f23d8b1894120e875edf97440de87e22308.
So we can remove our parsing code, as it is dead code that never runs if
yt-dlp's JSON already contains chapters.

And it seems that such videos without chapter markers are rare or
non-existing by now anyway - we can't find any.
https://www.youtube.com/watch?v=1v_4dL8l8pQ is linked from the yt-dlp PR
with the above commit, but now yt-dlp returns the Key moments as
chapters, so it can't be used for testing.

Our parsing was actually worse than yt-dlp's, because #16085 added an
option to disable it to fix the misdetection reported in #16081, but
yt-dlp correctly returns no chapter for that video
(https://www.youtube.com/watch?v=1v_4dL8l8pQ). So this code branch was
only running for misdetections, and by removing it that option is not
needed.
2025-12-19 18:06:14 +01:00
Guido Cella acd3378c9b Revert "ytdl_hook: add option to extract chapters"
This reverts commit df1e71a7cc.

The next commit will make this unused since chapters will only be taken
from yt-dlp's JSON.
2025-12-19 18:06:14 +01:00
Kacper Michajłow 6739fd490b filters/f_decoder_wrapper: reinit decoder on audio-spdif opt change
Fixes: #17072
2025-12-18 13:07:13 +01:00
llyyr 4623a0a7e8 osc.lua: remove flags from disable_key_bindings
disable-section doesn't accept flags, and has no need for it either.

Fixes: c209d4f73b
2025-12-18 13:06:46 +01:00
Kacper Michajłow 122abdfec3 video/out/aspect: don't overflow intermediate values in scaling calc
This fixes calculation of scaling bounds with extreme video zoom levels.

Fixes: https://github.com/mpv-player/mpv/discussions/17123
2025-12-15 01:46:40 +01:00
Kacper Michajłow 5d89f15e97 video/out/gpu/hwdec: load native D3D RA hwdec drivers first
There is no reason to load EGL/VAAPI first as it would fail in default gpu
context/api anyway, on Windows.
2025-12-14 13:42:22 +01:00
llyyr f7be2ee3e9 ao_aaudio: set content type if --audio-set-media-role is enabled 2025-12-13 15:18:12 +01:00
llyyr e99daecbdb ao_audiotrack: set content type if --audio-set-media-role is enabled 2025-12-13 14:46:55 +01:00
llyyr d07e4c7935 ao_pulse: set media.role if --audio-set-media-role enabled 2025-12-13 14:46:55 +01:00
llyyr 1a802b1810 ao_pipewire: avoid setting any media.role by default
This adds option `--audio-set-media-role` to configure whether mpv
should set media roles to supported audio APIs or not. Disabled by
default.

By default, WirePlumber restores the volume of each application to
whatever the last application with the same media role used. This is
completely insane behavior, and I couldn’t find any way for a user to
opt out of it on my end. The `state-stream.lua` script responsible for
this mess only uses media.role if the property is present, so the only
reliable workaround is simply not to set one at all.

This WirePlumber behavior is inherited from PulseAudio, which also
exhibits the same behavior to this day.

This commit also mirrors the same change made to ao_pulse in 2015:
b7325b2f64

See also: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/489
2025-12-13 14:46:55 +01:00
Kacper Michajłow 95c7599c41 ci/win32: downgrade meson to 1.9.2
1.10.0 fails to build cmake projects.

See: https://github.com/mesonbuild/meson/issues/15360
2025-12-08 22:23:08 +01:00
der richter 3c867c14c0 mac/vulkan: log opaque state (direct-to-display possible) of metal layer
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when the layer is opaque and direct-to-display is
possible.

log opaque state.
2025-12-08 19:13:32 +01:00
der richter ae746aa3a7 mac/vulkan: log display sync active state of metal layer
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when display sync is activated

log display sync active state.
2025-12-08 19:13:32 +01:00
der richter ac41d5f176 mac/vulkan: log HDR active state of metal layer
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when HDR is activated

log HDR active state.
2025-12-08 19:13:32 +01:00
der richter f2d1f2a3c4 mac/vulkan: log EDR changes of metal layer
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which EDR data is used/mapped to.

log EDR data changes to actually see which EDR data was chosen.
2025-12-08 19:13:32 +01:00
der richter 83d9de42bc mac/vulkan: log colorspace changes of metal layer
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which colorspace is used/mapped to.

log colorspace changes to actually see which colorspace was chosen.
2025-12-08 19:13:32 +01:00
der richter 5cfdbc24d9 mac/vulkan: log pixel format changes of metal layer
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which pixel format is used/mapped to.

log pixel format changes to actually see which format was chosen. only
those 9 formats are valid for a CAMetalLayer.
https://developer.apple.com/documentation/quartzcore/cametallayer/pixelformat
2025-12-08 19:13:32 +01:00
nanahi dbd7a905b6 clipboard-x11: request selection at init
XFixesSelectionNotifyEvent does not give an initial notification,
so initial selection needs to be requested manually.
2025-12-04 17:29:57 +01:00
nanahi 1ee207329a clipboard-x11: use separate properties to receive primary and clipboard
Fixes one of the property not being set when a client sets primary and
clipboard at the same time.
2025-12-04 17:29:57 +01:00
Kacper Michajłow 72dbcf119a ci: update some github actions 2025-11-30 17:50:10 +01:00
sfan5 3a4e0fc200 ci/mingw: update dependency versions 2025-11-30 17:21:28 +01:00
sfan5 393b3fc115 ci/mingw: use a mirror instead of ftp.gnu.org
it's apparently constantly down these days...
2025-11-30 17:21:28 +01:00
sfan5 584b368972 demux_playlist: clarify reason for HLS detection
see 0b1c3e8de2
2025-11-30 17:21:28 +01:00
sfan5 2ad27be8be demux_lavf: remove 'bin' format from blacklist
A probing function was implemented in ffmpeg 4.0:
<https://github.com/FFmpeg/FFmpeg/commit/8f6a71f7f13d21614f5140e672976e96dca04af8>
2025-11-30 17:21:28 +01:00
Guido Cella 4614dd6859 etc/mpv.conf: replace the --sharpen example
gpu-next doesn't support --sharpen and it is now the default VO, so
replace it with something that actually works.
2025-11-30 14:21:28 +01:00
nanahi 6756e86384 player/command: fix playlist-remove argument requirement
playlist-remove has a required index argument, as indicated by the
documentation. However, in 332907e1d7
MP_CMD_OPT_ARG was mistakenly added, making it optional.
The effect of not specifying the argument is defaulting the index to 0
and always removing the first element in the playlist, which is not
expected.

Fix this by making the argument required.

Fixes: 332907e1d7
2025-11-30 14:21:09 +01:00
Lynne 69e7341e8a vd_lavc: enable hwdec for DPX by default
Another Vulkan compute codec was merged in FFmpeg, for DPX.
2025-11-30 14:20:52 +01:00
Kacper Michajłow 23f9381b80 mp_image: add ycgco-{re,ro} support
Fixes: #17077
2025-11-28 18:28:06 +01:00
Kacper Michajłow 9a85ae3ee0 m_option: be more resilent to new enum additions
Unfortunately we don't have control over libplacebo and cannot
synchronize such changes, so just return `<unknown>` to be forward
compatible with any possible changed.

Note that this should be updated ASAP to support new values.
2025-11-28 18:28:06 +01:00
llyyr b6c35b55a0 player/video: only set a/v speed factor to 1 when exiting display-sync
Previously this would be called on every frame presented, this only
needs to be called if display sync was active for the last frame but
isn't active anymore.

This hid the bug mentioned in #16947 if VO was active.
2025-11-26 19:18:25 +00:00
llyyr ddd0fc0beb player/command: update speed filters for pitch-correction change too
Fixes #16947 for both audio only files as well as for files with video
which would only accidentally worked. See next commit
2025-11-26 19:18:25 +00:00
Jun Bo Bi 57d9d4eb42 ao/aaudio: implement aaudio backend for android 2025-11-25 20:29:42 +01:00
Jun Bo Bi 24000e3b3f meson: added option to disable audiotrack 2025-11-25 20:29:42 +01:00
Leo Izen 8469605191 video/image_writer: use image->params.repr to determine depth
The previous method used in 2b38b382cf doesn't properly determine the
original depth. We use image->params.repr.bits.color_depth to determine
that now.

Fixes #16398.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-11-23 18:18:36 -05:00
Guido Cella f6c116491a DOCS/man/input: don't discourage hook usage
This paragraph was added 10 years ago in f8dc5db315. Hooks are now
commonly used both in internal (ytdl_hook, auto_profiles) and external
scripts (e.g. https://github.com/mpv-player/mpv/issues?q=mp.add_hook).
They are the only way to handle events synchronously and nobody is just
going to change the API and break all scripts at this point, so remove
the warning.
2025-11-21 14:51:07 +01:00
der richter 1f4cf13e8b meson: print cocoa for feature summary
should be mentioned similar to x11 and wayland.
2025-11-21 14:50:11 +01:00
Kacper Michajłow 52525dceb8 demux: clear packet pool when upper memory limit is lowered
This clears packets from the pool, that would never be reused under new
settings. Note that depending on demuxer state this clears only unused
packets, in some cases demuxer may still hold more packets than the new
limit. Fox example demuxer doesn't forcefully clear forward cache when
reducing the size.

Also keep packet pool, even if current file is not cached, this is
useful for all sorts of things and may be useful for next file.

This act only on user options values, regardless of internal demuxer
caching state, which can vary depending on track type or source.
2025-11-20 20:35:00 +01:00
Guido Cella e6885cb926 misc/path_utils: don't normalize -
This fixes options like --audio-file=- and avoids returning $PWD/- as
path and stream-open-filename when playing from standard input.

It will also allow storing playlist filenames as normalized without
checking for - at the caller.

Fixes 23b57e9f7f.
2025-11-18 20:23:08 +00:00
llyyr accf0cc67e wayland: correct geometry handling for rotated outputs 2025-11-18 20:22:51 +00:00
llyyr 7482608939 wayland: fix condition for setting image description
We need both a color surface and parametric support to attempt to apply
image description, not either one.

Fixes: 0a32f988ba ("wayland: move initial color management setup earlier in the init")
2025-11-17 04:35:32 +00:00
Dudemanguy 0a32f988ba wayland: move initial color management setup earlier in the init
When this was originally implemented, there was a dependency on waiting
for certain events from the compositor so it was placed after the
original roundtrip. Since b3abe3975b
removed the need for most of these conditions, we can more logically
place the creation of the color_surface and color_surface_feedback
earlier in the process and leave the wl_display_roundtrip as the true
final call for the wayland init process.
2025-11-17 01:40:28 +00:00
llyyr 9379c0706d wayland: only print color repr message if we actually set anything 2025-11-16 22:50:14 +00:00