0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00
Commit Graph

155 Commits

Author SHA1 Message Date
llyyr
f5ca11e12b meson: make libplacebo a required dependency
Make it not possible to build mpv without the latest libplacebo anymore.
This will allow for less code duplication between mpv and libplacebo,
and in the future also let us delete legacy ifdefs and track libplacebo
better.
2023-10-23 13:03:29 +02:00
Dudemanguy
57fedcfcda meson: remove -D_ISOC99_SOURCE flag
The meson build has always compiled with c_std=c11. This was never
really needed.
2023-10-21 14:05:38 +00:00
NRK
2fa695c3f9 osdep: drop atomic fallback
even msvc (which mpv apparently doesn't support) supports C11 atomics
now. no need to carry around fallback with subtle semantic differences.
2023-10-20 21:31:09 +02:00
sfan5
af53ce18bd meson: streamline selection of certain osdep sources 2023-10-20 21:30:51 +02:00
Dudemanguy
d5e5c2ce98 stream_cdda: remove fallback for ancient libcdio versions
CDIO_API_VERSION 6 has been around since libcdio 0.90. That was release
over a decade ago. There's literally no reason to keep the ugly mess of
the old api around so remove it.
2023-10-19 12:10:53 -05:00
Kacper Michajłow
b9b58f122b ci: enable -Werror
For better feedback on build status and to keep mpv warning free.

Except for macos builds, there are more issue there that need fixing.
2023-10-19 14:03:23 +00:00
der richter
78d43740f5 vo_gpu/vo_gpu_next: add vulkan support for macOS
add support for vulkan through metal and a translation layer like
MoltenVK. also add the possibility to use different render timing modes
for testing.

i still consider this experimental atm.
2023-10-14 18:39:56 +02:00
Dudemanguy
5d44cf93df vo: use mp_poll wrapper in wait_events when applicable
On linux, several platforms poll for events over a fd. This has ms
accuracy, but mpv's timer is in ns now so lots of precision is lost. We
can use an mp_poll wrapper to use ppoll instead which takes a timespec
directly with nanosecond precision. On systems without ppoll this falls
back to old poll behavior. On wayland, we don't actually use this
because ppoll completely messes up the event loop for some unknown
reason.
2023-10-10 19:10:55 +00:00
Dudemanguy
ba4b408b8b osdep: rename polldev to poll_wrapper
Originally, this was added as purely a shim for macOS. However since we
want to do high resolution polling which is not neccesarily available on
all platforms, making this a generic wrapper for poll functions is
useful so rename it.
2023-10-10 19:10:55 +00:00
Dudemanguy
ace4d252e5 meson: declare libmpv as a dependency and override it
This allows libmpv users to build it as a subproject easily, i.e. meson
setup build --force-fallback-for=mpv -Dmpv:libmpv=true, if the mpv
source is in the subprojects directory. Mainly useful for development.
2023-10-03 15:46:14 +00:00
Kacper Michajłow
cdfd5c280a win32/pthread: define _POSIX_TIMERS to notify they are not supported 2023-09-29 20:48:58 +00:00
Kacper Michajłow
d263087713 meson: don't link pthreads when internal impl is used 2023-09-29 20:48:58 +00:00
Dudemanguy
6b74b55283 meson: don't require swift when checking macos sdk
It turns out that iOS doesn't actually need swift so this sdk check was
too strict and the build failed. Instead, only check this if we have
darwin and then make sure that the osdep subdir is only executed if
there are swift sources in the list. Fixes #12161.
2023-09-27 13:54:04 -05:00
Kacper Michajłow
ec4683baa0 meson: enable cplugins on Windows
Fixes: #12185
2023-09-20 02:16:45 +00:00
syphyr
662650bde3 meson: check vulkan version
The symbol "vkGetPhysicalDeviceProperties2" was recently added
after refactoring context.c.
2023-09-13 00:00:57 +02:00
sfan5
329d94af41 meson: rename last feature with underscore
fixes: ecbaf34701
2023-09-11 15:20:22 +02:00
Kacper Michajłow
bced1eec4e meson: add -Bsymbolic for libmpv
This is required when linking ffmpeg statically and generally good
practice to have on shared libraries anyway.

Prerequisit for fixes in mpv-build for:
https://github.com/mpv-player/mpv-build/issues/215
https://github.com/haasn/libplacebo/issues/198
2023-09-07 13:48:13 +00:00
Philip Langdale
fb5273985c meson: include our local copy of libavutil uuid if ffmpeg is too old
In the previous change, I added the uuid files. In this change, we
check the libavutil version and if it's too old, we compile in our
local copy.

We have to change the include paths of the uuid code to find some other
libavutil headers, but nothing beyond that.
2023-09-04 15:22:20 -07:00
sfan5
ecbaf34701 meson: rename all features with underscores
The convention is to use dashes.
2023-08-20 21:13:37 +00:00
Philip Langdale
d2074fee0a meson: remove redundant libplacebo version check for Vulkan interop
With the bump of the required base libplacebo version, we no longer
need to do an additional check for Vulkan interop - it will always be
new enough.
2023-08-19 21:16:20 -07:00
Dudemanguy
200992f90c x11: remove xinerama and refactor window geometry
mpv mixes xinerama and randr usage together which gets kind of
confusing and is also pretty stupid. Xinerama is completely unneccesary
today since randr can do everything it can do and much more. Remove it.
This reworks a lot of the window/geometry handling stuff to be centered
completely around xrandr_display plus some other tweaks to the geometry
handling. An important concept is that current_icc_screen is changed
into current_screen and used more generously since it is useful for
things besides just icc profiles.
2023-08-20 02:01:39 +00:00
Dudemanguy
a0038504a3 x11: require randr 1.4
There really is no reason to not just hard require randr 1.4. xorg added
1.4 support in 2012 and someone somehow using an xorg server older than
that today surely has several other problems.
2023-08-20 02:01:39 +00:00
Niklas Haas
24dca265b4 meson: remove redundant libplacebo-next check
Now implied by the minimum libplacebo version.
2023-08-18 16:39:57 +02:00
Niklas Haas
b1f9aa648a meson: bump minimum libplacebo dependency to v6.292
To remove a bunch of #ifdef templating.
2023-08-18 16:39:57 +02:00
Leonardo Taccari
f19bafc0e4 build: check for SNDCTL_DSP_HALT for oss-audio
At least NetBSD ossaudio(3) right now has SNDCTL_DSP_SETPLAYVOL support
but does not support SNDCTL_DSP_HALT chocking at build time.

NFCI on platforms where oss audio output is supported.
2023-08-16 12:59:58 +00:00
Dudemanguy
a177fb6188 vf_vapoursynth: save display resolution as a variable
mpv has a generic method for getting the display resolution, so we can
save it in vf_vapoursynth without too much trouble. Unfortunately, the
resolution won't actually be available in many cases (like my own)
because the windowing backend doesn't actually know it yet. It looks
like at least windows always returns the default monitor (maybe we
should do something similar for x11 and wayland), so there's at least
some value. Of course, this still has a bunch of pitfalls like not being
able to cope with multi monitor setups at all but so does display_fps.
As an aside, the vapoursynth API this uses apparently requires R26 (an
ancient version anyway), so bump the build to compensate for this.
Fixes #11510
2023-08-13 19:58:20 +00:00
Kacper Michajłow
df7a094765 build: remove version.py
After second thought version.py does not do anything useful. Meson has
built-in function vcs_tag that mostly replicate what version.py did. For
the build time we can just use __DATE__ and __TIME__. Of course this
changes time string format a little, but in my opinion it looks nicer in
fact.

Also it will use local time, instead UTC. But I would argue that date
string is only informative for users to check how old the specific mpv
build is. It doesn't have to be precise, it weren't for years anyway
before recent change.
2023-08-02 18:51:13 +00:00
LaserEyess
3b19866882 drm: bump minimum version to 2.4.105
Debian 12 is out, with 2.4.114, and Ubuntu 22.04 has 2.4.110, this
 #ifdef is no longer needed
2023-07-31 21:40:10 +02:00
Dudemanguy
0bed2a2263 build: remove outdated generated directory
This only existed as essentially a workaround for meson's behavior and
to maintain compatibility with the waf build. Since waf put everything
in a generated subdirectory, we had to put make a subdirectory called
"generated" in the source for meson so stuff could go to the right
place. Well now we don't need to do that anymore. Move the meson.build
files around so they go in the appropriate place in the subdirectory of
the source tree and change the paths of the headers accordingly. A
couple of important things to note.

1. mpv.com now gets made in build/player/mpv.com (necessary because of
   a meson limitation)
2. The macos icon generation path is shortened to
   TOOLS/osxbundle/icon.icns.inc.
2023-07-31 19:00:06 +00:00
Alexandre Ratchov
1bbc7a2cd0 ao_sndio: use sio_flush() to improve controls responsiveness
Use sio_flush() instead of sio_stop() to improve controls responsiveness.
2023-07-30 19:28:14 +00:00
Jan Beich
3bdf702b1d meson: look for linux/input-event-codes.h with libwayland flags
On DragonFly and FreeBSD native evdev headers are not not be used
outside of base system. Linux-compatible headers are provided by
evdev-proto package but require extra flags. As evdev-proto lacks
pkg-config support use libwayland prefix as approximation.

meson.build:974:0: ERROR: C header 'linux/input-event-codes.h' not usable
2023-07-29 19:43:28 -05:00
Dudemanguy
de112a7932 build: remove unneeded libdl requirement for vaapi
Curiously, vaapi requiring libdl has always existed ever since support
was added to mpv (2827295703). After some
investigation in IRC from uau and JEEB, it was concluded that the libdl
requirement was blindly copied from the vdpau check above it. At the
time, the vdpau code actually used dlsym so it was needed. The check was
later dropped when waf support was added
(7e2edad8ef). However, the requirement in
vaapi lived on, and actually it was never needed. libva does use dl when
building its libraries unsurprisingly, but this isn't relevant to mpv in
any way. Just drop it.
2023-07-25 20:04:54 +00:00
Gusar321
4332553db5 build: refactor vaapi handling 2023-07-25 19:20:40 +00:00
Gusar321
99f367f219 build: vaapi-x-egl is not used anywhere, remove it 2023-07-24 22:27:54 +02:00
Gusar321
2902532917 build: vaapi-egl should explicitly depend on egl 2023-07-24 22:27:54 +02:00
Gusar321
2e3cb30e46 build: vaapi-drm and vaapi-wayland do not depend on egl 2023-07-24 22:27:54 +02:00
Dudemanguy
9e449cc685 build: internally rename gl-wayland to egl-wayland
This has always been a pet peeve of mine and in fact I named the option
in meson "egl-wayland" with the intention of finally doing this. We call
everything that's egl "egl-foo" internally except for wayland.
2023-07-23 22:00:08 +00:00
sfan5
5236003db5 Revert "vo_gpu_next: use pl_dispatch_info_move to avoid useless data copy"
We wanted to preserve the libplacebo v5.264.0 requirement for gpu_next
for this release, since this is the what most Linux distributions are shipping.
The VLC 3 <-> libplacebo v6 situation is an additional reason distros are not
likely to ship the newest libplacebo release soon.
This reverts commit b73d96776c.
2023-07-23 15:40:41 +02:00
Dudemanguy
2616b2b11e build: make dmabuf-wayland a build option and require drm
It makes more sense as an option at this point. Also libdrm is not
optional at all. You have to get a drm format and modifier for this to
even work (the VO will just fail without DRM). Just hard require it and
remove the guards. vaapi can remain optional.
2023-07-14 14:24:45 +00:00
Kacper Michajłow
b73d96776c vo_gpu_next: use pl_dispatch_info_move to avoid useless data copy
Instead copy the data on-demand when VOCTRL_PERFORMANCE_DATA is
requested.
2023-07-02 16:20:48 +02:00
cloud11665
de7f4fb1ee video/image_writer: add avif screenshot support
Notes:
- converts the (image) write() api to filenames, because using avio
with FILE* is a pain.
- adds more debug logs for screenshots.

build: rename av1 dependency to avif_muxer
wscript: unify lavf dependency with meson
2023-07-01 02:05:23 +00:00
rcombs
57dae8f42c osdep: add mp_get_user_langs 2023-06-25 11:01:58 +02:00
rcombs
0463096b3c osdep: move cfstr<->cstr conversions to a new apple_utils.c file 2023-06-25 11:01:58 +02:00
rcombs
8c8d97c26c misc: add language-matching utilities 2023-06-25 11:01:58 +02:00
Thomas Weißschuh
594458838e ao_pipewire: bump dependency to 0.3.48
Now that Debian 12 is release bump the minium required version to what
is provided in Ubuntu Jammy (22.04).
The same as has been done for the wayland dependencies.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2023-06-21 17:33:31 +02:00
Dudemanguy
ca08bf599f wayland: bump wayland-protocols to 1.25
1.27 would have been nicer but ubuntu 22.04 is on 1.25 so we'll just
compromise.
2023-06-16 14:46:59 +00:00
Dudemanguy
45e2ca5411 wayland: bump required version to 1.20
This lets us remove some ifdefs.
2023-06-16 14:46:59 +00:00
Philip Langdale
effc68063b hwdec_cuda: bump required headers version for timeline semaphores
We're moving to using timeline semaphores for synchronisation between
cuda and vulkan. It's only required with libplacebo-next right now,
but eventually our baseline libplacebo requirement will increase, so we
will need new enough nvidia headers that include the necessary
declarations.
2023-06-04 13:25:43 -07:00
Philip Langdale
0f37d72360 hwdec_vulkan: check for the correct libplacebo version
It's 6.278, rather than 5.278.
2023-05-29 14:39:22 -07:00
Philip Langdale
0131ae4133 hwdec_vulkan: simplify requirement checks for Vulkan interop
I originally wrote this trying to avoid doing an explicit version check
on the headers, but it just makes things more confusing, and the
requirements harder to understand.

So, Vulkan interop now takes a dependency on the header release where
they finalised the video decode headers. VK_EXT_descriptor_buffer was
added in 1.3.235, so that's covered as well.

Along the way I fixed a bug in the waf build where it was depending
on libplacebo-next instead of libplacebo-decode.
2023-05-29 13:26:29 -07:00