summaryrefslogtreecommitdiffstats
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* vo: add new vaapi-wayland driverAaron Boxer2022-05-241-0/+6
| | | | | | | This driver makes use of dmabuffer and viewporter interfaces to enable efficient display of vaapi surfaces, avoiding any unnecessary colour space conversion, and avoiding scaling or colour conversion using GPU shader resources.
* various: remove trailing whitespaceGuido Cella2022-05-141-1/+1
|
* meson: compile mpv.exe as a win32 gui applicationDudemanguy2022-05-051-6/+1
| | | | | | | | | | | | | | | | | Some compiler flags were passed to mpv in order to get it to build as a gui application on windows. However on the meson build, this always resulted in mpv being built as a console application. This is because the function for making executables in meson specifically has a kwarg called win_subsystem* which defaults to 'console'. That always added link arguments at the end which compiled mpv.exe as a console application. The correct thing to do is to remove all of the subsystem-related flags in the meson build and use the win_subsystem kwarg as intended by setting it to 'windows,6.0'. For mpv.com, we can remove the -Wl,--subsystem,console flag since meson will set this by default in that executable. This makes mpv.exe function correctly and open with the pseudo-gui while mpv.com acts as a console wrapper. https://github.com/mesonbuild/meson/commit/1a0603835e3c9f1047d9b7694efc996219a422e4
* build: add avcodec jpegxl dependency versionsLeo Izen2022-04-281-0/+1
| | | | | Add the libavcodec version check for AV_CODEC_ID_JPEGXL to the build system rather than to any file that references it.
* vo_gpu_next: switch to unpooled hwdec mappingNiklas Haas2022-04-111-3/+3
| | | | | | | | | | | | This makes use of the new frame acquire/release callbacks to hold on to hwdec images only as long as necessary. This should greatly improve the smoothness/efficiency of hwdec interop, by not holding on to them for longer than needed. This also avoids the need to pool hwdec mappers altogether. Should fix #10067 as well, since frames are now only mapped when we actually use them.
* hwdec_vaapi_vk: rename to vaapi_plNiklas Haas2022-03-031-8/+8
| | | | | | | | There's really nothing vulkan-specific about this hwdec wrapper, and it actually works perfectly fine with an OpenGL-based ra_pl. This is not hugely important at the time, but I still think it makes sense in case we ever decide to make vo_gpu_next wrap OpenGL contexts to ra_pl instead of exposing the underlying ra_gl.
* vo_gpu_next: remove/simplify plane flipping hacksNiklas Haas2022-02-251-3/+3
| | | | | | | | | libplacebo v198 fixed this properly by adding the ability to flip planes directly, which is done automatically by the swapchain helpers. As such, we no longer need to concern ourselves with hacky logic to flip planes using the crop. This also removes the need for the OSD coordinate hack on OpenGL.
* vo_gpu_next: refactor subtitle renderingNiklas Haas2022-02-211-3/+3
| | | | | | | | | | | | | | | Render subs at the output resolution, rather than the video resolution. Uses the new APIs found in libplacebo 197+, to allow controlling the OSD resolution even for image-attached overlays. Also fixes an issue where the overlay state did not get correctly updated while paused. To avoid regenerating the OSD / flushing the cache constantly, we keep track of OSD changes and only regenerate the OSD when the OSD state is expected to change in some way (e.g. resolution change). This requires introducing a new VOCTRL to inform the VO when the UPDATE_OSD-tagged options have changed. Fixes #9744, #9524, #9399 and #9398.
* meson: remove horrifying macos luajit hackDudemanguy2022-02-071-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | See the previous commit for the full explanation. Basically, luajit 2.0 has a bad pc file on macos that causes libmpv to fail during build. The workaround was, if the os was darwin and luajit was found, to save a full luajit dep and a partial luajit dep with the link args removed. The partial dep was used for compiling libmpv, and the full dep was used for the actual mpv executable. This worked and was needed for the CI to pass but it sucked. Since the previous commit now makes the CI grab lua 5.1, we don't need all this crap anymore. Just delete it and treat the dependency normally. This does effectively mean that building libmpv with luajit 2.0 on macOS will no longer work with the meson build. However libraries not being built correctly is not a mpv-specific issue. The waf build will succeed for some reason, but it has known issues and it would be better if it just failed honestly. An upstream developer said years ago that that macOS users should use the 2.1 branch (and there's no release of course). In any case, no macOS user should be building mpv with luajit 2.0, so we shouldn't be going out of our way to support this. https://github.com/mpv-player/mpv/issues/7512 https://github.com/LuaJIT/LuaJIT/issues/521#issuecomment-562999247
* libplacebo: bump minimum dependency to 4.157Niklas Haas2022-02-031-1/+1
| | | | | | This has been the latest stable release for about half a year now. This version in particular lets us get rid of all the deprecation warnings in the older code. (See the following commits)
* build: rename libplacebo version checkNiklas Haas2022-02-031-4/+4
| | | | | Rename from "libplacebo-v4" to "libplacebo-next" to more closely capture the intent, since this will become libplacebo v5 eventually (tm).
* meson: fix libdl existence check for *bsd systemsAndrew Krasavin2022-02-021-6/+7
|
* meson: add version check to wayland-protocolsDudemanguy2022-01-291-1/+1
| | | | | This was mistakenly left out. mpv requires at least 1.15 for the xdg-decoration protocol. This just matches the waf build.
* build: remove aviocontext bytes_read checkDudemanguy2022-01-251-8/+0
| | | | | | | | | | | | | | | | This define was always just a stopgap for that two month period (August 2021 - October 2021) where the bytes_read field in ffmpeg was completely missing. Before that time, it was a private member in a struct (which mpv used). Afterwards, it officially became public. Fortunately, the lack of this field never actually made it into a release, so it could have only possibly affected people building from the master branch. Since ffmpeg 5.0 came out recently, and it's been plenty of months since that two month window, we can go ahead and drop this check. This finishes up the work done in 78cfeee2b93830f2988508a653b508336147b79d. Sidenote: the cached ffmpeg version in the mingw ci were from that time period when the bytes_read field was missing. The N in the workflow is bumped to force a full rebuild and fresh clone of ffmpeg.
* ao_sndio: bugfix and small refactoring for #8314Andrew Krasavin2022-01-221-0/+8
| | | | | | | | Changes: * fixed hangups in the loop function and in some other cases * refactoring according to @michaelforney's recommendations in #8314 * a few minor and/or cosmetic changes * ability to build ao_sndio using meson
* meson: add check kwarg to run_command() callsLaserEyess2022-01-181-5/+5
| | | | | | | | | | | | Warning from meson: WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 All of the run_command() calls currently use need to succeed for the build to work properly.
* ao_pipewire: Add PipeWire audio backendThomas Weißschuh2022-01-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The AO provides a way for mpv to directly submit audio to the PipeWire audio server. Doing this directly instead of going through the various compatibility layers provided by PipeWire has the following advantages: * It reduces complexity of going through the compatibility layers * It allows a richer integration between mpv and PipeWire (for example for metadata) * Some users report issues with the compatibility layers that to not occur with the native AO For now the AO is ordered after all the other relevant AOs, so it will most probably not be picked up by default. This is for the following reasons: * Currently it is not possible to detect if the PipeWire daemon that mpv connects to is actually driving the system audio. (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1835) * It gives the AO time to stabilize before it is used by everyone. Based-on-patch-by: Oschowa <oschowa@web.de> Based-on-patch-by: Andreas Kempf <aakempf@gmail.com> Helped-by: Ivan <etircopyhdot@gmail.com>
* meson: remove iconv hacks and bump req. versionDudemanguy2022-01-091-10/+2
| | | | | | | There was some breakage with regards to the iconv detection in some older meson versions. This was all settled in 0.60.3 and now it simply just works. Remove the workarounds and bump the needed meson version to 0.60.3.
* vo_gpu_next: update for new tone mapping optionsNiklas Haas2022-01-071-3/+3
| | | | | | | This was significantly refactored upstream. Switch to new APIs and add new tone mapping curves and options. cf. https://code.videolan.org/videolan/libplacebo/-/merge_requests/212
* meson: fix incorrect egl_drm operator in buildDudemanguy2021-12-211-1/+1
| | | | | | | | | | Back when the meson build was still in the PR state, this particular variable was a dictionary. Later, it was refactored to simply be a feature object instead. All uses of egl_drm['use'] should have been replaced with egl_drm.allowed() but this particular line was missed (that's what I get for not just doing find/replace). The conditional in this line is usually satisified before egl_drm ever needs to be checked which was why no one noticed until now. Fixes #9631.
* meson: remove unneccesary shaderc_static checkDudemanguy2021-12-191-1/+1
| | | | | | | | | | | | | | shaderc is a special case dependency in meson. According to the documentation*, it first checks for shaderc_shared and will fallback to shaderc_combined (the order is reversed if the static keyword is true). However, shaderc also has a third .pc file (shaderc_static) which should be checked. The meson documentation doesn't indicate this, but it also actually checks shaderc_static*. shaderc_combined is first checked if meson looks for static libs and if that is not found it tries shaderc_static. So this extra fallback check is not needed. *: https://mesonbuild.com/Dependencies.html#shaderc *: https://github.com/mesonbuild/meson/blob/a2934ca9d13ede4eb97b320bc768319ecad7b525/mesonbuild/dependencies/misc.py#L539
* meson: look for rst2man.py as well as rst2manPhilip Langdale2021-12-171-1/+1
| | | | | | If you install docutils with pip in the default way, you will get a script called `rst2man.py` rather than `rst2man`, so look for both names.
* libmpv: remove opengl_cb API and other deprecated symbolssfan52021-12-151-3/+3
| | | | | | Not all deprecated symbols were removed. Only three events were removed for now since these are not used internally. This bumps the library version to 2.0.
* meson: correct champ.c to chmap.cSolomon Choina2021-11-261-1/+1
| | | meson: correct champ.c to chmap.c
* meson: add a temporary workaround for iconv crapDudemanguy2021-11-261-7/+9
| | | | | | | | | | The initial iconv dependency worked everywhere but was broken on freebsd. This was fixed in 0.60.2 but the fix accidentally broke mingw (ouch; kind of my fault for not double checking). There's another PR to fix this but that won't land until 0.60.3 so for the meantime just if/else this (both freebsd and windows work with the system method) until we want to bump the meson version (probably not for a while since opensuse tumbleweed is weirdly slow).
* vo_gpu_next: factor out context-specific code to gpu_next/context.csfan52021-11-221-1/+2
| | | | | | This is done to avoid cluttering vo_gpu_next.c with more ifdeffery and context-specific code when additional backends are added in the near future. Eventually gpu_ctx is intended to take the place of ra_ctx to further separate gpu and gpu_next.
* meson: use gnu_symbol_visibility for libmpvDudemanguy2021-11-191-1/+2
| | | | | | Following the previous commit, we can just set gnu_symbol_visibility to 'hidden' to hide everything except for the symbols we explictly want to export. This should work on gcc, clang, and msvc.
* meson: fix typo in header checkDudemanguy2021-11-181-1/+1
| | | | This should be EGL not GL. Fixes #9469.
* meson: fix build on androidDudemanguy2021-11-161-18/+28
| | | | | | | The original implementation had some errors with regards to android. Add a couple of missing files, add the android library, fix the aviocontext bytes_read check, fix egl-android, and rearrange/tidy up the vulkan handling.
* meson: check for x11 when building the xv optionDudemanguy2021-11-151-1/+5
| | | | | Obvious oversight in the original PR for the meson build. The xv option requires x11 to function. Check for this by using the require method.
* meson: minor QOL and logic tweaksDudemanguy2021-11-151-18/+37
| | | | | | | | | | | A few custom targets had some less than optimal names which created some misleading "Generating custom-target-name with a custom command" messages. Change those to be more descriptive/correct. In a few other places, some checks were being done that could easily be skipped/ignored in certain cases (like checking for windows-related headers when gl-win32 isn't true). Also rearrange that to be smarter. Finally, print some extra libplacebo messages for enabling/disabling vo_gpu_next.
* meson: also check for generic lua.pcDudemanguy2021-11-151-1/+2
| | | | | Some systems have only a "lua.pc" file which contains version information inside it. Check those as well.
* meson: fix -Werror=format-security flagDudemanguy2021-11-151-1/+4
| | | | | | | | This test fails because the compiler object does not have -Wformat when it tries this flag. To fix this this, we have to pass both -Wformat and -Werror=format-security at the same time during the test. This requires us to use has_multi_arguments so this flag needs to be pulled out of this array and tested separately.
* build: add meson build supportDudemanguy2021-11-141-0/+1840
Adds support for the meson build system as well as a bit of documentation. Compatibility with the existing waf build is maintained.