From patchwork Mon Jan 7 23:11:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 163 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 A1EDE600CC for ; Tue, 8 Jan 2019 00:10:47 +0100 (CET) Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0BB8E530 for ; Tue, 8 Jan 2019 00:10:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1546902647; bh=qSyXu+58+Ks+2LdvqVD7W11kiaDOninRSW+DsdZA0K0=; h=From:To:Subject:Date:From; b=Far1MYm/g5RLD0nvD8BZUQpD6o9ON2pQHn36B/2XZNMP5RM8qAVd+3B3eJcPWJBKX H4RGB8jM06Bd5oL6mOCPIcxIiHuHuFJLSvNNFZpYdf2DHKV4gZps6/WwvQiVhSfYeO WRuGV9+veFJJxwHPR1L7puEtJAL4pKMpfKsj0T8Y= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 8 Jan 2019 01:11:40 +0200 Message-Id: <20190107231151.23291-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 00/11] libcamera: Add event notification and timers 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: Mon, 07 Jan 2019 23:10:47 -0000 Hello everybody, Here's the second version of the event notification and timer support patch series for libcamera. The series starts with small cleanups and changes (01/11 to 04/11), and then adds a signal/slot mechanism (05/11) that serves to implement event nofication in the event notifier and the timer (06/11). Patch 07/11 adds a default poll()-based implementation of the event dispatcher that is used by libcamera when the application doesn't provide its own implementation. Patches 08/11 to 11/11 finally add corresponding test cases. I've incorporated (to the best of my knowledge) all the feedback I've received on v1. Please see individual patches for changelogs. Laurent Pinchart (11): libcamera: log: Add a LogFatal log level libcamera: log: Add an ASSERT macro libcamera: log: Pad timestamp fields with zeros libcamera: camera_manager: Make the class a singleton libcamera: Add signal/slot communication mechanism libcamera: Add event notification infrastructure libcamera: Add a poll-based event dispatcher test: Rename list test to list-cameras test: Add signal/slot test test: Add timer test test: Add event notifier test Documentation/Doxyfile.in | 4 +- include/libcamera/camera_manager.h | 15 +- include/libcamera/event_dispatcher.h | 33 +++ include/libcamera/event_notifier.h | 42 ++++ include/libcamera/libcamera.h | 2 + include/libcamera/meson.build | 4 + include/libcamera/signal.h | 154 ++++++++++++ include/libcamera/timer.h | 37 +++ src/libcamera/camera_manager.cpp | 66 ++++- src/libcamera/event_dispatcher.cpp | 103 ++++++++ src/libcamera/event_dispatcher_poll.cpp | 234 ++++++++++++++++++ src/libcamera/event_notifier.cpp | 121 +++++++++ src/libcamera/include/event_dispatcher_poll.h | 50 ++++ src/libcamera/include/log.h | 11 + src/libcamera/log.cpp | 37 ++- src/libcamera/meson.build | 6 + src/libcamera/signal.cpp | 84 +++++++ src/libcamera/timer.cpp | 105 ++++++++ test/event.cpp | 117 +++++++++ test/{list.cpp => list-cameras.cpp} | 7 +- test/meson.build | 5 +- test/signal.cpp | 159 ++++++++++++ test/timer.cpp | 149 +++++++++++ 23 files changed, 1530 insertions(+), 15 deletions(-) create mode 100644 include/libcamera/event_dispatcher.h create mode 100644 include/libcamera/event_notifier.h create mode 100644 include/libcamera/signal.h create mode 100644 include/libcamera/timer.h create mode 100644 src/libcamera/event_dispatcher.cpp create mode 100644 src/libcamera/event_dispatcher_poll.cpp create mode 100644 src/libcamera/event_notifier.cpp create mode 100644 src/libcamera/include/event_dispatcher_poll.h create mode 100644 src/libcamera/signal.cpp create mode 100644 src/libcamera/timer.cpp create mode 100644 test/event.cpp rename test/{list.cpp => list-cameras.cpp} (89%) create mode 100644 test/signal.cpp create mode 100644 test/timer.cpp