Commit Graph
100 Commits
Author SHA1 Message Date
sfan5 d0e24ab17a Update MPV_VERSION 2025-12-21 20:14:18 +01:00
sfan5 41f6a64506 Release 0.41.0 2025-12-21 20:08:20 +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
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
sfan5and茶茶 e23e72bd49 vo/context_android: fix surface tearing on resize
It's not clear why this is needed, but it works (on my device).

fixes https://github.com/mpv-android/mpv-android/issues/991

Co-authored-by: 茶茶 <chachakko@outlook.com>
2025-10-27 23:30:04 +01:00
sfan5 80d2a6a7ed ytdl_hook.lua: don't crash if playlist entries don't have an usable URL
see #16717
2025-08-23 15:02:46 +02:00
sfan5 194ce88ac3 player/command: fix missing property update for some hwdec changes
fixes #16710
2025-08-22 08:38:02 +02:00
sfan5 653e241ac3 DOCS/lua: fix mistyped function name 2025-08-22 08:38:02 +02:00
sfan5 521e162420 DOCS/input: clarify value of hwdec-current
This can never be false, or a boolean at all.
2025-08-22 08:38:02 +02:00
sfan5 866da80979 vo_gpu_next: fix resetting --glsl-shader-opts
fixes: #16638
2025-08-07 18:35:42 +02:00
sfan5 a6f3236c3a ytdl_hook.lua: don't pass any format to youtube-dl by default
yt-dlp changed its default format from `bv+ba/b` to `bv*+ba/b`, which we want to follow
since it fixes the behavior with some streaming sites.

The note that "sometimes youtube-dl returns a format that mpv cannot use" was added in
43c13e5ea2 but it's not clear what it refers to.

fixes #16388
2025-07-28 11:22:13 +02:00
sfan5 2168e3d82c ytdl_hook.lua: get rid of outdated youtube-dl hint
It has never worked for yt-dlp anyway and the relevant error messages
already tell people to update.
2025-07-28 11:22:13 +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
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
sfan5 e663cbc037 vo: move vo_mediacodec_embed to not be the default on Android 2025-05-03 18:13:35 +03:00
sfan5 08939665fe DOCS: clarify some minor points in the release policy 2025-03-28 16:19:48 +01:00
sfan5 97cb16d683 RELEASE_NOTES: remove accidental BOM
linting is good and all but does this check really need to fail on every single commit from now on?
2025-03-25 18:39:00 +01:00
sfan5 2da0b49038 Update MPV_VERSION 2025-03-25 18:36:18 +01:00
sfan5 e48ac7ce08 Release 0.40.0 2025-03-25 18:33:27 +01:00
sfan5 425037a16a DOCS: refresh some parts of the release policy 2025-03-25 17:57:53 +01:00
sfan5 839aa31b7e player/client: adjust log message for client exit
The old message is too generic and worse could be mistaken
for exit of the entire player.
2025-03-07 09:44:19 +01:00
sfan5 53a6a6821c player/scripting: add logging around script un- and reloading 2025-03-07 09:44:19 +01:00
sfan5 bfa3e90867 video/out/android: don't assert-fail if WinID is not set
This matches the behavior of every other GPU context and is the only
behavior that makes sense.
2025-02-11 19:19:36 +01:00
sfan5 3b586ba6c3 ci/mingw: update library versions
also moves shaderc to latest git again
2025-01-25 15:39:36 +01:00
sfan5 87826224a2 ci/mingw: restrict shaderc version to fix build errors
https://github.com/KhronosGroup/glslang/issues/3787 was fixed already
but shaderc uses pinned revisions, so let's just downgrade.
2024-11-07 22:39:38 +01:00
sfan5 9737b99845 Revert "editorconfig: punish tab usage"
This reverts commit 3840c98b36.
There are multiple reasons:
- the correct way to prevent tabs being mistakenly added is a CI linting step
- it can affect the editing experience of foreign source files
  under mpv's tree (e.g. subprojects)
- at least one editor (BBEdit) misinterprets the values and also turns
  soft tabs into 7 spaces
- it does not consistently apply to GH code view either
2024-10-20 11:22:09 +02:00
sfan5 c11239be8c options: enable handling --no-hwdec as --hwdec=no
Reusing M_OPT_ALLOW_NO has the side-effect of applying to --ab-loop-[ab],
which makes sense.
2024-09-30 11:26:13 +02:00
sfan5 b64c53f730 ci/lint-commit-msg: make some minor adjustments to the rules 2024-09-23 19:49:43 +02:00
sfan5 0e6d050c3b Update MPV_VERSION 2024-09-23 19:37:35 +02:00
sfan5 a0fba7be57 Release 0.39.0 2024-09-23 19:36:41 +02:00
sfan5 5e9e756f53 TOOLS/gen-interface-changes: small usability improvement 2024-09-23 19:20:05 +02:00
sfan5 3ab989e554 ci/mingw: update dependency versions 2024-07-16 23:04:36 +02:00
sfan5 d2e3e6f3bd test/libmpv_lifetime: don't re-define ASAN macro 2024-07-16 23:04:36 +02:00
sfan5 03ca340835 stream: remove directory playlist hint
The stream layer is the wrong place to handle this and the benefit
seems dubious.
2024-05-15 22:45:18 +02:00
sfan5 553fb024d4 stream: check file descriptor passed to fd:// or fdclose:// 2024-05-15 22:45:18 +02:00
sfan5 54c755b08d various: add missing checks for directory streams
All of this code opens a stream and expects to read stuff from a file.
But streams can also be directories and that has to be handled.
2024-05-15 22:45:18 +02:00
sfan5 b69b58a12a {options,player}: fix stream leaks 2024-05-15 22:45:18 +02:00
sfan5 ae23556b6f stream: disallow reading or writing to directories
Reading an entire file is a common operation, meanwhile
stream_file will happily open a directory. This doesn't match well.

Analogously for open_output_stream().
2024-05-15 22:45:18 +02:00
sfan5 a33fd3b4cf Revert "stream: don't try to read from all-sparse/no-data files"
The stream layer is just not the right place to make this change
since it's also used for completely unrelated purposes such as reading
configs.

This reverts commit bb7a485c09.
2024-05-12 18:06:21 +02:00
sfan5 c4b6d0da38 f_lavfi: reject filters with too many in/outs
The pad count serves as a minimum even if the filter has
dynamic inputs/outputs, so we should reject them here.

At least on FFmpeg 6.1 this results in no practical change
in the list accepted filters.

fixes: 8bf3fe7e2a
2024-05-04 16:13:03 +02:00
sfan5 943a50b300 ci/mingw: update dependency versions 2024-05-03 23:44:51 +02:00
sfan5 426be8441a test: make libmpv_test abort if an error is logged
Among others this provides a trivial test that built-in scripts aren't throwing
an error at load or init time.
2024-04-24 12:58:50 +02:00
sfan5 1586ccc0c8 Update VERSION 2024-04-17 21:19:56 +02:00
sfan5 02254b92dd Release 0.38.0 2024-04-17 21:18:44 +02:00
sfan5 3b64bf908a test: add an encoding test with libmpv 2024-04-17 20:22:36 +02:00
sfan5 2af3a6e294 meson: improve option descriptions 2024-03-26 12:59:59 +01:00
sfan5 52638a4cac meson: refine dependencies of many feature checks 2024-03-26 12:59:59 +01:00
sfan5 af69b268c2 meson: remove some unneeded features from list
There's no practical use in knowing that e.g. mpv was linked
to libm and these are not used for HAVE_* tests either.
2024-03-26 12:59:59 +01:00
sfan5 7ccb1cbcd4 DOCS: update for new --pulse-latency-hacks defaults
I missed this.
fixes: 8e3737ab63
2024-03-25 22:45:58 +01:00
sfan5 8e3737ab63 ao_pulse: reenable latency hacks by default
As far as I can tell PulseAudio introduced a bug in 16.0
where if a stream is (un)paused too often the reported latency
will momentarily spike by 3000% or more. Apparently in certain cases
just pausing once and waiting can also cause this.

Save the remaining users of PA the trouble of debugging the various
obscure issues that can arise from this (desync is a harmless example)
by enabling the latency hack code again.

ref: <https://github.com/mpv-player/mpv/issues/12057>
     <https://github.com/mpv-player/mpv/issues/10333>
