From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E037115800F for ; Thu, 12 Jan 2023 10:38:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3C3D7E095C; Thu, 12 Jan 2023 10:38:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 03369E0952 for ; Thu, 12 Jan 2023 10:38:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED20B340CD2 for ; Thu, 12 Jan 2023 10:38:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F3EB683C for ; Thu, 12 Jan 2023 10:38:07 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1673461273.fd7f05d1f1a3cbc396a26148360f707a5f9ea180.flow@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: mpv-plugin/mpv_thumbnail_script/ X-VCS-Repository: repo/proj/guru X-VCS-Files: mpv-plugin/mpv_thumbnail_script/mpv_thumbnail_script-0.5.1.ebuild X-VCS-Directories: mpv-plugin/mpv_thumbnail_script/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: fd7f05d1f1a3cbc396a26148360f707a5f9ea180 X-VCS-Branch: master Date: Thu, 12 Jan 2023 10:38:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 62f3ae66-a077-4292-add5-ce96f98b18f9 X-Archives-Hash: 1c2b7916d63d78f31784abefe459ffe5 commit: fd7f05d1f1a3cbc396a26148360f707a5f9ea180 Author: Nicola Smaniotto gmail com> AuthorDate: Wed Jan 11 14:58:51 2023 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Wed Jan 11 18:21:13 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fd7f05d1 mpv-plugin/mpv_thumbnail_script: add multiple thumbnailer threads Signed-off-by: Nicola Smaniotto gmail.com> .../mpv_thumbnail_script-0.5.1.ebuild | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mpv-plugin/mpv_thumbnail_script/mpv_thumbnail_script-0.5.1.ebuild b/mpv-plugin/mpv_thumbnail_script/mpv_thumbnail_script-0.5.1.ebuild index fda47afa1..c07571d62 100644 --- a/mpv-plugin/mpv_thumbnail_script/mpv_thumbnail_script-0.5.1.ebuild +++ b/mpv-plugin/mpv_thumbnail_script/mpv_thumbnail_script-0.5.1.ebuild @@ -28,3 +28,27 @@ src_compile() { ${EPYTHON} concat_files.py -r "cat_osc.json" || die ${EPYTHON} concat_files.py -r "cat_server.json" || die } + +src_install() { + mpv-plugin_src_install + + # add multiple threads + THUMBNAIL_SERVER_THREADS="${THUMBNAIL_SERVER_THREADS:-1}" + + if [[ "${THUMBNAIL_SERVER_THREADS}" -gt 1 ]]; then + i=1 + while [[ ${i} -lt ${THUMBNAIL_SERVER_THREADS} ]]; do + dosym -r "/etc/mpv/scripts/mpv_thumbnail_script_server.lua" \ + "/etc/mpv/scripts/mpv_thumbnail_script_server_${i}.lua" || die + (( i++ )) + done + fi +} + +pkg_postinst(){ + if [[ "${THUMBNAIL_SERVER_THREADS}" -gt 1 ]]; then + elog "Created a total of ${THUMBNAIL_SERVER_THREADS} server threads. Setting this too high is not recommended" + else + elog "You can create multiple thumbnailing threads by setting THUMBNAIL_SERVER_THREADS" + fi +}