diff options
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | plex-wayland-hwdec.patch | 63 | ||||
-rw-r--r-- | plex-wayland.patch | 53 |
4 files changed, 131 insertions, 3 deletions
@@ -1,7 +1,7 @@ pkgbase = plex-media-player pkgdesc = Next generation Plex Desktop Client pkgver = 2.58.1 - pkgrel = 2 + pkgrel = 3 url = https://github.com/plexinc/plex-media-player arch = i686 arch = x86_64 @@ -18,6 +18,7 @@ pkgbase = plex-media-player depends = p8-platform depends = protobuf depends = python + conflicts = jellyfin-media-player noextract = web-client-desktop-183-045db5be50e175-4.29.2-e50e175.tar.xz noextract = web-client-tv-183-045db5be50e175-4.29.6-045db5b.tar.xz source = plex-media-player-2.58.1-ae73e074.tar.gz::https://github.com/plexinc/plex-media-player/archive/v2.58.1-ae73e074.tar.gz @@ -27,6 +28,8 @@ pkgbase = plex-media-player source = web-client-tv-183-045db5be50e175-4.29.6-045db5b.tar.xz::https://artifacts.plex.tv/web-client-pmp/183-045db5be50e175/web-client-tv-4.29.6-045db5b.tar.xz source = web-client-tv-183-045db5be50e175-4.29.6-045db5b.tar.xz.sha1::https://artifacts.plex.tv/web-client-pmp/183-045db5be50e175/web-client-tv-4.29.6-045db5b.tar.xz.sha1 source = plex.patch + source = plex-wayland.patch + source = plex-wayland-hwdec.patch sha512sums = 86fc3cd4c37700a1881ccd2aa43c0aa5e7ff20eacc643e3babef6acfab4b355903b69988b9d8821c87269fc5d6bdc8803e115ef867f5f388a1e9b6cad8fd321e sha512sums = 6c3fa0d2fa26da3c8ed47de5385f0f2fb1af0409f4a58aef5bc2c2cf75741dcbddd4b496ca5b9a55c4ce35e09ed076d411c3e9c330de1d99761aa0ebc3fae6bc sha512sums = 0c09ebf57cd39e8e4dae449e3882725686214e0bed07e3dac25eae579ebdc3a136e51bb2272aaca6a5b8e317b1ccbe94231eb214ddf11cbfb14307a0e7f3e3e0 @@ -34,5 +37,7 @@ pkgbase = plex-media-player sha512sums = d60cc01f6b9abf579b3fa2e5b5c9b19e71a986578b0ca46173572324fb54573c97f09ac0ef1654a0b04d68eee20ab3d81ab19a85a761ba638b2b543548ff94ac sha512sums = 442c2e5a31eed30167009bdaf263c66bea482d4ad03e168c9d9eb5e9f4e40f771dee9bc6913d6be46f7d86feb961603f172bb6497fac28c4f5d36a1f05d0ec66 sha512sums = SKIP + sha512sums = SKIP + sha512sums = SKIP pkgname = plex-media-player @@ -11,20 +11,23 @@ _fullname="$pkgname-$_fullver" _web_buildid=183-045db5be50e175 _web_desktop_ver=4.29.2-e50e175 _web_tv_ver=4.29.6-045db5b -pkgrel=2 +pkgrel=3 pkgdesc='Next generation Plex Desktop Client' arch=('i686' 'x86_64' 'armv7h' 'aarch64') license=('GPL') url='https://github.com/plexinc/plex-media-player' depends=('mpv' 'qt5-webengine' 'libcec' 'sdl2' 'qt5-x11extras' 'qt5-quickcontrols' 'p8-platform' 'protobuf' 'python') makedepends=('cmake') +conflicts=('jellyfin-media-player') source=("$_fullname.tar.gz::https://github.com/plexinc/plex-media-player/archive/v${_fullver}.tar.gz" "buildid-${_web_buildid}.cmake::https://artifacts.plex.tv/web-client-pmp/${_web_buildid}/buildid.cmake" "web-client-desktop-${_web_buildid}-${_web_desktop_ver}.tar.xz::https://artifacts.plex.tv/web-client-pmp/${_web_buildid}/web-client-desktop-${_web_desktop_ver}.tar.xz" "web-client-desktop-${_web_buildid}-${_web_desktop_ver}.tar.xz.sha1::https://artifacts.plex.tv/web-client-pmp/${_web_buildid}/web-client-desktop-${_web_desktop_ver}.tar.xz.sha1" "web-client-tv-${_web_buildid}-${_web_tv_ver}.tar.xz::https://artifacts.plex.tv/web-client-pmp/${_web_buildid}/web-client-tv-${_web_tv_ver}.tar.xz" "web-client-tv-${_web_buildid}-${_web_tv_ver}.tar.xz.sha1::https://artifacts.plex.tv/web-client-pmp/${_web_buildid}/web-client-tv-${_web_tv_ver}.tar.xz.sha1" - 'plex.patch') + 'plex.patch' + 'plex-wayland.patch' + 'plex-wayland-hwdec.patch') noextract=("web-client-desktop-${_web_buildid}-${_web_desktop_ver}.tar.xz" "web-client-tv-${_web_buildid}-${_web_tv_ver}.tar.xz") sha512sums=('86fc3cd4c37700a1881ccd2aa43c0aa5e7ff20eacc643e3babef6acfab4b355903b69988b9d8821c87269fc5d6bdc8803e115ef867f5f388a1e9b6cad8fd321e' @@ -33,10 +36,14 @@ sha512sums=('86fc3cd4c37700a1881ccd2aa43c0aa5e7ff20eacc643e3babef6acfab4b355903b '3f2de45e29303445bca976d61e343acabc29edbca0c9dcddeff9134d75c317a8f678a122e6c429fea0801b49fe40d2b30a4f44cd8fdcc040b3c9ab5b15f04d0e' 'd60cc01f6b9abf579b3fa2e5b5c9b19e71a986578b0ca46173572324fb54573c97f09ac0ef1654a0b04d68eee20ab3d81ab19a85a761ba638b2b543548ff94ac' '442c2e5a31eed30167009bdaf263c66bea482d4ad03e168c9d9eb5e9f4e40f771dee9bc6913d6be46f7d86feb961603f172bb6497fac28c4f5d36a1f05d0ec66' + 'SKIP' + 'SKIP' 'SKIP') prepare() { cd "${srcdir}/$_fullname" patch --forward --strip=1 --input="${srcdir}/plex.patch" + patch --forward --strip=1 --input="${srcdir}/plex-wayland.patch" + patch --forward --strip=1 --input="${srcdir}/plex-wayland-hwdec.patch" # All this git version junk fails, just remove it we already have the version sed -i 's|include(GetGitRevisionDescription)|| s|get_git_head_revision(REFSPEC FULL_GIT_REVISION)||' \ diff --git a/plex-wayland-hwdec.patch b/plex-wayland-hwdec.patch new file mode 100644 index 000000000000..5b5b6bfc8596 --- /dev/null +++ b/plex-wayland-hwdec.patch @@ -0,0 +1,63 @@ +From 6ae471023a30b1f16d2ed54bf48717af1483352e Mon Sep 17 00:00:00 2001 +From: Eivind Uggedal <eivind@uggedal.com> +Date: Tue, 13 Apr 2021 06:14:22 +0000 +Subject: [PATCH] Fix hwdec for wayland + +Passing the wayland display to libmpv should improve stability and +enable direct rendering. This seems to be needed for hw decoding to work +on wayland. + +Should properly fix #9. +--- + CMakeModules/QtConfiguration.cmake | 7 ++++++- + src/player/PlayerQuickItem.cpp | 5 +++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/CMakeModules/QtConfiguration.cmake b/CMakeModules/QtConfiguration.cmake +index 61d1602..8fe9073 100644 +--- a/CMakeModules/QtConfiguration.cmake ++++ b/CMakeModules/QtConfiguration.cmake +@@ -26,7 +26,7 @@ set(components Core Network WebChannel Qml Quick Xml WebEngine Widgets) + + if(UNIX AND (NOT APPLE) AND ((NOT BUILD_TARGET STREQUAL "RPI"))) + add_definitions(-DUSE_X11EXTRAS) +- set(components ${components} X11Extras) ++ set(components ${components} X11Extras Gui) + endif() + + if(LINUX_DBUS) +@@ -47,6 +47,11 @@ foreach(COMP ${components}) + include_directories(${${mod}_PRIVATE_INCLUDE_DIRS}) + endif(OPENELEC) + ++ # Need private interfaces for qpa/qplatformnativeinterface.h: ++ if(${mod} STREQUAL Qt5Gui) ++ include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) ++ endif() ++ + list(APPEND QT5_LIBRARIES ${${mod}_LIBRARIES}) + list(APPEND QT5_CFLAGS ${${mod}_EXECUTABLE_COMPILE_FLAGS}) + endforeach(COMP ${components}) +diff --git a/src/player/PlayerQuickItem.cpp b/src/player/PlayerQuickItem.cpp +index 19a62c5..655ac40 100644 +--- a/src/player/PlayerQuickItem.cpp ++++ b/src/player/PlayerQuickItem.cpp +@@ -26,6 +26,7 @@ + + #ifdef USE_X11EXTRAS + #include <QX11Info> ++#include <qpa/qplatformnativeinterface.h> + #endif + + /////////////////////////////////////////////////////////////////////////////////////////////////// +@@ -114,6 +115,10 @@ mpv_opengl_init_params opengl_params = { + if (platformName.contains("xcb")) { + params[2].type = MPV_RENDER_PARAM_X11_DISPLAY; + params[2].data = QX11Info::display(); ++ } else if (platformName.contains("wayland")) { ++ QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface(); ++ params[2].type = MPV_RENDER_PARAM_WL_DISPLAY; ++ params[2].data = native->nativeResourceForWindow("display", NULL); + } + #endif + int err = mpv_render_context_create(&m_mpvGL, m_mpv, params); diff --git a/plex-wayland.patch b/plex-wayland.patch new file mode 100644 index 000000000000..ae56678a61da --- /dev/null +++ b/plex-wayland.patch @@ -0,0 +1,53 @@ +From 540a78e1061199c6120c9b4587be34d285b40b9a Mon Sep 17 00:00:00 2001 +From: Eivind Uggedal <eivind@uggedal.com> +Date: Mon, 12 Apr 2021 13:20:13 +0000 +Subject: [PATCH] Fix libmpv initialization on wayland + +This makes the x11 specific initialization of libmpv conditional on +actually running under x11 (or forcing XWayland with +QT_QPA_PLATFORM=xcb). + +In the future, libmpv wayland awareness could be added, but the +current implementation seems to work ok. + +Should fix #9. +--- + src/player/PlayerQuickItem.cpp | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/src/player/PlayerQuickItem.cpp b/src/player/PlayerQuickItem.cpp +index 0acae27..19a62c5 100644 +--- a/src/player/PlayerQuickItem.cpp ++++ b/src/player/PlayerQuickItem.cpp +@@ -3,6 +3,7 @@ + #include <stdexcept> + + #include <QCoreApplication> ++#include <QGuiApplication> + #include <QOpenGLContext> + #include <QRunnable> + +@@ -101,14 +102,20 @@ mpv_opengl_init_params opengl_params = { + #endif + }; + ++ const QString platformName = QGuiApplication::platformName(); ++ + mpv_render_param params[] = { + {MPV_RENDER_PARAM_API_TYPE, (void*)MPV_RENDER_API_TYPE_OPENGL}, + {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &opengl_params}, +-#ifdef USE_X11EXTRAS +- {MPV_RENDER_PARAM_X11_DISPLAY, QX11Info::display()}, +-#endif ++ {MPV_RENDER_PARAM_INVALID}, + {MPV_RENDER_PARAM_INVALID}, + }; ++#ifdef USE_X11EXTRAS ++ if (platformName.contains("xcb")) { ++ params[2].type = MPV_RENDER_PARAM_X11_DISPLAY; ++ params[2].data = QX11Info::display(); ++ } ++#endif + int err = mpv_render_context_create(&m_mpvGL, m_mpv, params); + + if (err >= 0) { |