2024-03-24 09:58:41 +01:00
sfan5 1d8f28cea7 meson: conditionalize searching for ANGLE's EGL 2024-03-21 18:27:08 +01:00
sfan5 a392f91170 meson: get rid of 'egl-helpers' feature
This was just redundant because it's always present together with 'egl'.
2024-03-21 18:27:08 +01:00
sfan5 3679d18b54 meson: fix EGL version check 2024-03-21 18:27:08 +01:00
sfan5 6b8bd8072f video/egl_helpers: fix fallback logic for EGL_KHR_create_context
Both possible paths had bugs:
For OpenGL it passed EGL_CONTEXT_CLIENT_VERSION, which - in older versions
of the standard - was not permitted.
For GLES it always assumed EGL_CONTEXT_FLAGS_KHR to work, which belongs to the
aforementioned extension.

Ironically this was never a problem (probably saved by implementations
not being overly strict) except in 2024 on an emulated Android 14 device
that trips over this edge case. It is a mystery.
2024-03-21 18:27:08 +01:00
sfan5 b3ca600acb video/egl_helpers: log error for eglCreateContext 2024-03-21 18:27:08 +01:00
sfan5 ead9f892b3 various: use static assertions where appropriate 2024-03-17 20:04:04 +01:00
sfan5 830f6ccd6b vo_{drm,wlshm}: make query_format checks more correct
We're using mp_sws here, so we should ask it for format support
and not the underlying library (usually swscale) directly.
2024-03-16 13:27:34 +01:00
sfan5 aa75a0e9d2 vo_drm: add support for YUYV format
As the first aligned format this required a fix to reconfig().

Adding the other component-swapped formats in this group would be trivial
but I checked the DRM database [1] and no driver exists that supports
one of those but not YUYV and this is quite fringe as-is, so I opted not to.

[1] <https://drmdb.emersion.fr/formats>
2024-03-16 13:27:34 +01:00
sfan5 bc8038cffd vo_{drm,wlshm,x11}: add support for video-target-params 2024-03-16 13:27:34 +01:00
sfan5 2893b7d0f5 vo: move target_params into responsibility of VO
The VO generic code tries to be helpful and resets this after
each reconfig. However for the simpler VOs the target params
are constant after a reconfig or even for the entire lifetime.
So it's clearly better to let the VO decide.

This also allows the VO to use a static buffer instead.
2024-03-16 13:27:34 +01:00
sfan5 44f54357ca context_drm_egl: log fallback correctly
Currently a theoretical concern because we handle all existing formats.
2024-03-16 13:27:34 +01:00
sfan5 6b452788c4 vo_drm: add support for BGR formats 2024-03-16 13:27:34 +01:00
sfan5 93a5059e8c vo_drm: use native matching pixel format for XRGB2101010 2024-03-16 13:27:34 +01:00
sfan5 dafced8a8a wayland_common: fix type of dnd_action
The default value of -1 and comparisons >= 0 only work properly
with an int type.
2024-02-29 17:24:05 +01:00
sfan5 878b76f75e wayland_common: fix initialization order issue with protocols
This broke DND under (apparently) GNOME and KWin, but not sway.

