summaryrefslogtreecommitdiffstats
path: root/waftools
Commit message (Collapse)AuthorAgeFilesLines
* build: fixup vendored wayland protocols with variantsJan Ekström2018-04-151-4/+23
| | | | | | Utilize the SRC variable for this to get a built-in relative path. Can be tested by adding `--variant="random_string"` to configure and build.
* build: fix swift build with waf 1.8.4Akemi2018-03-111-2/+2
| | | | | | | with older waf versions a node doesn't return an absolute path but just a relative one. fix this by explicitly requesting an absolute one. Fixes #5604
* cocoa-cb: change border and borderless window stylingAkemi2018-02-281-3/+3
| | | | | | | | | | | the title bar is now within the window bounds instead of outside. same as QuickTime Player. it supports several standard styles, two dark and two light ones. additionally we have properly rounded corners now and the borderless window also has the proper window shadow. Also make the earliest supported macOS version 10.10. Fixes #4789, #3944
* build: fix dependency check on macOSAkemi2018-02-161-9/+1
| | | | | | | 235eb60 added a needed linking flag, but too soon. this lead to some of the configure checks to fail. add the flag in our build phase. Fixes #5528
* build: fix linking libmpv when swift features are builtAkemi2018-02-131-0/+2
| | | | | | | | the swift object file wasn't linked when libmpv was linked, which resulted in a missing symbol error. add the swift object to the linking list for libmpv too. Fixes #5522
* build: remove shell usage from swift build scriptsAkemi2018-02-131-4/+5
| | | | | | | for convenience reasons i used strings for subprocess commands instead of command lists, which made it mandatory to use a shell. for security reasons, among others, we removed the shell usage and converted the commands to actual command lists.
* build: fix swift detection with python2Akemi2018-02-131-6/+2
| | | | | | | | | c82fed8 fixed the detection with python3 but broke it on python2. the decode function on python2 converts the str to unicode which causes problems when concatenating to str when building. instead of decoding the output we change the subprocess to operate in text mode. also use check_output instead of Popen for simplicity.
* build: fix swift detection on major swift versionsAkemi2018-02-121-2/+2
| | | | | the swift version string on major versions only has two components, major and minor, the third one is missing.
* build: fix swift detection with python3Akemi2018-02-121-1/+1
| | | | | python3 returns bytes instead of str, unlike python2. explicitly decode the output.
* build: fix configure on windowsAkemi2018-02-121-7/+8
| | | | | configure failed because of a wrong check. fix the check and also only check for swift on macOS.
* cocoa-cb: initial implementation via opengl-cb APIAkemi2018-02-123-14/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is meant to replace the old and not properly working vo_gpu/opengl cocoa backend in the future. the problems are various shortcomings of Apple's opengl implementation and buggy behaviour in certain circumstances that couldn't be properly worked around. there are also certain regressions on newer macOS versions from 10.11 onwards. - awful opengl performance with a none layer backed context - huge amount of dropped frames with an early context flush - flickering of system elements like the dock or volume indicator - double buffering not properly working with a none layer backed context - bad performance in fullscreen because of system optimisations all the problems were caused by using a normal opengl context, that seems somewhat abandoned by apple, and are fixed by using a layer backed opengl context instead. problems that couldn't be fixed could be properly worked around. this has all features our old backend has sans the wid embedding, the possibility to disable the automatic GPU switching and taking screenshots of the window content. the first was deemed unnecessary by me for now, since i just use the libmpv API that others can use anyway. second is technically not possible atm because we have to pre-allocate our opengl context at a time the config isn't read yet, so we can't get the needed property. third one is a bit tricky because of deadlocking and it needed to be in sync, hopefully i can work around that in the future. this also has at least one additional feature or eye-candy. a properly working fullscreen animation with the native fs. also since this is a direct port of the old backend of the parts that could be used, though with adaptions and improvements, this looks a lot cleaner and easier to understand. some credit goes to @pigoz for the initial swift build support which i could improve upon. Fixes: #5478, #5393, #5152, #5151, #4615, #4476, #3978, #3746, #3739, #2392, #2217
* build: fix linking to dev SDK on macOSAkemi2018-02-121-1/+21
| | | | | | | | | on macOS mpv was linked to the system SDK which didn't cause any problems as long as the system SDK was the same as the dev SDK. though it started to cause linking warnings when a new xcode version with the SDK for the next macOS was installed. in the worst case it could also cause linking errors. to fix this we explicitly set the SDK path to the SDK that is used for building instead.
* win32: add more-POSIXy versions of open() and fstat()James Ross-Gowan2017-10-251-1/+1
| | | | | | | | | | | | | | Directory-opening never worked on Windows because MSVCRT's open() doesn't open directories and its fstat() doesn't recognise directory handles. These are just MSVCRT restrictions, and the Windows API itself has no problem with opening directories as file objects, so reimplement mpv's mp_open and mp_stat to use the Windows API directly. This should fix directory playback. This also populates the st_dev and st_ino fields of struct stat, so filesystem loop checking in demux_playlist.c should now work on Windows. Fixes #4711
* wayland_common: rewrite from scratchRostislav Pehlivanov2017-10-033-5/+40
| | | | | | | | | | | | The wayland code was written more than 4 years ago when wayland wasn't even at version 1.0. This commit rewrites everything in a more modern way, switches to using the new xdg v6 shell interface which solves a lot of bugs and makes mpv tiling-friedly, adds support for drag and drop, adds support for touchscreens, adds support for KDE's server decorations protocol, and finally adds support for the new idle-inhibitor protocol. It does not yet use the frame callback as a main rendering loop driver, this will happen with a later commit.
* vd_lavc: cuda requires setting hw_device_ctxwm42017-09-261-0/+3
| | | | | | This restores cuda/cuvid under Windows. Cuvid is relatively useless under Windows, but this was requested.
* build: fix build for waf 2.0orbea2017-09-221-1/+1
| | | | | | | | Thanks to ita1024 for the patch. Fixes https://github.com/mpv-player/mpv/issues/4894 Signed-off-by: wm4 <wm4@nowhere>
* build: add preliminary LGPL modewm42017-09-211-1/+0
| | | | | | | See "Copyright" file for caveats. This changes the remaining "almost LGPL" files to LGPL, because we think that the conditions the author set for these was finally fulfilled.
* build: remove some dead codewm42017-09-191-7/+0
|
* build: use unified dependency expressions instead of weird fieldswm42017-09-182-40/+242
| | | | | | | | | | | | | | | | Instead of "deps", "deps_neg", and "deps_any" fields, just have a single "deps" field, which changes from an array to a string. The string is now an expression, which can contain the operators &&, ||, !, and allows grouping with ( ). It's probably overkill. If it gets a maintenance burden, we can switch to specifiying the dep expressions as ASTs (or maybe eval()-able Python expressions), and we could simplify the code that determines the reason why a dependency is not fulfilled. The latter involves a complicated conversion of the expression AST to DNF. The parser is actually pretty simple, and pretty much follows: https://en.wikipedia.org/wiki/Shunting_yard_algorithm
* Revert "build: rpi: rely on pkgconfig for compiler flags"wm42017-08-151-22/+1
| | | | | | | | | 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.
* build: warn against VLAwm42017-07-241-1/+2
| | | | | Although C99 supports them, they are optional in C11, and we don't like/use them anyway.
* build: change how some OS specific source files are selectedwm42017-06-291-0/+12
| | | | | | | | | | | | | | | | | | 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: reduce GLX test fragmentwm42017-06-221-4/+0
| | | | | While it doesn't matter for anything, we don't really need to check for GL symbols (neither headers nor for linking).
* build: remove Linux DVB test fragmentwm42017-06-221-12/+0
| | | | | | | | | | | | 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.
* build: remove unused pvr.c test fragmentwm42017-06-221-7/+0
|
* build: simplify OSS checks and remove changes by "bugmen0t"wm42017-06-223-38/+1
| | | | | | | | | | | | | | | | | | 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.
* build: remove checks for libGLwm42017-04-261-1/+0
| | | | | | 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.
* build: rely on internal GL headers for rpi checkIlya Tumaykin2017-04-261-4/+0
| | | | | Since mpv ships all the required OpenGL defines now, rpi check doesn't need to check system GL headers.
* demux_mkv: change license to LGPLwm42017-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most contributors have agreed. This claims it's based on gstreamer code, but this was LGPL at the time (and still is). Contributors whose code was removed were not accounted for. There are still some potentially problematic cases: 06eee1b67 is potentially the most problematic case. Most of these changes are gone due to mpv not using BITMAPINFOHEADER anymore. Some of the other changes are rather trivial. If someone contests this and claims that copyrightable changes are left, the original change can simply be reverted. 62bfae140 has only 2 lines left: a "char *name;" struct field, and a line that prints a message. All other code was removed. The parsing code in particular was made declarative, which replaced reading this element explicitly (and other elements, see 1b22101c77e). I'm putting the log message under HAVE_GPL, but I don't think the declaration is copyrightable, or the mere concept of reading this element. Redoing the other 2 lines of code would result in the same program text. d41e860ba was applied by someone who (potentially) disagreed. The patch itself is from someone who did agree, though. It's unknown whether the applier changed the patch. But it seems unlikely, and the change was mostly rewritten. 50a86fcc3 all demux_mkv changes were reverted (old stdout slave mode) 3a406e94d same 2e40bfa13 the old MPlayer subtitle code was completely removed 316bb1d44 completely removed in 1cf4802c1d 87f93d9d7 same 11bfc6780 relative seeks were removed in 92ba630796 be54f4813 the corresponding demux_mkv code was removed in 5dabaaf093 efd53eed6 all internal vobsub handling is now in FFmpeg d7f693a20 removed in f3db4b0b937 e8a1b3713 removed in 522ee6b7831 cfb890259 removed, see 6b1374b203 for analysis c80808b5a same
* osx: initial Touch Bar supportAkemi2017-03-261-0/+7
|
* waf: fix linking of win32 console wrapperRicardo Constantino2017-02-191-3/+3
| | | | | Broken with waf 1.9.8 update. Not noticed right away if previous waf version was present.
* waftools/checks/generic: hacks for linking against static/shared libskwkam2017-01-281-5/+18
| | | | | | | | | | | | When mpv is being linked against static libraries which have shared libraries as dependencies, linker will throw error because pkg-config with --static flag will return shared libraries which will be placed under the -Wl,-Bstatic section, while pkg-config without --static flag will omit the private libraries required to link the static library. With this function users can modify the wscript to insert the dependencies when necessary. For example, linking FFmpeg with shared OpenSSL and zlib: 'func': check_pkg_config_mixed(['crypto','ssl','z'], 'libavcodec')
* 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-1/+27
| | | | | | | | | | | | | | | | | 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: always run code generators before compilingStefano Pigozzi2017-01-071-0/+1
|
* waf: don't discard line endings when using file2string.pywm42017-01-051-1/+1
|
* build: use matroska.py & file2string.py as python modulesStefano Pigozzi2017-01-051-26/+30
|
* Revert "Port several python scripts to Perl"wm42016-12-171-2/+2
| | | | | | | | | | | | | | | | | | This reverts commit fae73079310eef9dce9737f2e37ff4b80c8830ee. Before the waf build system was used, we had a configure script written in shell. To drop the build dependency on Python, someone rewrote the Python scripts we had to Perl. Now the shell configure script is gone, and it makes no sense to have a build dependency on both Perl and Python. This isn't just a straight revert. It adds the new Matroska EBML elements to the old Python scripts, adjusts the waf build system, and of course doesn't add anything back needed by the old build system. It would be better if this used matroska.py/file2string.py directly by importing them as modules, instead of calling them via "python". But for now this is simpler.
* cocoa: cosmetic fixesAkemi2016-12-161-1/+2
|
* wscript: Fix cuda test to actually work when cuda SDK is not presentPhilip Langdale2016-11-231-0/+12
| | | | | | | | | | The test ended up failing if cuda.h wasn't present, even if cuda.h isn't used during the actual build. This test is attempting to establish if the ffmpeg being built against has dynlink_cuda support. While it might theoretically be possible to build against the older normally-linked-cuda version of ffmpeg, it seems more trouble than it's worth.
* audio/out: add AudioUnit output driver for iOSAman Gupta2016-11-011-0/+15
|
* build: Set a default error message for #3692Thomas Nagy2016-10-211-1/+1
| | | | | This change will prevent annoying exceptions from appearing when error messages are missing.
* win32: build with -DINITGUIDJames Ross-Gowan2016-09-282-2/+1
| | | | | | | | | | | | We always want to use __declspec(selectany) to declare GUIDs, but manually including <initguid.h> in every file that used GUIDs was error-prone. Since all <initguid.h> does is define INITGUID and include <guiddef.h>, we can remove all references to <initguid.h> and just compile with -DINITGUID to get the same effect. Also, this partially reverts 622bcb0 by re-adding libuuid.a to the build, since apparently some GUIDs (such as GUID_NULL) are not declared in the source file, even when INITGUID is set.
* ao_openal: enable building on OSXJosh de Kock2016-09-211-1/+12
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* waftools: remove trailing newlinestepshal2016-06-081-1/+0
|
* build: silence -Wunused-resultNiklas Haas2016-06-071-1/+3
| | | | | | | | For clang, it's enough to just put (void) around usages we are intentionally ignoring the result of. Since GCC does not seem to want to respect this decision, we are forced to disable the warning globally.
* build: Do not link to libGL for egl-drmQuentin Glidic2016-05-201-2/+8
| | | | Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* build: also use the iconv check on freebsdq662016-05-101-1/+1
| | | | This is necessary to make mpv build out of box on FreeBSD.
* build: make DVB test stricterwm42016-04-021-0/+2
| | | | | | | | | | | | | | | | | | | I got a report that the build on a recent aarch64 Linux kernel failed. DVB support was detected, but errored on compilation: In file included from ../stream/stream_dvb.c:57:0: ../stream/dvbin.h:72:5: error: unknown type name 'fe_bandwidth_t' fe_bandwidth_t bw; Make the test stricter, which should take care of this. (I couldn't find out what exactly triggered the failure, nor could I attempt to reproduce it.) The change in stream/dvbin.h is to make sure that this isn't caused by incorrect header inclusion. It now includes the same files as the configure test.
* build: add special openbsd case for iconv checkStefano Pigozzi2016-02-011-1/+5
| | | | Fixes #2710
* build: add option to customize config files system pathStefano Pigozzi2016-01-111-1/+1
| | | | | | | Some packagers need to install default config files to some path but automatically load system configuration files from another path. See #2704
* waf: add "lua51" ("51obsd") to list of possible lua namesDmitrij D. Czarkoff2016-01-111-0/+1
|
* win32: build: set subsystem versionJames Ross-Gowan2015-12-201-0/+2
| | | | | | This sets the minimum supported Windows version to Windows Vista. The subsystem version also affects some Windows API functions, including GetSystemMetrics(SM_CXPADDEDBORDER).
* w32: use DisplayConfig API to retrieve correct monitor refresh rateJames Ross-Gowan2015-11-061-1/+1
| | | | | | | | | | This is based on an older patch by James Ross-Gowan. It was rebased and cleaned up. Also, the DWM API usage present in the older patch was removed, because DWM reports nonsense rates at least on Windows 8.1 (they are rounded to integers, just like with the old GDI API - except the GDI API had a good excuse, as it could report only integers). Signed-off-by: wm4 <wm4@nowhere>
* video: refactor GPU memcpy usagewm42015-09-251-0/+18
| | | | | | | | | | | | | | | | | Make the GPU memcpy from the dxva2 code generally useful to other parts of the player. We need to check at configure time whether SSE intrinsics work at all. (At least in this form, they won't work on clang, for example. It also won't work on non-x86.) Introduce a mp_image_copy_gpu(), and make the dxva2 code use it. Do some awkward stuff to share the existing code used by mp_image_copy(). I'm hoping that FFmpeg will sooner or later provide a function like this, so we can remove most of this again. (There is a patch, bit it's stuck in limbo since forever.) All this is used by the following commit.
* build: make sure the HAVE_ key is undefined on failureStefano Pigozzi2015-08-191-0/+1
| | | | | | Some particular checks can define the HAVE_ key on their own. To make sure they work correctly when composed (with compose_checks) we force the HAVE_ key to be undefined if a check fails.
* win32: revert wchar_t changeswm42015-08-011-1/+0
| | | | | | | | | | | Revert "win32: more wchar_t -> WCHAR replacements" Revert "win32: replace wchar_t with WCHAR" Doing a "partial" port of this makes no sense anymore from my perspective. Revert the changes, as they're confusing without context, maintenance, and progress. These changes were a bit premature anyway, and might actually cause other issues (locale neutrality etc. as it was pointed out).
* win32: more wchar_t -> WCHAR replacementswm42015-07-301-0/+1