summaryrefslogtreecommitdiffstats
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* misc/path_utils: normalize win32 pathsKacper Michajłow19 hours1-0/+5
|
* cocoa-cb: add support for macOS color space transformation (EDR/HDR)der richter20 hours1-0/+12
| | | | | | | | | | by default utilises the color space of the screen on which the window is located. if a specific value is defined, it will instead be utilised. depending on the chosen color space the macOS EDR (HDR) support is activated and that OS's transformation (tone mapping) is used. Fixes #7341
* fuzzers: add new fuzzer targetsKacper Michajłow10 days1-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | fuzzer_set_property.c: fuzz mpv_set_property in both initialized and non-initialized state. Useful for user provided values sanitization test. I've already seen some memory leaks in parsing code, good to drill it. fuzzer_loadfile.c: mpv_command "loadfile" test. Good for testing demuxers, decoding and playback loop. Sadly in headless mode we can't really test AO and VO, but at least all the code around can be fuzzed. Especially our custom demuxers like demux_mkv. fuzzer_loadfile_direct.c: Similar to loadfile above, but instead of saving the data to file, it passes the fuzz input in the command. Generated protocol specific versions (mf:// and memory:// for now) and generic one. Nothing really complex, but good start and even those few targets should give good coverage of the most common code paths in libmpv.
* vf_gpu: vulkan and egl implementationsShreesh Adiga10 days1-2/+7
| | | | | | | | Abstract out EGL, and allow choosing between EGL and vulkan at runtime. vf_gpu_egl.c contains GL specific context and creation/destroy code, vf_gpu_vulkan.c contains Vulkan specific. This allows vf_gpu being built in systems where EGL is not available and where Vulkan is available.
* ao/audiounit: fix building for iOSRobert Kopaczewski2024-04-201-2/+5
|
* d3d11: disable IDXGIInfoQueue usage if dxgidebug.h is incompleteKacper Michajłow2024-04-191-0/+1
| | | | Older MinGW-w64 doesn't define IDXGIInfoQueue in dxgidebug.h.
* d3d11: use IDXGIInfoQueue instead ID3D11InfoQueueKacper Michajłow2024-04-191-0/+1
| | | | | | | | | DXGI debug interface encapsulate multiple message queues, which allows to get validation not only for D3D11 calls, but also DXGI ones. Also this makes leak detector not report self debug interface as alive like it was before. And same as with validation, it has ability to detect more alive objects, not being limited to D3D11.
* mac/vulkan: add support for frame timing via presentation feedbackder richter2024-04-101-0/+1
|
* vo: add win32 context menu supportShuanglei Tao2024-04-061-1/+2
|
* mac/app: rewrite App c main function, startup and termination in swiftder richter2024-04-011-1/+0
| | | | | also move main invocation into AppHub and completely delete the old Application c implementation.
* mac/app: rewrite Application class in swiftder richter2024-04-011-1/+2
|
* ao_avfoundation: initial avfoundation ao supportMisaki Kasumi2024-03-291-2/+11
|
* meson: refine dependencies of many feature checkssfan52024-03-261-41/+55
|
* meson: remove some unneeded features from listsfan52024-03-261-16/+5
| | | | | There's no practical use in knowing that e.g. mpv was linked to libm and these are not used for HAVE_* tests either.
* mac/apphub: migrate remaining events functionality to new AppHubder richter2024-03-241-2/+3
| | | | | | | | add new app_bridge objc file for bridging between mpv core and app functionality. replace old EventsResponder singleton with AppHub. another step to clean up all App functionality and have one central place for it.
* mac/event: add helper to subscribe to mpv events and property changesder richter2024-03-241-0/+1
| | | | | preparation to remove duplicate code from all classes that implement their own observer loops.
* mac/option: move option functionality from mpv helper to option helperder richter2024-03-211-1/+1
| | | | delete now empty mpv helper
* mac/type: move c<>swift type bridging into a dedicated type helperder richter2024-03-211-0/+1
|
* meson: conditionalize searching for ANGLE's EGLsfan52024-03-211-2/+3
|
* meson: get rid of 'egl-helpers' featuresfan52024-03-211-3/+2
| | | | This was just redundant because it's always present together with 'egl'.
* meson: fix EGL version checksfan52024-03-211-1/+1
|
* meson: remove winmm dependency for win32 desktop targetnanahi2024-03-191-2/+1
| | | | Not needed anymore as timeBeginPeriod() is removed.
* win32: increase hires timer resolutionnanahi2024-03-191-0/+1
| | | | | | | | | | | timeBeginPeriod() only allows setting minimum timer resolution to 1 ms. However, modern x86 platforms support a minimum timer resolution of 0.5 ms. Use NtSetTimerResolution() instead for the increased resolution, which can be set with MPV_HRT_RES. Additionally, change the units of mp_start_hires_timers(), mp_end_hires_timer(), MPV_HRT_RES, and MPV_HRT_MAX to nanoseconds, in accordance with other functions used in timer.h.
* meson: bump warning level to 2nanahi2024-03-191-1/+6
| | | | Ignore a few noisy warnings for now.
* mac/touchbar: rewrite touch bar in swiftder richter2024-03-181-1/+1
|
* mac/events: move input ctx related functionality into new input helperder richter2024-03-141-0/+1
| | | | | preparation for mac/events cleanup and single responsibility principle. all functions are thread safe.
* meson: fix ios-gl hwdec buildRobert Kopaczewski2024-03-121-1/+1
|
* meson: remove main function from libmpv buildowl0w12024-03-071-5/+5
| | | Only include a main function in cplayer build, not libmpv build. This shaves off 40 bytes from libmpv build.
* mac/menu: rewrite menu bar in swiftder richter2024-03-071-6/+6
|
* osdep/mac: make mac naming of files, folders and function consistentder richter2024-02-281-20/+20
| | | | | rename all macOS namings (osx, macosx, macOS, macos, apple) to mac, to make naming consistent.
* meson: add custom target for macOS App bundlingder richter2024-02-241-0/+8
| | | | Fixes #10879
* options/path: move path utility functions to misc/path_utilsnanahi2024-02-231-0/+1
| | | | | These utility functions have nothing to do with user and config dir/file. Move them to a separate file.
* osdep/io: move I/O utility functions to misc/io_utilsnanahi2024-02-231-0/+1
| | | | | | | The purpose of osdep/io is to provide a wrapper for POSIX I/O functions on Windows. The last 2 functions are utility functions which don't serve this purpose. Move them to a separate file.
* meson: set default options for libplacebo if using subprojectllyyr2024-02-121-1/+2
| | | | | | This will prevent building demos and link statically with libplacebo by default if system libplacebo is not found or isn't new enough and a sufficiently new enough libplacebo exists in `subprojects/libplacebo`.
* player: remove all rpi-specific codeDudemanguy2024-02-051-22/+1
| | | | | | | | | | | | | | | | | | | | | | vo_rpi and its related code has pretty much historically been a disaster in mpv. The build regularly gets broken and since nobody uses it, it takes months for anyone to notice. There was also that time where fullscreen was broken for about a year and a half. Also building in waf was entirely broken for about a couple of years or so due to mysterious reasons no one ever figured out (meson magically fixed it). Anyways, once again the build is broken due to rpi being forgotten about again, but instead of pretending to support this crap. Just drop it all. Nowadays, mmal hwdec is a relic since these devices are better off using the v4l2m2m ffmpeg fork instead which actually uses KMS properly. RPI 1 and 2 probably can't do this and will remain broken but oh well blame Broadcom for being special snowflakes and not using standard APIs (my rockpro worked out of the box; just saying). RPI 2 is nearly 10 years old anyways, so I think you can afford a new SBC by now. If we were nicer, there would be a deprecation period, but this is broken in the last major release anyway so too late. Closes #13402.
* meson: bump libplacebo required version to 6.338.2Kacper Michajłow2024-01-311-1/+1
|
* win32: move IME candidate window to video windownanahi2024-01-151-0/+1
| | | | | By default the IME candidate window appears on the top left corner of the monitor. Move it to the video window for sane behavior.
* meson: use subprocess-dummy.c fallback when fork func doesn't existkarelrooted2023-12-031-1/+5
|
* meson: fix check for dvbin availabilitysfan52023-11-291-2/+3
|
* build: only directly link shaderc and spirv-cross on windowsDudemanguy2023-11-281-2/+2
| | | | | | | See 1b035402a688a5d116a9014e8930d7863481eeed. This is only relevant if you are using d3d11 on --vo=gpu which is windows-only. For all other platforms, vulkan uses libplacebo which uses shaderc. mpv itself doesn't need it in those cases.
* meson: move mpv.com target after mpv.exe to avoid meson version warningKacper Michajłow2023-11-271-7/+7
| | | | | meson is able to detect blocks of code that are guarded with version checks, but we did that in reverse order and mpv.exe was complaining.
* meson: generate .com in the same place as the .exe if possibleDudemanguy2023-11-271-0/+7
| | | | | | | | | Meson was pretty strict about target ids and generating the mpv.com in the same directory as mpv.exe wasn't possible. So as a workaround we tucked it away in a subdirectory, but that's not really intuitive at all. Well as of meson 1.3.0, this is now possible so leverage it since it makes way more sense. We still keep the old workaround for anyone using older meson versions.
* meson: add missing _GNU_SOURCE in checkKacper Michajłow2023-11-251-0/+1
|
* meson: adjust win32 definesKacper Michajłow2023-11-251-3/+8
| | | | | | | | - Don't define _GNU_SOURCE on Windows, no need - Define WIN32_LEAN_AND_MEAN to strip some unneded headers from windows.h - Define NOMINMAX and _USE_MATH_DEFINES as they are common for Windows headers
* meson: don't define __USE_MINGW_ANSI_STDIOKacper Michajłow2023-11-251-1/+1
| | | | | | | It is defined automatically when needed, which is almost never we don't support Windows XP. See: https://github.com/mingw-w64/mingw-w64/commit/bfd33f6c0ec5e652cc9911857dd1492ece8d8383
* meson: also expose present_sync for VT-only after a96d04f19d73Jan Beich2023-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | $ meson setup --auto-features=disabled -Ddrm=enabled -Degl=enabled -Dgbm=enabled -Degl-drm=enabled /tmp/mpv_build $ meson compile -C /tmp/mpv_build [...] ld: error: undefined symbol: mp_present_initialize >>> referenced by drm_common.c >>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(vo_drm_init) ld: error: undefined symbol: present_sync_update_values >>> referenced by drm_common.c >>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(drm_pflip_cb) ld: error: undefined symbol: present_sync_swap >>> referenced by drm_common.c >>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(drm_pflip_cb) ld: error: undefined symbol: present_sync_get_info >>> referenced by vo_drm.c >>> libmpv.so.2.2.0.p/video_out_vo_drm.c.o:(get_vsync)
* vaapi: add support for vaapi-win32Kacper Michajłow2023-11-221-1/+8
| | | | | | | | | | | Only vaapi-copy variant as nothing can map D3D12 resources currently. And even if we would add resource sharing to D3D11 it would invoke copy at some point, so there is no point really. Maybe in the future when libplacebo get smarter about resource sharing on Windows, but practical advantages are really small. I've tested it with Vulkan <-> D3D11 sharing and GPU <-> GPU copy is still invoked. Better than CPU memcpy, something for the future.
* hwdec: support videotoolbox with libplaceborcombs2023-11-161-2/+15
|
* cocoa: remove OpenGL cocoa backendder richter2023-11-101-8/+3
| | | | | | the OpenGL cocoa backend was deprecated in 0.29, it has lot of bugs, is completely unmaintained and can't properly playback anything anymore on the newest macOS. it is time to remove it.
* TOOLS/macos-sdk-version: remove legacy sdk version retrievalder richter2023-11-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | older macOS dev tools were inconsistent with the way how SDK versions were returned, some truncated the minor versions. in those cases the SDK version had to be retrieved through the SDK build version. recently the scheme for the SDK build version changed that our heuristic for converting it to an SDK version produced wrong version strings. the stride of the minor version changed from 1 to 2, so SDK versions ended up higher than they actually were. furthermore macOS 11 was hardcoded. since Xcode 12 Apple fixed the SDK version retrieval and it is no longer truncated when using Xcode as dev tools. Xcode 12 is also the latest supported version on macOS 10.15, which is also our oldest supported version. we can remove the old SDK build version conversation and use the Xcode only tool to retrieve the SDK version in the case Xcode is used as dev tools. furthermore this als keeps support for Xcode 11 where the problem wasn't fixed yet, but is still a supported version on macOS 10.15. Fixes #9907
* meson: remove several macos-10-* build optionsDudemanguy2023-11-091-18/+3
| | | | | | | | | | | These have been build options since the waf build, but that doesn't really make sense. The build can detect whatever macOS sdk version is available and then use that information to determine whether to enable the features or not. Potentially disabling multiple sdk versions doesn't really make any sense. Because f5ca11e12bc55d14bd6895b619c4abfd470c6452 effectively made macOS 10.15 the minimum supported version, we can drop all of these checks and bump the required sdk version to 10.15. The rest of the build simplifies from there.
* meson: add missing source file for UWPKacper Michajłow2023-11-081-1/+2
|
* osdep/threads-posix: use CLOCK_MONOTONIC if supportedKacper Michajłow2023-11-081-0/+4
|
* threads: rename threads.c to threads-posix.cKacper Michajłow2023-11-051-1/+1
|
* threads: move pthread debug to threads-posix.hKacper Michajłow2023-11-051-3/+0
| | | | And remove redundant define while at it.
* mp_thread: add win32 implementationKacper Michajłow2023-11-051-24/+10
|
* meson: do the macos sdk version comparison in mesonDudemanguy2023-10-291-1/+3
| | | | | | | | Since we can no longer rely on distuils for a version comparison, let's modify the macos-sdk-version script so it returns multiple potential versions to meson. Then use meson's built-in version comparison to pick the right one instead. This avoids the complication of needing certain python packages installed since everything simply uses stdlib functions.
* Revert "meson: import python module"Dudemanguy2023-10-291-5/+2
| | | | | | | | | | | | | | | | | Since distutils was dropped from python 3.12, we can't rely on a standard library implementation for version comparison anymore hence the switch to packaging instead which is essentially supposed to be the replacement. This is problematic though because macOS can have several ways of managing python can result in the build calling the wrong python binary that doesn't have the actual packaging library installed. This commit was a workaround for that since it would fetch the python used to run the build (which is probably the one the user wants), but apparently upstream doesn't like this and it's subject to change*. So instead, let's solve try, and solve this a different way. This reverts commit a57bd8e2b8a1871dc2613984b7ca93dd7bcb5419. *: https://github.com/mesonbuild/meson/pull/12116#pullrequestreview-1575846647
* meson: import python modulem154k12023-10-281-2/+5
| | | | | | | | | | - Use import to find Python installation. - Run macos-sdk-version.py with Python provided by meson. This fixes an error when meson and python-packaging are installed from Homebrew. Currently, the Python executable from python@3.12 is installed as python3.12 so python3 is referring to system installation, which may not have packaging module. meson can provide the correct executable via import.
* osdep/timer-win2: rename to timer-win32Kacper Michajłow2023-10-251-1/+1
|
* meson: remove libplacebo wrapllyyr2023-10-251-2/+1
| | | | This causes more pain than it is worth
* meson: make libplacebo a required dependencyllyyr2023-10-231-28/+16
| | | | | | | 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.
* meson: remove -D_ISOC99_SOURCE flagDudemanguy2023-10-211-2/+1
| | | | | The meson build has always compiled with c_std=c11. This was never really needed.
* osdep: drop atomic fallbackNRK2023-10-201-7/+3
| | | | | even msvc (which mpv apparently doesn't support) supports C11 atomics now. no need to carry around fallback with subtle semantic differences.
* meson: streamline selection of certain osdep sourcessfan52023-10-201-12/+11
|
* stream_cdda: remove fallback for ancient libcdio versionsDudemanguy2023-10-191-2/+3
| | | | | | 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.
* ci: enable -WerrorKacper Michajłow2023-10-191-2/+0
| | | | | | For better feedback on build status and to keep mpv warning free. Except for macos builds, there are more issue there that need fixing.
* vo_gpu/vo_gpu_next: add vulkan support for macOSder richter2023-10-141-4/+11
| | | | | | | | 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.
* vo: use mp_poll wrapper in wait_events when applicableDudemanguy2023-10-101-0/+3
| | | | | | | | | | 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.
* osdep: rename polldev to poll_wrapperDudemanguy2023-10-101-1/+1
| | | | | | | 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.
* meson: declare libmpv as a dependency and override itDudemanguy2023-10-031-0/+4
| | | | | | 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.
* win32/pthread: define _POSIX_TIMERS to notify they are not supportedKacper Michajłow2023-09-291-3/+0