Commit Graph
333 Commits
Author SHA1 Message Date
llyyr a16b333eef meson: bump libcurl minimum version to 7.87.0
CURL_WRITEFUNC_ERROR is only avaialble from 7.87 onwards
2026-05-19 15:55:13 +02:00
Kacper Michajłow f7e0fd8f0e meson: add curl to summary 2026-05-16 18:20:42 +02:00
Kacper Michajłow c6833a9307 stream_curl: add libcurl-based stream backend
Introduces stream_http, an internal libcurl-driven backend for http://
and https:// URLs. Runs all transfers on a dedicated curl multi thread
with a producer-side ring buffer, and exposes HTTP/2 multiplexing,
QUIC/HTTP/3 (when libcurl supports it), HSTS and TCP keep-alive.

Should generally be more stable and faster than FFmpeg HTTP/1.1 impl,
additionally connections are kept-alive between files open, so if you
open playlist of network files and navigate through them, it will re-use
the same connection.

Build is gated on the new 'libcurl' meson option (auto). When disabled
or unavailable, mpv silently falls back to FFmpeg's HTTP implementation.
2026-05-16 18:20:42 +02:00
Kacper Michajłow cdd3f1197f stream: split shared network options into their own sub-options
Will be useful for future commits
2026-05-16 18:20:42 +02:00
nanahi 81611b4a4e input/dnd: move built-in drag and drop handling to mpv client
This moves the drag and drop handling to an internal mpv client,
removing the hardcoded handling from core.
2026-05-01 13:42:57 +02:00
Crend King 75b2ccfeb1 vf_vapoursynth: update for VapourSynth R74
VapourSynth R74 changed two things relevant to mpv build process:

1) VSScript no longer has static library to link to, and only support runtime loading.
This is reflected on the new VSScript example in VapourSynth SDK.
2) The VSScript library name is changed from libvapoursynth-script to libvsscript for Linux
and MacOS.

The new VSScript initialization code is modified from their SDK example to utilize
mpv's mechanisms. Build dependency is also updated accordingly.
2026-04-23 01:38:48 +02:00
Mia Herkt 428edff9c1 Meson: add appropriate install_tag to each target
See https://mesonbuild.com/Installing.html#installation-tags

tl;dr it allows choosing what to install and also provides some
extra metadata for tools operate on Meson projects via its
introspection feature.
2026-04-03 18:45:52 +02:00
Mia Herkt c1f30c9b63 Meson: specify license files
This allows using --licensedir. Meson then also generates and
installs a machine-readable manifest file at that location, which
would include the licenses of subprojects if we had any.
2026-04-03 18:21:19 +02:00
llyyr 4bed99f6a5 meson: bump minimum libdrm version to 2.4.114
We'll use the dumb buffer helpers added in 2.4.114 and GEM_CLOSE wrapper
added in 2.4.108. This is available on Ubuntu 24.04 and Debian 12.
2026-03-31 18:22:54 +00:00
Kacper Michajłow 4f9f1ffaf3 meson: build mpv.com with -Os
LLVM even in freestanding build required memset/memcpy/memmove to be
implemented. We don't use them directly but the calls are generated from
the code, which are later optimized away. Since this suppose to be small
utility application, we can always optimize it.

Fixes: #17664
2026-03-28 23:22:09 +01:00
nanahi 58ee11c58a misc/hash: add mp_hash_to_bstr function
This util function uses the generic libavutil hash API to hash any data
with the specified algorithm to a bstr. It deduplicates multiple hash
routines used in mpv.
2026-03-23 15:03:38 +01:00
llyyr 022fbd16b9 meson: bump min libplacebo version to v7.360.1
This version contains critical fixes to swapchain selection, correct
mapping of sRGB TRC as well as fix for gpu hangs on anv. Bump the
minimum version because the mpv experience with previous version
shouldn't be endorsed or be considered acceptable by upstream.
2026-03-15 18:40:09 +01:00
Hubert Głuchowski 2007f5543c sub/sd_sbr: use instanced rendering to avoid blending in software
The instanced API allows a lot of work to be offloaded to the GPU and
makes software rasterization tolerable performance-wise in most cases.

This is similar to sd_ass but there are some substantial differences:
- It uses a BGRA atlas to allow drawing bitmap emoji.
- De-duplicates images internally to significantly reduce atlas size by
  reusing the same atlas image for different instances.
- Exploits bilinear interpolation to further reduce atlas size of some
  primitives. For example this allows reducing background boxes to one
  very stretched pixel.

Bumps subrandr requirement to `v1.1` since this API is not present in
earlier versions.
2026-01-14 01:56:18 +01:00
Hubert Głuchowski 0babb5778b sub/ass_mp: split out packer into a separate file 2026-01-14 01:56:18 +01:00
Kacper Michajłow c0d989c839 sub/sd_sbr: check runtime version 2025-12-24 19:01:40 +01:00
Kacper Michajłow cb1b6a54f2 video/filter/vf_amf: add AMD Frame Rate Conversion filter
D3D11 only for now. Documentation says that only D3D11 and D3D12 is
supported, but it looks like Vulkan is possible too. But I realized this
after implementing this version. Vulan may be added later.

