summaryrefslogtreecommitdiffstats
path: root/wscript
Commit message (Collapse)AuthorAgeFilesLines
* build: require our own ffmpeg repowm42017-10-271-3/+11
| | | | | | | | | This is required now. Can't have FFmpeg upstream randomly break us and then not fix it (like this recent EOF issue). Upstream FFmpeg is of course still supported, but you will need to edit the build scripts. Official support is only with the master branch of our own repo.
* vd_lavc: use avcodec_fill_hw_frames_parameters() APIwm42017-10-271-0/+6
| | | | | | | | This removes the need for codec- and API-specific knowledge in the libavcodec hardware acceleration API user. For mpv, this removes the need for vd_lavc_hwdec.pixfmt_map and a few other things. (For now, we still keep the "old" parts for the sake of supporting older Libav, and FFgarbage.)
* Add DRM_PRIME Format Handling and Display for RockChip MPP decodersLionel CHAZALLON2017-10-231-0/+5
| | | | | | | | | | | This commit allows to use the AV_PIX_FMT_DRM_PRIME newly introduced format in ffmpeg that allows decoders to provide an AVDRMFrameDescriptor struct. That struct holds dmabuf fds and information allowing zerocopy rendering using KMS / DRM Atomic. This has been tested on RockChip ROCK64 device.
* build: make LGPL mode final (via --enable-gpl)wm42017-10-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename --enable-preliminary-lgpl2 to --enable-gpl. This concludes the relicensing. Some things are still to do (relicensing some still-GPL optional code), but we consider the code included by --enable-gpl to be fully relicensed. The relicensing was performed by asking every known author for permission for relicensing it to LGPL version 2.1 "or later". If an author could not be contacted or permission could not be obtained, and the contribution was considered relevant for copyright purposes, the affected code was either excluded from LGPL mode (not built), or removed or rewritten. This is the standard in open source relicensing processes. Keep in mind that using LGPL mode is still on the user's own risk. Even though I claim that the relicensing was pretty clean and thorough (measured on the standards of the open source community¹), and I followed the advice of some actual experts, there is still a residual uncertainty due to the fact that I'm not an all-knowing entity (authors could have taken someone else's code and pretend it's their own) nor a lawyer (meaning I might lack associated authority or expertise), and the fact that the judicial system is far from deterministic. The relicensing was performed merely to the best of my knowledge. I reject all responsibility outside of that. This commit also cleans up the "Copyright" file to reflect the finalized relicensing process. ¹ Not to imply that the standards of commercial companies are much higher. Some major tech companies get away with stuff I would not consider clean. See #2033.
* vo_gpu: android: fix gpu contextAman Gupta2017-10-091-0/+1
|
* vo_gpu: add android opengl backendAman Gupta2017-10-091-2/+5
| | | | | | | | | | At the moment, rendering on Android requires ``--vo=opengl-cb`` and a lot of java<->c++ bridging code to receive the receive and react to the render callback in java. Performance also suffers with opengl-cb, due to the overhead of context switching in JNI. With this patch, Android can render using ``--vo=gpu --gpu-context=android`` (after setting ``--wid`` to point to an android.view.Surface on-screen).
* build: switch preliminary LGPL mode from v3 to v2.1wm42017-10-051-3/+3
| | | | | | | | | | | iive agreed to relicense things that are still in mpv to LGPLv2.1. So change the licenses of the affected files, and rename the configure switch for LGPL mode to --enable-preliminary-lgpl2. (The "preliminary" part will probably be removed from the configure switch soon as well.) Also player/main.c hasn't had GPL parts since a few commits ago.
* wayland_common: rewrite from scratchRostislav Pehlivanov2017-10-031-0/+9
| | | | | | | | | | | | 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.
* vaapi: change license to LGPLwm42017-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | Originally mpv vaapi support was based on the MPlayer-vaapi patches. These were never merged in upstream MPlayer. The license headers indicated they were GPL-only. Although the actual author agreed to relicensing, the company employing him to write this code did not, so the original code is unusable to us. Fortunately, vaapi support was refactored and rewritten several times, meaning little code is actually left. The previous commits removed or moved that to GPL-only code. Namely, vo_vaapi.c remains GPL-only. The other code went away or became unnecessary mainly because libavcodec itself gained the ability to manage the hw decoder, and libavutil provides code to manage vaapi surfaces. We also changed to mainly using EGL interop, making any of the old rendering code unnecessary. hwdec_vaglx.c is still GPL. It's possibly relicensable, because much of it was changed, but I'm not too sure and further investigation would be required. Also, this has been disabled by default for a while now, so bothering with this is a waste of time. This commit simply disables it at compile time as well in LGPL mode.
* video: remove old videotoolbox supportwm42017-09-261-15/+1
| | | | | Like as in previous commits, you need a very recent FFmpeg (probably git master).
* wscript: remove redundant checkwm42017-09-261-6/+0
| | | | We're not using this function directly.
* video: drop old D3D11/DXVA2 supportwm42017-09-261-11/+1
| | | | | | | | | Now you need FFmpeg git, or something. This also gets rid of the last real use of gpu_memcpy(). libavutil does that itself. (vaapi.c still used it, but it was essentially unused, because the code path isn't really in use anymore. It wasn't even included due to the d3d-hwaccel dependency in wscript.)
* vo_gpu: vulkan: generalize SPIR-V compilerNiklas Haas2017-09-261-0/+4
| | | | | | | | | | | | | | In addition to the built-in nvidia compiler, we now also support a backend based on libshaderc. shaderc is sort of like glslang except it has a C API and is available as a dynamic library. The generated SPIR-V is now cached alongside the VkPipeline in the cached_program. We use a special cache header to ensure validity of this cache before passing it blindly to the vulkan implementation, since passing invalid SPIR-V can cause all sorts of nasty things. It's also designed to self-invalidate if the compiler gets better, by offering a catch-all `int compiler_version` that implementations can use as a cache invalidation marker.
* vo_gpu: vulkan: initial implementationNiklas Haas2017-09-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time based on ra/vo_gpu. 2017 is the year of the vulkan desktop! Current problems / limitations / improvement opportunities: 1. The swapchain/flipping code violates the vulkan spec, by assuming that the presentation queue will be bounded (in cases where rendering is significantly faster than vsync). But apparently, there's simply no better way to do this right now, to the point where even the stupid cube.c examples from LunarG etc. do it wrong. (cf. https://github.com/KhronosGroup/Vulkan-Docs/issues/370) 2. The memory allocator could be improved. (This is a universal constant) 3. Could explore using push descriptors instead of descriptor sets, especially since we expect to switch descriptors semi-often for some passes (like interpolation). Probably won't make a difference, but the synchronization overhead might be a factor. Who knows. 4. Parallelism across frames / async transfer is not well-defined, we either need to use a better semaphore / command buffer strategy or a resource pooling layer to safely handle cross-frame parallelism. (That said, I gave resource pooling a try and was not happy with the result at all - so I'm still exploring the semaphore strategy) 5. We aggressively use pipeline barriers where events would offer a much more fine-grained synchronization mechanism. As a result of this, we might be suffering from GPU bubbles due to too-short dependencies on objects. (That said, I'm also exploring the use of semaphores as a an ordering tactic which would allow cross-frame time slicing in theory) Some minor changes to the vo_gpu and infrastructure, but nothing consequential. NOTE: For safety, all use of asynchronous commands / multiple command pools is currently disabled completely. There are some left-over relics of this in the code (e.g. the distinction between dev_poll and pool_poll), but that is kept in place mostly because this will be re-extended in the future (vulkan rev 2). The queue count is also currently capped to 1, because of the lack of cross-frame semaphores means we need the implicit synchronization from the same-queue semantics to guarantee a correct result.
* android: posix_spawn(p) replacementsfan52017-09-221-2/+12
| | | | Signed-off-by: wm4 <wm4@nowhere>
* build: make vo_gpu + infrastructure non-optionalwm42017-09-221-8/+3
| | | | | Also readd the the error message for when no GL backends are found (why was this removed?).
* vo_opengl: refactor into vo_gpuNiklas Haas2017-09-211-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done in several steps: 1. refactor MPGLContext -> struct ra_ctx 2. move GL-specific stuff in vo_opengl into opengl/context.c 3. generalize context creation to support other APIs, and add --gpu-api 4. rename all of the --opengl- options that are no longer opengl-specific 5. move all of the stuff from opengl/* that isn't GL-specific into gpu/ (note: opengl/gl_utils.h became opengl/utils.h) 6. rename vo_opengl to vo_gpu 7. to handle window screenshots, the short-term approach was to just add it to ra_swchain_fns. Long term (and for vulkan) this has to be moved to ra itself (and vo_gpu altered to compensate), but this was a stop-gap measure to prevent this commit from getting too big 8. move ra->fns->flush to ra_gl_ctx instead 9. some other minor changes that I've probably already forgotten Note: This is one half of a major refactor, the other half of which is provided by rossy's following commit. This commit enables support for all linux platforms, while his version enables support for all non-linux platforms. Note 2: vo_opengl_cb.c also re-uses ra_gl_ctx so it benefits from the --opengl- options like --opengl-early-flush, --opengl-finish etc. Should be a strict superset of the old functionality. Disclaimer: Since I have no way of compiling mpv on all platforms, some of these ports were done blindly. Specifically, the blind ports included context_mali_fbdev.c and context_rpi.c. Since they're both based on egl_helpers, the port should have gone smoothly without any major changes required. But if somebody complains about a compile error on those platforms (assuming anybody actually uses them), you know where to complain.
* build: add preliminary LGPL modewm42017-09-211-10/+31
| | | | | | | 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.
* audio: make libaf derived code optionalwm42017-09-211-0/+4
| | | | | | | | | | | | | | | This code could not be relicensed. The intention was to write new filter code (which could handle both audio and video), but that's a bit of work. Write some code that can do audio conversion (resampling, downmixing, etc.) without the old audio filter chain code in order to speed up the LGPL relicensing. If you build with --disable-libaf, nothing in audio/filter/* is compiled in. It breaks a few features, such as --volume, --af, pitch correction on speed changes, replaygain. Most likely this adds some bugs, even if --disable-libaf is not used. (How the fuck does EOF notification work again anyway?)
* build: use unified dependency expressions instead of weird fieldswm42017-09-181-92/+81
| | | | | | | | | | | | | | | | 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
* build: remove duplicate android option after 72a8120daIlya Tumaykin2017-09-171-4/+0
| | | | | | | | The first one (line 140) comes from 69650851f8 and is the correct one. The second one (line 731) comes from 72a8120daa and slipped in with the revert commit. Remove the second one.
* 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