logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 5a4f3899c1c06147c94b8f81de2883244c411873
parent f8f4562b49cd6c59b0a3384335497dc1077b9621
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 28 Dec 2017 22:11:01 -0800

mpv: Update to 0.28.2

This removes wayland SHM support for now (to be re-added later after adapting to
the new wayland code).

Diffstat:

Mninja.lua12+++++++++---
Mpkg/mpv/config.h34+++++++++++++++++-----------------
Mpkg/mpv/gen.lua75++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
Mpkg/mpv/gensources.awk12+++++++++---
Mpkg/mpv/rev2+-
Mpkg/mpv/sources.txt113+++++++++++++++++++++++++++++++++++++++----------------------------------------
Mpkg/wayland-protocols/gen.lua16++++++++++++++++
7 files changed, 172 insertions(+), 92 deletions(-)

diff --git a/ninja.lua b/ninja.lua @@ -363,9 +363,15 @@ end function waylandproto(proto, client, server, code) proto = '$srcdir/'..proto code = '$outdir/'..code - build('waylandproto', '$outdir/'..client, proto, {type='client-header'}) - build('waylandproto', '$outdir/'..server, proto, {type='server-header'}) - build('waylandproto', code, proto, {type='code'}) + if client then + build('waylandproto', '$outdir/'..client, proto, {type='client-header'}) + end + if server then + build('waylandproto', '$outdir/'..server, proto, {type='server-header'}) + end + if code then + build('waylandproto', code, proto, {type='code'}) + end cc(code, {'pkg/wayland/headers'}) end diff --git a/pkg/mpv/config.h b/pkg/mpv/config.h @@ -3,6 +3,9 @@ #define DEFAULT_DVD_DEVICE "/dev/sr0" #define DEFAULT_CDROM_DEVICE "/dev/sr0" +#define HAVE_LGPL 1 +#define HAVE_GPL 1 +#define HAVE_LIBAF 1 #define HAVE_CPLAYER 1 #define HAVE_LIBMPV_SHARED 0 #define HAVE_LIBMPV_STATIC 0 @@ -37,9 +40,8 @@ #define HAVE_DOS_PATHS 0 #define HAVE_TERMIOS_H 1 #define HAVE_SYS_TERMIOS_H 0 -#define HAVE_TERMIOS 1 -#define HAVE_SHM 1 -#define HAVE_NANOSLEEP 1 +#define HAVE_POSIX_SPAWN_NATIVE 1 +#define HAVE_POSIX_SPAWN_ANDROID 0 #define HAVE_POSIX_SPAWN 1 #define HAVE_WIN32_PIPES 0 #define HAVE_GLOB_POSIX 1 @@ -88,7 +90,10 @@ #define HAVE_WASAPI 0 #define HAVE_COCOA 0 #define HAVE_DRM 1 +#define HAVE_DRMPRIME 0 #define HAVE_GBM 0 +#define HAVE_WAYLAND_SCANNER 1 +#define HAVE_WAYLAND_PROTOCOLS 1 #define HAVE_WAYLAND 1 #define HAVE_X11 0 #define HAVE_XV 0 @@ -114,34 +119,29 @@ #define HAVE_CACA 0 #define HAVE_JPEG 0 #define HAVE_DIRECT3D 0 -#define HAVE_ANDROID 0 +#define HAVE_SHADERC_SHARED 0 +#define HAVE_SHADERC_STATIC 0 +#define HAVE_SHADERC 0 +#define HAVE_CROSSC 0 +#define HAVE_D3D11 0 #define HAVE_RPI 0 #define HAVE_IOS_GL 0 #define HAVE_PLAIN_GL 0 #define HAVE_MALI_FBDEV 0 #define HAVE_GL 0 +#define HAVE_VULKAN 0 #define HAVE_EGL_HELPERS 0 #define HAVE_LIBAVCODEC 1 -#define HAVE_IS_FFMPEG 1 -#define HAVE_IS_LIBAV 0 -#define HAVE_LIBAV 1 +#define HAVE_FFMPEG 1 +#define HAVE_LIBAV 0 +#define HAVE_LIBAV_ANY 1 #define HAVE_LIBAVDEVICE 1 -#define HAVE_AVUTIL_IMGCPY_UC 1 -#define HAVE_AVUTIL_CONTENT_LIGHT_LEVEL 0 -#define HAVE_AVUTIL_ICC_PROFILE 0 -#define HAVE_AVUTIL_SPHERICAL 1 -#define HAVE_VAAPI_HWACCEL 0 -#define HAVE_VIDEOTOOLBOX_HWACCEL_NEW 0 -#define HAVE_VIDEOTOOLBOX_HWACCEL_OLD 0 #define HAVE_VIDEOTOOLBOX_HWACCEL 0 #define HAVE_VIDEOTOOLBOX_GL 0 -#define HAVE_VDPAU_HWACCEL 0 #define HAVE_D3D_HWACCEL 0 -#define HAVE_D3D_HWACCEL_NEW 0 #define HAVE_D3D9_HWACCEL 0 #define HAVE_GL_DXINTEROP_D3D9 0 #define HAVE_CUDA_HWACCEL 0 -#define HAVE_SSE4_INTRINSICS 0 #define HAVE_TV 0 #define HAVE_SYS_VIDEOIO_H 0 #define HAVE_VIDEODEV 1 diff --git a/pkg/mpv/gen.lua b/pkg/mpv/gen.lua @@ -33,8 +33,17 @@ pkg.deps = { 'pkg/zlib/headers', } +build('copy', '$outdir/video/out/wayland/xdg-shell-v6.h', '$builddir/pkg/wayland-protocols/include/xdg-shell-unstable-v6-client-protocol.h') +build('copy', '$outdir/video/out/wayland/idle-inhibit-v1.h', '$builddir/pkg/wayland-protocols/include/idle-inhibit-unstable-v1-client-protocol.h') +waylandproto('video/out/wayland/server-decoration.xml', 'video/out/wayland/srv-decor.h', nil, 'video/out/wayland/srv-decor.c') +table.insert(pkg.deps, { + '$outdir/video/out/wayland/idle-inhibit-v1.h', + '$outdir/video/out/wayland/xdg-shell-v6.h', + '$outdir/video/out/wayland/srv-decor.h', +}) + rule('file2string', '$outdir/file2string $in >$out.tmp && mv $out.tmp $out') -function file2string(out, inp) +local function file2string(out, inp) build('file2string', '$outdir/'..out, {'$srcdir/'..inp, '|', '$outdir/file2string'}) table.insert(pkg.deps, '$outdir/'..out) end @@ -42,7 +51,7 @@ end file2string('input/input_conf.h', 'etc/input.conf') file2string('player/builtin_conf.inc', 'etc/builtin.conf') file2string('sub/osd_font.h', 'sub/osd_font.otf') -for _, f in ipairs{'assdraw', 'defaults', 'options', 'osc', 'ytdl_hook'} do +for _, f in ipairs{'defaults', 'assdraw', 'options', 'osc', 'ytdl_hook', 'stats'} do file2string('player/lua/'..f..'.inc', 'player/lua/'..f..'.lua') end @@ -53,19 +62,63 @@ for line in iterlines('config.h', 1) do options[var] = true end end +table.insert(pkg.inputs.gen, '$dir/config.h') + +-- source inclusion parser +local eval +do + local ops = { + {tok='||', fn=function(a, b) return a or b end, binary=true}, + {tok='&&', fn=function(a, b) return a and b end, binary=true}, + {tok='!', fn=function(a) return not a end}, + } + local function check(x) + if not x then + error('invalid expression') + end + end + local function helper(s, i, j) + local result, var, val + if s:sub(i, i) == '(' then + i = s:find('[^%s]', i + 1) + check(i) + result, i = parse(s, i, 1) + check(i and s:sub(i, i) == ')') + return result, s:find('[^%s]', i + 1) + end + if j > #ops then + local k = select(2, s:find('^[%w_.-]+', i)) + check(k) + var = s:sub(i, k):upper():gsub('-', '_') + i = s:find('[^%s]', k + 1) + return options['HAVE_'..var] or false, i + end + local op = ops[j] + if op.binary then + result, i = helper(s, i, j + 1) + end + if i and s:sub(i, i + #op.tok - 1) == op.tok then + i = s:find('[^%s]', i + #op.tok) + check(i) + val, i = helper(s, i, j) + result = op.fn(val, result) + elseif not op.binary then + result, i = helper(s, i, j + 1) + end + return result, i + end + eval = function(s, i) + result, i = helper(s, i, 1) + check(not i) + return result + end +end + local sources = {} for line in iterlines('sources.txt', 1) do local i = line:find(' ', 1, true) local add = true - if i then - local var = line:sub(i + 1):upper():gsub('-', '_') - local neg = var:sub(1, 1) == '!' - if neg then - var = var:sub(2) - end - add = options['HAVE_'..var] or false ~= neg - end - if add then + if not i or eval(line, i + 1) then sources[line:sub(1, i and i - 1)] = true end end diff --git a/pkg/mpv/gensources.awk b/pkg/mpv/gensources.awk @@ -5,13 +5,19 @@ BEGIN { ignore["osdep/terminal-dummy.c"] = 1 ignore["input/ipc-dummy.c"] = 1 ignore["osdep/subprocess-dummy.c"] = 1 + external["video/out/wayland/xdg-shell-v6.c"] = "$builddir/pkg/wayland-protocols/xdg-shell-unstable-v6-protocol.c.o" + external["video/out/wayland/idle-inhibit-v1.c"] = "$builddir/pkg/wayland-protocols/idle-inhibit-v1-protocol.c.o" + external["video/out/wayland/srv-decor.c"] = "video/out/wayland/srv-decor.c.o" } / +\(.*\),$/ { - if (ignore[$2]) + src = $2 + if (src in ignore) next + if (src in external) + src = external[src] if (NF == 3) - print $2 + print src else if (NF == 5) - print $2, $4 + print src, $4 } diff --git a/pkg/mpv/rev b/pkg/mpv/rev @@ -1 +1 @@ -13 +14 diff --git a/pkg/mpv/sources.txt b/pkg/mpv/sources.txt @@ -10,7 +10,8 @@ input/ipc-unix.c posix input/ipc-win.c win32-desktop osdep/subprocess-posix.c posix-spawn osdep/subprocess-win.c win32-desktop -audio/audio.c +audio/aconverter.c +audio/audio.c libaf audio/audio_buffer.c audio/chmap.c audio/chmap_sel.c @@ -20,18 +21,14 @@ audio/aframe.c audio/decode/ad_lavc.c audio/decode/ad_spdif.c audio/decode/dec_audio.c -audio/filter/af.c -audio/filter/af_channels.c -audio/filter/af_equalizer.c -audio/filter/af_format.c -audio/filter/af_lavcac3enc.c -audio/filter/af_lavfi.c -audio/filter/af_lavrresample.c -audio/filter/af_pan.c +audio/filter/af.c libaf +audio/filter/af_format.c libaf +audio/filter/af_lavcac3enc.c libaf +audio/filter/af_lavfi.c libaf +audio/filter/af_lavrresample.c libaf audio/filter/af_rubberband.c rubberband -audio/filter/af_scaletempo.c -audio/filter/af_volume.c -audio/filter/tools.c +audio/filter/af_scaletempo.c libaf +audio/filter/tools.c libaf audio/out/ao.c audio/out/ao_alsa.c alsa audio/out/ao_audiounit.m audiounit @@ -128,9 +125,9 @@ player/screenshot.c player/scripting.c player/sub.c player/video.c -stream/ai_alsa1x.c alsa -stream/ai_oss.c oss-audio -stream/ai_sndio.c sndio +stream/ai_alsa1x.c alsa && audio-input +stream/ai_oss.c oss-audio && audio-input +stream/ai_sndio.c sndio && audio-input stream/audio_in.c audio-input stream/cache.c stream/cache_file.c @@ -172,8 +169,8 @@ sub/sd_ass.c libass sub/sd_lavc.c sub/filter_sdh.c video/csputils.c +video/d3d.c d3d-hwaccel video/fmt-conversion.c -video/gpu_memcpy.c sse4-intrinsics video/image_loader.c video/image_writer.c video/img_format.c @@ -184,36 +181,18 @@ video/sws_utils.c video/vaapi.c vaapi video/vdpau.c vdpau video/vdpau_mixer.c vdpau -video/vt.c videotoolbox-hwaccel -video/decode/d3d.c d3d-hwaccel video/decode/dec_video.c -video/decode/hw_cuda.c cuda-hwaccel -video/decode/hw_dxva2.c d3d9-hwaccel -video/decode/hw_d3d11va.c d3d-hwaccel -video/decode/hw_videotoolbox.c videotoolbox-hwaccel video/decode/vd_lavc.c video/filter/refqueue.c video/filter/vf.c -video/filter/vf_buffer.c -video/filter/vf_crop.c +video/filter/vf_convert.c video/filter/vf_d3d11vpp.c d3d-hwaccel -video/filter/vf_dsize.c -video/filter/vf_expand.c -video/filter/vf_flip.c video/filter/vf_format.c -video/filter/vf_gradfun.c video/filter/vf_lavfi.c -video/filter/vf_mirror.c -video/filter/vf_noformat.c -video/filter/vf_pullup.c -video/filter/vf_rotate.c -video/filter/vf_scale.c -video/filter/vf_stereo3d.c video/filter/vf_sub.c video/filter/vf_vapoursynth.c vapoursynth-core video/filter/vf_vavpp.c vaapi video/filter/vf_vdpaupp.c vdpau -video/filter/vf_yadif.c video/out/aspect.c video/out/bitmap_packer.c video/out/cocoa/video_view.m cocoa @@ -222,26 +201,42 @@ video/out/cocoa/window.m cocoa video/out/cocoa_common.m cocoa video/out/dither.c video/out/filter_kernels.c +video/out/d3d11/context.c d3d11 +video/out/d3d11/hwdec_d3d11va.c d3d11 && d3d-hwaccel +video/out/d3d11/ra_d3d11.c d3d11 video/out/opengl/angle_dynamic.c egl-angle +video/out/gpu/context.c +video/out/gpu/d3d11_helpers.c d3d11 || egl-angle-win32 +video/out/gpu/hwdec.c +video/out/gpu/lcms.c +video/out/gpu/osd.c +video/out/gpu/ra.c +video/out/gpu/spirv.c +video/out/gpu/spirv_shaderc.c shaderc +video/out/gpu/shader_cache.c +video/out/gpu/user_shaders.c +video/out/gpu/utils.c +video/out/gpu/video.c +video/out/gpu/video_shaders.c video/out/opengl/common.c gl +video/out/opengl/formats.c gl +video/out/opengl/utils.c gl +video/out/opengl/ra_gl.c gl video/out/opengl/context.c gl video/out/opengl/context_angle.c egl-angle-win32 video/out/opengl/context_cocoa.c gl-cocoa video/out/opengl/context_drm_egl.c egl-drm video/out/opengl/context_dxinterop.c gl-dxinterop video/out/opengl/context_mali_fbdev.c mali-fbdev +video/out/opengl/context_android.c android video/out/opengl/context_rpi.c rpi video/out/opengl/context_vdpau.c vdpau-gl-x11 video/out/opengl/context_wayland.c gl-wayland -video/out/opengl/context_w32.c gl-win32 -video/out/opengl/context_x11.c gl-x11 +video/out/opengl/context_win.c gl-win32 +video/out/opengl/context_glx.c gl-x11 video/out/opengl/context_x11egl.c egl-x11 video/out/opengl/cuda_dynamic.c cuda-hwaccel -video/out/opengl/d3d11_helpers.c egl-angle-win32 video/out/opengl/egl_helpers.c egl-helpers -video/out/opengl/formats.c gl -video/out/opengl/gl_utils.c gl -video/out/opengl/hwdec.c gl video/out/opengl/hwdec_cuda.c cuda-hwaccel video/out/opengl/hwdec_d3d11egl.c d3d-hwaccel video/out/opengl/hwdec_d3d11eglrgb.c d3d-hwaccel @@ -249,20 +244,12 @@ video/out/opengl/hwdec_dxva2gldx.c gl-dxinterop-d3d9 video/out/opengl/hwdec_dxva2egl.c d3d9-hwaccel video/out/opengl/hwdec_osx.c videotoolbox-gl video/out/opengl/hwdec_ios.m ios-gl +video/out/opengl/hwdec_drmprime_drm.c drmprime && drm video/out/opengl/hwdec_rpi.c rpi video/out/opengl/hwdec_vaegl.c vaapi-egl -video/out/opengl/hwdec_vaglx.c vaapi-glx video/out/opengl/hwdec_vdpau.c vdpau-gl-x11 -video/out/opengl/lcms.c gl -video/out/opengl/osd.c gl -video/out/opengl/ra.c gl -video/out/opengl/ra_gl.c gl -video/out/opengl/shader_cache.c gl -video/out/opengl/user_shaders.c gl -video/out/opengl/utils.c gl -video/out/opengl/video.c gl -video/out/opengl/video_shaders.c gl video/out/vo.c +video/out/vo_mediacodec_embed.c android video/out/vo_caca.c caca video/out/vo_drm.c drm video/out/vo_direct3d.c direct3d @@ -270,28 +257,39 @@ video/out/vo_image.c video/out/vo_lavc.c encoding video/out/vo_rpi.c rpi video/out/vo_null.c -video/out/vo_opengl.c gl +video/out/vo_gpu.c video/out/vo_opengl_cb.c gl video/out/vo_sdl.c sdl2 video/out/vo_tct.c -video/out/vo_vaapi.c vaapi-x11 +video/out/vo_vaapi.c vaapi-x11 && gpl video/out/vo_vdpau.c vdpau -video/out/vo_wayland.c wayland video/out/vo_x11.c x11 video/out/vo_xv.c xv video/out/w32_common.c win32-desktop video/out/win32/displayconfig.c win32-desktop video/out/win32/droptarget.c win32-desktop -video/out/win32/exclusive_hack.c gl-win32 +video/out/vulkan/utils.c vulkan +video/out/vulkan/malloc.c vulkan +video/out/vulkan/formats.c vulkan +video/out/vulkan/ra_vk.c vulkan +video/out/vulkan/context.c vulkan +video/out/vulkan/context_xlib.c vulkan && x11 +video/out/vulkan/context_wayland.c vulkan && wayland +video/out/vulkan/context_win.c vulkan && win32-desktop +video/out/vulkan/spirv_nvidia.c vulkan video/out/wayland_common.c wayland -video/out/wayland/buffer.c wayland -video/out/wayland/memfile.c wayland +$builddir/pkg/wayland-protocols/xdg-shell-unstable-v6-protocol.c.o wayland +$builddir/pkg/wayland-protocols/idle-inhibit-v1-protocol.c.o wayland +video/out/wayland/srv-decor.c.o wayland video/out/win_state.c video/out/x11_common.c x11 +video/out/drm_atomic.c drm video/out/drm_common.c drm +video/out/drm_prime.c drm && drmprime osdep/io.c osdep/timer.c osdep/threads.c +osdep/polldev.c posix osdep/ar/HIDRemote.m apple-remote osdep/macosx_application.m cocoa osdep/macosx_events.m cocoa @@ -310,4 +308,5 @@ osdep/windows_utils.c os-win32 osdep/windows_utils.c os-cygwin osdep/mpv.rc win32-executable osdep/win32/pthread.c win32-internal-pthreads +osdep/android/posix-spawn.c android osdep/android/strnlen.c android diff --git a/pkg/wayland-protocols/gen.lua b/pkg/wayland-protocols/gen.lua @@ -6,9 +6,25 @@ waylandproto('unstable/xdg-shell/xdg-shell-unstable-v5.xml', 'xdg-shell-unstable-v5-protocol.c' ) +waylandproto('unstable/xdg-shell/xdg-shell-unstable-v6.xml', + 'include/xdg-shell-unstable-v6-client-protocol.h', + 'include/xdg-shell-unstable-v6-server-protocol.h', + 'xdg-shell-unstable-v6-protocol.c' +) + +waylandproto('unstable/idle-inhibit/idle-inhibit-unstable-v1.xml', + 'include/idle-inhibit-unstable-v1-client-protocol.h', + 'include/idle-inhibit-unstable-v1-server-protocol.h', + 'idle-inhibit-v1-protocol.c' +) + pkg.hdrs = { '$outdir/include/xdg-shell-unstable-v5-client-protocol.h', '$outdir/include/xdg-shell-unstable-v5-server-protocol.h', + '$outdir/include/xdg-shell-unstable-v6-client-protocol.h', + '$outdir/include/xdg-shell-unstable-v6-server-protocol.h', + '$outdir/include/idle-inhibit-unstable-v1-client-protocol.h', + '$outdir/include/idle-inhibit-unstable-v1-server-protocol.h', } fetch 'git'