Merge pull request #2055 from fewtarius/dev

Fix mpv video playback across devices.
This commit is contained in:
fewtarius 2023-09-13 14:37:49 -04:00 committed by GitHub
commit 036fbca992
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 10 deletions

View file

@ -76,7 +76,8 @@ fi
if [ "${VAAPI_SUPPORT}" = "yes" ] && listcontains "${GRAPHIC_DRIVERS}" "(r600|radeonsi)"; then
PKG_DEPENDS_TARGET+=" libva"
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=enabled"
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=enabled \
-Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc"
else
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=disabled"
fi

View file

@ -39,6 +39,20 @@ if [ "${V4L2_SUPPORT}" = "yes" ]; then
PKG_NEED_UNPACK+=" $(get_pkg_directory libdrm)"
PKG_FFMPEG_V4L2="--enable-v4l2_m2m --enable-libdrm"
if [ "${PROJECT}" = "Amlogic" -o "${PROJECT}" = "PC" -o "${DEVICE}" = "Rockchip" ]; then
PKG_V4L2_REQUEST="yes"
else
PKG_V4L2_REQUEST="no"
fi
if [ "${PKG_V4L2_REQUEST}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" systemd"
PKG_NEED_UNPACK+=" $(get_pkg_directory systemd)"
PKG_FFMPEG_V4L2+=" --enable-libudev --enable-v4l2-request"
else
PKG_FFMPEG_V4L2+=" --disable-libudev --disable-v4l2-request"
fi
if [ "${PKG_V4L2_REQUEST}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" systemd"
PKG_NEED_UNPACK+=" $(get_pkg_directory systemd)"
@ -58,13 +72,13 @@ else
PKG_FFMPEG_VAAPI="--disable-vaapi"
fi
if [ "${DISPLAYSERVER}" != "x11" ]; then
if [ "${DISPLAYSERVER}" != "wl" ]; then
PKG_DEPENDS_TARGET+=" libdrm"
PKG_NEED_UNPACK+=" $(get_pkg_directory libdrm)"
PKG_FFMPEG_VAAPI=" --enable-libdrm"
fi
if [ "${VDPAU_SUPPORT}" = "yes" -a "${DISPLAYSERVER}" = "x11" ]; then
if [ "${VDPAU_SUPPORT}" = "yes" -a "${DISPLAYSERVER}" = "wl" ]; then
PKG_DEPENDS_TARGET+=" libvdpau"
PKG_NEED_UNPACK+=" $(get_pkg_directory libvdpau)"
PKG_FFMPEG_VDPAU="--enable-vdpau"

View file

@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present Fewtarius
PKG_NAME="libplacebo"
PKG_VERSION="839e847e32ff0b6bb0a0c033b700245de6a333dc"
PKG_LICENSE="GPLv2+"
PKG_SITE="https://code.videolan.org/videolan/libplacebo"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain ffmpeg SDL2 luajit libass waf:host"
PKG_LONGDESC="The core rendering algorithms and ideas of mpv rewritten as an independent library."
if [ "${VULKAN_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers"
PKG_MESON_OPTS_TARGET+=" -Dvulkan=enabled"
else
PKG_MESON_OPTS_TARGET+=" -Dvulkan=disabled"
fi

View file

@ -3,20 +3,27 @@
# Copyright (C) 2022-present Fewtarius
PKG_NAME="mpv"
PKG_VERSION="af9b53f3a3831531504906882efce0d979506ed3"
PKG_VERSION="662650bde319a57733bb4ea80f709a018d247f1d"
PKG_LICENSE="GPLv2+"
PKG_SITE="https://github.com/mpv-player/mpv"
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain ffmpeg SDL2 luajit libass waf:host"
PKG_DEPENDS_TARGET="toolchain ffmpeg SDL2 luajit libass waf:host libplacebo"
PKG_LONGDESC="Video player based on MPlayer/mplayer2 https://mpv.io"
if [ ! "${OPENGL}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
PKG_MESON_OPTS_TARGET+=" -Dgl=enabled -Degl=disabled"
fi
if [ "${OPENGLES_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
PKG_MESON_OPTS_TARGET+=" -Dgl=disabled -Degl=enabled"
fi
if [ "${OPENGL_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd"
PKG_MESON_OPTS_TARGET+=" -Dgl=enabled -Degl=disabled"
fi
if [ "${DISPLAYSERVER}" = "wl" ]; then
PKG_MESON_OPTS_TARGET+=" -Dwayland=enabled"
else
PKG_MESON_OPTS_TARGET+=" -Dwayland=disabled"
fi
PKG_MESON_OPTS_TARGET+=" -Dsdl2=enabled"