summaryrefslogtreecommitdiffstats
path: root/wscript
Commit message (Collapse)AuthorAgeFilesLines
* build: bump required libva versionwm42015-10-171-4/+4
| | | | | | | | 0.34 and 0.35 don't have the buffer API, such as vaAcquireBufferHandle. This is only needed for the EGL interop, but why bother staying compatible for such old things (0.36 was released over a year ago). We also can drop some minor compatibility ifdeffery.
* Take care of libavcodec convergence_duration deprecationwm42015-09-291-1/+7
| | | | | | This AVPacket field was a hack against the fact that the duration field was merely an int (too small for things like subtitle durations). Newer libavcodec drops this field and makes duration 64 bit.
* video: remove VDA supportwm42015-09-281-26/+0
| | | | | | | | | VideoToolbox is preferred. Now that FFmpeg released 2.8, there's no reason to support VDA anymore. In fact, we had a bug that made VDA not useable with older FFmpeg versions in some newer mpv releases. VideoToolbox is supported even on slightly older OSX versions, and if not, you still can run mpv without hw decoding.
* vo_opengl: vaapi: add Wayland supportwm42015-09-271-2/+7
| | | | | | Pretty trivial with the new EGL interop. Fixes #478.
* vo_opengl: refactor EGL context information callbackwm42015-09-271-1/+2
| | | | | Move the ugliness from x11egl.c to common.c, so that the ugliness doesn't have to be duplicated in wayland.c.
* vaapi: remove dependency on X11wm42015-09-271-5/+15
| | | | | | | | | | | | | There are at least 2 ways of using VAAPI without X11 (Wayland, DRM). Remove the X11 requirement from the decoder part and the EGL interop. This will be used by a following commit, which adds Wayland support. The worst about this is the decoder part, which includes a bad hack for using the decoder without any VO interop (also known as "vaapi-copy" mode). Separate the X11 parts so that they're self-contained. For the EGL interop code we do something similar (it's kept slightly simpler, because it essentially only has to translate between our silly MPGetNativeDisplay abstraction and the vaGetDisplay...() call).
* vo_opengl: vaapi: redo how EGL extensions are loadedwm42015-09-271-5/+0
| | | | | | | It looks like my hope that we can unconditionally include EGL headers in the OpenGL code is not coming true, because OSX does not support EGL at all. So I prefer loading the VAAPI EGL/GL specific extensions manually, because it's less of a mess. Partially reverts commit d47dff3f.
* wscript: add missing entry to help outputwm42015-09-251-1/+1
| | | | Fixes #2344.
* vaapi: use GPU memcpy for reading back from HW surfacewm42015-09-251-1/+1
| | | | | | | | | This makes it much faster if the surface is really mapped from GPU memory. It's slightly slower than system memcpy if used on system memory. We don't really know definitely in which type of memory it's located, so we use the GPU memcpy in all cases. Fixes #2317.
* video: refactor GPU memcpy usagewm42015-09-251-0/+5
| | | | | | | | | | | | | | | | | 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.
* vo_rpi, wayland: fix buildwm42015-09-251-5/+5
| | | | | | Broken by commit d47dff3f. If something is going to include EGL.h, header_fixes.h has to know. This definitely affected vo_rpi, and probably affects wayland builds (with x11egl didabled) as well.
* vo_opengl: support new VAAPI EGL interopwm42015-09-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Should work much better than the old GLX interop code. Requires Mesa 11, and explicitly selecting the X11 EGL backend with: --vo=opengl:backend=x11egl Should it turn out that the new interop works well, we will try to autodetect EGL by default. This code still uses some bad assumptions, like expecting surfaces to be in NV12. (This is probably ok, because virtually all HW will use this format. But we should at least check this on init or so, instead of failing to render an image if our assumption doesn't hold up.) This repo was a lot of help: https://github.com/gbeauchesne/ffvademo The kodi code was also helpful (the magic FourCC it uses for EGL_LINUX_DRM_FOURCC_EXT are nowhere documented, and EGL_IMAGE_INTERNAL_FORMAT_EXT as used in ffvademo does not actually exist). (This is the 3rd VAAPI GL interop that was implemented in this player.)
* vo_opengl: add mechanism to retrieve Display from EGL contextwm42015-09-251-1/+5
| | | | | | | | | | The VAAPI EGL interop code will need access to the X11 Display. While GLX could return it from the current GLX context, EGL has no such mechanism. (At least no standard one supported by all implementations.) So mpv makes up such a mechanism. For internal purposes, this is very rather awkward solution, but it's needed for libmpv anyway.
* vo_opengl: load certain EGL extensions needed for VAAPI EGL interopwm42015-09-251-0/+5
| | | | | | | | | These extensions use a bunch of EGL types, so we need to include the EGL headers in common.h to use our GL function loader with this. In the future, we should probably require presence of the EGL headers to reduce the hacks. This might be not so simple at least with OSX, so for now this has to do.
* vo_opengl: enable X11 EGL backend by defaultwm42015-09-241-1/+0
| | | | | Originally, this was disabled, because it was useless and I was afraid it could possibly break autodetection and proper fallback.
* build: allow disabling vapoursynth completelywm42015-09-221-7/+8
| | | | | | | | | | | It's possible to build vf_vapoursynth with either the Python or Lua backend (or both or none). The check for the vapoursynth core itself was hidden away and couldn't be disabled, which would link mpv with vapoursynth even if all backends were disabled. Rearrange the checks so that the core will be disabled if no backend is found (or both are disabled). This duplicates the check for vapoursynth.pc, but since it's trivial, this is not that bad.
* video: do not use deprecated libavutil pixdesc fieldswm42015-09-101-0/+6
| | | | | | These were normalized and are saner now. We want to use the new fields, and also get rid of the deprecation warnings, so use them. There's no release yet which uses these, so some ifdeffery is unfortunately needed.
* audio/filter: remove af_bs2b toowm42015-09-041-4/+0
| | | | | | | Some users still use this filter, so the filter was going to be kept. But I overlooked that libavfilter provides this filter. Remove the redundant wrapper from mpv. Something like --af=lavfi=bs2b should work and give exactly the same results.
* audio/filter: remove some useless filterswm42015-09-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | All of these filters are considered not useful anymore by us. Some have replacements in libavfilter (useable through af_lavfi). af_center, af_extrastereo, af_karaoke, af_sinesuppress, af_sub, af_surround, af_sweep: pretty simple and useless filters which probably nobody ever wants. af_ladspa: has a replacement in libavfilter. af_hrtf: the algorithm doesn't work properly on most sources, and the implementation was buggy and complicated. (The filter was inherited from MPlayer; but even in mpv times we had to apply fixes that fixed major issues with added noise.) There is a ladspa filter if you still want to use it. af_export: I'm not even sure what this is supposed to do. Possibly it was meant for GUIs rendering audio visualizations, but it couldn't really work well. For example, the size of the audio depended on the samplerate (fixed number of samples only), and it couldn't retrieve the complete audio, only fragments. If this is really needed for GUIs, mpv should add native visualization, or a proper API for it.
* Revert "build: workaround for broken waf crap"Stefano Pigozzi2015-08-191-7/+1
| | | | This reverts commit 1b7883a3e57a39edfd39732efde5cd02417e3ebd.
* build: workaround for broken waf crapwm42015-08-181-1/+7
| | | | | Even though the rpi check fails, it'll define "HAVE_RPI 1" in config.h. Why? Who knows...
* vo_rpi: use EGL to render subtitleswm42015-08-181-11/+5
| | | | | | | | Slightly faster than using the dispmanx mess (perhaps to a large amount due to the rather stupid C-only unoptimized ASS->RGBA blending code). Do this by reusing vo_opengl's subtitle renderer, and vo_opengl's RPI backend.
* stream: libarchive wrapper for reading compressed archiveswm42015-08-171-0/+5
| | | | | | | | | | | | | | | | | | | | This works similar to the existing .rar support, but uses libarchive. libarchive supports a number of formats, including zip and (most of) rar. Unfortunately, seeking does not work too well. Most libarchive readers do not support seeking, so it's emulated by skipping data until the target position. On backwards seek, the file is reopened. This works fine on a local machine (and if the file is not too large), but will perform not so well over network connection. This is disabled by default for now. One reason is that we try libarchive on every file we open, before trying libavformat, and I'm not sure if I trust libarchive that much yet. Another reason is that this breaks multivolume rar support. While libarchive supports seeking in rar, and (probably) supports multivolume archive, our support of libarchive (probably) does not. I don't care about multivolume rar, but vocal users do.
* video: remove old vdpau hwaccel API usagewm42015-08-101-8/+0
| | | | | | | While the "old" libavcodec vdpau API is not deprecated (only the very- old API is), it's still relatively complicated code that badly duplicates the much simpler newer vdpau code. It exists only for the sake of older FFmpeg releases; get rid of it.
* build: fix build with --disable-tv --enable-pvrwm42015-08-061-0/+1
| | | | | These share some code (frequencies.c at least), so linking was failing. Fix by making pvr depend on tv.
* build: fix conditions for building gl_hwdec_vda.cwm42015-08-051-1/+1
| | | | | This contains code for the VT and VDA case, thus must be build if at least 1 of them is enabled.
* hwdec: add VideoToolbox supportSebastien Zwickert2015-08-051-0/+19
| | | | | | | | VDA is being deprecated in OS X 10.11 so this is needed to keep hwdec working. The code needs libavcodec support which was added recently (to FFmpeg git, libav doesn't support it). Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* build: make charset detectors dependent on iconv and group themwm42015-08-021-4/+11
|
* build: fix version.h creationStefano Pigozzi2015-07-121-4/+10
| | | | | Previous code did not retrigger a relink when version.h changed since it didn't use a waf task.
* vaapi: drop compatibility crap and vo_vaapi deinterlacerwm42015-07-081-1/+1
| | | | | | | | | | | Drop libva versions below 0.34.0. These are ancient, so I don't care. Drop the vo_vaapi deinterlacer as well. With 0.34.0, VPP is always available, and deinterlacing is done with vf_vavpp. The vaCreateSurfaces() function changes its signature - actually it did in 0.34.0 or so, and the <va/va_compat.h> defined a macro to make it use the old signature.
* av_log: print FFmpeg versionwm42015-07-031-0/+6
| | | | | The individual library versionsd are pretty useless. This will actually tell us at least the git hash or git tag of the FFmpeg build.
* build: always regenerate version hashwm42015-06-301-0/+7
| | | | | | | | | Until now, it only used the hash from the previous configure run, instead of trying to get the latest hash. The "old" build system did this correctly - we just have to use the existing logic in version.sh. Since waf supports separate build dirs, extend version.sh with an argument for setting the path of version.h.
* test: update cmocka version to 1.0Stefano Pigozzi2015-06-131-1/+1
|
* vdpau: add support for the "new" libavcodec vdpau APIwm42015-05-281-0/+8
| | | | | | | | | Yet another of these dozens of hwaccel changes. This time, libavcodec provides utility functions, which initialize the vdpau decoder and map codec profiles. So a lot of work the API user had to do falls away. This also will give us support for high bit depth profiles, and possibly HEVC once libavcodec supports it.
* vda: add support for nv12 image formatsStefano Pigozzi2015-05-131-0/+7
| | | | | | | | | The hardware always decodes to nv12 so using this image format causes less cpu usage than uyvy (which we are currently using, since Apple examples and other free software use that). The reduction in cpu usage can add up to quite a bit, especially for 4k or high fps video. This needs an accompaning commit in libavcodec.
* cocoa: always compile OSX application code with cocoawm42015-05-021-6/+0
| | | | | | | | | | | | | | This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case.
* vo_drm: disable VT switcher for non-Linux systemsMarcin Kurczewski2015-04-191-0/+6
|
* vo_drm: add KMS/DRM renderer supportMarcin Kurczewski2015-04-161-0/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vaapi: fight with Intel's broken video decoding GL interopwm42015-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use texture-from-pixmap instead of vaapi's "native" GLX support. Apparently the latter is unused by other projects. Possibly it's broken due that, and Intel's inability to provide anything non-broken in relation to video. The new code basically uses the X11 output method on a in-memory pixmap, and maps this pixmap as texture using standard GLX mechanisms. This requires a lot of X11 and GLX boilerplate, so the code grows. (I don't know why libva's GLX interop doesn't just do the same under the hood, instead of bothering the world with their broken/unmaintained "old" method, whatever it did. I suspect that Intel programmers are just genuine sadists.) This change was suggested in issue #1765. The old GLX support is removed, as it's redundant and broken anyway. One remaining issue is that the first vaPutSurface() call fails with an unknown error. It returns -1, which is pretty strange, because vaapi error codes are normally positive. It happened with the old GLX code too, but does not happen with vo_vaapi. I couldn't find out why.
* build: make posix_spawn() mandatorywm42015-03-301-1/+7
| | | | | | | It was already accidentally used unconditionally by command.c. Apparently this worked well for us, so don't change anything about, but should it be unavailable, fail at configure time instead of compile time.
* RPI supportwm42015-03-291-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires FFmpeg git master for accelerated hardware decoding. Keep in mind that FFmpeg must be compiled with --enable-mmal. Libav will also work. Most things work. Screenshots don't work with accelerated/opaque decoding (except using full window screenshot mode). Subtitles are very slow - even simple but huge overlays can cause frame drops. This always uses fullscreen mode. It uses dispmanx and mmal directly, and there are no window managers or anything on this level. vo_opengl also kind of works, but is pretty useless and slow. It can't use opaque hardware decoding (copy back can be used by forcing the option --vd=lavc:h264_mmal). Keep in mind that the dispmanx backend is preferred over the X11 ones in case you're trying on X11; but X11 is even more useless on RPI. This doesn't correctly reject extended h264 profiles and thus doesn't fallback to software decoding. The hw supports only up to the high profile, and will e.g. return garbage for Hi10P video. This sets a precedent of enabling hw decoding by default, but only if RPI support is compiled (which most hopefully it will be disabled on desktop Linux platforms). While it's more or less required to use hw decoding on the weak RPI, it causes more problems than it solves on real platforms (Linux has the Intel GPU problem, OSX still has some cases with broken decoding.) So I can live with this compromise of having different defaults depending on the platform. Raspberry Pi 2 is required. This wasn't tested on the original RPI, though at least decoding itself seems to work (but full playback was not tested).
* input: remove Linux joystick supportwm42015-03-241-5/+0
| | | | | | | | | | | Why did this exist in the first place? Other than being completely useless, this even caused some regressions in the past. For example, there was the case of a laptop exposing its accelerometer as joystick device, which led to extremely fun things due to the default mappings of axis movement being mapped to seeking. I suppose those who really want to use their joystick to control a media player (???) can configure it as mouse device or so.
* input: remove classic LIRC supportwm42015-03-241-4/+0
| | | | It's much easier to configure remotes as X11 input devices.
* audio: remove internal libmpg123 wrapperwm42015-03-241-4/+0
| | | | | | | We've been prefering the libavcodec mp3 decoder for half a year now. There is likely no benefit at all for using the libmpg123 one. It's just a maintenance burden, and tricks users into thinking it's a required dependency.
* build: fix missing windows librariesKevin Mitchell2015-03-161-2/+2
|
* build: simplify windows checkswm42015-03-111-23/+12
| | | | | There's no reason to do finegrained checks for libraries which always must be present. It also reduces the number of extra dependencies.
* build: disable tests by defaultStefano Pigozzi2015-03-101-0/+1
| | | | | Having them autodetect is a bad idea since it would link cmocka in the main mpv binary (which users don't want).
* build: make vdpau and dxva2 checks nicerwm42015-03-061-2/+2
| | | | | | Using check_statement() with an empty statement just to check for the header is quite a hack. Fix check_headers() (so it takes a "use" parameter), and use it for the checks instead.
* build: check whether hwaccels are enabled in FFmpegwm42015-03-051-3/+5
| | | | | FFmpeg can be compiled with them disabled, and then it won't provide the public headers specific to these APIs, causing mpv compilation failure.
* Remove some FFmpeg/Libav compatibility hackswm42015-03-031-43/+0
| | | | | | All of these are now in the supported FFmpeg and Libav versions. The 3 remaining API checks are for FFmpeg-only things.
* build: bump required FFmpeg/Libav librarieswm42015-03-031-9/+10
| | | | | | | | | | | | | | | | The af_lavrresample commit made compilation fail on Libav 10, so I think it's time to require somewhat more recent dependencies. Libav 11 is the latest release, and FFmpeg 2.4 seems to correspond to Libav 11. So use these. Also adjust the configure failure message. Instead of (accidentally) printing the pkg-config versions twice, print the release version numbers too. This is helpful, because the release version numbers are completely different from the pkg-config ones. I will probably remove some compatibility hacks in the following commits too.
* Revert "Revert recent vo_opengl related commits"Niklas Haas2015-02-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Omitted a simple, but devastasting check. Fixed the relevant commits now. This reverts commit 8d24e9d9b8ad1b5d82139980eca148dc0f4a1eab. diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 9c8a643..f1ea03e 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1034,9 +1034,9 @@ static void compile_shaders(struct gl_video *p) shader_def_opt(&header_conv, "USE_CONV_GAMMA", use_conv_gamma); shader_def_opt(&header_conv, "USE_CONST_LUMA", use_const_luma); shader_def_opt(&header_conv, "USE_LINEAR_LIGHT_BT1886", - gamma_fun == MP_CSP_TRC_BT_1886); + use_linear_light && gamma_fun == MP_CSP_TRC_BT_1886); shader_def_opt(&header_conv, "USE_LINEAR_LIGHT_SRGB", - gamma_fun == MP_CSP_TRC_SRGB); + use_linear_light && gamma_fun == MP_CSP_TRC_SRGB); shader_def_opt(&header_conv, "USE_SIGMOID", use_sigmoid); if (p->opts.alpha_mode > 0 && p->has_alpha && p->plane_count > 3) shader_def(&header_conv, "USE_ALPHA_PLANE", "3");
* Revert recent vo_opengl related commitswm42015-02-281-7/+0
| | | | | | | | | | | | | | | Breaks vo_opengl by default. I'm hot able to fix this myself, because I have no clue about the overcomplicated color management logic. Also, whilethis is apparently caused by commit fbacd5, the following commits all depend on it, so revert them too. This reverts the following commits: e141caa97dade07f4d7e0d6c208bcd3493e712ed 653b0dd5295453d9661f673b4ebd02c5ceacf645 729c8b3f641e633474be612e66388c131a1b5c92 fbacd5de31de964f7cd562304ab1c9b4a0d76015 Fixes #1636.
* screenshots: check for AVFrame csp supportNiklas Haas2015-02-281-0/+7
| | | | Apparently, libav stable is old enough to not have these fields.
* input: avoid creating world-writeable file with --input-unix-socketwm42015-02-261-0/+4
| | | | | This requires fchmod(), which is not necessarily available everywhere. It also might not work at all. (It does work on Linux.)
* remove dead commentStefano Pigozzi2015-02-251-2/+0
|
* build: move QuartzCore linking to the cocoa checkStefano Pigozzi2015-02-251-1/+1
| | | | | It's needed for the Displa