[{"id":5183,"web_url":"https://patchwork.libcamera.org/comment/5183/","msgid":"<c11a7435-84c9-a171-a11f-2a674d536126@uajain.com>","date":"2020-06-11T17:18:54","subject":"Re: [libcamera-devel] [PATCH v4 0/6] Introduce UVC hotplugging\n\tsupport","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi,\n\nOn 6/11/20 10:45 PM, Umang Jain wrote:\n> Hi all,\n>\n> Around round of UVC hotplug support I have been working on.\n>\n> Changelog:\n>   \n> v3->v4:\n>    - Introduce one additional commit to eliminate Pipehandlers' vector\n>      from CameraManager. It was leaving behind a leaked reference which\n>      was causing unclean unbind->bind operation (due to dangling dirs)\n>      for the hotplug unit test to run.\n>    - Simplify hotplug unit test with use of std::ofstream.\n>    - Change CameraManager::Private::addCamera() signature to accept\n>      Camera arg as pass-by-value instead of pass-by-reference.\n>    - qcam: Finalize HotplugEvent naming with ::HotPlug and ::HotUnplug\n>    - Few small improvements in commit messages and rebase.\n\nSorry, forgot to mention\n\n- Running the unit-test under valgrind to check for  leaks, segfaults\n\n    issues for both hot-plugging and hot-unplugging code paths as \nLaurent  suggested.\n\n>\n>\n> Umang Jain (6):\n>    libcamera: CameraManager: Drop the vector of created PipelineHandlers\n>    libcamera: camera_manager: Refactor pipelines creation into separate\n>      function\n>    libcamera: device_enumerator: Emit a signal when a new devices are\n>      added\n>    libcamera: camera_manager: Introduce signals when a camera is\n>      added/removed\n>    qcam: main_window: Introduce initial hotplug support\n>    tests: Introduce hotplug hot-unplug unit test\n>\n>   include/libcamera/camera_manager.h            |   6 +-\n>   .../libcamera/internal/device_enumerator.h    |   4 +\n>   src/libcamera/camera_manager.cpp              |  60 +++++++--\n>   src/libcamera/device_enumerator.cpp           |  13 ++\n>   src/libcamera/pipeline_handler.cpp            |   2 +-\n>   src/qcam/main_window.cpp                      |  76 +++++++++++\n>   src/qcam/main_window.h                        |   6 +\n>   test/hotplug-cameras.cpp                      | 124 ++++++++++++++++++\n>   test/meson.build                              |   1 +\n>   9 files changed, 277 insertions(+), 15 deletions(-)\n>   create mode 100644 test/hotplug-cameras.cpp\n>","headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE02D61027\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jun 2020 19:18:55 +0200 (CEST)","by filterdrecv-p3iad2-784dbb6bd8-m8bfj with SMTP id\n\tfilterdrecv-p3iad2-784dbb6bd8-m8bfj-20-5EE2677E-42\n\t2020-06-11 17:18:54.597971363 +0000 UTC m=+681126.011182603","from mail.uajain.com (unknown)\n\tby ismtpd0001p1maa1.sendgrid.net (SG) with ESMTP\n\tid EOHo8WLTQu-xKi2ElzaDkw Thu, 11 Jun 2020 17:18:54.128 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"eRMBsBLx\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=tKMyhtimldZAJXCx6/A35S77pgBnZCceUYvzThl4VxA=;\n\tb=eRMBsBLxBV3ZCDVxh34VZvv5mobESS7+tmY/0pUNGldx7TOIOx+jJzAxTi4S1HWq2MQi\n\t42SVmAdT3rLHV72rGsjpw1JSyX/2grbVn/HKWuxddKZ98V73Ef3VUSpoSgPydFdHXdcjXd\n\tWACtl4nBLjIGt8pyXQHQpShxinWfJdyoM=","References":"<20200611171528.9381-1-email@uajain.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<c11a7435-84c9-a171-a11f-2a674d536126@uajain.com>","Date":"Thu, 11 Jun 2020 17:18:54 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<20200611171528.9381-1-email@uajain.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcsqq2IL5HKct149ShwfIDnkBtgoJOt37U0KWblIc76G01SG069aOGsfNny21KP4sjU99xP1u8su2vG+Mx3x0irEm+jI1fzMLqx7O4YHmUFZbcxohrerWNhYCKMrC4CvVyc0yW2Ub4EGhJWcJZAEUKSwYaCy32FEoftdTCyyYe/K7o4QF+MONci62sfSA8Aw7EapKfb2Xk9aRMech688omJA==","To":"laurent.pinchart@ideasonboard.com, libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=iso-8859-1; format=flowed","Content-Transfer-Encoding":"8bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v4 0/6] Introduce UVC hotplugging\n\tsupport","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Thu, 11 Jun 2020 17:18:56 -0000"}}]