From patchwork Sun Jan 21 21:09:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Gompa X-Patchwork-Id: 19435 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 13386C3243 for ; Sun, 21 Jan 2024 21:11:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AEE1C62947; Sun, 21 Jan 2024 22:11:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1705871481; bh=QHGX4vy6TAHJhrGjSMyq1LIDG2aIUXNFZpHhRG5ItCc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=lqRMLDayZMJLIKNkeKNdbL2CXn5DDbYIDdACcjAHFGHEsPrzPAJFXVc4JZuxHOGcd 5xdOu6ljiGs93IvQOZaY8lzZBzOMjjEe8HUPds2ZCr20ZLxaBjgI5rDGiNaRh/JwRc JwhiwDBnWKyd36K4CR1s87K6nnNvkA+cFSk22OMa7GhYSk53IQYbKw8etBv0k1MrrU k5BN8SM8bdn2q12lq0v6yNtJrmsMSkO8vAfAWHPzEEDwJZ1Tv2E+nKzdr83fEsbpez 6G6xXT0tvkiLSDGQoTpb0O0uWT21uWc4JLmt71UYTiF/CIG6Nf6Ek67NXVXtk4/TMb rNyliNcSfDDYQ== Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 40D5562946 for ; Sun, 21 Jan 2024 22:11:20 +0100 (CET) Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-783182d4a0aso218078285a.2 for ; Sun, 21 Jan 2024 13:11:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705871478; x=1706476278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X+SnimwoYr5MMrSkUhhL7b4QmFXuwHwt7evm/Ag5hqU=; b=gLWZmJ5G96qU4nCGvlcInIXjaqhtE1Vchg1PuYIBSfcfuU3Za6OEGp6PufAMKgY44q YIzEhxKGNasUYgGf7d6mDSgp/xk9QTxevTMNsI0GOUXh4D7fP56iMz+0zJxisI5dzsfY k+E0acurJ84x0mD9aH5FlgIazghN+hIHplVdAcUuS596ktxc98ob34u722e/xg3OjYIH j5DvcjrVIxr+LNcNAn6zCet3SCewilVuJdCI584jlPTHFD7cHS4Mv56Qjqc8ihkzSkUi PFZYTahu5yORvizj8fUNwj636UbZppOAGMHnid8SR+I2+QFBjSHtArxeO8CRZHynlj33 mS9A== X-Gm-Message-State: AOJu0YxpMPIBKj+9xlyC54nk91yCTQsVnDbmi8gv5KDd1uuvMwlwErYH uDwPnSZEJLUEfnZrTRv3Kk0HyXoAPsrUX9JG7ME31vQj5Wi7+XsCtXufxhZlO8Y= X-Google-Smtp-Source: AGHT+IGY4XId2+fQVCplJ2TJ8rqf8bZ74LL5ndknIWo9u4TZ0E/Nf/FI350Hj9+jcFEza5YOwx2YOg== X-Received: by 2002:a05:620a:2a14:b0:783:7674:29af with SMTP id o20-20020a05620a2a1400b00783767429afmr4650485qkp.25.1705871478528; Sun, 21 Jan 2024 13:11:18 -0800 (PST) Received: from Belldandy-Slimbook.infra.opensuse.org ([32.220.181.243]) by smtp.gmail.com with ESMTPSA id z21-20020a05620a101500b007832895cf8csm1596456qkj.38.2024.01.21.13.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 13:11:17 -0800 (PST) To: libcamera-devel Date: Sun, 21 Jan 2024 16:09:44 -0500 Message-ID: <20240121211040.1048509-2-neal@gompa.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240121211040.1048509-1-neal@gompa.dev> References: <20240121211040.1048509-1-neal@gompa.dev> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/3] apps: qcam: Port to Qt 6 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Neal Gompa via libcamera-devel From: Neal Gompa Reply-To: Neal Gompa Cc: Neal Gompa , Wim Taymans Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Open source Qt 5 has been effectively end of life since the release of Qt 6, and Qt 6 has current LTS releases now. This change ports qcam to Qt 6.2 and drops some of the baggage related to Qt 5 that is no longer applicable. Signed-off-by: Neal Gompa --- README.rst | 2 +- src/apps/qcam/meson.build | 45 +++++++++++---------------------------- 2 files changed, 14 insertions(+), 33 deletions(-) diff --git a/README.rst b/README.rst index 315738ee..6f1c9302 100644 --- a/README.rst +++ b/README.rst @@ -88,7 +88,7 @@ for cam: [optional] - libsdl2-dev: Enables the SDL sink for qcam: [optional] - libtiff-dev qtbase5-dev qttools5-dev-tools + libtiff-dev qt6-base-dev qt6-tools-dev-tools for tracing with lttng: [optional] liblttng-ust-dev python3-jinja2 lttng-tools diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build index 6cf4c171..c7fcfbeb 100644 --- a/src/apps/qcam/meson.build +++ b/src/apps/qcam/meson.build @@ -1,13 +1,13 @@ # SPDX-License-Identifier: CC0-1.0 -qt5 = import('qt5') -qt5_dep = dependency('qt5', +qt6 = import('qt6') +qt6_dep = dependency('qt6', method : 'pkg-config', - modules : ['Core', 'Gui', 'Widgets'], + modules : ['Core', 'Gui', 'OpenGL', 'OpenGLWidgets', 'Widgets'], required : get_option('qcam'), - version : '>=5.4') + version : '>=6.2') -if not qt5_dep.found() +if not qt6_dep.found() qcam_enabled = false subdir_done() endif @@ -20,46 +20,27 @@ qcam_sources = files([ 'main.cpp', 'main_window.cpp', 'message_handler.cpp', + 'viewfinder_gl.cpp', 'viewfinder_qt.cpp', ]) qcam_moc_headers = files([ 'cam_select_dialog.h', 'main_window.h', + 'viewfinder_gl.h', 'viewfinder_qt.h', ]) qcam_resources = files([ 'assets/feathericons/feathericons.qrc', + 'assets/shader/shaders.qrc', ]) -qt5_cpp_args = [apps_cpp_args, '-DQT_NO_KEYWORDS'] +qt6_cpp_args = [apps_cpp_args, '-DQT_NO_KEYWORDS'] -if cxx.has_header_symbol('QOpenGLWidget', 'QOpenGLWidget', - dependencies : qt5_dep, args : '-fPIC') - qcam_sources += files([ - 'viewfinder_gl.cpp', - ]) - qcam_moc_headers += files([ - 'viewfinder_gl.h', - ]) - qcam_resources += files([ - 'assets/shader/shaders.qrc' - ]) -endif - -# gcc 9 introduced a deprecated-copy warning that is triggered by Qt until -# Qt 5.13. clang 10 introduced the same warning, but detects more issues -# that are not fixed in Qt yet. Disable the warning manually in both cases. -if ((cc.get_id() == 'gcc' and cc.version().version_compare('>=9.0') and - qt5_dep.version().version_compare('<5.13')) or - (cc.get_id() == 'clang' and cc.version().version_compare('>=10.0'))) - qt5_cpp_args += ['-Wno-deprecated-copy'] -endif - -resources = qt5.preprocess(moc_headers : qcam_moc_headers, +resources = qt6.preprocess(moc_headers : qcam_moc_headers, qresources : qcam_resources, - dependencies : qt5_dep) + dependencies : qt6_dep) qcam = executable('qcam', qcam_sources, resources, install : true, @@ -69,6 +50,6 @@ qcam = executable('qcam', qcam_sources, resources, libatomic, libcamera_public, libtiff, - qt5_dep, + qt6_dep, ], - cpp_args : qt5_cpp_args) + cpp_args : qt6_cpp_args) From patchwork Sun Jan 21 21:09:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Gompa X-Patchwork-Id: 19436 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id ACAE3C323E for ; Sun, 21 Jan 2024 21:11:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4902F6294A; Sun, 21 Jan 2024 22:11:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1705871484; bh=2IOA5LSwkIYe2t2uKNwZbUxIq68v9wUt0PueHKvZIBw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oay+Em/r+69XQCFcFsc1Z3Io99dwjkIvXg3VUKLtIUyuFyMqLVAJC0WagXO6UyRpG CyhkUXpFCXWtlsACVPnSNBuXAy763x/WxJ2KlgRYBIVhl/Qu+wpRvV/oquKGl1BaRP L+R2MezgQ+KVmd6chRBh+G4kl2j6bRsRDXO6VfSLaBQsVgX/7wG0iqXX1+wm9Xsrx+ 2suOGUlOTxmYNukrSVuFPQcvn0yCXLQvqi53k3Cxp42cwHQbbIEKdwxWHVi5HBqYPV k6l6z7yO/bJ+AGUnFU00rub8c4oMZgHy2FDp5141MKhnMcUBYNJBYsiEPKKnFOkXWz Iu1fWUvUnKJTw== Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6888F62946 for ; Sun, 21 Jan 2024 22:11:22 +0100 (CET) Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3bb9b28acb4so2372701b6e.2 for ; Sun, 21 Jan 2024 13:11:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705871480; x=1706476280; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u7AdEcFtxh1pw1rZFB0Qkpu/9GRWbOsHXvsoXS3f3Ng=; b=o51+ora+Qi5QB3Rpfe76tbzE8OagdXfQBXGEPnS39IkugaZ4qF1n1XL16kechIfmup WbhPmEwApQUOYTvIKUR9t7G7oOc7pfhAjvpJwLTQyDO8VtmgOD600WiQqclOPh4k32AZ rbITUMlRh3KHjKwXncWdgxwYLlss0PH0hUcIZ2jPa6iN3V5IhuH8wMIMnEjzB4uOpQKg uFR3pMJW4jqsWTrcBnVcxumm0tHI9Vi9vCoXFWoMpoQviVU2YdG9jFBxqq3hc2uDdnkv JeJnylUf7FvYM7MwB5sn1A4+VZos/sP5sbZgfGAxsomx3M8p5/72zlklvbh5qJIWCTFC RJMQ== X-Gm-Message-State: AOJu0YyrVVOXgsFGbjzWSIn+2z6vmgu6s3bZJQZk2MkJTIhFmnSE6RHu XRc3cB/QYneAb9LBGgDV47TnoX6DWvb7ljaJlM4Osr8YqJ/YhG9i8OpqUhfDLPQ= X-Google-Smtp-Source: AGHT+IGaqDTgvnKP/XIYl4MPR6VGcgq22clV/dkr+7VgE9lYWH0AGX/KOb2+mRu0sOoAPJC2qXTcZA== X-Received: by 2002:a05:6808:1786:b0:3bd:3b9d:1479 with SMTP id bg6-20020a056808178600b003bd3b9d1479mr4186555oib.94.1705871480007; Sun, 21 Jan 2024 13:11:20 -0800 (PST) Received: from Belldandy-Slimbook.infra.opensuse.org ([32.220.181.243]) by smtp.gmail.com with ESMTPSA id z21-20020a05620a101500b007832895cf8csm1596456qkj.38.2024.01.21.13.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 13:11:18 -0800 (PST) To: libcamera-devel Date: Sun, 21 Jan 2024 16:09:45 -0500 Message-ID: <20240121211040.1048509-3-neal@gompa.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240121211040.1048509-1-neal@gompa.dev> References: <20240121211040.1048509-1-neal@gompa.dev> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] libcamera: base: signal: Update Qt documentation link to Qt 6 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Neal Gompa via libcamera-devel From: Neal Gompa Reply-To: Neal Gompa Cc: Neal Gompa , Wim Taymans Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The documentation is effectively the same, but we should be pointing to the actively supported and used Qt version. Signed-off-by: Neal Gompa --- src/libcamera/base/signal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/base/signal.cpp b/src/libcamera/base/signal.cpp index a46386a0..02290ad7 100644 --- a/src/libcamera/base/signal.cpp +++ b/src/libcamera/base/signal.cpp @@ -74,7 +74,7 @@ SignalBase::SlotList SignalBase::slots() * * Signals and slots are a language construct aimed at communication between * objects through the observer pattern without the need for boilerplate code. - * See http://doc.qt.io/qt-5/signalsandslots.html for more information. + * See http://doc.qt.io/qt-6/signalsandslots.html for more information. * * Signals model events that can be observed from objects unrelated to the event * source. Slots are functions that are called in response to a signal. Signals From patchwork Sun Jan 21 21:09:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Gompa X-Patchwork-Id: 19437 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 52004C32BC for ; Sun, 21 Jan 2024 21:11:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BEBFA6294F; Sun, 21 Jan 2024 22:11:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1705871485; bh=vjFOwRWAlqXCiBtK2zhm1wu5u2KX86VmloQcqlcVJ3s=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UobICKUn32sb71dOrbh6aYiMMHANoAC+ZLmZII0vlwsQKhqaoxG0fsJXfJVmB096T nAmQv6gXagwRNaaudwk02eMGweVkLR+/GuX3BG/2rej+nVQZFf2u/Un7bufatUGhUd sOV4MboFhP/wA2n58q/aJ93wKWMQstUGWbQo0C9XecZ9JFqkRcYO1Da9JX0n7TpRwS tH9Ke6/guVAJu1eENPvGZEn/bJKji6RHlKc8th5d8Av5NU673t0ws9wftg/oAv/AoO OoPumMDFmHr3YO7l5GkMV3tqmbMglsrekZBLtuq0ao2VSbkr2O0lzw4jp/AKxhbWo/ cwN4o7Vb46P7Q== Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CFDFA6294C for ; Sun, 21 Jan 2024 22:11:23 +0100 (CET) Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-78376790dfbso276881485a.1 for ; Sun, 21 Jan 2024 13:11:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705871482; x=1706476282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=91pKEPNEfL3OTK1npwLX5tdNWBYKKzaEOVSlhr931qk=; b=nblgQQZIKsL8qVVKfj5CbzB+SW1G02fXHZXaArlmt8Z99ma1OtSRRd9KpMt5FXetfh lVz1ryUAfquY2Sr+usxFGRSSb8fJLxWEtb4+nHEAXUA3JT2UEQ183k9E3JfZ70Qs7Dwn YDIPDvxxTPiUzzFgCzj1DE7G3t4XgOjd69vaoy5qQ2NhRM6Uma4K0LZpwUIllD5HVZpd qjKqDJsvpWQb5IxujkFjsNtDnWQITZkM8eMbhIJVi1i5ZzcXIMxmN7cjZ7FlnemllRUs D/WUpyu5QPTkJkv6YogceJ05l/cN054gmVODxVhScf27vBB/+gFWpaupD1gEjYHhRf3K mKhw== X-Gm-Message-State: AOJu0Yyi9brOwZt+lV5LQhrDyawESgrCOsPOiSE1XIcJmUCtCG3PxJs+ uluGlWFIDWnk1p9yvErXa8uozo8f5RM3/nXyG2QtADKJ6lLa+J1wi/fd61iNxzk= X-Google-Smtp-Source: AGHT+IG/hRjIVzvpwUIgS2GepFZrlteF3sEHTQV1OV5KJWCDRjDNgklWxDs9OrcgER+tZavMoWcdew== X-Received: by 2002:a05:620a:148a:b0:783:1f95:b89b with SMTP id w10-20020a05620a148a00b007831f95b89bmr6187421qkj.67.1705871481927; Sun, 21 Jan 2024 13:11:21 -0800 (PST) Received: from Belldandy-Slimbook.infra.opensuse.org ([32.220.181.243]) by smtp.gmail.com with ESMTPSA id z21-20020a05620a101500b007832895cf8csm1596456qkj.38.2024.01.21.13.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 13:11:20 -0800 (PST) To: libcamera-devel Date: Sun, 21 Jan 2024 16:09:46 -0500 Message-ID: <20240121211040.1048509-4-neal@gompa.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240121211040.1048509-1-neal@gompa.dev> References: <20240121211040.1048509-1-neal@gompa.dev> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] Documentation: Update Qt documentation links to Qt 6 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Neal Gompa via libcamera-devel From: Neal Gompa Reply-To: Neal Gompa Cc: Neal Gompa , Wim Taymans Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The documentation is effectively the same, but we should be pointing to the actively supported and used Qt version. Signed-off-by: Neal Gompa --- Documentation/guides/application-developer.rst | 2 +- Documentation/guides/pipeline-handler.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index c46d3362..9a9905b1 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -348,7 +348,7 @@ The libcamera library uses the concept of `signals and slots` (similar to `Qt Signals and Slots`_) to connect events with callbacks to handle them. .. _signals and slots: https://libcamera.org/api-html/classlibcamera_1_1Signal.html#details -.. _Qt Signals and Slots: https://doc.qt.io/qt-5/signalsandslots.html +.. _Qt Signals and Slots: https://doc.qt.io/qt-6/signalsandslots.html The ``Camera`` device emits two signals that applications can connect to in order to execute callbacks on frame completion events. diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst index 26dc9358..2046a2e7 100644 --- a/Documentation/guides/pipeline-handler.rst +++ b/Documentation/guides/pipeline-handler.rst @@ -1422,7 +1422,7 @@ emitted triggers the execution of the connected slots. A detailed description of the libcamera implementation is available in the `libcamera Signal and Slot`_ classes documentation. -.. _Qt Signals and Slots: https://doc.qt.io/qt-5/signalsandslots.html +.. _Qt Signals and Slots: https://doc.qt.io/qt-6/signalsandslots.html .. _libcamera Signal and Slot: https://libcamera.org/api-html/classlibcamera_1_1Signal.html#details In order to notify applications about the availability of new frames and data,