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 87BF8158094 for ; Mon, 29 Aug 2022 08:21:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E02DE08C3; Mon, 29 Aug 2022 08:21:46 +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 7232DE08C3 for ; Mon, 29 Aug 2022 08:21:46 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 674D7340FA2 for ; Mon, 29 Aug 2022 08:21:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A7FA357D for ; Mon, 29 Aug 2022 08:21:43 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1661761127.e99944422426ce41f27c3d53e4364dd05e7896f1.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch X-VCS-Directories: media-video/aegisub/files/3.2.2_p20160518/ media-video/aegisub/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: e99944422426ce41f27c3d53e4364dd05e7896f1 X-VCS-Branch: master Date: Mon, 29 Aug 2022 08:21:43 +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: 3b08bc48-aca7-4183-a734-b82747b2079c X-Archives-Hash: 852c5980eed7f890d58af98291162c0d commit: e99944422426ce41f27c3d53e4364dd05e7896f1 Author: Joonas Niilola gentoo org> AuthorDate: Mon Aug 29 08:18:47 2022 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Mon Aug 29 08:18:47 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9994442 media-video/aegisub: revbump to fix compatibility with ffmpegsource Closes: https://bugs.gentoo.org/867298 Closes: https://bugs.gentoo.org/857765 Signed-off-by: Joonas Niilola gentoo.org> ....ebuild => aegisub-3.2.2_p20160518-r104.ebuild} | 3 +- ...3.2.2_p20160518-ffmpegsource-2.40-compat2.patch | 106 +++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild similarity index 98% rename from media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild rename to media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild index a9c7d950a82c..cbf5e1a06090 100644 --- a/media-video/aegisub/aegisub-3.2.2_p20160518-r103.ebuild +++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r104.ebuild @@ -29,7 +29,7 @@ RDEPEND="${LUA_DEPS} x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,debug?] dev-libs/boost:=[icu,nls,threads(+)] dev-libs/icu:= - ~media-libs/ffmpegsource-2.23:= + media-libs/ffmpegsource media-libs/fontconfig media-libs/freetype media-libs/libass:=[fontconfig] @@ -75,6 +75,7 @@ PATCHES=( "${FILESDIR}/${PV}/${P}-tests_luarocks_lua_version.patch" "${FILESDIR}/${PV}/${P}-avoid-conveying-positional-parameters-to-source-builtin.patch" "${FILESDIR}/${PV}/${P}-luaL_Reg-not-luaL_reg.patch" + "${FILESDIR}/${PV}/${P}-ffmpegsource-2.40-compat2.patch" ) aegisub_check_compiler() { diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch new file mode 100644 index 000000000000..17dc3f2dbabc --- /dev/null +++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-ffmpegsource-2.40-compat2.patch @@ -0,0 +1,106 @@ +commit 89c4e8d34ab77c3322f097b91fd9de22cbea7a37 +Author: Thomas Goyne +Date: Wed Nov 21 16:41:05 2018 -0800 + + Update ffmpeg and ffms2 + +diff --git a/src/video_provider_ffmpegsource.cpp b/src/video_provider_ffmpegsource.cpp +index 8bd68fbbf..f4ed6a2f2 100644 +--- a/src/video_provider_ffmpegsource.cpp ++++ b/src/video_provider_ffmpegsource.cpp +@@ -44,6 +44,23 @@ + #include + + namespace { ++typedef enum AGI_ColorSpaces { ++ AGI_CS_RGB = 0, ++ AGI_CS_BT709 = 1, ++ AGI_CS_UNSPECIFIED = 2, ++ AGI_CS_FCC = 4, ++ AGI_CS_BT470BG = 5, ++ AGI_CS_SMPTE170M = 6, ++ AGI_CS_SMPTE240M = 7, ++ AGI_CS_YCOCG = 8, ++ AGI_CS_BT2020_NCL = 9, ++ AGI_CS_BT2020_CL = 10, ++ AGI_CS_SMPTE2085 = 11, ++ AGI_CS_CHROMATICITY_DERIVED_NCL = 12, ++ AGI_CS_CHROMATICITY_DERIVED_CL = 13, ++ AGI_CS_ICTCP = 14 ++} AGI_ColorSpaces; ++ + /// @class FFmpegSourceVideoProvider + /// @brief Implements video loading through the FFMS library. + class FFmpegSourceVideoProvider final : public VideoProvider, FFmpegSourceProvider { +@@ -78,7 +95,7 @@ public: + if (matrix == RealColorSpace) + FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), nullptr); + else if (matrix == "TV.601") +- FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr); ++ FFMS_SetInputFormatV(VideoSource, AGI_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr); + else + return; + ColorSpace = matrix; +@@ -103,16 +120,16 @@ std::string colormatrix_description(int cs, int cr) { + std::string str = cr == FFMS_CR_JPEG ? "PC" : "TV"; + + switch (cs) { +- case FFMS_CS_RGB: ++ case AGI_CS_RGB: + return "None"; +- case FFMS_CS_BT709: ++ case AGI_CS_BT709: + return str + ".709"; +- case FFMS_CS_FCC: ++ case AGI_CS_FCC: + return str + ".FCC"; +- case FFMS_CS_BT470BG: +- case FFMS_CS_SMPTE170M: ++ case AGI_CS_BT470BG: ++ case AGI_CS_SMPTE170M: + return str + ".601"; +- case FFMS_CS_SMPTE240M: ++ case AGI_CS_SMPTE240M: + return str + ".240M"; + default: + throw VideoOpenError("Unknown video color space"); +@@ -206,8 +223,10 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st + + // set thread count + int Threads = OPT_GET("Provider/Video/FFmpegSource/Decoding Threads")->GetInt(); ++#if FFMS_VERSION < ((2 << 24) | (30 << 16) | (0 << 8) | 0) + if (FFMS_GetVersion() < ((2 << 24) | (17 << 16) | (2 << 8) | 1) && FFMS_GetSourceType(Index) == FFMS_SOURCE_LAVF) + Threads = 1; ++#endif + + // set seekmode + // TODO: give this its own option? +@@ -235,18 +254,22 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st + else + DAR = double(Width) / Height; + +- CS = TempFrame->ColorSpace; ++ int VideoCS = CS = TempFrame->ColorSpace; + CR = TempFrame->ColorRange; + +- if (CS == FFMS_CS_UNSPECIFIED) +- CS = Width > 1024 || Height >= 600 ? FFMS_CS_BT709 : FFMS_CS_BT470BG; ++ if (CS == AGI_CS_UNSPECIFIED) ++ CS = Width > 1024 || Height >= 600 ? AGI_CS_BT709 : AGI_CS_BT470BG; + RealColorSpace = ColorSpace = colormatrix_description(CS, CR); + + #if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0) +- if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) { +- if (FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), &ErrInfo)) ++ if (CS != AGI_CS_RGB && CS != AGI_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) { ++ CS = AGI_CS_BT470BG; ++ ColorSpace = colormatrix_description(AGI_CS_BT470BG, CR); ++ } ++ ++ if (CS != VideoCS) { ++ if (FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), &ErrInfo)) + throw VideoOpenError(std::string("Failed to set input format: ") + ErrInfo.Buffer); +- ColorSpace = colormatrix_description(FFMS_CS_BT470BG, CR); + } + #endif +