From 4cbcc855382a06088e2f016f62cafdbcb7e40665 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 Mar 2022 00:40:44 +0000 Subject: gentoo resync : 20.03.2022 --- media-libs/gst-plugins-good/Manifest | 6 + ...t-plugins-good-1.20.0-lame-feature-option.patch | 23 +++ .../gst-plugins-good-1.20.0-ldac-rtp-header.patch | 163 +++++++++++++++++++++ .../gst-plugins-good-1.18.6.ebuild | 49 +++++++ .../gst-plugins-good-1.20.1.ebuild | 53 +++++++ 5 files changed, 294 insertions(+) create mode 100644 media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-lame-feature-option.patch create mode 100644 media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-ldac-rtp-header.patch create mode 100644 media-libs/gst-plugins-good/gst-plugins-good-1.18.6.ebuild create mode 100644 media-libs/gst-plugins-good/gst-plugins-good-1.20.1.ebuild (limited to 'media-libs/gst-plugins-good') diff --git a/media-libs/gst-plugins-good/Manifest b/media-libs/gst-plugins-good/Manifest index d526dcd48f9d..babfd332e2ef 100644 --- a/media-libs/gst-plugins-good/Manifest +++ b/media-libs/gst-plugins-good/Manifest @@ -1,5 +1,11 @@ +AUX gst-plugins-good-1.20.0-lame-feature-option.patch 721 BLAKE2B 857188fd4e6392fc87b75174123636b6d9178742b0f3d90cf17a3b756f3fdc5e19e16d7c22b74d58704caca914f393f75d73762672e2a14481404c030dba29b8 SHA512 e2860cd84627fef0b285e2910a9efc208bbe520b341894fd8e2216193d8610c1e3c4b3c6c5bbcb545bc0c6ad8eff71864fc35f4bb1f2507e131d02a4e39f9a2b +AUX gst-plugins-good-1.20.0-ldac-rtp-header.patch 5748 BLAKE2B 00b9fdf873751d8566cc4951a9a0d887a61d3e7f433d6a72ccdc384c6267c0d076bbe8e12e80b8eeeb60d23ca0321353c3c300f22e99e3621cafe43a17639fbd SHA512 320c478ea792f9944ce3d80e7661014a23427bb74aefd6ac4f1fb80437868728d27ddfb5ee2b24ef6ff78aead2e71947bb367b50440e477f294b304b0d6e1bc0 DIST gst-plugins-good-1.16.3.tar.xz 3914676 BLAKE2B 52f18027f9d9a77e8b459a0a10fa7c1450dff2faf8a2a63134f833ad08b19985b7f0d3d2af4b766c9b8bf802d048fabd6f52ad5a7865eccd1fe0d26404b7b2de SHA512 3e0da4a4defc0ddea1c26dfc767fed732548654f4155452649777109a17d5b65b2fde895483a3e35dc1646de5a16e913cd2408f826251d46a99b7751b88dcb65 DIST gst-plugins-good-1.18.4.tar.xz 3277572 BLAKE2B 8acfb975d19eabc681184d0096328051a9a02e5f849599dbad1233a0e9254e1a2d2bef75d8afdc779a7ca01a71b15d1e83a843749c0ef5f7ab2b5818067ab898 SHA512 764c66383c93e57f9c5e7742002013e07e7b25750d6974d6c07744433e8ceb7570e829e68278e2bc5214f77158311a6b3bfb013d615cf66205d8d7a9e2d54b86 +DIST gst-plugins-good-1.18.6.tar.xz 3296552 BLAKE2B 551ae9cf9beb512ae418db20cd50dc8826ed60421a40d6c9c9fc558f32c9db2a9bada309a8075306542c53382ecb728dac3dd6252d1efc7255cffde0bea35895 SHA512 e0be5f1eaffe65d7871f23e42645fa4cee30953d16d54c4f4707c094859659cff1e4609b086afebaf08777b6d01dcba4f4b2b338e722bf729e9ed0482a2417a5 +DIST gst-plugins-good-1.20.1.tar.xz 3415220 BLAKE2B 62a0e0b4d60412350c3aad692e7b3d0dd5c7ebed098e21e7d4d7c599ffec9be5795c88cbdece0b219d1aad607ad1a0209a376a8f3543793c9c905cb1401e92c4 SHA512 6e56f6290465da03bfe162228829e51091896b2c5fe9d1d0718f663a3ab14edf5c790b37998a783981b9c77034252e7dee9fec5136f92ced44c4898e2fbd402e EBUILD gst-plugins-good-1.16.3.ebuild 1407 BLAKE2B 7709616de2741cecd718c6dd6ac66e7f427b4f8ed80b5a07085a3cb5a3e2cfcc0ac36f28adbbb5c6f6f91f0e31768483462c5f390c672311d4f1c7d308dfac86 SHA512 e31d9ff7c2a665942970da87adedcb90ce31c9c8cecba2816af2d5a15edf7b07f0fdbba7b5bd1a0fb0973f2f8f685b64c54981f601927ca8b6b68b672303b8ad EBUILD gst-plugins-good-1.18.4.ebuild 1107 BLAKE2B 7a482bd520673f9f380be8ef253e56bd9fcafea31f408e2932cc2b05976b5757c46bb047c101ade5d35569413c16753e763f34477d7322c9a9d10055401fedf9 SHA512 929a9e4832409b481744d4048b99dda4a3fd1578d78cd306a7f8e94fa6614955145d801ecf6f9f994942f8b6588d3e57955b398ef956651699d4f8168bd5d047 +EBUILD gst-plugins-good-1.18.6.ebuild 1113 BLAKE2B ed67c675ebaf80530bf9779f44e8934aa1c430b8b9b754edc6a3351395ea704eecacfbb4826759e167cf072e43819d7961f56a1e330dd63be13cd9041035a126 SHA512 dbe363637519cda3fe604d0ba5ceabefe4cf70f643b61e7a61758288c617dcfb782a42526e984f05ab1ee2e25d6bcde1fe59bd5fa278d4b71a7d0549e698aa8a +EBUILD gst-plugins-good-1.20.1.ebuild 1169 BLAKE2B 4708d87bbecb2d6bcf45e5db89c0f9ca36ee255a286fc79ba3ad5895e1d2c0a687ccb8689716d0dea3de70cac98621fc864fff5931ad31da2a0268dccb274df0 SHA512 62404ae8a5d86d442bf18afb8e457d888430bf6ff35eb116e0ed48b8737e702f1a7e882afa7582c81783c7249c8e5e1ac117265111bf39f5ba23f007d26ccb64 MISC metadata.xml 267 BLAKE2B 331be70b2fa90cce1bf91ded1dac141de6a9bec40c1736bcb90d280ac7fabf22cfd0a701c7fd5864f007d1159954f7ee55701d5e68b47a1a9a217ca34b7ee619 SHA512 4dcdd6bc6d148a0e02a0f1b766bd0c5712d373d898c06078d8630e0067e858b815117392a11332b257156e95da6337494d99c2724d24cadb97432089908644b5 diff --git a/media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-lame-feature-option.patch b/media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-lame-feature-option.patch new file mode 100644 index 000000000000..c431b1fb6bd7 --- /dev/null +++ b/media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-lame-feature-option.patch @@ -0,0 +1,23 @@ +commit d03971dac7b32a6ffcbf161853e017f65ae7c22f +Author: Heiko Becker +Date: Fri Feb 11 21:35:54 2022 +0100 + + meson: Don't build lame plugin with -Dlame=disabled + + Part-of: + +diff --git a/ext/lame/meson.build b/ext/lame/meson.build +index 2169fde6f4..3290f17e1e 100644 +--- a/ext/lame/meson.build ++++ b/ext/lame/meson.build +@@ -1,5 +1,10 @@ ++lame_dep = dependency('', required: false) + lame_option = get_option('lame') + ++if lame_option.disabled() ++ subdir_done() ++endif ++ + lame_extra_c_args = [] + lame_dep = cc.find_library('mp3lame', required: false) + have_lame = cc.has_header_symbol('lame/lame.h', 'lame_init') diff --git a/media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-ldac-rtp-header.patch b/media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-ldac-rtp-header.patch new file mode 100644 index 000000000000..f1fc4601a23a --- /dev/null +++ b/media-libs/gst-plugins-good/files/gst-plugins-good-1.20.0-ldac-rtp-header.patch @@ -0,0 +1,163 @@ +From cc3419daf60159394cd310c2405a78775b3f84db Mon Sep 17 00:00:00 2001 +From: Sanchayan Maity +Date: Thu, 24 Feb 2022 20:28:23 +0530 +Subject: [PATCH] rtp: ldac: Set frame count information in payload + +The RTP payload seems to be required as it carries the frame count +information. Also, gst_rtp_base_payload_allocate_output_buffer had +the second argument incorrect. + +Strangely some devices like Shanling MP4 and Sony XM3 would still +work without this while some like the Sony XM4 do not. + +Part-of: +--- + .../docs/gst_plugins_cache.json | 2 +- + .../gst-plugins-good/gst/rtp/gstrtpldacpay.c | 63 ++++++++++++++++++- + .../gst-plugins-good/gst/rtp/gstrtpldacpay.h | 1 + + 3 files changed, 62 insertions(+), 4 deletions(-) + +diff --git a/docs/gst_plugins_cache.json b/docs/gst_plugins_cache.json +index 88bff47243..003546d59d 100644 +--- a/docs/gst_plugins_cache.json ++++ b/docs/gst_plugins_cache.json +@@ -14678,7 +14678,7 @@ + "long-name": "RTP packet payloader", + "pad-templates": { + "sink": { +- "caps": "audio/x-ldac:\n channels: [ 1, 2 ]\n rate: { (int)44100, (int)48000, (int)88200, (int)96000 }\n", ++ "caps": "audio/x-ldac:\n channels: [ 1, 2 ]\n eqmid: { (int)0, (int)1, (int)2 }\n rate: { (int)44100, (int)48000, (int)88200, (int)96000 }\n", + "direction": "sink", + "presence": "always" + }, +diff --git a/gst/rtp/gstrtpldacpay.c b/gst/rtp/gstrtpldacpay.c +index 2b14b746fe..aa30673e7e 100644 +--- a/gst/rtp/gstrtpldacpay.c ++++ b/gst/rtp/gstrtpldacpay.c +@@ -48,7 +48,7 @@ + #include "gstrtpldacpay.h" + #include "gstrtputils.h" + +-#define GST_RTP_HEADER_LENGTH 12 ++#define GST_RTP_LDAC_PAYLOAD_HEADER_SIZE 1 + /* MTU size required for LDAC A2DP streaming */ + #define GST_LDAC_MTU_REQUIRED 679 + +@@ -64,6 +64,7 @@ static GstStaticPadTemplate gst_rtp_ldac_pay_sink_factory = + GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, + GST_STATIC_CAPS ("audio/x-ldac, " + "channels = (int) [ 1, 2 ], " ++ "eqmid = (int) { 0, 1, 2 }, " + "rate = (int) { 44100, 48000, 88200, 96000 }") + ); + +@@ -81,6 +82,38 @@ static gboolean gst_rtp_ldac_pay_set_caps (GstRTPBasePayload * payload, + static GstFlowReturn gst_rtp_ldac_pay_handle_buffer (GstRTPBasePayload * + payload, GstBuffer * buffer); + ++/** ++ * gst_rtp_ldac_pay_get_num_frames ++ * @eqmid: Encode Quality Mode Index ++ * @channels: Number of channels ++ * ++ * Returns: Number of LDAC frames per packet. ++ */ ++static guint8 ++gst_rtp_ldac_pay_get_num_frames (gint eqmid, gint channels) ++{ ++ g_assert (channels == 1 || channels == 2); ++ ++ switch (eqmid) { ++ /* Encode setting for High Quality */ ++ case 0: ++ return 4 / channels; ++ /* Encode setting for Standard Quality */ ++ case 1: ++ return 6 / channels; ++ /* Encode setting for Mobile use Quality */ ++ case 2: ++ return 12 / channels; ++ default: ++ break; ++ } ++ ++ g_assert_not_reached (); ++ ++ /* If assertion gets compiled out */ ++ return 6 / channels; ++} ++ + static void + gst_rtp_ldac_pay_class_init (GstRtpLdacPayClass * klass) + { +@@ -115,7 +148,7 @@ gst_rtp_ldac_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps) + { + GstRtpLdacPay *ldacpay = GST_RTP_LDAC_PAY (payload); + GstStructure *structure; +- gint rate; ++ gint channels, eqmid, rate; + + if (GST_RTP_BASE_PAYLOAD_MTU (ldacpay) < GST_LDAC_MTU_REQUIRED) { + GST_ERROR_OBJECT (ldacpay, "Invalid MTU %d, should be >= %d", +@@ -129,6 +162,18 @@ gst_rtp_ldac_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps) + return FALSE; + } + ++ if (!gst_structure_get_int (structure, "channels", &channels)) { ++ GST_ERROR_OBJECT (ldacpay, "Failed to get audio rate from caps"); ++ return FALSE; ++ } ++ ++ if (!gst_structure_get_int (structure, "eqmid", &eqmid)) { ++ GST_ERROR_OBJECT (ldacpay, "Failed to get eqmid from caps"); ++ return FALSE; ++ } ++ ++ ldacpay->frame_count = gst_rtp_ldac_pay_get_num_frames (eqmid, channels); ++ + gst_rtp_base_payload_set_options (payload, "audio", TRUE, "X-GST-LDAC", rate); + + return gst_rtp_base_payload_set_outcaps (payload, NULL); +@@ -145,14 +190,26 @@ gst_rtp_ldac_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps) + static GstFlowReturn + gst_rtp_ldac_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer) + { ++ GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + GstRtpLdacPay *ldacpay = GST_RTP_LDAC_PAY (payload); + GstBuffer *outbuf; + GstClockTime outbuf_frame_duration, outbuf_pts; ++ guint8 *payload_data; + gsize buf_sz; + + outbuf = + gst_rtp_base_payload_allocate_output_buffer (GST_RTP_BASE_PAYLOAD +- (ldacpay), GST_RTP_HEADER_LENGTH, 0, 0); ++ (ldacpay), GST_RTP_LDAC_PAYLOAD_HEADER_SIZE, 0, 0); ++ ++ /* Get payload */ ++ gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); ++ ++ /* Write header and copy data into payload */ ++ payload_data = gst_rtp_buffer_get_payload (&rtp); ++ /* Upper 3 fragment bits not used, ref A2DP v13, 4.3.4 */ ++ payload_data[0] = ldacpay->frame_count & 0x0f; ++ ++ gst_rtp_buffer_unmap (&rtp); + + outbuf_pts = GST_BUFFER_PTS (buffer); + outbuf_frame_duration = GST_BUFFER_DURATION (buffer); +diff --git a/gst/rtp/gstrtpldacpay.h b/gst/rtp/gstrtpldacpay.h +index 0865ce7ade..0134491752 100644 +--- a/gst/rtp/gstrtpldacpay.h ++++ b/gst/rtp/gstrtpldacpay.h +@@ -42,6 +42,7 @@ typedef struct _GstRtpLdacPayClass GstRtpLdacPayClass; + + struct _GstRtpLdacPay { + GstRTPBasePayload base; ++ guint8 frame_count; + }; + + struct _GstRtpLdacPayClass { +-- +GitLab + diff --git a/media-libs/gst-plugins-good/gst-plugins-good-1.18.6.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-1.18.6.ebuild new file mode 100644 index 000000000000..e1f8658bcad6 --- /dev/null +++ b/media-libs/gst-plugins-good/gst-plugins-good-1.18.6.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +GST_ORG_MODULE="gst-plugins-good" + +inherit flag-o-matic gstreamer-meson + +DESCRIPTION="Basepack of plugins for GStreamer" +HOMEPAGE="https://gstreamer.freedesktop.org/" + +LICENSE="LGPL-2.1+" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="+orc" + +RDEPEND=" + >=media-libs/gst-plugins-base-${PV}:${SLOT}[${MULTILIB_USEDEP}] + >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + >=dev-util/gtk-doc-am-1.12 +" + +DOCS="AUTHORS ChangeLog NEWS README RELEASE" + +multilib_src_configure() { + GST_PLUGINS_NOAUTO="bz2" + local emesonargs=( + -Dbz2=enabled + + # gst-plugins-ximagesrc + -Dximagesrc=disabled + -Dximagesrc-xshm=disabled + -Dximagesrc-xfixes=disabled + -Dximagesrc-xdamage=disabled + + # gst-plugins-v4l2 + -Dv4l2=disabled + ) + + gstreamer_multilib_src_configure +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name '*.la' -delete || die +} diff --git a/media-libs/gst-plugins-good/gst-plugins-good-1.20.1.ebuild b/media-libs/gst-plugins-good/gst-plugins-good-1.20.1.ebuild new file mode 100644 index 000000000000..de6939296c03 --- /dev/null +++ b/media-libs/gst-plugins-good/gst-plugins-good-1.20.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +GST_ORG_MODULE="gst-plugins-good" + +inherit flag-o-matic gstreamer-meson + +DESCRIPTION="Basepack of plugins for GStreamer" +HOMEPAGE="https://gstreamer.freedesktop.org/" + +LICENSE="LGPL-2.1+" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="+orc" + +RDEPEND=" + >=media-libs/gst-plugins-base-${PV}:${SLOT}[${MULTILIB_USEDEP}] + >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" +BDEPEND="" + +DOCS=( AUTHORS ChangeLog NEWS README.md RELEASE ) + +# Fixes backported to 1.20.1, to be removed in 1.20.2+ +PATCHES=( +) + +multilib_src_configure() { + GST_PLUGINS_NOAUTO="bz2" + + local emesonargs=( + -Dbz2=enabled + + # gst-plugins-ximagesrc + -Dximagesrc=disabled + -Dximagesrc-xshm=disabled + -Dximagesrc-xfixes=disabled + -Dximagesrc-xdamage=disabled + + # gst-plugins-v4l2 + -Dv4l2=disabled + ) + + gstreamer_multilib_src_configure +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name '*.la' -delete || die +} -- cgit v1.2.3