From patchwork Sat Mar 23 07:31:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 788 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1CEC7600FD for ; Sat, 23 Mar 2019 08:31:42 +0100 (CET) Received: from pendragon.ideasonboard.com (30.net042126252.t-com.ne.jp [42.126.252.30]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BD7E42D0 for ; Sat, 23 Mar 2019 08:31:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1553326301; bh=FNoTHCF5WefeiZrYl1v/rwrdZdWCUG0HNaaoTJ301rg=; h=From:To:Subject:Date:From; b=GOdyD2knsGYMJte6LTfVXXV8oSTMdyp2FhR/uV4KUSKIoFXGnNPY7MC9PlR/OGgWf TFhrwPbNlWFwEMHd74H0OPo4S5J/MHCwADWtPAHAYdM3I8JkbrrTjr3CfWJisz/ghy +VLkAo17mfOpCYJEjmKzlUI0W7NsWiKcAksZXSyc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 23 Mar 2019 09:31:23 +0200 Message-Id: <20190323073125.25497-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] Qt-based libcamera viewer X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Mar 2019 07:31:42 -0000 Hello, As part of a recent demo, I faced a need to display the frames generated by libcamera on the screen. Starting with Niklas' experiments with Qt and libcamera, I've created the qcam application. The result is quite simple, supports a single stream, and has very limited features (the only feature is camera selection, everything else, including format selection, user-controlled camera start/stop, is not implemented yet). Still, I believe it can be useful, and may even be clean enough to merge it in the libcamera tree. One item worth noting is the integration of the Qt event loop in the libcamera event dispatcher infrastructure. This component could possibly be moved to a libcamera-utils library, as it it could be useful to libcamera users. Laurent Pinchart (2): cam: Separate options valid() and empty() qcam: Add Qt-based GUI application src/cam/main.cpp | 7 +- src/cam/options.cpp | 34 +++-- src/cam/options.h | 5 +- src/meson.build | 1 + src/qcam/format_converter.cpp | 99 ++++++++++++++ src/qcam/format_converter.h | 14 ++ src/qcam/main.cpp | 75 +++++++++++ src/qcam/main_window.cpp | 223 +++++++++++++++++++++++++++++++ src/qcam/main_window.h | 54 ++++++++ src/qcam/meson.build | 19 +++ src/qcam/qt_event_dispatcher.cpp | 145 ++++++++++++++++++++ src/qcam/qt_event_dispatcher.h | 62 +++++++++ src/qcam/viewfinder.cpp | 38 ++++++ src/qcam/viewfinder.h | 31 +++++ 14 files changed, 785 insertions(+), 22 deletions(-) create mode 100644 src/qcam/format_converter.cpp create mode 100644 src/qcam/format_converter.h create mode 100644 src/qcam/main.cpp create mode 100644 src/qcam/main_window.cpp create mode 100644 src/qcam/main_window.h create mode 100644 src/qcam/meson.build create mode 100644 src/qcam/qt_event_dispatcher.cpp create mode 100644 src/qcam/qt_event_dispatcher.h create mode 100644 src/qcam/viewfinder.cpp create mode 100644 src/qcam/viewfinder.h Acked-by: Kieran Bingham