From patchwork Thu Jun 11 17:16:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 4025 Return-Path: Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0118B61167 for ; Thu, 11 Jun 2020 19:16:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="UqELhGkx"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:mime-version:to:cc:content-type: content-transfer-encoding; s=s1; bh=KpwMp5/5+NFG3IoSOal254txRjs2HbGpoY5aTpzStE8=; b=UqELhGkxtiP9O9JDxpg9M5nQuHqKEhzZrQs7zGKJ2TsdXaFfiEuW5HZRhwXEM1J19Xkt bsaIcyHjPLENcuDXa1Zdkx7zDfOL+fV6AOwscWKMBoqeODXdVKTSImjjvhYVuIgw9BLRrt glAQ6rpIvhawK7gP4LdvMrqwtGs3Jr8Tk= Received: by filter0088p3las1.sendgrid.net with SMTP id filter0088p3las1-13542-5EE266D1-A5 2020-06-11 17:16:01.707854497 +0000 UTC m=+255989.231988590 Received: from mail.uajain.com (unknown) by ismtpd0004p1hnd1.sendgrid.net (SG) with ESMTP id -PPsXPefR9Cir886jekLcg Thu, 11 Jun 2020 17:16:01.246 +0000 (UTC) From: Umang Jain Date: Thu, 11 Jun 2020 17:16:01 +0000 (UTC) Message-Id: <20200611171528.9381-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcIQ89AvAiYjJmgYkN1WcnPYQppZwiX4S4RsTicx0So7YkMZKLspPftWN5pcxNFLl+kkz4epii5iycdlniF/7Su2sHkTMtCBXDLolmWd+c5t2MTflULocWZH/pzIV4XkQ0eYrMXq4YF5j+3+rK0KLymJTVQR4mV0AuAj3yW++axDGa+d6T/JjStJ0Kt4OzZD0Q To: laurent.pinchart@ideasonboard.com, libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH v4 0/6] Introduce UVC hotplugging support 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-List-Received-Date: Thu, 11 Jun 2020 17:16:04 -0000 Hi all, Around round of UVC hotplug support I have been working on. Changelog: v3->v4: - Introduce one additional commit to eliminate Pipehandlers' vector from CameraManager. It was leaving behind a leaked reference which was causing unclean unbind->bind operation (due to dangling dirs) for the hotplug unit test to run. - Simplify hotplug unit test with use of std::ofstream. - Change CameraManager::Private::addCamera() signature to accept Camera arg as pass-by-value instead of pass-by-reference. - qcam: Finalize HotplugEvent naming with ::HotPlug and ::HotUnplug - Few small improvements in commit messages and rebase. Umang Jain (6): libcamera: CameraManager: Drop the vector of created PipelineHandlers libcamera: camera_manager: Refactor pipelines creation into separate function libcamera: device_enumerator: Emit a signal when a new devices are added libcamera: camera_manager: Introduce signals when a camera is added/removed qcam: main_window: Introduce initial hotplug support tests: Introduce hotplug hot-unplug unit test include/libcamera/camera_manager.h | 6 +- .../libcamera/internal/device_enumerator.h | 4 + src/libcamera/camera_manager.cpp | 60 +++++++-- src/libcamera/device_enumerator.cpp | 13 ++ src/libcamera/pipeline_handler.cpp | 2 +- src/qcam/main_window.cpp | 76 +++++++++++ src/qcam/main_window.h | 6 + test/hotplug-cameras.cpp | 124 ++++++++++++++++++ test/meson.build | 1 + 9 files changed, 277 insertions(+), 15 deletions(-) create mode 100644 test/hotplug-cameras.cpp