Fixes: #16613
2025-12-23 07:06:34 +01:00
Hubert Głuchowski b6d7f4e793 sub/sd_sbr: add logging callback 2025-12-23 07:01:29 +01:00
Hubert Głuchowski bb97882c9a sub: add subrandr renderer support
subrandr is a subtitle rendering library which aims to render
SRV3 (YouTube) subtitles and WebVTT subtitles accurately.

Currently in mpv WebVTT subs are rendered via ffmpeg conversion to ASS
which throws away a lot of the style and completely disregards
the WebVTT non-region-cue positioning algorithm. Furthermore if
one wants to render some more complex SRV3 subtitles one has to
resort to external converters since it's not even supported by ffmpeg.

However subrandr is able to render SRV3 subtitles natively with support
for the most commonly used features. It can render ruby text without
relying on font metrics during conversion which is obviously fragile,
and it can perform correct scaling using the exact calculations used by
YouTube instead of making up ASS approximations. Similarly it follows
the WebVTT spec for the features of WebVTT that it supports (mostly).

It's not perfect of course and there's still many things it doesn't do
or does wrong but those are things that can be incrementally improved
outside of mpv.
2025-12-23 07:01:29 +01:00
Kacper Michajłow b95846a28c meson: check wayland-scanner version
At least 1.23 is needed for 1.38 protocols. Also check other Wayland
deps to be 1.23, they are likely bundled at the same version as scanner
anyway.
2025-12-22 17:30:05 +00:00
llyyr 8ba0603ffa wayland: bump wayland-protocols minimum version to 1.38
Debian Stable has 1.44 but we're gated by Ubuntu LTS here.
2025-12-22 15:00:02 +01:00
llyyr 9adeeb02ea wayland: bump libwayland minimum version to 1.22
1.23.1 is available in Debian Stable, which was the last distro holding
us back from doing version bumps
2025-12-22 15:00:02 +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
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
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 83cedd1074 meson: define WINICONV_CONST to strip const from win-iconv 2025-11-15 01:25:37 +01:00
nanahi 2e5e2938dd meson.build: print drm for feature summary
Similar to X11 and Wayland, it is a platform with gpu/gpu-next support
and worths to mention.
2025-11-10 08:33:15 +01:00
der richter 1b9998a620 osxbundle: make bundle category configurable and default to video
in a13a674363 we set the default category
for the bundle to games, to get certain benefits like better rendering
timing, better bluetooth latency, better threading, etc (bundle only).

though this also prevents low power modes and wrongly categories the app
for spotlight search etc.

set the default category to video and add an option to set the category
to games if one wishes to.
2025-11-05 19:23:26 +01:00
Alex James 0a606d9e18 osxbundle: read version from version.h
osxbundle.py currently reads the version number from MPV_VERSION, while
Meson first tries git describe before falling back to MPV_VERSION.
Update osxbundle.py to try reading the version number from version.h
before falling back to MPV_VERSION. This ensures that the version number
in the bundle matches the output of mpv --version.
2025-11-01 14:41:18 +01:00
sfan5 609acc7cf2 meson: warn if building with SDL2
I previously tried to enable sdl2-gamepad by default and the CI turned all red.
In detail:
- SDL_config.h has macros that conflict with ours
- memory leaks caused the tests to fail
- main=SDL_main redefinition broke MSYS builds

The options remain disabled by default, but lets warn our users a bit.
2025-10-31 12:53:04 +01:00
sfan5 8649b64e57 meson: remove redundant sdl2 option
This disables the individual options by default, since they were gated by the parent option before.
2025-10-31 12:53:04 +01:00
nanahi 6b01391142 meson.build: add libx11 as x11 clipboard dependency
Should resolve possible link errors.
2025-10-28 13:57:37 +01:00
nanahi 4f03bc1779 clipboard-x11: add x11 clipboard backend
This adds the x11 clipboard backend and native clipboard support to x11.
Clipboard monitoring is supported.
2025-10-27 20:01:47 +01:00
LordMZTE df939d4fe8 osdep/linux-als: support ambient-light on Linux
This implements the ambient-light property on Linux using the sysfs
interface.
2025-10-15 21:59:42 +02:00
Kacper Michajłow 24647365a3 meson: don't define _UCRT_NOISY_NAN
The issue has been fixed in Windows SDK, if you are using affected SDK
version, update or downgrade to the working one.

See: https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907
2025-10-05 21:34:29 +02:00
der richter af4e4fed44 meson: disable swift when cocoa not available or disabled
it doesn't make sense to build the swift parts without cocoa because
the swift bridge would be missing and it's impossible to interact
with the swift parts from obj-c, swift depends on cocoa/appkit/etc, and
the cocoa main function/main loop is missing making anything
cocoa/appkit/GUI crash on use.