fixes: 2274311b25
2024-02-29 17:24:05 +01:00
sfan5 78cedac844 wayland_common: fix DND read error handling 2024-02-29 17:24:05 +01:00
sfan5 dec29e82ac wayland_common: read DND data in larger chunks 2024-02-29 17:24:05 +01:00
sfan5 98f7f9e25e wayland_common: log if DND fails
This can happen if the compositor or applications don't behave correctly,
so let the user know to aid debugging.
2024-02-29 17:24:05 +01:00
sfan5 f36ab2c609 wayland_common: free DND resources on shutdown and error
This leaked only in edge cases, if at all.
2024-02-29 17:24:05 +01:00
sfan5 d955dfab29 misc/jni: reduce duplication in mapping struct
'name' was in fact unused when reading fields or methods, so it can be merged with 'method'.
Also changed the type of 'mandatory' to bool.
2024-02-28 16:11:54 +01:00
sfan5 5b1eaf3ff1 misc/jni: introduce macros for deleting references 2024-02-28 16:11:54 +01:00
sfan5 75ae44472b misc/jni: general code cleanup and refactor
Make it align with mpv's coding conventions in general and avoid unecessary Lavu use.
2024-02-28 16:11:54 +01:00
sfan5 1f3758adea ao_audiotrack: refactor JNI class retrieval
- split mapping from field struct
- mark field struct static
- define list of classes to reduce more repetitive code
2024-02-28 16:11:54 +01:00
sfan5 87d30899ff ao_audiotrack: remove two dead variables 2024-02-28 16:11:54 +01:00
sfan5 3c1c848c2b ao_audiotrack: fix missing check for passthrough support 2024-02-28 16:11:54 +01:00
sfan5 3e42139e13 ci: clone repos with shallow submodules 2024-02-26 23:16:48 +01:00
sfan5 bbbc0e248b hwdec/dmabuf_interop: reduce magic constant use 2024-02-26 17:37:20 +01:00
sfan5 73556036a2 hwdec/dmabuf_interop_gl: migrate to EXT_EGL_image_storage on desktop GL
As it turns out OES_EGL_image is only defined for OpenGL ES.
OpenGL drivers implement this extension anyway because it used to be
the only way of importing EGLImages into GL.

An equivalent extension for OpenGL was defined with EXT_EGL_image_storage.
The only difference is the interaction with immutability, which requires
textures to be recreated since they can be bound only once.

Note: this commit can in theory cause certain systems to lose vaapi / drmprime
support. Since EXT_EGL_image_storage is 7 years old this hopefully doesn't happen.
If it does, the init checks can be relaxed to still permit OES_EGL_image.
2024-02-26 17:37:20 +01:00
sfan5 1ae0282c1b hwdec/dmabuf_interop_gl: refactor texture creation
no functional changes in preparation for the next commit
2024-02-26 17:37:20 +01:00
sfan5 c294408ce0 hwdec/dmabuf_interop_gl: restyle macros to fit line length 2024-02-26 17:37:20 +01:00
sfan5 861e9566f6 video: don't define IMGFMT_VULKAN conditionally
We generally try to avoid that due to the #ifdef mess.
The equivalent format is defined in ffmpeg 4.4 while our interop code
requires a higher version, but that doesn't cause any problems.
2024-02-26 17:37:20 +01:00
sfan5 09606b9db9 ci/mingw: pin Vulkan version again
With 1.3.277 the AV1 decode headers have been upstreamed.
These get preferred over ffmpeg's internal non-standard header
for this extension (same name). FFmpeg currently only builds
using its own header and a patch to work with upstream ones
is in review.

For now pin vulkan at the version before that to unbreak our CI.
2024-02-12 14:42:29 +01:00
sfan5 4981690fb6 x11_common: fix Xft.dpi detection ignoring --hidpi-window-scale
closes #13466
fixes: 4b69164147
2024-02-12 13:51:25 +01:00
sfan5 cbcf12cdbd README: mention libplacebo subproject integration 2024-02-12 11:04:22 +01:00
sfan5 ca5f7d2b4b osdep: fix infinite loop when cancelling subprocess
Due to the state of the other fds/pipes it cannot safely be assumed
that the loop breaks on its own.
2024-02-11 14:13:22 +01:00
sfan5 c6ccabe585 hwdec_aimagereader: handle lack of JNI gracefully
Hwdec drivers are always loaded so it's rude to abort.
fixes #13367
2024-01-27 22:35:25 +01:00
sfan5 dcf8adf289 common: don't force terminal log buffer to small size
Using the 'terminal-default' log level a client can request
to get all messages that would normally appear on the terminal.

8c2d73f112 changed the size of the
relevant buffer to 100 lines, which was prone to quickly overflowing
once you enable verbose or debug output.
This size is kept for the early terminal buffer but now enlarged
once a client actually requests this log level. This fixes the overflow
risk while not consuming more resources if this feature is unused.
2024-01-27 10:04:16 +01:00
sfan5 431b420dd6 ao_null: fix reset() implementation
Stopping output implies that it can't be paused anymore.
This is consistent with the documented API in internal.h as well
as the behavior of other AOs.

resolves #13267
2024-01-12 20:36:04 +01:00