mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Add experimental MPV player backend (#161)
Experimental MPV player backend Related to #14, #22, & #85 You can switch to MPV in advanced settings and toggle using hardware decoding or not. This uses code and buildscripts from https://github.com/mpv-android/mpv-android, plus other third party libraries to build MPV
This commit is contained in:
parent
d7b333e519
commit
6be2662d4e
84 changed files with 3987 additions and 289 deletions
44
scripts/mpv/scripts/lua.sh
Executable file
44
scripts/mpv/scripts/lua.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
. ../../include/path.sh
|
||||
|
||||
if [ "$1" == "build" ]; then
|
||||
true
|
||||
elif [ "$1" == "clean" ]; then
|
||||
make clean
|
||||
exit 0
|
||||
else
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# Building seperately from source tree is not supported, this means we are forced to always clean
|
||||
$0 clean
|
||||
|
||||
mycflags=(
|
||||
# ensures correct linking into libmpv.so
|
||||
-fPIC
|
||||
# bionic is missing decimal_point in localeconv [src/llex.c]
|
||||
-Dgetlocaledecpoint\\\(\\\)=\\\(46\\\)
|
||||
# force fallback as ftello/fseeko are not defined [src/liolib.c]
|
||||
-Dlua_fseek
|
||||
)
|
||||
|
||||
# LUA_T= and LUAC_T= to disable building lua & luac
|
||||
# -Dgetlocaledecpoint()=('.') fixes bionic missing decimal_point in localeconv
|
||||
make CC="$CC" AR="$AR rc" RANLIB="$RANLIB" \
|
||||
MYCFLAGS="${mycflags[*]}" \
|
||||
PLAT=linux LUA_T= LUAC_T= -j$cores
|
||||
|
||||
# TO_BIN=/dev/null disables installing lua & luac
|
||||
make INSTALL=${INSTALL:-install} INSTALL_TOP="$prefix_dir" TO_BIN=/dev/null install
|
||||
|
||||
# make pc only generates a partial pkg-config file because ????
|
||||
mkdir -p $prefix_dir/lib/pkgconfig
|
||||
make pc >$prefix_dir/lib/pkgconfig/lua.pc
|
||||
cat >>$prefix_dir/lib/pkgconfig/lua.pc <<'EOF'
|
||||
Name: Lua
|
||||
Description:
|
||||
Version: ${version}
|
||||
Libs: -L${libdir} -llua
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue