From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iIEEHz4k32I7XwAAbAwnHQ (envelope-from ) for ; Tue, 26 Jul 2022 01:16:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4Oc2Hz4k32IZYwEA9RJhRA (envelope-from ) for ; Tue, 26 Jul 2022 01:16:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2A67739115 for ; Tue, 26 Jul 2022 01:16:14 +0200 (CEST) Received: from localhost ([::1]:39444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oG7J7-0001z5-20 for larch@yhetil.org; Mon, 25 Jul 2022 19:16:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG7Iw-0001yZ-Kb for guix-patches@gnu.org; Mon, 25 Jul 2022 19:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oG7Iw-0006jU-BK for guix-patches@gnu.org; Mon, 25 Jul 2022 19:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oG7Iw-0000Tz-1I for guix-patches@gnu.org; Mon, 25 Jul 2022 19:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56771] [PATCH 29/33] gnu: jami: Update to 20220725.1128.fd5e6c6. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jul 2022 23:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56771 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56771@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 56771-submit@debbugs.gnu.org id=B56771.16587909051719 (code B ref 56771); Mon, 25 Jul 2022 23:16:01 +0000 Received: (at 56771) by debbugs.gnu.org; 25 Jul 2022 23:15:05 +0000 Received: from localhost ([127.0.0.1]:51737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oG7I0-0000Rc-Ap for submit@debbugs.gnu.org; Mon, 25 Jul 2022 19:15:05 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:43609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oG7Hx-0000Qk-MU for 56771@debbugs.gnu.org; Mon, 25 Jul 2022 19:15:03 -0400 Received: by mail-pg1-f172.google.com with SMTP id h132so11655252pgc.10 for <56771@debbugs.gnu.org>; Mon, 25 Jul 2022 16:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2jZkUGVxAtODnIPNR6hTeYbBjTGuHB/aXdDDCcm8enQ=; b=BPOikOqbyk37vquoKx8QLAWTG07YQ7opDn3Ot4g2rUf1atJYi/dODepA4M/8MPeEwq 8UpPIGpC5zlV5aFLP9WbX4raFO9H6wseasVsSMNudUZP/Fhn4ijX+uDuwbzpj0yPYuQM x7u3C3cjYocC7C0kLZiQ6aMJZaHYhnqlA0ofPz4eQxC3SnkTb/PZAehYTb16T52fuYkQ 6aBldB1BjS45x9z4ZxHQjp40oul0E2F7M5wjT8bvbUjM5ch0GyCS/I+iiTphJmWKYwOE +LKAS4rjaNh65JxwNPGM828/uvD1RUStbiQarp14Ahhv1o1jkle7zkIFZlGQSqBeVtTz d1tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2jZkUGVxAtODnIPNR6hTeYbBjTGuHB/aXdDDCcm8enQ=; b=TihSUReBUgm+V5sWyeiUHFJKVGUvU7GSY0LMF4dh1m0Neur5FuX2poUCqOy7fhDDLu AHBvOCkfF2WqVPrAjWcFJorQnLW+Nw/38Z9H0k4v/9lBpZgAYQsyShYHTqeIxs6iHVoA 5Dvz9ncNbAGcQc4AnkOh/cS0iGoyh9iG5uJCoUQnn24Mp79fgdx4Zkooiy8w71IHtfeY u9uY94jo5BauTTbbIpy2JaTP/C5YDJkETUN33Gv5U2UjuyvJMzRsLfO6RMPnXXxVh6bN 5WTG4G0ck2idN/ri68hVGf39T7N9q+Htzdx0zhYLlYh4c322nWPWGjjytZuimUDqES+E f0kA== X-Gm-Message-State: AJIora82mkgSdaRFhP9FLn7RDaNufE6ab7x/x4vv1SgW2FB998ZYC2WT EahiCerb1Gqd3lCFDe41m00EfagdZNY= X-Google-Smtp-Source: AGRyM1tmbKog/sCeJygeKPozrhUrhsz4Dqbr6LFqv+2f2preHbmAI8RA1+5xbBhhFxiimMnfzDk2gQ== X-Received: by 2002:a05:6214:2584:b0:474:489:2772 with SMTP id fq4-20020a056214258400b0047404892772mr12643820qvb.67.1658790516772; Mon, 25 Jul 2022 16:08:36 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-69.b2b2c.ca. [205.233.125.69]) by smtp.gmail.com with ESMTPSA id c15-20020ac8008f000000b0031ee9afafccsm8110580qtg.14.2022.07.25.16.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 16:08:36 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 25 Jul 2022 19:07:59 -0400 Message-Id: <20220725230803.10002-29-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220725230803.10002-1-maxim.cournoyer@gmail.com> References: <20220725230803.10002-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658790974; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2jZkUGVxAtODnIPNR6hTeYbBjTGuHB/aXdDDCcm8enQ=; b=h/N3sWupWVqWnZVNo64hlOvY1HA0WyIokDvO6hKI1DVc8mfDEEm1V268ETKKeiDuM6Mvmg MVhkah9WwQ5QBM/xjQkWvPb4QkYGvLzCIjB/XhO0evlvFft18FykfUU928YXQMiYJEt6H3 B22VUEFS6jzbWZAoROTab0wta2TnUr0ibabl+SlPVJdwb6g9tjckrz1Xqi/0gZwyMgttNZ iCNaVZwLfndCgOZ8MPp2Ddhqg8bUPG/FQM1maTTFs57ifcscIIV0pg7ng+BLTaWgRAGCDs hED30+HehSgjfk5C811uBJQeQ0rCUfa4f021wR0boP4Xw2sTBAbDiU8ADRyM4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658790974; a=rsa-sha256; cv=none; b=SMaId3Fh8LEfv9+9+MaKBU0WsQZfYNNDd8kU9zGobPEY/EH+Xp7w4SBPYGZXs3tlVvQo5u B/ob1/Frd5K8UgnppVpDmO4FmxjamyFP2oIpTwNBxMG3KXwfthA5ZQO4iReia2MPKuvCho cEdrGt0pGOV/O83hv1SmZub5Tu3tew0/OYCBTYVf5hZ2f1GBWvkn+DTAAuvLXVNq7YmOrk Mg0C4xOOIH8EEuK6Ayb1YbW2iexsWwt9u5XroACMSnW6Bt3v/1HRboZkJOI86pL/5bELqG hxy5AjTr1vUB0HKiNUJ4rMtBLzm/L9fJZFB/4Vv+YXCEJzrWis/OTsyXlhSxhw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=BPOikOqb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=BPOikOqb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2A67739115 X-Spam-Score: 4.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2xCw2Wd/Vefa * gnu/packages/patches/jami-fix-crash-on-quit.patch: Delete file. * gnu/packages/patches/jami-images-loading.patch: Likewise. * gnu/packages/patches/jami-libclient-audio-managers.patch: Likewise. * gnu/packages/patches/jami-memory-usage.patch: Likewise. * gnu/local.mk (dist_patch_DATA): De-register removed patches. * gnu/packages/jami.scm (%jami-version): Update to 20220725.1128.fd5e6c6. (libjami)[configure-flags]: Add '--disable-static'. (jami-apply-custom-patches): Adjust for top directory renaming. (%ffmpeg-default-configure-flags): Add muxer support for g726 and g726le. Add demuxer support for g723_1, g726 and g726le. Add encoder/decoder support for g726, g726le and g723_1. Add decoder support for g729. (ffmpeg-jami)[patches]: Add 'libopusenc-reload-packet-loss-at-encode'. (jami-libclient)[native-inputs]: New field. [inputs]: Add ffmpeg-jami and libxkbcommon. [propagated-inputs]: Replace qtbase-5 with qtbase. --- gnu/local.mk | 4 - gnu/packages/jami.scm | 48 +++--- .../patches/jami-fix-crash-on-quit.patch | 34 ---- .../patches/jami-images-loading.patch | 152 ------------------ .../jami-libclient-audio-managers.patch | 23 --- gnu/packages/patches/jami-memory-usage.patch | 70 -------- 6 files changed, 29 insertions(+), 302 deletions(-) delete mode 100644 gnu/packages/patches/jami-fix-crash-on-quit.patch delete mode 100644 gnu/packages/patches/jami-images-loading.patch delete mode 100644 gnu/packages/patches/jami-libclient-audio-managers.patch delete mode 100644 gnu/packages/patches/jami-memory-usage.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0c4edf6e56..9aab37b67b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1307,10 +1307,6 @@ dist_patch_DATA = \ %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ %D%/packages/patches/jsoncpp-pkg-config-version.patch \ - %D%/packages/patches/jami-fix-crash-on-quit.patch \ - %D%/packages/patches/jami-images-loading.patch \ - %D%/packages/patches/jami-memory-usage.patch \ - %D%/packages/patches/jami-libclient-audio-managers.patch \ %D%/packages/patches/jamvm-1.5.1-aarch64-support.patch \ %D%/packages/patches/jamvm-1.5.1-armv7-support.patch \ %D%/packages/patches/jamvm-2.0.0-aarch64-support.patch \ diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm index e5c29981d3..617b477193 100644 --- a/gnu/packages/jami.scm +++ b/gnu/packages/jami.scm @@ -51,7 +51,9 @@ (define-module (gnu packages jami) #:use-module (gnu packages upnp) #:use-module (gnu packages version-control) #:use-module (gnu packages video) + #:use-module (gnu packages vulkan) #:use-module (gnu packages webkit) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module (gnu packages) @@ -64,7 +66,7 @@ (define-module (gnu packages jami) #:use-module (guix packages) #:use-module (guix utils)) -(define %jami-version "20211223.2.37be4c3") +(define %jami-version "20220725.1128.fd5e6c6") (define %jami-sources ;; Return an origin object of the tarball release sources archive of the @@ -85,14 +87,10 @@ (define %jami-sources (for-each delete-file-recursively '("client-android" "client-ios" "client-macosx" - "client-uwp")))) - (patches (search-patches "jami-libclient-audio-managers.patch" - "jami-fix-crash-on-quit.patch" - "jami-images-loading.patch" - "jami-memory-usage.patch")) + "plugins")))) (sha256 (base32 - "12h4a0nj3gh05w64gkywrrb64agrhn6y3q4b9cqnhvr1vdkzlj0h")))) + "0pyyw0lynfdxqdz44ld324hvhqbcmqd9zz4pbxvgk3z165njsdig")))) ;; Jami maintains a set of patches for some key dependencies (currently ;; pjproject and ffmpeg) of Jami that haven't yet been integrated upstream. @@ -104,7 +102,7 @@ (define jami-apply-custom-patches (invoke "tar" "-xvf" #$%jami-sources "-C" patches-directory "--strip-components=5" - (string-append "ring-project/daemon/contrib/src/" + (string-append "jami-project/daemon/contrib/src/" dep-name)) (for-each (lambda (file) @@ -178,6 +176,8 @@ (define %ffmpeg-default-configure-flags "--disable-muxers" "--enable-muxer=rtp" "--enable-muxer=g722" + "--enable-muxer=g726" + "--enable-muxer=g726le" "--enable-muxer=h263" "--enable-muxer=h264" "--enable-muxer=hevc" @@ -202,6 +202,9 @@ (define %ffmpeg-default-configure-flags "--enable-demuxer=wav" "--enable-demuxer=ac3" "--enable-demuxer=g722" + "--enable-demuxer=g723_1" + "--enable-demuxer=g726" + "--enable-demuxer=g726le" "--enable-demuxer=pcm_mulaw" "--enable-demuxer=pcm_alaw" "--enable-demuxer=pcm_s16be" @@ -222,6 +225,13 @@ (define %ffmpeg-default-configure-flags ;; Encoders/decoders. "--enable-encoder=adpcm_g722" "--enable-decoder=adpcm_g722" + "--enable-encoder=adpcm_g726" + "--enable-decoder=adpcm_g726" + "--enable-encoder=adpcm_g726le" + "--enable-decoder=adpcm_g726le" + "--enable-decoder=g729" + "--enable-encoder=g723_1" + "--enable-decoder=g723_1" "--enable-encoder=rawvideo" "--enable-decoder=rawvideo" "--enable-encoder=libx264" @@ -387,7 +397,7 @@ (define-public ffmpeg-jami "change-RTCP-ratio" "rtp_ext_abs_send_time" "libopusdec-enable-FEC" - "libopusenc-enable-FEC" + "libopusenc-reload-packet-loss-at-encode" "screen-sharing-x11-fix")))))))))) (define-public libjami @@ -405,12 +415,13 @@ (define-public libjami #:tests? #f ;; The agent links the daemon binary with libguile, which enables the ;; execution of test plans described in Scheme. It may be useful in - ;; user scripts too, until more generalized Scheme bindings are made - ;; (see: test/agent/README.md). - ;; FIXME: Fails to link when building libjami as a shared library: - ;; bindings.cpp:(.text+0x24): undefined reference to `jami::Logger::log - ;; [...]. - #:configure-flags #~(list "--disable-agent" "--enable-debug") + ;; user scripts too, until more general purpose Scheme bindings are made + ;; available (see: test/agent/README.md). + #:configure-flags #~(list "--disable-agent" + "--enable-debug" + ;; Disable static libraries to avoid + ;; installing a 98 MiB archive. + "--disable-static") #:make-flags #~(list "V=1") ;build verbosely #:phases #~(modify-phases %standard-phases @@ -489,10 +500,9 @@ (define-public jami-libclient (lambda _ ;; Allow building from the tarball or a git checkout. (false-if-exception (chdir "lrc"))))))) - (inputs - (list libjami network-manager)) - (propagated-inputs - (list qtbase-5)) ;Qt is included in several installed headers + (native-inputs (list qttools vulkan-headers)) + (inputs (list ffmpeg-jami libjami libxkbcommon network-manager)) + (propagated-inputs (list qtbase)) ;qt included in several installed headers (synopsis "Jami client library") (description "This package provides a library common to all Jami clients. Jami is a secure and distributed voice, video and chat communication platform diff --git a/gnu/packages/patches/jami-fix-crash-on-quit.patch b/gnu/packages/patches/jami-fix-crash-on-quit.patch deleted file mode 100644 index c25bce588a..0000000000 --- a/gnu/packages/patches/jami-fix-crash-on-quit.patch +++ /dev/null @@ -1,34 +0,0 @@ -Retrieved from: -https://git.jami.net/savoirfairelinux/jami-client-qt/-/commit/83f68573324a453a6d26e025fd6439f175a79d1b.diff. - -With the 'client-qt' prefix added to match the file hierarchy of the release tarball. - -diff --git a/client-qt/src/mainapplication.cpp b/client-qt/src/mainapplication.cpp -index 0c3209fc6fa7c528bec197f1cf9332758170441c..278f19287b86dd2c916935ab0930cbe0abb35d26 100644 ---- a/client-qt/src/mainapplication.cpp -+++ b/client-qt/src/mainapplication.cpp -@@ -155,7 +155,11 @@ MainApplication::MainApplication(int& argc, char** argv) - QObject::connect(this, &QApplication::aboutToQuit, [this] { cleanup(); }); - } - --MainApplication::~MainApplication() {} -+MainApplication::~MainApplication() -+{ -+ engine_.reset(); -+ lrcInstance_.reset(); -+} - - bool - MainApplication::init() -diff --git a/src/mainapplication.h b/src/mainapplication.h -index 51306be829478b9fbc1c61a08aeb96938be26dac..4047e3abb3cfd3e6250387a37fa5a896e9bc4161 100644 ---- a/client-qt/src/mainapplication.h -+++ b/client-qt/src/mainapplication.h -@@ -80,7 +80,6 @@ private: - private: - QScopedPointer debugFile_; - QScopedPointer engine_; -- - QScopedPointer lrcInstance_; - - QScopedPointer connectivityMonitor_; diff --git a/gnu/packages/patches/jami-images-loading.patch b/gnu/packages/patches/jami-images-loading.patch deleted file mode 100644 index caf9e1e198..0000000000 --- a/gnu/packages/patches/jami-images-loading.patch +++ /dev/null @@ -1,152 +0,0 @@ -From be9dd0d0d8cb4556cd930edd783c0a1699565ac0 Mon Sep 17 00:00:00 2001 -From: kkostiuk -Date: Mon, 1 Nov 2021 17:39:23 -0400 -Subject: [PATCH] conversation: fix long loading time for images - -Change-Id: Id88cfbd571f4b504f258758bd13b4e4a91bf1b49 ---- - .../DataTransferMessageDelegate.qml | 52 +++++++++++++++++-- - src/messagesadapter.cpp | 20 +++++-- - src/messagesadapter.h | 2 +- - 3 files changed, 66 insertions(+), 8 deletions(-) - -diff --git a/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml b/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml -index 7875e01..2e7dcc0 100644 ---- a/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml -+++ b/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml -@@ -252,10 +252,11 @@ Loader { - Loader { - id: localMediaCompLoader - anchors.right: isOutgoing ? parent.right : undefined -+ asynchronous: true - width: sourceComponent.width - height: sourceComponent.height - sourceComponent: mediaInfo.isImage !== undefined ? -- imageComp : -+ imageComp : mediaInfo.isAnimatedImage !== undefined ? animatedImageComp : - avComp - Component { - id: avComp -@@ -302,9 +303,9 @@ Loader { - } - } - Component { -- id: imageComp -+ id: animatedImageComp - AnimatedImage { -- id: img -+ id: animatedImg - anchors.right: isOutgoing ? parent.right : undefined - property real minSize: 192 - property real maxSize: 256 -@@ -327,6 +328,51 @@ Loader { - anchors.fill: parent - } - layer.enabled: true -+ layer.effect: OpacityMask { -+ maskSource: MessageBubble { -+ out: isOutgoing -+ type: seq -+ width: animatedImg.width -+ height: animatedImg.height -+ radius: msgRadius -+ } -+ } -+ HoverHandler { -+ target : parent -+ onHoveredChanged: { -+ localMediaMsgItem.hoveredLink = hovered ? animatedImg.source : "" -+ } -+ cursorShape: Qt.PointingHandCursor -+ } -+ } -+ } -+ -+ Component { -+ id: imageComp -+ Image { -+ id: img -+ anchors.right: isOutgoing ? parent.right : undefined -+ property real minSize: 192 -+ property real maxSize: 256 -+ cache: true -+ fillMode: Image.PreserveAspectCrop -+ mipmap: true -+ antialiasing: true -+ autoTransform: false -+ asynchronous: true -+ source: "file:///" + Body -+ property real aspectRatio: implicitWidth / implicitHeight -+ property real adjustedWidth: Math.min(maxSize, -+ Math.max(minSize, -+ innerContent.width - senderMargin)) -+ width: adjustedWidth -+ height: Math.ceil(adjustedWidth / aspectRatio) -+ Rectangle { -+ color: JamiTheme.previewImageBackgroundColor -+ z: -1 -+ anchors.fill: parent -+ } -+ layer.enabled: true - layer.effect: OpacityMask { - maskSource: MessageBubble { - out: isOutgoing -diff --git a/client-qt/src/messagesadapter.cpp b/client-qt/src/messagesadapter.cpp -index 91f8eed..ba38e53 100644 ---- a/client-qt/src/messagesadapter.cpp -+++ b/client-qt/src/messagesadapter.cpp -@@ -458,13 +458,24 @@ MessagesAdapter::conversationTypersUrlToName(const QSet& typersSet) - return nameList; - } - --bool -+QVariantMap - MessagesAdapter::isLocalImage(const QString& msg) - { - QImageReader reader; - reader.setDecideFormatFromContent(true); - reader.setFileName(msg); -- return !reader.read().isNull(); -+ QByteArray fileFormat = reader.format(); -+ if (fileFormat == "gif") { -+ return {{"isAnimatedImage", true}}; -+ } -+ QList supportedFormats = reader.supportedImageFormats(); -+ auto iterator = std::find_if(supportedFormats.begin(), -+ supportedFormats.end(), -+ [fileFormat](QByteArray format) { return format == fileFormat; }); -+ if (iterator != supportedFormats.end()) { -+ return {{"isImage", true}}; -+ } -+ return {{"isImage", false}}; - } - - QVariantMap -@@ -476,8 +487,9 @@ MessagesAdapter::getMediaInfo(const QString& msg) - "<%1 style='width:100%;height:%2;outline:none;background-color:#f1f3f4;" - "object-fit:cover;' " - "controls controlsList='nodownload' src='file://%3' type='%4'/>"; -- if (isLocalImage(msg)) { -- return {{"isImage", true}}; -+ QVariantMap fileInfo = isLocalImage(msg); -+ if (fileInfo["isImage"].toBool() || fileInfo["isAnimatedImage"].toBool()) { -+ return fileInfo; - } - QRegularExpression vPattern("[^\\s]+(.*?)\\.(avi|mov|webm|webp|rmvb)$", - QRegularExpression::CaseInsensitiveOption); -diff --git a/client-qt/src/messagesadapter.h b/client-qt/src/messagesadapter.h -index bfa4e62..1965c5e 100644 ---- a/client-qt/src/messagesadapter.h -+++ b/client-qt/src/messagesadapter.h -@@ -101,7 +101,7 @@ protected: - Q_INVOKABLE void deleteInteraction(const QString& interactionId); - Q_INVOKABLE void copyToDownloads(const QString& interactionId, const QString& displayName); - Q_INVOKABLE void userIsComposing(bool isComposing); -- Q_INVOKABLE bool isLocalImage(const QString& msg); -+ Q_INVOKABLE QVariantMap isLocalImage(const QString& msg); - Q_INVOKABLE QVariantMap getMediaInfo(const QString& msg); - Q_INVOKABLE bool isRemoteImage(const QString& msg); - Q_INVOKABLE QString getFormattedTime(const quint64 timestamp); --- -GitLab - diff --git a/gnu/packages/patches/jami-libclient-audio-managers.patch b/gnu/packages/patches/jami-libclient-audio-managers.patch deleted file mode 100644 index 1f8a5585e6..0000000000 --- a/gnu/packages/patches/jami-libclient-audio-managers.patch +++ /dev/null @@ -1,23 +0,0 @@ -From f5e4619d02526d961c14012a6cae1a091aa149d4 Mon Sep 17 00:00:00 2001 -From: Sébastien Blin -Date: Thu, 27 Jan 2022 13:48:32 -0500 -Subject: [PATCH] misc: link getSupportedAudioManagers -q -Change-Id: I897e49cd131d3cbffef9fb1d5c9be3c0bc9bcb3f -GitLab: #495 ---- - -diff --git a/lrc/src/qtwrapper/configurationmanager_wrap.h b/lrc/src/qtwrapper/configurationmanager_wrap.h -index a680138..2807f8a 100644 ---- a/lrc/src/qtwrapper/configurationmanager_wrap.h -+++ b/lrc/src/qtwrapper/configurationmanager_wrap.h -@@ -526,8 +526,7 @@ - - QStringList getSupportedAudioManagers() - { -- QStringList temp; -- return temp; -+ return convertStringList(DRing::getSupportedAudioManagers()); - } - - QStringList getSupportedTlsMethod() diff --git a/gnu/packages/patches/jami-memory-usage.patch b/gnu/packages/patches/jami-memory-usage.patch deleted file mode 100644 index 75fcde8d0a..0000000000 --- a/gnu/packages/patches/jami-memory-usage.patch +++ /dev/null @@ -1,70 +0,0 @@ -From e796b3325d95b5ddd6162b5513c8325210f41fc5 Mon Sep 17 00:00:00 2001 -From: Sébastien Blin -Date: Wed, 26 Jan 2022 11:37:07 -0500 -Subject: [PATCH] datatransferimage: improve memory usage - -+ Reduce listview caching' size by 50% -+ use sourceSize to compress images and speedup loading -+ use autoTransform: true to rotate images when needed - -Change-Id: Idf1babdc73f43aa6a79b89428c25c5d06856c0ef -GitLab: #649 ---- - -diff --git a/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml b/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml -index d017c03..ca5913e 100644 ---- a/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml -+++ b/client-qt/src/commoncomponents/DataTransferMessageDelegate.qml -@@ -255,9 +255,13 @@ - asynchronous: true - width: sourceComponent.width - height: sourceComponent.height -- sourceComponent: mediaInfo.isImage !== undefined ? -- imageComp : mediaInfo.isAnimatedImage !== undefined ? animatedImageComp : -- avComp -+ sourceComponent: { -+ if (mediaInfo.isImage) -+ return imageComp -+ if (mediaInfo.isAnimatedImage) -+ return animatedImageComp -+ return avComp -+ } - Component { - id: avComp - WebEngineView { -@@ -316,7 +320,7 @@ - fillMode: Image.PreserveAspectCrop - mipmap: true - antialiasing: true -- autoTransform: false -+ autoTransform: true - asynchronous: true - source: "file:///" + Body - property real aspectRatio: implicitWidth / implicitHeight -@@ -361,8 +365,10 @@ - fillMode: Image.PreserveAspectCrop - mipmap: true - antialiasing: true -- autoTransform: false -+ autoTransform: true - asynchronous: true -+ sourceSize.width: width -+ sourceSize.height: height - source: "file:///" + Body - property real aspectRatio: implicitWidth / implicitHeight - property real adjustedWidth: Math.min(maxSize, -diff --git a/client-qt/src/mainview/components/MessageListView.qml b/client-qt/src/mainview/components/MessageListView.qml -index 2b7c326..f65e67b 100644 ---- a/client-qt/src/mainview/components/MessageListView.qml -+++ b/client-qt/src/mainview/components/MessageListView.qml -@@ -174,8 +174,8 @@ - width: parent.width - // this offscreen caching is pretty huge - // displayMarginEnd may be removed -- displayMarginBeginning: 4096 -- displayMarginEnd: 4096 -+ displayMarginBeginning: 2048 -+ displayMarginEnd: 2048 - maximumFlickVelocity: 2048 - verticalLayoutDirection: ListView.BottomToTop - boundsBehavior: Flickable.StopAtBounds -- 2.36.1