summaryrefslogtreecommitdiffstats
path: root/wscript
Commit message (Collapse)AuthorAgeFilesLines
* video: add metadata handling for spherical videowm42017-08-211-0/+6
| | | | | | | | | | | | | | This adds handling of spherical video metadata: retrieving it from demux_lavf and demux_mkv, passing it through filters, and adjusting it with vf_format. This does not include support for rendering this type of video. We don't expect we need/want to support the other projection types like cube maps, so we don't include that for now. They can be added later as needed. Also raise the maximum sizes of stringified image params, since they can get really long.
* Revert "x11: drop xscrnsaver use"Martin Herkt2017-08-201-0/+1
| | | | | | | | | | | | | | This broke screensaver/powersave inhibition with at least KDE and LXDE. This is a release blocker. Since fdo, KDE and GNOME idiots seem to be unable to reach a consensus on a simple protocol, this seems unlikely to get fixed upstream this year, so revert this change. Fixes #4752. Breaks #4706 but I don’t give a damn. This reverts commit 3f75b3c3439241c209349908fa190c0382e44f05.
* Revert "build: rpi: rely on pkgconfig for compiler flags"wm42017-08-151-1/+21
| | | | | | | | | This reverts commit ea40fa36eef15384b4c0218fb102f92f5cd1cdff. This caused strange runtime failure on Raspbian (when running mpv, vc_dispmanx_display_open() returned 0, while other dispmanx using programs were fine). The problem must have been something about the compiler flags, maybe linking order or set of include paths.
* x11: drop xscrnsaver usewm42017-08-081-1/+0
| | | | | | | | | | | It's an ancient X11 protocol extension that apparently nobody uses anymore (desktop environments in particular have replaced it with equally bad protocols that require tons of dependencies). Users keep complaining about it being a required dependency. The impact is likely minimal to none. Fixes #4706 and other annoying people.
* build: fix dependencies for Cygwin environmentfeixm12017-08-081-1/+1
| | | | | This replaces previous commit with same intentions. This time, with proper formating (no tabs in code).
* wscript: fix build of videotoolbox hwaccel for iOSAman Gupta2017-08-051-2/+2
|
* build: re-add and re-structurize the glob() checksJan Ekström2017-08-051-0/+10
| | | | | | | | * If we have glob() supported, we have `HAVE_GLOB = 1'. * If we have specifically POSIX glob(), we have `HAVE_GLOB_POSIX = 1`. * If we have specifically Win32 glob(), we have `HAVE_GLOB_WIN32 = 1`
* build: move Android environment check to main dependenciesJan Ekström2017-08-051-4/+4
| | | | | | Additionally change the description to better match what Android is, which is an "environment". The original positioning of this check was unfortunate.
* vd_lavc: decode embedded ICC profilesNiklas Haas2017-08-031-0/+6
| | | | | | | | | Since these need to be refcounted, we throw them directly into struct mp_image instead of being part of mp_colorspace. Even though they would semantically make more sense in mp_colorspace, having them there is really awkward because mp_colorspace is passed around and stored a lot, and this way their lifetime is exactly tied to the lifetime of the mp_image associated with it.
* d3d: make DXVA2 support optionalwm42017-06-301-5/+23
| | | | | | | | | | | | This partially reverts the change from a longer time ago to always build DXVA2 and D3D11VA together. To make it simpler, we change the following: - building with ANGLE headers is now required to build D3D hwaccels - if DXVA2 is enabled, D3D11VA is still forcibly built - the CLI vo_opengl ANGLE backend is now under --egl-angle-win32 This is done to reduce the dependency mess slightly.
* build: allow --disable-zlibwm42017-06-291-1/+1
| | | | | Since strictly speaking, it's still optional. It's just very much recommended not to disable it.
* Universal Windows Plaform (UWP) supportPedro Pombeiro2017-06-291-1/+10
| | | | | | | | libmpv only. Some things are still missing. Heavily reworked. Signed-off-by: wm4 <wm4@nowhere>
* build: change how some OS specific source files are selectedwm42017-06-291-10/+23
| | | | | | | | | | | | | | | | | | In a bunch of cases, we emulate highly platform specific APIs on a higher level across all OSes, such as IPC, terminal, subprocess handling, and more. We have source files for each OS, and they implement all the same mpv internal API. Selecting which source file to use on an OS can be tricky, because there is partially overlapping and emulated APIs (consider Cygwin on Windows). Add a pick_first_matching_dep() function to make this slightly easier and more structured. Also add dummy backends in some cases, to deal with APIs not being available. Clarify the Windows dependency identifiers, as these are the most confusing.
* build: replace glob() check and assume it's always in POSIXwm42017-06-291-6/+2
| | | | | POSIX requires glob(), so no need to check for it. Together with the fact that we can emulate glob() on Windows, glob() is always available.
* build: remove unnecessary dlopen checkwm42017-06-291-5/+0
| | | | Probably became unnecessary with the vf_dlopen removal.
* build: pick up new libavcodec D3D hwaccel APIwm42017-06-271-4/+8
| | | | | This was enabled for Libav already. The patches got merged into FFmpeg now.
* build: disable ancient V4L TV support by defaultwm42017-06-251-1/+4
|
* build: remove Linux DVB test fragmentwm42017-06-221-1/+1
| | | | | | | | | | | | Most of the DVB test fragment was added in 2e399f39 by someone who wasn't asked for LGPL relicensing permission. Thus remove it. (For some weird reason, the configure check wasn't even for the later added actual DVB code.) Since DVB is disabled by default, this isn't too bad. But if someone enables it, and the system doesn't support it, he will receive a weird compilation error. That has to be good enough, until maybe someone adds a new check.
* Revert "osdep: NetBSD pthread_setname_np()"wm42017-06-221-8/+1
| | | | | | | | | | This reverts commit 2e81698d2809836d4cd7f754a78598e7bdf96c0b. Seems like this was a patch applied from someone who can't agree to LGPL relicensing (see previous commit), with the author field not properly set. This is not so important anyway, so just revert it.
* build: simplify OSS checks and remove changes by "bugmen0t"wm42017-06-221-36/+3
| | | | | | | | | | | | | | | | | | The user bugmen0t was apparently a shared github account with publicly available login. Thus, we can't get LGPL relicensing permission from the people who used this account. To relicense successfully, we have to remove all their changes. This commit should remove 20d1fc13, f26fb009, defbe48d. It also should remove whatever test fragments were copied from the ancient configure, as well as some configure logic (potentially that device path stuff). I think this change still preserves the most important use-cases of OSS: BSDs, and the Linux OSS emulation (the latter for testing only). According to an OSS user, the 4front checks were probably broken anyway. The SunAudio stuff was probably for (Open)Solaris, which is dead. ao_oss.c itself will remain GPL, and still contains bugmen0t changes.
* vd: use ST.2086 / HDR10 MaxCLL in addition to mastering metadataNiklas Haas2017-06-181-0/+6
| | | | | | | | | | | | | MaxCLL is the more authoritative source for the metadata we are interested in. The use of mastering metadata is sort of a hack anyway, since there's no clearly-defined relationship between the mastering peak brightness and the actual content. (Unlike MaxCLL, which is an explicit relationship) Also move the parameter fixing to `fix_image_params` I don't know if the avutil check is strictly necessary but I've included it anyway to be on the safe side.
* vf_dlopen: remove this filterwm42017-06-181-6/+0
| | | | | | | | | | | | | | | | It was an attempt to move some MPlayer filters (which were removed from mpv) to external, loadable filters. That worked well, but then the MPlayer filters were ported to libavfilter (independently), so they're available again. Also there is a more widely supported and more advanced loadable filter system supported by mpv: vapoursynth. In conclusion, vf_dlopen is not useful anymore, confusing, and requires quite a bit of code (and probably wouldn't survive the rewrite of the mpv video filter chain, which has to come at some point). It has some implicit dependencies on internal conventions, like possibly the format names dropped in the previous commit. We also deprecated it last release. Drop it.
* js: wscript: use pkgconfig for mujs (recently added .pc and 1.0.0 tag)Avi Halachmi (:avih)2017-06-161-1/+1
|
* js: add javascript scripting support using MuJSAvi Halachmi (:avih)2017-06-141-0/+4
| | | | | | | | | | | | | | | Implements JS with almost identical API to the Lua support. Key differences from Lua: - The global mp, mp.msg and mp.utils are always available. - Instead of returning x, error, return x and expose mp.last_error(). - Timers are JS standard set/clear Timeout/Interval. - Supports CommonJS modules/require. - Added at mp.utils: getenv, read_file, write_file and few more. - Global print and dump (expand objects) functions. - mp.options currently not supported. See DOCS/man/javascript.rst for more details.
* d3d: add support for new libavcodec hwaccel APIwm42017-06-081-0/+8
| | | | | | Unfortunately quite a mess, in particular due to the need to have some compatibility with the old API. (The old API will be supported only in short term.)
* build: enable cplugins by defaultwm42017-06-071-1/+1
| | | | | | | | | | There's probably no reason to keep this disabled. The -rdynamic (and the approach we use) is probably a bit scary, but should not break anything. Just to be sure I'm hard-disabling this on win32 anyway. We know it can't work there in its current form. Fixes #4491.
* videotoolbox: support new libavcodec APIwm42017-05-241-3/+19
| | | | | | | | | | | The new API has literally no advantages (other than that we can drop mp_vt_download_image and other things later), but it's sort-of uniform with the other hwaccels. "--videotoolbox-format=no" is not supported with the new API, because it doesn't "fit in". Probably could be added later again. The iOS code change is untested (no way to test).
* vo_opengl: drop TLS usagewm42017-05-111-8/+0
| | | | | | | | | | | TLS is a headache. We should avoid it if we can. The involved mechanism is unfortunately entangled with the unfortunate libmpv API for returning pointers to host API objects. This has to be kept until we change the API somehow. Practically untested out of pure laziness. I'm sure I'll get a bunch of reports if it's broken.
* dvb: disable by defaultwm42017-05-111-0/+1
| | | | | | | | It fails building with some older kernel headers, and the current test does not auto-disable it in these cases. Since DVB isn't going to be used by many people, I think disabling it by default is reasonable.
* stream_smb: disable by default, mark as GPLv3wm42017-05-111-1/+2
| | | | | | | | | | It seems libsmbclient has been GPLv3 for years. Also, it's certainly not LGPL (unlike some of its support libs like talloc). Thus, mpv built with Samba support is GPLv3. Disable it by default, so we don't have to go through the trouble to indicate the correct license in our output, and we don't trick people into distributing stuff under the wrong license.
* wscript: make OpenGL VO failure message less misleadingwm42017-05-041-1/+1
| | | | | It doesn't even use OpenGL header anymore. What it needs are EGL and GLX libs/header and similar.
* build: remove checks for libGLwm42017-04-261-6/+2
| | | | | | We don't need to link against libGL directly, nor do we need OpenGL headers. The only thing we need is the windowing interop stuff, such as libEGL.
* video: drop vaapi/vdpau hw decoding support with FFmpeg 3.2wm42017-04-231-27/+3
| | | | | | | | | | This drops support for the old libavcodec APIs. Now FFmpeg 3.3 or FFmpeg git is required. Libav has no release with the new APIs yet, so for Libav git as of a few weeks or months ago or so is required if you want to use Libav. Not much actually changes in hwdec_vaegl.c - some code is removed, but the reindentation inflates the diff.
* build: make various x11 protocol extension libs mandatorywm42017-04-211-21/+5
| | | | | | | Reduces the ifdeffery, which is good and will avoid silent breakages, or weird behavior if a lib is omitted. Also reorder the x11_common.c include statements.
* wscript: don't make dvdread-common an optionRicardo Constantino2017-04-071-2/+2
| | | | | | | | This just checks if dvdread or dvdnav are enabled so it can compile dvdread code. Change description to be clearer on what this does differently from --enable-dvdread.
* vo_opengl: add our own copy of OpenGL headerswm42017-04-071-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gl_headers.h is basically header_fixes.h done consequently. It contains all OpenGL defines (and some typedefs) we need. We don't include GL headers provided by the system anymore. Some care has to be taken by certain windowing APIs including all of gl.h anyway. Then the definitions could clash. Fortunately, redefining preprocessor symbols to the same content is allowed and ignored. Also, redefining typedefs to the same thing is allowed in C11. Apparently the latter is not allowed in C99, so there is an imperfect attempt to avoid the typedefs if required API symbols are apparently present already. The nost risky part about this are the standard typedefs and GLAPIENTRY. The latter is different only on win32 (and at least consistently so). The typedefs are mostly based on stdint.h typedefs, which khrplatform.h clumsily emulates on platforms which don't have it. The biggest difference is that we define GLsizeiptr directly to ptrdiff_t, instead of checking for the _WIN64 symbol and defining it to long or long long. This also typedefs GLsync to __GLsync, just like the khronos headers. Although symbols prefixed with __ are implementation reserved, khronos also violates this rule, and having the same definition as khronos will avoid problems on duplicate definitions. We can simplify the build scripts too. The ios-gl check seems a bit wrong now (what we really want to test for is EAGLContext), but I can't test and thus can't improve it. cuda_dynamic.h redefined two GL symbols; just include the new headers directly instead.
* wscript: avoid compose_checks in one casewm42017-04-061-4/+2
| | | | | Avoid it where we can, because it tends to have unexpected side-effects. (Probably not in this case, but still a reason to avoid it.)
* build: replace android-gl check with a standard GLES3 checkwm42017-04-061-4/+4
| | | | | There's no reason to make it Android specific, as it uses standard include paths.
* wscript: fix broken build with dvdread+dvdnav in 34e6a26Ricardo Constantino2017-03-311-0/+5
| | | | Didn't know waf actually tried to compile the same files twice.
* wscript: decouple dvdnav check from dvdreadRicardo Constantino2017-03-311-2/+2
| | | | | | | | | Reallows enabling dvdnav without enabling dvdread which was broken in 77cbb3543 when they were both disabled by default. Since dvdnav requires dvdread, we can enable dvdread:// even if --enable-dvdread isn't passed. Fixes #4290
* osx: initial Touch Bar supportAkemi2017-03-261-1/+10
|
* vdpau: support new vdpau libavcodec decode APIwm42017-03-231-1/+18
| | | | | | | | | | | | | | | | | | | The new API works like the new vaapi API, using generic hwaccel support. One minor detail is the error message that will be printed if using non-4:2:0 surfaces (which as far as I can tell is completely broken in the nVidia drivers and thus not supported by mpv). The HEVC warning (which is completely broken in the nVidia drivers but should work with Mesa) had to be added to the generic hwaccel code. This also trashes display preemption recovery. Fuck that. It never really worked. If someone complains, I might attempt to add it back somehow. This is the 4th iteration of the libavcodec vdpau API (after the separate decoder API, the manual hwaccel API, and the automatic vdpau hwaccel API). Fortunately, further iterations will be generic, and not require much vdpau-specific changes (if any at all).
* build: disable optical media libs by default (DVD/BD/CD)wm42017-03-151-0/+4
| | | | Pure garbage.
* wscript: substitute cplugins linker flag for macOS compatiblityAlexis Nootens2017-03-061-2/+2
| | | | | | | | | | For an unknown reason, '-Wl -export-dynamic' doesn't work anymore on the last macOS build (10.12.3 with Apple LLVM 8.0.0) so forcing cplugins is useless because the check fails. Replacing the linker option with its substitute '-rdynamic' do the trick. The syms module from waf still works as expected and only the symbols specified in mpv.def are exported.
* wscript: drop pointless libavcodec vaapi.h/dxva2.h/d3d11va.h checkswm42017-02-201-5/+3
| | | | | | Not needed under any circumstances. While the Windows ones export functions to which we must link, these functions are always available, even if libavcodec was compiled with D3D disabled.
* wscript: fix --egl-angle-lib for waf 1.9James Ross-Gowan2017-02-191-2/+4
|
* atomic: remove __atomic builtin usagewm42017-02-131-10/+2
| | | | | | | | Using these was a temporary solution while some compilers implemented the underlying atomic mechanisms, but not the C11 language parts (or that's what I guess). Not really useful for us anymore. Also, there is the slight risk of having subtly incorrect semantics by using potentially changing compiler internals and such.
* vo_opengl: angle: rewrite with custom swap chainJames Ross-Gowan2017-02-071-1/+2
| | | | | | | | | | | | | This replaces the old backend that exclusively used EGL windowing with one that can also use ANGLE's ability to render to directly to a texture. The advantage of this is that it allows mpv to create the swap chain itself and this allows mpv to use a flip-mode swap chain on a HWND (which avoids problems with DirectComposition) and to use a longer swap chain that has six backbuffers by default (which reportedly fixes problems with rendering 24fps video on 24Hz monitors.) Also, "screenshot window" should now work on DXGI 1.2 and up (Windows 8 and up.)
* build: fix --disable-gl if cuda is enabledwm42017-01-301-0/+1
| | | | | | | | | video/out/opengl/hwdec_cuda.c is enabled with cuda-hwaccel. But it makes only sense to build if GL is enabled, and in fact it fails to link without GL as it calls a specific GL helper function. In theory it would be perfectly possible to use cuda-copy with GL disabled. But I'm not bothering with the complexity.
* wscript: add LIBRARY_PATH for library detectionkwkam2017-01-281-0/+2
| | | | | | MinGW GCC seems to ignore LIBRARY_PATH which causes problem when some libraries not using pkg-config were installed to local directory
* build: rpi: rely on pkgconfig for compiler flagsIlya Tumaykin2017-01-281-19/+1
| | | | | | | | | | | | | | | | | Upstream provides pkgconfig files for quite some time now [1,2]. Use them to determine the required flags instead of hard coding. This makes cross-compilation easy, which I dare to say is important for many raspberry-pi users. This also prevents picking libEGL and libGLESv2 from mesa when they are present, which can happen with the current code. Good distros should put these pkgconfig files into default pkg-config search path or populate PKG_CONFIG_PATH for users. However, be nice to everybody and manually look into '/opt/vc/lib/pkgconfig' just in case. Hence the PKG_CONFIG_PATH mangling. [1]: https://github.com/raspberrypi/userland/issues/245 [2]: https://github.com/raspberrypi/userland/commit/05d60a01d53dca363bb4286594db1826ffff8762
* build: explicitly check for FFmpeg vs. Libav, and their exact versionswm42017-01-271-39/+52
| | | | | | | | | | | | | | | | | | In a first pass, we check whether libavcodec is present. Then we try to compile a snippet and check for FFmpeg vs. Libav. (This could probably also be done by somehow checking the pkgconfig version. But pkg-config can't deal with that idiotic FFmpeg idea that a micro version number >= 100 identifies FFmpeg vs. Libav.) After that we check the project-specific version numbers. This means it can no longer happen that we accidentally allow older, unsupported versions of FFmpeg, just because the Libav version numbers are somehow this way. Also drop the resampler checks. We hardcode which resampler to each with each project. A user can no longer force use of libavresample with FFmpeg.
* wscript: merge libavfilter check into the main ffmpeg checkwm42017-01-271-7/+2
| | | | | It used to be optional. That's why it was separate. No need for that anymore.
* atomic: drop __sync builtinswm42017-01-271-9/+1
| | | | | | | | | | The correctness of the stdatomic.h emulation via the __sync builtins is questionable, and we've been relying on exact stdatomic semantics for a while, so just get rid of it. Compilers which support __sync but not stdatomic.h will use to the slow mutex fallback. Not sure about the __atomic builtins. It doesn't seem to harm either, so leave it for now.
* build: new vaapi hwaccel API does not use av_image_copy_uc_from()wm42017-01-241-1/+1
| | | | | | | | | | | Not even Libav does. Whoops. The developer who wrote the FFmpeg code for this said he could not find any improvements when using the "GPU memcpy" ; instead, it made it actually slower on some hardware. It's not clear to what extent the "GPU memcpy" was needed for vaapi, but hopefully not very much (see #2317). This commit enables use of the new vaapi API by default with FFmpeg.
* build: replace some FFmpeg API checks with version checkswm42017-01-241-24/+0
| | | | | | The FFmpeg versions we support all have the APIs we were checking for. Only Libav missed them. Simplify this by explicitly checking for FFmpeg in the code, instead of trying to detect the presence of the API.
* vaapi: detect new API on FFmpeg too, and disable it by defaultwm4