[{"id":11792,"web_url":"https://patchwork.libcamera.org/comment/11792/","msgid":"<4574e829-365a-d123-3e05-590f4cade43f@uajain.com>","date":"2020-08-03T13:09:24","subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Kieran,\n\nOn 8/3/20 6:18 PM, Kieran Bingham wrote:\n> From: Umang Jain <email@uajain.com>\n>\n> Add --monitor to monitor new hotplug and unplug camera events from\n> the CameraManager.\n>\n> Signed-off-by: Umang Jain <email@uajain.com>\n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>   src/cam/main.cpp | 27 +++++++++++++++++++++++++++\n>   src/cam/main.h   |  1 +\n>   2 files changed, 28 insertions(+)\n>\n> v3:\n>    - V1 rebased, and slightly modified to update the conditional\n>      connection of the signals during CamApp::init()\n>    - Adjust formatting of parser.addOption\n>\n>\n> Hi all,\n>\n> I am aiming to merge Umang's patch, but because I have ended up making a\n> more than superficial change to the code path in CamApp::init() I'm\n> reposting as v3. This is essentially v1 of Umangs patch (thanks, and\n> sorry for incorrectly leading you to make a v2) with the small line\n> adjustment to the parser addition, but a more impacting adjustment to\n> the conditional which enables the signals.\n>\n>\n> If there are no objections, I can merge this patch.\nYes, Ack from my side.\n>\n> Testing with the two options combined shows:\n>\n> ./build/src/cam/cam -m -c 1 -C\n>\n> fps: 25.64 stream0 seq: 000052 bytesused: 36000\n> fps: 25.00 stream0 seq: 000053 bytesused: 36024\n> fps: 25.00 stream0 seq: 000054 bytesused: 36784\n> fps: 25.64 stream0 seq: 000055 bytesused: 36968\n> fps: 25.64 stream0 seq: 000056 bytesused: 36792\n> fps: 25.00 stream0 seq: 000057 bytesused: 37040\n> fps: 25.64 stream0 seq: 000058 bytesused: 36808\n> fps: 25.00 stream0 seq: 000059 bytesused: 36848\n> fps: 25.00 stream0 seq: 000060 bytesused: 37480\n> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n> Camera Added: VF0520 Live! Cam Sync: VF0520 L\n> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n>\n> So the stream doesn't continue, but no crashing - so we're fine ;-)\nIndeed, restarting the stream would be nice to have feature.\nIt would be obvious in case only one camera is present, will probably\nneed to think a bit in case of multiple cameras.\n\nThanks for the v3.\n\n>\n>\n> --\n> Kieran\n>\n>\n>\n> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> index f5aba041d7c4..3ceb6576960e 100644\n> --- a/src/cam/main.cpp\n> +++ b/src/cam/main.cpp\n> @@ -36,6 +36,8 @@ public:\n>   \tvoid quit();\n>   \n>   private:\n> +\tvoid cameraAdded(std::shared_ptr<Camera> cam);\n> +\tvoid cameraRemoved(std::shared_ptr<Camera> cam);\n>   \tint parseOptions(int argc, char *argv[]);\n>   \tint prepareConfig();\n>   \tint listControls();\n> @@ -123,6 +125,12 @@ int CamApp::init(int argc, char **argv)\n>   \t\t\treturn ret;\n>   \t}\n>   \n> +\tif (options_.isSet(OptMonitor)) {\n> +\t\tcm_->cameraAdded.connect(this, &CamApp::cameraAdded);\n> +\t\tcm_->cameraRemoved.connect(this, &CamApp::cameraRemoved);\n> +\t\tstd::cout << \"Monitoring new hotplug and unplug events...\" << std::endl;\n> +\t}\n> +\n>   \tloop_ = new EventLoop(cm_->eventDispatcher());\n>   \n>   \treturn 0;\n> @@ -186,6 +194,9 @@ int CamApp::parseOptions(int argc, char *argv[])\n>   \t\t\t \"list-controls\");\n>   \tparser.addOption(OptListProperties, OptionNone, \"List cameras properties\",\n>   \t\t\t \"list-properties\");\n> +\tparser.addOption(OptMonitor, OptionNone,\n> +\t\t\t \"Monitor for hotplug and unplug camera events\",\n> +\t\t\t \"monitor\");\n>   \tparser.addOption(OptStrictFormats, OptionNone,\n>   \t\t\t \"Do not allow requested stream format(s) to be adjusted\",\n>   \t\t\t \"strict-formats\");\n> @@ -309,6 +320,16 @@ int CamApp::infoConfiguration()\n>   \treturn 0;\n>   }\n>   \n> +void CamApp::cameraAdded(std::shared_ptr<Camera> cam)\n> +{\n> +\tstd::cout << \"Camera Added: \" << cam->name() << std::endl;\n> +}\n> +\n> +void CamApp::cameraRemoved(std::shared_ptr<Camera> cam)\n> +{\n> +\tstd::cout << \"Camera Removed: \" << cam->name() << std::endl;\n> +}\n> +\n>   int CamApp::run()\n>   {\n>   \tint ret;\n> @@ -346,6 +367,12 @@ int CamApp::run()\n>   \t\treturn capture.run(options_);\n>   \t}\n>   \n> +\tif (options_.isSet(OptMonitor)) {\n> +\t\tret = loop_->exec();\n> +\t\tif (ret)\n> +\t\t\tstd::cout << \"Failed to run monitor loop\" << std::endl;\n> +\t}\n> +\n>   \treturn 0;\n>   }\n>   \n> diff --git a/src/cam/main.h b/src/cam/main.h\n> index 6f95add31a63..ea8dfd330830 100644\n> --- a/src/cam/main.h\n> +++ b/src/cam/main.h\n> @@ -15,6 +15,7 @@ enum {\n>   \tOptInfo = 'I',\n>   \tOptList = 'l',\n>   \tOptListProperties = 'p',\n> +\tOptMonitor = 'm',\n>   \tOptStream = 's',\n>   \tOptListControls = 256,\n>   \tOptStrictFormats = 257,","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B460ABD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Aug 2020 13:09:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 439A060536;\n\tMon,  3 Aug 2020 15:09:28 +0200 (CEST)","from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F72960536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Aug 2020 15:09:25 +0200 (CEST)","by filterdrecv-p3las1-559bd7b968-hw9rl with SMTP id\n\tfilterdrecv-p3las1-559bd7b968-hw9rl-18-5F280C83-E0\n\t2020-08-03 13:09:24.047067046 +0000 UTC m=+413593.447928360","from mail.uajain.com (unknown)\n\tby ismtpd0008p1hnd1.sendgrid.net (SG) with ESMTP\n\tid D6xwlnATRruZokqlkGsBAg Mon, 03 Aug 2020 13:09:23.547 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"PPyaEnzz\"; dkim-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:cc:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=qgrPBW/d6M8cS+kFuqIGurHJ0p6/5fSUiUR3WQKfUrc=;\n\tb=PPyaEnzzVXp5RW5ABpMxFPHEJD8p2W8Q2Xk86wcdJEWnhLnObXGyaBtcWy1pS5Yv1VOv\n\tZtRncUu9XEd9VgwmPslRgsEcqhTRvGaWmtjLJiuzGwT/L63CeD2lMI8xCgd6FgX0izkfRD\n\tcF2d6riJaYPV81sLno+0oe5GmAvM8GaJ0=","References":"<20200803124823.82691-1-kieran.bingham@ideasonboard.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<4574e829-365a-d123-3e05-590f4cade43f@uajain.com>","Date":"Mon, 03 Aug 2020 13:09:24 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<20200803124823.82691-1-kieran.bingham@ideasonboard.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcu4OVMbZ0DPo4pBBcZhwsTLfj5ix47uyDQB5VeZmb8tERz/WRSvOIyXJJagplEwM9s4py0fipP1WrSy0s+zaH+Zx8S+KFodj9559mRiQh0Y8wKrAG1aIWSXAfLqpmr3/DzZgV1JKynQDCT6CM4Cnk1hBBuLUpe7Muq1uxSXYwGw0nvTEYXs/SLEblw+NARFAy3Tn+yH67C2iFgc6jGH7iEA==","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>, libcamera devel\n\t<libcamera-devel@lists.libcamera.org>","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","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>","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=\"iso-8859-1\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":11793,"web_url":"https://patchwork.libcamera.org/comment/11793/","msgid":"<20200803130929.GD5926@pendragon.ideasonboard.com>","date":"2020-08-03T13:09:29","subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran (and Umang),\n\nThank you for the patch.\n\nOn Mon, Aug 03, 2020 at 01:48:23PM +0100, Kieran Bingham wrote:\n> From: Umang Jain <email@uajain.com>\n> \n> Add --monitor to monitor new hotplug and unplug camera events from\n> the CameraManager.\n> \n> Signed-off-by: Umang Jain <email@uajain.com>\n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/cam/main.cpp | 27 +++++++++++++++++++++++++++\n>  src/cam/main.h   |  1 +\n>  2 files changed, 28 insertions(+)\n> \n> v3:\n>   - V1 rebased, and slightly modified to update the conditional\n>     connection of the signals during CamApp::init()\n>   - Adjust formatting of parser.addOption\n> \n> \n> Hi all,\n> \n> I am aiming to merge Umang's patch, but because I have ended up making a\n> more than superficial change to the code path in CamApp::init() I'm\n> reposting as v3. This is essentially v1 of Umangs patch (thanks, and\n> sorry for incorrectly leading you to make a v2) with the small line\n> adjustment to the parser addition, but a more impacting adjustment to\n> the conditional which enables the signals.\n> \n> \n> If there are no objections, I can merge this patch.\n> \n> Testing with the two options combined shows:\n> \n> ./build/src/cam/cam -m -c 1 -C\n> \n> fps: 25.64 stream0 seq: 000052 bytesused: 36000\n> fps: 25.00 stream0 seq: 000053 bytesused: 36024\n> fps: 25.00 stream0 seq: 000054 bytesused: 36784\n> fps: 25.64 stream0 seq: 000055 bytesused: 36968\n> fps: 25.64 stream0 seq: 000056 bytesused: 36792\n> fps: 25.00 stream0 seq: 000057 bytesused: 37040\n> fps: 25.64 stream0 seq: 000058 bytesused: 36808\n> fps: 25.00 stream0 seq: 000059 bytesused: 36848\n> fps: 25.00 stream0 seq: 000060 bytesused: 37480\n> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n> Camera Added: VF0520 Live! Cam Sync: VF0520 L\n> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n> \n> So the stream doesn't continue, but no crashing - so we're fine ;-)\n> \n> \n> --\n> Kieran\n> \n> \n> \n> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> index f5aba041d7c4..3ceb6576960e 100644\n> --- a/src/cam/main.cpp\n> +++ b/src/cam/main.cpp\n> @@ -36,6 +36,8 @@ public:\n>  \tvoid quit();\n>  \n>  private:\n> +\tvoid cameraAdded(std::shared_ptr<Camera> cam);\n> +\tvoid cameraRemoved(std::shared_ptr<Camera> cam);\n>  \tint parseOptions(int argc, char *argv[]);\n>  \tint prepareConfig();\n>  \tint listControls();\n> @@ -123,6 +125,12 @@ int CamApp::init(int argc, char **argv)\n>  \t\t\treturn ret;\n>  \t}\n>  \n> +\tif (options_.isSet(OptMonitor)) {\n> +\t\tcm_->cameraAdded.connect(this, &CamApp::cameraAdded);\n> +\t\tcm_->cameraRemoved.connect(this, &CamApp::cameraRemoved);\n> +\t\tstd::cout << \"Monitoring new hotplug and unplug events...\" << std::endl;\n> +\t}\n> +\n>  \tloop_ = new EventLoop(cm_->eventDispatcher());\n>  \n>  \treturn 0;\n> @@ -186,6 +194,9 @@ int CamApp::parseOptions(int argc, char *argv[])\n>  \t\t\t \"list-controls\");\n>  \tparser.addOption(OptListProperties, OptionNone, \"List cameras properties\",\n>  \t\t\t \"list-properties\");\n> +\tparser.addOption(OptMonitor, OptionNone,\n> +\t\t\t \"Monitor for hotplug and unplug camera events\",\n> +\t\t\t \"monitor\");\n>  \tparser.addOption(OptStrictFormats, OptionNone,\n>  \t\t\t \"Do not allow requested stream format(s) to be adjusted\",\n>  \t\t\t \"strict-formats\");\n> @@ -309,6 +320,16 @@ int CamApp::infoConfiguration()\n>  \treturn 0;\n>  }\n>  \n> +void CamApp::cameraAdded(std::shared_ptr<Camera> cam)\n> +{\n> +\tstd::cout << \"Camera Added: \" << cam->name() << std::endl;\n> +}\n> +\n> +void CamApp::cameraRemoved(std::shared_ptr<Camera> cam)\n> +{\n> +\tstd::cout << \"Camera Removed: \" << cam->name() << std::endl;\n> +}\n> +\n>  int CamApp::run()\n>  {\n>  \tint ret;\n> @@ -346,6 +367,12 @@ int CamApp::run()\n>  \t\treturn capture.run(options_);\n>  \t}\n>  \n> +\tif (options_.isSet(OptMonitor)) {\n\nI wonder if we should add here\n\n\t\tstd::cout << \"Press Ctrl-C to interrupt\" << std::endl;\n\nWith or without that (or with a modified version),\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t\tret = loop_->exec();\n> +\t\tif (ret)\n> +\t\t\tstd::cout << \"Failed to run monitor loop\" << std::endl;\n> +\t}\n> +\n>  \treturn 0;\n>  }\n>  \n> diff --git a/src/cam/main.h b/src/cam/main.h\n> index 6f95add31a63..ea8dfd330830 100644\n> --- a/src/cam/main.h\n> +++ b/src/cam/main.h\n> @@ -15,6 +15,7 @@ enum {\n>  \tOptInfo = 'I',\n>  \tOptList = 'l',\n>  \tOptListProperties = 'p',\n> +\tOptMonitor = 'm',\n>  \tOptStream = 's',\n>  \tOptListControls = 256,\n>  \tOptStrictFormats = 257,","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D1976BD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Aug 2020 13:09:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9CC1B61826;\n\tMon,  3 Aug 2020 15:09:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF5F760536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Aug 2020 15:09:40 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DE5A560;\n\tMon,  3 Aug 2020 15:09:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jXI4eOU9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1596460180;\n\tbh=Q8jCwt2vD/+AuGOkhWslUrxQs0Q2DnU39l6YTOTbVgA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jXI4eOU9nrza5tk78ISL0hy3U2OkMmp15om0BexwVHizrMTiuqF18XA1mRR5GTI4W\n\ty1JZm0jPZ3I2zJFZP3ukUX0Gf6timj/poD9nL/pFEhx4lmw09awRz3QXnZNM+vRkDQ\n\tNOI5gfdM/O43DkWfY49kb/oBcLwPVOy9+UTxiF0Q=","Date":"Mon, 3 Aug 2020 16:09:29 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20200803130929.GD5926@pendragon.ideasonboard.com>","References":"<20200803124823.82691-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200803124823.82691-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":11794,"web_url":"https://patchwork.libcamera.org/comment/11794/","msgid":"<680ce7f3-cc82-7efe-b4df-982c761ec443@ideasonboard.com>","date":"2020-08-03T13:13:52","subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 03/08/2020 14:09, Laurent Pinchart wrote:\n> Hi Kieran (and Umang),\n> \n> Thank you for the patch.\n> \n> On Mon, Aug 03, 2020 at 01:48:23PM +0100, Kieran Bingham wrote:\n>> From: Umang Jain <email@uajain.com>\n>>\n>> Add --monitor to monitor new hotplug and unplug camera events from\n>> the CameraManager.\n>>\n>> Signed-off-by: Umang Jain <email@uajain.com>\n>> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  src/cam/main.cpp | 27 +++++++++++++++++++++++++++\n>>  src/cam/main.h   |  1 +\n>>  2 files changed, 28 insertions(+)\n>>\n>> v3:\n>>   - V1 rebased, and slightly modified to update the conditional\n>>     connection of the signals during CamApp::init()\n>>   - Adjust formatting of parser.addOption\n>>\n>>\n>> Hi all,\n>>\n>> I am aiming to merge Umang's patch, but because I have ended up making a\n>> more than superficial change to the code path in CamApp::init() I'm\n>> reposting as v3. This is essentially v1 of Umangs patch (thanks, and\n>> sorry for incorrectly leading you to make a v2) with the small line\n>> adjustment to the parser addition, but a more impacting adjustment to\n>> the conditional which enables the signals.\n>>\n>>\n>> If there are no objections, I can merge this patch.\n>>\n>> Testing with the two options combined shows:\n>>\n>> ./build/src/cam/cam -m -c 1 -C\n>>\n>> fps: 25.64 stream0 seq: 000052 bytesused: 36000\n>> fps: 25.00 stream0 seq: 000053 bytesused: 36024\n>> fps: 25.00 stream0 seq: 000054 bytesused: 36784\n>> fps: 25.64 stream0 seq: 000055 bytesused: 36968\n>> fps: 25.64 stream0 seq: 000056 bytesused: 36792\n>> fps: 25.00 stream0 seq: 000057 bytesused: 37040\n>> fps: 25.64 stream0 seq: 000058 bytesused: 36808\n>> fps: 25.00 stream0 seq: 000059 bytesused: 36848\n>> fps: 25.00 stream0 seq: 000060 bytesused: 37480\n>> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n>> Camera Added: VF0520 Live! Cam Sync: VF0520 L\n>> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n>>\n>> So the stream doesn't continue, but no crashing - so we're fine ;-)\n>>\n>>\n>> --\n>> Kieran\n>>\n>>\n>>\n>> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n>> index f5aba041d7c4..3ceb6576960e 100644\n>> --- a/src/cam/main.cpp\n>> +++ b/src/cam/main.cpp\n>> @@ -36,6 +36,8 @@ public:\n>>  \tvoid quit();\n>>  \n>>  private:\n>> +\tvoid cameraAdded(std::shared_ptr<Camera> cam);\n>> +\tvoid cameraRemoved(std::shared_ptr<Camera> cam);\n>>  \tint parseOptions(int argc, char *argv[]);\n>>  \tint prepareConfig();\n>>  \tint listControls();\n>> @@ -123,6 +125,12 @@ int CamApp::init(int argc, char **argv)\n>>  \t\t\treturn ret;\n>>  \t}\n>>  \n>> +\tif (options_.isSet(OptMonitor)) {\n>> +\t\tcm_->cameraAdded.connect(this, &CamApp::cameraAdded);\n>> +\t\tcm_->cameraRemoved.connect(this, &CamApp::cameraRemoved);\n>> +\t\tstd::cout << \"Monitoring new hotplug and unplug events...\" << std::endl;\n>> +\t}\n>> +\n>>  \tloop_ = new EventLoop(cm_->eventDispatcher());\n>>  \n>>  \treturn 0;\n>> @@ -186,6 +194,9 @@ int CamApp::parseOptions(int argc, char *argv[])\n>>  \t\t\t \"list-controls\");\n>>  \tparser.addOption(OptListProperties, OptionNone, \"List cameras properties\",\n>>  \t\t\t \"list-properties\");\n>> +\tparser.addOption(OptMonitor, OptionNone,\n>> +\t\t\t \"Monitor for hotplug and unplug camera events\",\n>> +\t\t\t \"monitor\");\n>>  \tparser.addOption(OptStrictFormats, OptionNone,\n>>  \t\t\t \"Do not allow requested stream format(s) to be adjusted\",\n>>  \t\t\t \"strict-formats\");\n>> @@ -309,6 +320,16 @@ int CamApp::infoConfiguration()\n>>  \treturn 0;\n>>  }\n>>  \n>> +void CamApp::cameraAdded(std::shared_ptr<Camera> cam)\n>> +{\n>> +\tstd::cout << \"Camera Added: \" << cam->name() << std::endl;\n>> +}\n>> +\n>> +void CamApp::cameraRemoved(std::shared_ptr<Camera> cam)\n>> +{\n>> +\tstd::cout << \"Camera Removed: \" << cam->name() << std::endl;\n>> +}\n>> +\n>>  int CamApp::run()\n>>  {\n>>  \tint ret;\n>> @@ -346,6 +367,12 @@ int CamApp::run()\n>>  \t\treturn capture.run(options_);\n>>  \t}\n>>  \n>> +\tif (options_.isSet(OptMonitor)) {\n> \n> I wonder if we should add here\n> \n> \t\tstd::cout << \"Press Ctrl-C to interrupt\" << std::endl;\n> \n> With or without that (or with a modified version),\n\nWell, I hope that is usually expected, but it does otherwise sit\nreasonably quietly:\n\nThe current output is:\n\n> ./build/src/cam/cam -m\n> [5:07:13.071292781] [83575]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/libcamera/libcamera-next/build/src/ipa' to the IPA search path\n> [5:07:13.076546278] [83575]  INFO Camera camera_manager.cpp:287 libcamera v0.0.11+797-785d7418-dirty\n> [5:07:13.223619576] [83576]  INFO IPAProxy ipa_proxy.cpp:122 libcamera is not installed. Loading IPA configuration from '/home/libcamera/libcamera-next/src/ipa/vimc/data'\n> Monitoring new hotplug and unplug events...\n\nI hope the '...' implies that it is waiting.\n\nWould you still like to see the \"Press Ctrl-C to interrupt\" ?\n\nI'm happy with that text if you think it helps, otherwise the loop does\nindeed sit there idly (excepting actual hotplug notifications of course).\n\n--\nKieran\n\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>> +\t\tret = loop_->exec();\n>> +\t\tif (ret)\n>> +\t\t\tstd::cout << \"Failed to run monitor loop\" << std::endl;\n>> +\t}\n>> +\n>>  \treturn 0;\n>>  }\n>>  \n>> diff --git a/src/cam/main.h b/src/cam/main.h\n>> index 6f95add31a63..ea8dfd330830 100644\n>> --- a/src/cam/main.h\n>> +++ b/src/cam/main.h\n>> @@ -15,6 +15,7 @@ enum {\n>>  \tOptInfo = 'I',\n>>  \tOptList = 'l',\n>>  \tOptListProperties = 'p',\n>> +\tOptMonitor = 'm',\n>>  \tOptStream = 's',\n>>  \tOptListControls = 256,\n>>  \tOptStrictFormats = 257,\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BAFF8BD87A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Aug 2020 13:13:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4789B6194F;\n\tMon,  3 Aug 2020 15:13:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 248AF60536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Aug 2020 15:13:57 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 06E0B560;\n\tMon,  3 Aug 2020 15:13:54 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"NTDaRs3z\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1596460435;\n\tbh=eh4M89612gbNVIBiVkYk61EuR5iv5Hz3CLhjrIeLcdE=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=NTDaRs3zyDrXqz3v4MYpmWuJ9Fc6Jy6MivzE6IjKIE3JGZIi76q6+UTfwamrE+PT2\n\tIJeFAaJX0IMZge6HwXt1vexsSnvUGpLd1IayA6PyJXTJ3cFMykmbhPaJclSmS06BB3\n\thu7HXrs/V77v2+DvGKdzkotdHBT4Q4okWvWWiV8E=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20200803124823.82691-1-kieran.bingham@ideasonboard.com>\n\t<20200803130929.GD5926@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\t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\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<680ce7f3-cc82-7efe-b4df-982c761ec443@ideasonboard.com>","Date":"Mon, 3 Aug 2020 14:13:52 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<20200803130929.GD5926@pendragon.ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":11795,"web_url":"https://patchwork.libcamera.org/comment/11795/","msgid":"<20200803131539.GE5926@pendragon.ideasonboard.com>","date":"2020-08-03T13:15:39","subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Mon, Aug 03, 2020 at 02:13:52PM +0100, Kieran Bingham wrote:\n> On 03/08/2020 14:09, Laurent Pinchart wrote:\n> > On Mon, Aug 03, 2020 at 01:48:23PM +0100, Kieran Bingham wrote:\n> >> From: Umang Jain <email@uajain.com>\n> >>\n> >> Add --monitor to monitor new hotplug and unplug camera events from\n> >> the CameraManager.\n> >>\n> >> Signed-off-by: Umang Jain <email@uajain.com>\n> >> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >>  src/cam/main.cpp | 27 +++++++++++++++++++++++++++\n> >>  src/cam/main.h   |  1 +\n> >>  2 files changed, 28 insertions(+)\n> >>\n> >> v3:\n> >>   - V1 rebased, and slightly modified to update the conditional\n> >>     connection of the signals during CamApp::init()\n> >>   - Adjust formatting of parser.addOption\n> >>\n> >>\n> >> Hi all,\n> >>\n> >> I am aiming to merge Umang's patch, but because I have ended up making a\n> >> more than superficial change to the code path in CamApp::init() I'm\n> >> reposting as v3. This is essentially v1 of Umangs patch (thanks, and\n> >> sorry for incorrectly leading you to make a v2) with the small line\n> >> adjustment to the parser addition, but a more impacting adjustment to\n> >> the conditional which enables the signals.\n> >>\n> >>\n> >> If there are no objections, I can merge this patch.\n> >>\n> >> Testing with the two options combined shows:\n> >>\n> >> ./build/src/cam/cam -m -c 1 -C\n> >>\n> >> fps: 25.64 stream0 seq: 000052 bytesused: 36000\n> >> fps: 25.00 stream0 seq: 000053 bytesused: 36024\n> >> fps: 25.00 stream0 seq: 000054 bytesused: 36784\n> >> fps: 25.64 stream0 seq: 000055 bytesused: 36968\n> >> fps: 25.64 stream0 seq: 000056 bytesused: 36792\n> >> fps: 25.00 stream0 seq: 000057 bytesused: 37040\n> >> fps: 25.64 stream0 seq: 000058 bytesused: 36808\n> >> fps: 25.00 stream0 seq: 000059 bytesused: 36848\n> >> fps: 25.00 stream0 seq: 000060 bytesused: 37480\n> >> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n> >> Camera Added: VF0520 Live! Cam Sync: VF0520 L\n> >> Camera Removed: VF0520 Live! Cam Sync: VF0520 L\n> >>\n> >> So the stream doesn't continue, but no crashing - so we're fine ;-)\n> >>\n> >> diff --git a/src/cam/main.cpp b/src/cam/main.cpp\n> >> index f5aba041d7c4..3ceb6576960e 100644\n> >> --- a/src/cam/main.cpp\n> >> +++ b/src/cam/main.cpp\n> >> @@ -36,6 +36,8 @@ public:\n> >>  \tvoid quit();\n> >>  \n> >>  private:\n> >> +\tvoid cameraAdded(std::shared_ptr<Camera> cam);\n> >> +\tvoid cameraRemoved(std::shared_ptr<Camera> cam);\n> >>  \tint parseOptions(int argc, char *argv[]);\n> >>  \tint prepareConfig();\n> >>  \tint listControls();\n> >> @@ -123,6 +125,12 @@ int CamApp::init(int argc, char **argv)\n> >>  \t\t\treturn ret;\n> >>  \t}\n> >>  \n> >> +\tif (options_.isSet(OptMonitor)) {\n> >> +\t\tcm_->cameraAdded.connect(this, &CamApp::cameraAdded);\n> >> +\t\tcm_->cameraRemoved.connect(this, &CamApp::cameraRemoved);\n> >> +\t\tstd::cout << \"Monitoring new hotplug and unplug events...\" << std::endl;\n> >> +\t}\n> >> +\n> >>  \tloop_ = new EventLoop(cm_->eventDispatcher());\n> >>  \n> >>  \treturn 0;\n> >> @@ -186,6 +194,9 @@ int CamApp::parseOptions(int argc, char *argv[])\n> >>  \t\t\t \"list-controls\");\n> >>  \tparser.addOption(OptListProperties, OptionNone, \"List cameras properties\",\n> >>  \t\t\t \"list-properties\");\n> >> +\tparser.addOption(OptMonitor, OptionNone,\n> >> +\t\t\t \"Monitor for hotplug and unplug camera events\",\n> >> +\t\t\t \"monitor\");\n> >>  \tparser.addOption(OptStrictFormats, OptionNone,\n> >>  \t\t\t \"Do not allow requested stream format(s) to be adjusted\",\n> >>  \t\t\t \"strict-formats\");\n> >> @@ -309,6 +320,16 @@ int CamApp::infoConfiguration()\n> >>  \treturn 0;\n> >>  }\n> >>  \n> >> +void CamApp::cameraAdded(std::shared_ptr<Camera> cam)\n> >> +{\n> >> +\tstd::cout << \"Camera Added: \" << cam->name() << std::endl;\n> >> +}\n> >> +\n> >> +void CamApp::cameraRemoved(std::shared_ptr<Camera> cam)\n> >> +{\n> >> +\tstd::cout << \"Camera Removed: \" << cam->name() << std::endl;\n> >> +}\n> >> +\n> >>  int CamApp::run()\n> >>  {\n> >>  \tint ret;\n> >> @@ -346,6 +367,12 @@ int CamApp::run()\n> >>  \t\treturn capture.run(options_);\n> >>  \t}\n> >>  \n> >> +\tif (options_.isSet(OptMonitor)) {\n> > \n> > I wonder if we should add here\n> > \n> > \t\tstd::cout << \"Press Ctrl-C to interrupt\" << std::endl;\n> > \n> > With or without that (or with a modified version),\n> \n> Well, I hope that is usually expected, but it does otherwise sit\n> reasonably quietly:\n> \n> The current output is:\n> \n> > ./build/src/cam/cam -m\n> > [5:07:13.071292781] [83575]  INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/libcamera/libcamera-next/build/src/ipa' to the IPA search path\n> > [5:07:13.076546278] [83575]  INFO Camera camera_manager.cpp:287 libcamera v0.0.11+797-785d7418-dirty\n> > [5:07:13.223619576] [83576]  INFO IPAProxy ipa_proxy.cpp:122 libcamera is not installed. Loading IPA configuration from '/home/libcamera/libcamera-next/src/ipa/vimc/data'\n> > Monitoring new hotplug and unplug events...\n> \n> I hope the '...' implies that it is waiting.\n> \n> Would you still like to see the \"Press Ctrl-C to interrupt\" ?\n> \n> I'm happy with that text if you think it helps, otherwise the loop does\n> indeed sit there idly (excepting actual hotplug notifications of course).\n\nIf it was just me I'd remove the ... and add the Ctrl-C message, as when\nspecifying -C -m the ... seem a bit weird. Up to you really, I don't\nmind. Pick the option you like best and push :-)\n\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> >> +\t\tret = loop_->exec();\n> >> +\t\tif (ret)\n> >> +\t\t\tstd::cout << \"Failed to run monitor loop\" << std::endl;\n> >> +\t}\n> >> +\n> >>  \treturn 0;\n> >>  }\n> >>  \n> >> diff --git a/src/cam/main.h b/src/cam/main.h\n> >> index 6f95add31a63..ea8dfd330830 100644\n> >> --- a/src/cam/main.h\n> >> +++ b/src/cam/main.h\n> >> @@ -15,6 +15,7 @@ enum {\n> >>  \tOptInfo = 'I',\n> >>  \tOptList = 'l',\n> >>  \tOptListProperties = 'p',\n> >> +\tOptMonitor = 'm',\n> >>  \tOptStream = 's',\n> >>  \tOptListControls = 256,\n> >>  \tOptStrictFormats = 257,","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4CC56BD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Aug 2020 13:15:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EA63960536;\n\tMon,  3 Aug 2020 15:15:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C035C60536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Aug 2020 15:15:50 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3920A560;\n\tMon,  3 Aug 2020 15:15:50 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"M+8s7qbt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1596460550;\n\tbh=vEw3hCXHaY75mxeU4uwgWhRvVgVQ34+lqyy8ojXV1vY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=M+8s7qbtdEjd6qKZQkLY6/MyEatiBACgd9TkPyCDUF/2BnaMh6aZSjNuA5JpZCwUS\n\tCsVj740DSIpdBBMz4kNaxaJ22gn9mjNQxnjqQjSZwLBnL+mt1TZCrlaQmXob7Ln8Kb\n\tHGS4xjS3qNx8QRTsQqeUXhZs9OrhwLQJdetUZGw8=","Date":"Mon, 3 Aug 2020 16:15:39 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20200803131539.GE5926@pendragon.ideasonboard.com>","References":"<20200803124823.82691-1-kieran.bingham@ideasonboard.com>\n\t<20200803130929.GD5926@pendragon.ideasonboard.com>\n\t<680ce7f3-cc82-7efe-b4df-982c761ec443@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<680ce7f3-cc82-7efe-b4df-982c761ec443@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3] cam: Add --monitor option","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]