From patchwork Wed May 13 17:29:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 3789 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 C1B5460DE6 for ; Wed, 13 May 2020 19:29:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="PqT3CoYf"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type; s=s1; bh=K0QOQzJod/eKkvfQJjyeyoD1kwbMtJd+HZd63TzZIEI=; b=PqT3CoYfrjQUFXVjjYPTGb4OBdVaajzGYz8/9UHBQA4RQmjYTz4dyFxbjkPWh50/Y3tp FREiMJxloBdcJ5NVox1AatcaRAc66SoFZAmUxgTeAmWq4TqGhN47nk8FC442TJ+YWMtjff vNGyINVII67r1R9KDNCO1OMB8uQIb3Apo= Received: by filter0084p3las1.sendgrid.net with SMTP id filter0084p3las1-1974-5EBC2E95-96 2020-05-13 17:29:57.470694555 +0000 UTC m=+2402889.608201556 Received: from mail.uajain.com (unknown) by ismtpd0007p1hnd1.sendgrid.net (SG) with ESMTP id NOHhAgjzSQ6x4FT7YbDLGw Wed, 13 May 2020 17:29:56.976 +0000 (UTC) From: Umang Jain Date: Wed, 13 May 2020 17:29:57 +0000 (UTC) Message-Id: <20200513172950.72685-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcHIuSzkf5/M5SksOT1pntGzUknbqKtzsN7gNbS+iTSutvZBT3xpO/THqNSVE66GYAEg47c8QcyzCQtKIJaUriLM3JBn+Is+YjhD+UOUPGlxvQzBO7lpTanOSbU3IIF9rcWrjUoFcHMel5q8dDgyqPZoH67QpignyD/Opav6clygkgJKF+nEKEOYHMClNWFOtA To: libcamera-devel Subject: [libcamera-devel] [PATCH v2 0/5] Introduce UVC hotplug 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: Wed, 13 May 2020 17:30:01 -0000 Hi all, After a while, working through the reviews and gripping few concepts along the way, this is the second iteration of the initial hotplug support, I submitted for review at [1] [1]: https://u15657259.ct.sendgrid.net/ls/click?upn=8H1KCc2bev8KdIveckpOEBeWjI3THEr-2F8W-2FrEpvXj1ekoJbGR9Ivjkfu-2BLRbGop4lLFTSSW-2BR7XzFtf418GE1MWhYN2yDdtgpIDma1I7Xxo50CYA-2FzGdn8vdeIY5M9vLkoyz_C3wFy2Q4UgRsRLDAYieRZ5Z3EhAWyy0-2FkOzyYc6FPc1dn6ROcAJqKXb9hjP566uPvKbTBxONXI-2BCZL7pLzOWeYqZxVpLQFvCIQZO9BAhCDIK-2FLR5rbAomN4ygqeqT9lRXHCCjJnCJFOYydaTLVCyOhnIK8Yi7XerNc7G2lc-2FvskrBjGSVHMgg41o-2BmhmHuHFlv2Hw-2Bj5uHtcueHBoF1VumNlotoZ9IUhIoLNNo9ZS9kX58IlHcI0IbfF9B57rwUk Umang Jain (5): libcamera: camera_manager: Refactor device enumeration into separate function libcamera: device_enumerator: Emit a signal when a new device is hotplugged libcamera: camera_manager: Introduce signals when a camera is added/removed qcam: main_window: Introduce hotplug support tests: Introduce hotplug hot-unplug unit test include/libcamera/camera_manager.h | 6 +- src/libcamera/camera_manager.cpp | 54 ++++++-- src/libcamera/device_enumerator.cpp | 12 ++ src/libcamera/include/device_enumerator.h | 4 + src/libcamera/pipeline_handler.cpp | 2 +- src/qcam/main_window.cpp | 83 ++++++++++++ src/qcam/main_window.h | 6 + test/hotplug-cameras.cpp | 152 ++++++++++++++++++++++ test/meson.build | 1 + 9 files changed, 309 insertions(+), 11 deletions(-) create mode 100644 test/hotplug-cameras.cpp