[{"id":2471,"web_url":"https://patchwork.libcamera.org/comment/2471/","msgid":"<20190819085749.2nw3o2pkllrhrn3v@uno.localdomain>","date":"2019-08-19T08:57:49","subject":"Re: [libcamera-devel] [PATCH 02/14] libcamera: proxy: Get event\n\tdispatcher from current thread","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Sun, Aug 18, 2019 at 04:13:17AM +0300, Laurent Pinchart wrote:\n> Get the event dispatcher from the current thread instead of the camera\n> manager. This prepares for the removal of CameraManager::instance().\n>\n\nRegardless the outcome of the discussion on the\nCameraManager::instance() method, I think this is a good change.\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> index c43b088ac39c..ffba3ae4de80 100644\n> --- a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> +++ b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> @@ -9,7 +9,6 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include <libcamera/camera_manager.h>\n>  #include <libcamera/event_dispatcher.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/logging.h>\n> @@ -17,6 +16,7 @@\n>  #include \"ipa_module.h\"\n>  #include \"ipc_unixsocket.h\"\n>  #include \"log.h\"\n> +#include \"thread.h\"\n>  #include \"utils.h\"\n>\n>  using namespace libcamera;\n> @@ -81,7 +81,7 @@ int main(int argc, char **argv)\n>  \tLOG(IPAProxyLinuxWorker, Debug) << \"Proxy worker successfully started\";\n>\n>  \t/* \\todo upgrade listening loop */\n> -\tEventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();\n> +\tEventDispatcher *dispatcher = Thread::current()->eventDispatcher();\n>  \twhile (1)\n>  \t\tdispatcher->processEvents();\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8C76A60E38\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 Aug 2019 10:56:21 +0200 (CEST)","from uno.localdomain (unknown [87.18.63.98])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id D2B52E000B;\n\tMon, 19 Aug 2019 08:56:20 +0000 (UTC)"],"X-Originating-IP":"87.18.63.98","Date":"Mon, 19 Aug 2019 10:57:49 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190819085749.2nw3o2pkllrhrn3v@uno.localdomain>","References":"<20190818011329.14499-1-laurent.pinchart@ideasonboard.com>\n\t<20190818011329.14499-3-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"iyjcebo3hly5octv\"","Content-Disposition":"inline","In-Reply-To":"<20190818011329.14499-3-laurent.pinchart@ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 02/14] libcamera: proxy: Get event\n\tdispatcher from current thread","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Mon, 19 Aug 2019 08:56:21 -0000"}}]