like this it is possible to build mpv on macOS without cocoa, it will
fallback to the unix main function and mpv can run in 'headless' mode,
eg you can use it from CLI, it won't spawn any App icon/menu/etc, and
you can use everything that isn't related to cocoa/appkit/GUI like audio
playback. anything other will make mpv segfault, for example sdl2 and
its vo, since it tries to spawn a window.
2025-09-15 03:59:55 +02:00
der richter b4151d4449 meson: properly add path-mac.c to path_source and don't overwrite it
path-mac.c was not properly set as path_source for macOS. it didn't lead
to any errors because it was added to the normal source files. though
in the case of tests and for certain setups the mac path symbols were
not found.

to fix that properly add path-mac.c to path_source (additional to
path_darwin.c), remove it from the normal source files and don't
overwrite it later with the posix or darwin path.

this was overlooked in 9db8182 and #11374
2025-09-15 03:59:32 +02:00
Kacper Michajłow 7ee677c773 meson: add mpv-register and mpv-unregister helpers on Windows
They call `--register` / ``--unregister` for users who don't want to open
console and do it manually, this is one-click solution.
2025-09-15 03:47:35 +02:00
Kacper Michajłow 4f08802ff1 osdep/w32_register: add register/unregister options for Windows
On Linux, we have `mpv.desktop`, and on macOS, we have `osxbundle`, both
of which handle file associations and protocol registration in the
system environment.

On Windows, this information is stored in the registry, so this commit
adds support for it.

It registers the application, supported file types, and supported
protocols, and adds an uninstall entry so users can remove all
registrations via the control panel. Note that this does not remove the
binary itself.

The implementation is fully portable. There are no external installers,
as mpv handles everything automatically. This should improve usability
when moving binaries and so on.

- `mpv --register` registers mpv (see verbose output for a list of actions).
- `mpv --unregister` reverts all changes made during installation.
- `mpv --register-rpath <string>` allows specifying a string to be
  prepended to `PATH` before running mpv. This is useful when using
external dependencies that shouldn't be added globally to `PATH`.
2025-09-15 03:47:35 +02:00
Kacper Michajłow 9681bda7d5 meson: bump libbluray requirement to 0.5.0
Released 2013-12-21. Will be used for bd_get_main_title().
2025-08-06 18:04:46 +02:00
Louis Pate 73c2118710 meson: add -Woverflow to test flags 2025-07-26 20:13:28 +02:00
Dudemanguy 08d7d049d1 build: install encoding-profiles.conf into the system data directory
fd4e3af740 originally started installing
it, and we've been doing it ever since then. The value of having all of
these encoding profiles predefined by default is pretty dubious since a
lot of them are pretty old ('MP4 for Nokia N900' being a shining
example) and mpv is not really a good encoding tool anyways. Let's treat
it like the other conf files in etc and install it in the data directory
for reference. If someone really uses these, they can copy the file over
locally to their mpv config directory and it'll still work fine.
2025-07-12 14:01:54 +00:00
llyyr 329c5294aa meson: remove wayland-protocol 1.39 check from top level meson.build
We do this check inside video/out/meson.build, and the subdirectory is
included before this already
2025-07-12 13:59:11 +00:00
Kacper Michajłow 8b64a5d937 video/out/vulkan/context_win: add support for getting colorspace 2025-07-11 21:53:58 +02: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
Dudemanguy 0c3f1c0f6e build: make drm optional again for vo_dmabuf_wayland
We used to deal more directly with drm-specific things, but that has all
since been removed and is known to not be needed. We can relax the build
requirements some more since vo_dmabuf_wayland will simply error out if
no hwdec backend is available at init.
2025-03-26 15:31:08 +01:00
DudemanguyandKacper Michajłow a9dccf22a1 build: use a drm_fourcc header check for vaapi on gl
The underlying interop only needs the DRM fourcc defined in the header.

Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
2025-03-26 15:31:08 +01:00
Kacper Michajłow f972cb6dc4 meson: disable stack protector for mpv.com
This is a bare runner for mpv.exe. There is no need for a stack
protector here and when it is forced to be added by -fno-stack-protector
it complains about missing symbols, because we don't link any standard
libs here.

Fixes:
undefined symbol: __stack_chk_fail
undefined symbol: __stack_chk_guard

We could define those, but mpv.com wrapper doesn't need it.
2025-03-26 01:28:50 +01:00
Jaime Marquínez Ferrándiz 561156217e fish-completion: create the fish completion script
It is an adaptation of the bash completion.
2025-03-08 00:25:45 +01:00
Kacper Michajłow 93ea3df0a9 player: add mpv:// protocol
This is useful to run mpv from URL handler. Can be used to start mpv
from you web browser or anything that would trigger url handler for
given protocol. Only safe protocols are allowed.

Current solutions to run mpv in such context are to spawn IPC proxy and
run mpv when requested, but this is in most cases not necessary.

Currently the protocol is added in mpv.desktop. Windows related
registration will follow in future changes.
2025-03-07 00:15:23 +01:00