[{"id":1774,"web_url":"https://patchwork.libcamera.org/comment/1774/","msgid":"<20190605161806.GR32191@localhost.localdomain>","date":"2019-06-05T16:18:06","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline_handler: Optimise\n\tfactory implementation","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn Wed, Jun 05, 2019 at 05:54:13PM +0300, Laurent Pinchart wrote:\n> The REGISTER_PIPELINE_HANDLER() macro defines and instantiates a\n> subclass of the PipelineHandlerFactory class that specialises the\n> virtual create() method. Now that create() does more than just creating\n> an instance, boilerplate code gets duplicated between different\n> factories.\n> \n> Factor out the instance creation code to a new virtual createInstance()\n> method, and turn create() into a non-virtual method of the base class\n> that can then be defined in the .cpp file.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/include/pipeline_handler.h | 11 +++-----\n>  src/libcamera/pipeline_handler.cpp       | 33 +++++++++++++-----------\n>  2 files changed, 22 insertions(+), 22 deletions(-)\n> \n> diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\n> index 84307e408772..36f0b84c0d6c 100644\n> --- a/src/libcamera/include/pipeline_handler.h\n> +++ b/src/libcamera/include/pipeline_handler.h\n> @@ -107,7 +107,7 @@ public:\n>  \tPipelineHandlerFactory(const char *name);\n>  \tvirtual ~PipelineHandlerFactory() { };\n>  \n> -\tvirtual std::shared_ptr<PipelineHandler> create(CameraManager *manager) = 0;\n> +\tstd::shared_ptr<PipelineHandler> create(CameraManager *manager);\n>  \n>  \tconst std::string &name() const { return name_; }\n>  \n> @@ -115,7 +115,7 @@ public:\n>  \tstatic std::vector<PipelineHandlerFactory *> &factories();\n>  \n>  protected:\n> -\tvoid setInfo(PipelineHandler *handler, const char *name);\n> +\tvirtual PipelineHandler *createInstance(CameraManager *manager) = 0;\n\nI guess I didn't notice this when I wrote it in the first place, but\ndoes this need to be protected rather than private?\n\n>  private:\n>  \tstd::string name_;\n> @@ -126,12 +126,9 @@ class handler##Factory final : public PipelineHandlerFactory\t\t\\\n>  {\t\t\t\t\t\t\t\t\t\\\n>  public:\t\t\t\t\t\t\t\t\t\\\n>  \thandler##Factory() : PipelineHandlerFactory(#handler) {}\t\\\n> -\tstd::shared_ptr<PipelineHandler> create(CameraManager *manager)\t\\\n> +\tPipelineHandler *createInstance(CameraManager *manager)\t\t\\\n>  \t{\t\t\t\t\t\t\t\t\\\n> -\t\tstd::shared_ptr<handler> h =\t\t\t\t\\\n> -\t\t\tstd::make_shared<handler>(manager);\t\t\\\n> -\t\tsetInfo(h.get(), #handler);\t\t\t\t\\\n> -\t\treturn h;\t\t\t\t\t\t\\\n> +\t\treturn new handler(manager);\t\t\t\t\\\n>  \t}\t\t\t\t\t\t\t\t\\\n>  };\t\t\t\t\t\t\t\t\t\\\n>  static handler##Factory global_##handler##Factory;\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index 800931d81337..af19f4a33187 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -539,17 +539,18 @@ PipelineHandlerFactory::PipelineHandlerFactory(const char *name)\n>  }\n>  \n>  /**\n> - * \\fn PipelineHandlerFactory::create()\n>   * \\brief Create an instance of the PipelineHandler corresponding to the factory\n>   * \\param[in] manager The camera manager\n>   *\n> - * This virtual function is implemented by the REGISTER_PIPELINE_HANDLER()\n> - * macro. It creates a pipeline handler instance associated with the camera\n> - * \\a manager.\n> - *\n> - * \\return a pointer to a newly constructed instance of the PipelineHandler\n> - * subclass corresponding to the factory\n> + * \\return A shared pointer to a new instance of the PipelineHandler subclass\n> + * corresponding to the factory\n>   */\n> +std::shared_ptr<PipelineHandler> PipelineHandlerFactory::create(CameraManager *manager)\n> +{\n> +\tPipelineHandler *handler = createInstance(manager);\n> +\thandler->name_ = name_.c_str();\n> +\treturn std::shared_ptr<PipelineHandler>(handler);\n> +}\n>  \n>  /**\n>   * \\fn PipelineHandlerFactory::name()\n> @@ -589,15 +590,17 @@ std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::factories()\n>  }\n>  \n>  /**\n> - * \\brief Set the information of a given pipeline handler\n> - * \\param[in] handler The handler whose info is to be set\n> - * \\param[in] name The name of the pipeline handler\n> + * \\fn PipelineHandlerFactory::createInstance()\n> + * \\brief Create an instance of the PipelineHandler corresponding to the factory\n> + * \\param[in] manager The camera manager\n> + *\n> + * This virtual function is implemented by the REGISTER_PIPELINE_HANDLER()\n> + * macro. It creates a pipeline handler instance associated with the camera\n> + * \\a manager.\n> + *\n> + * \\return a pointer to a newly constructed instance of the PipelineHandler\n> + * subclass corresponding to the factory\n>   */\n> -void PipelineHandlerFactory::setInfo(PipelineHandler *handler,\n> -\t\t\t\t     const char *name)\n> -{\n> -\thandler->name_ = name;\n> -}\n>  \n>  /**\n>   * \\def REGISTER_PIPELINE_HANDLER\n\nThanks,\n\nPaul","headers":{"Return-Path":"<paul.elder@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20233664FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Jun 2019 18:18:14 +0200 (CEST)","from localhost.localdomain (unknown [96.44.9.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5C87884;\n\tWed,  5 Jun 2019 18:18:13 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559751493;\n\tbh=C+5k+aKYBOARn7/kIrABAY89kiHZRW03QKKu4+2+ezo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Nb/eQ3UhWOa6aSLDZRMHZMn1PNMg4l/jcZ+5o71l8ljGEdRr0vd2TturF3yUK8cvj\n\tVF5DxTMa+mqzRiFHU/p4CrPHGHEMHgpkNZEotOEiituZ7JRA+hpHq5xvnqeBXmwkdJ\n\tZQlr2vR0YdyCyH2P2LImzt0js4+Lvue7Lt83tvfg=","Date":"Wed, 5 Jun 2019 12:18:06 -0400","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190605161806.GR32191@localhost.localdomain>","References":"<20190605145413.9888-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20190605145413.9888-1-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline_handler: Optimise\n\tfactory implementation","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":"Wed, 05 Jun 2019 16:18:14 -0000"}},{"id":1775,"web_url":"https://patchwork.libcamera.org/comment/1775/","msgid":"<20190606072553.GC4931@pendragon.ideasonboard.com>","date":"2019-06-06T07:25:53","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline_handler: Optimise\n\tfactory implementation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Wed, Jun 05, 2019 at 12:18:06PM -0400, Paul Elder wrote:\n> On Wed, Jun 05, 2019 at 05:54:13PM +0300, Laurent Pinchart wrote:\n> > The REGISTER_PIPELINE_HANDLER() macro defines and instantiates a\n> > subclass of the PipelineHandlerFactory class that specialises the\n> > virtual create() method. Now that create() does more than just creating\n> > an instance, boilerplate code gets duplicated between different\n> > factories.\n> > \n> > Factor out the instance creation code to a new virtual createInstance()\n> > method, and turn create() into a non-virtual method of the base class\n> > that can then be defined in the .cpp file.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/libcamera/include/pipeline_handler.h | 11 +++-----\n> >  src/libcamera/pipeline_handler.cpp       | 33 +++++++++++++-----------\n> >  2 files changed, 22 insertions(+), 22 deletions(-)\n> > \n> > diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\n> > index 84307e408772..36f0b84c0d6c 100644\n> > --- a/src/libcamera/include/pipeline_handler.h\n> > +++ b/src/libcamera/include/pipeline_handler.h\n> > @@ -107,7 +107,7 @@ public:\n> >  \tPipelineHandlerFactory(const char *name);\n> >  \tvirtual ~PipelineHandlerFactory() { };\n> >  \n> > -\tvirtual std::shared_ptr<PipelineHandler> create(CameraManager *manager) = 0;\n> > +\tstd::shared_ptr<PipelineHandler> create(CameraManager *manager);\n> >  \n> >  \tconst std::string &name() const { return name_; }\n> >  \n> > @@ -115,7 +115,7 @@ public:\n> >  \tstatic std::vector<PipelineHandlerFactory *> &factories();\n> >  \n> >  protected:\n> > -\tvoid setInfo(PipelineHandler *handler, const char *name);\n> > +\tvirtual PipelineHandler *createInstance(CameraManager *manager) = 0;\n> \n> I guess I didn't notice this when I wrote it in the first place, but\n> does this need to be protected rather than private?\n\nsetInfo() needed to be protected as it was called by derived classes,\nbut createInstance() can be private indeed. I'll fix this.\n\n> >  private:\n> >  \tstd::string name_;\n> > @@ -126,12 +126,9 @@ class handler##Factory final : public PipelineHandlerFactory\t\t\\\n> >  {\t\t\t\t\t\t\t\t\t\\\n> >  public:\t\t\t\t\t\t\t\t\t\\\n> >  \thandler##Factory() : PipelineHandlerFactory(#handler) {}\t\\\n> > -\tstd::shared_ptr<PipelineHandler> create(CameraManager *manager)\t\\\n> > +\tPipelineHandler *createInstance(CameraManager *manager)\t\t\\\n> >  \t{\t\t\t\t\t\t\t\t\\\n> > -\t\tstd::shared_ptr<handler> h =\t\t\t\t\\\n> > -\t\t\tstd::make_shared<handler>(manager);\t\t\\\n> > -\t\tsetInfo(h.get(), #handler);\t\t\t\t\\\n> > -\t\treturn h;\t\t\t\t\t\t\\\n> > +\t\treturn new handler(manager);\t\t\t\t\\\n> >  \t}\t\t\t\t\t\t\t\t\\\n> >  };\t\t\t\t\t\t\t\t\t\\\n> >  static handler##Factory global_##handler##Factory;\n> > diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> > index 800931d81337..af19f4a33187 100644\n> > --- a/src/libcamera/pipeline_handler.cpp\n> > +++ b/src/libcamera/pipeline_handler.cpp\n> > @@ -539,17 +539,18 @@ PipelineHandlerFactory::PipelineHandlerFactory(const char *name)\n> >  }\n> >  \n> >  /**\n> > - * \\fn PipelineHandlerFactory::create()\n> >   * \\brief Create an instance of the PipelineHandler corresponding to the factory\n> >   * \\param[in] manager The camera manager\n> >   *\n> > - * This virtual function is implemented by the REGISTER_PIPELINE_HANDLER()\n> > - * macro. It creates a pipeline handler instance associated with the camera\n> > - * \\a manager.\n> > - *\n> > - * \\return a pointer to a newly constructed instance of the PipelineHandler\n> > - * subclass corresponding to the factory\n> > + * \\return A shared pointer to a new instance of the PipelineHandler subclass\n> > + * corresponding to the factory\n> >   */\n> > +std::shared_ptr<PipelineHandler> PipelineHandlerFactory::create(CameraManager *manager)\n> > +{\n> > +\tPipelineHandler *handler = createInstance(manager);\n> > +\thandler->name_ = name_.c_str();\n> > +\treturn std::shared_ptr<PipelineHandler>(handler);\n> > +}\n> >  \n> >  /**\n> >   * \\fn PipelineHandlerFactory::name()\n> > @@ -589,15 +590,17 @@ std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::factories()\n> >  }\n> >  \n> >  /**\n> > - * \\brief Set the information of a given pipeline handler\n> > - * \\param[in] handler The handler whose info is to be set\n> > - * \\param[in] name The name of the pipeline handler\n> > + * \\fn PipelineHandlerFactory::createInstance()\n> > + * \\brief Create an instance of the PipelineHandler corresponding to the factory\n> > + * \\param[in] manager The camera manager\n> > + *\n> > + * This virtual function is implemented by the REGISTER_PIPELINE_HANDLER()\n> > + * macro. It creates a pipeline handler instance associated with the camera\n> > + * \\a manager.\n> > + *\n> > + * \\return a pointer to a newly constructed instance of the PipelineHandler\n> > + * subclass corresponding to the factory\n> >   */\n> > -void PipelineHandlerFactory::setInfo(PipelineHandler *handler,\n> > -\t\t\t\t     const char *name)\n> > -{\n> > -\thandler->name_ = name;\n> > -}\n> >  \n> >  /**\n> >   * \\def REGISTER_PIPELINE_HANDLER\n> \n> Thanks,\n> \n> Paul","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 68EA2675E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Jun 2019 09:26:07 +0200 (CEST)","from pendragon.ideasonboard.com (unknown\n\t[IPv6:2a02:a03f:44f0:8500:ca05:8177:199c:fed4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ED3D884;\n\tThu,  6 Jun 2019 09:26:06 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559805967;\n\tbh=khjyzP/AN+yCviYyevAnXS6rKsTzvaUliEks16gZXDc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SAUFuTkpzvIU3lu8S12LUi3KlSjiLedYVdDfxRfQACPP0Pa1+/504T5PgmfdX/0sM\n\tZLchYfw1yOCyhREW5qmkeaPKhtmfB4zjVct8EcgE1khISxyD3I+VhfrzN7pfVZQg01\n\tZs/DZ4xoAGUCYGNBMXAa/6G0ZTW+I5V1ZP5nM9NY=","Date":"Thu, 6 Jun 2019 10:25:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190606072553.GC4931@pendragon.ideasonboard.com>","References":"<20190605145413.9888-1-laurent.pinchart@ideasonboard.com>\n\t<20190605161806.GR32191@localhost.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190605161806.GR32191@localhost.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline_handler: Optimise\n\tfactory implementation","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":"Thu, 06 Jun 2019 07:26:07 -0000"}},{"id":1827,"web_url":"https://patchwork.libcamera.org/comment/1827/","msgid":"<20190610115920.GB1362@bigcity.dyn.berto.se>","date":"2019-06-10T11:59:20","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline_handler: Optimise\n\tfactory implementation","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2019-06-05 17:54:13 +0300, Laurent Pinchart wrote:\n> The REGISTER_PIPELINE_HANDLER() macro defines and instantiates a\n> subclass of the PipelineHandlerFactory class that specialises the\n> virtual create() method. Now that create() does more than just creating\n> an instance, boilerplate code gets duplicated between different\n> factories.\n> \n> Factor out the instance creation code to a new virtual createInstance()\n> method, and turn create() into a non-virtual method of the base class\n> that can then be defined in the .cpp file.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI like that this both becomes simpler to read and less duplication. With \nthe protected/private comment Paul points out,\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/include/pipeline_handler.h | 11 +++-----\n>  src/libcamera/pipeline_handler.cpp       | 33 +++++++++++++-----------\n>  2 files changed, 22 insertions(+), 22 deletions(-)\n> \n> diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\n> index 84307e408772..36f0b84c0d6c 100644\n> --- a/src/libcamera/include/pipeline_handler.h\n> +++ b/src/libcamera/include/pipeline_handler.h\n> @@ -107,7 +107,7 @@ public:\n>  \tPipelineHandlerFactory(const char *name);\n>  \tvirtual ~PipelineHandlerFactory() { };\n>  \n> -\tvirtual std::shared_ptr<PipelineHandler> create(CameraManager *manager) = 0;\n> +\tstd::shared_ptr<PipelineHandler> create(CameraManager *manager);\n>  \n>  \tconst std::string &name() const { return name_; }\n>  \n> @@ -115,7 +115,7 @@ public:\n>  \tstatic std::vector<PipelineHandlerFactory *> &factories();\n>  \n>  protected:\n> -\tvoid setInfo(PipelineHandler *handler, const char *name);\n> +\tvirtual PipelineHandler *createInstance(CameraManager *manager) = 0;\n>  \n>  private:\n>  \tstd::string name_;\n> @@ -126,12 +126,9 @@ class handler##Factory final : public PipelineHandlerFactory\t\t\\\n>  {\t\t\t\t\t\t\t\t\t\\\n>  public:\t\t\t\t\t\t\t\t\t\\\n>  \thandler##Factory() : PipelineHandlerFactory(#handler) {}\t\\\n> -\tstd::shared_ptr<PipelineHandler> create(CameraManager *manager)\t\\\n> +\tPipelineHandler *createInstance(CameraManager *manager)\t\t\\\n>  \t{\t\t\t\t\t\t\t\t\\\n> -\t\tstd::shared_ptr<handler> h =\t\t\t\t\\\n> -\t\t\tstd::make_shared<handler>(manager);\t\t\\\n> -\t\tsetInfo(h.get(), #handler);\t\t\t\t\\\n> -\t\treturn h;\t\t\t\t\t\t\\\n> +\t\treturn new handler(manager);\t\t\t\t\\\n>  \t}\t\t\t\t\t\t\t\t\\\n>  };\t\t\t\t\t\t\t\t\t\\\n>  static handler##Factory global_##handler##Factory;\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index 800931d81337..af19f4a33187 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -539,17 +539,18 @@ PipelineHandlerFactory::PipelineHandlerFactory(const char *name)\n>  }\n>  \n>  /**\n> - * \\fn PipelineHandlerFactory::create()\n>   * \\brief Create an instance of the PipelineHandler corresponding to the factory\n>   * \\param[in] manager The camera manager\n>   *\n> - * This virtual function is implemented by the REGISTER_PIPELINE_HANDLER()\n> - * macro. It creates a pipeline handler instance associated with the camera\n> - * \\a manager.\n> - *\n> - * \\return a pointer to a newly constructed instance of the PipelineHandler\n> - * subclass corresponding to the factory\n> + * \\return A shared pointer to a new instance of the PipelineHandler subclass\n> + * corresponding to the factory\n>   */\n> +std::shared_ptr<PipelineHandler> PipelineHandlerFactory::create(CameraManager *manager)\n> +{\n> +\tPipelineHandler *handler = createInstance(manager);\n> +\thandler->name_ = name_.c_str();\n> +\treturn std::shared_ptr<PipelineHandler>(handler);\n> +}\n>  \n>  /**\n>   * \\fn PipelineHandlerFactory::name()\n> @@ -589,15 +590,17 @@ std::vector<PipelineHandlerFactory *> &PipelineHandlerFactory::factories()\n>  }\n>  \n>  /**\n> - * \\brief Set the information of a given pipeline handler\n> - * \\param[in] handler The handler whose info is to be set\n> - * \\param[in] name The name of the pipeline handler\n> + * \\fn PipelineHandlerFactory::createInstance()\n> + * \\brief Create an instance of the PipelineHandler corresponding to the factory\n> + * \\param[in] manager The camera manager\n> + *\n> + * This virtual function is implemented by the REGISTER_PIPELINE_HANDLER()\n> + * macro. It creates a pipeline handler instance associated with the camera\n> + * \\a manager.\n> + *\n> + * \\return a pointer to a newly constructed instance of the PipelineHandler\n> + * subclass corresponding to the factory\n>   */\n> -void PipelineHandlerFactory::setInfo(PipelineHandler *handler,\n> -\t\t\t\t     const char *name)\n> -{\n> -\thandler->name_ = name;\n> -}\n>  \n>  /**\n>   * \\def REGISTER_PIPELINE_HANDLER\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":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5D8B7636B4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Jun 2019 13:59:22 +0200 (CEST)","by mail-lj1-x241.google.com with SMTP id 16so7636198ljv.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Jun 2019 04:59:22 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tr2sm1965445lfi.51.2019.06.10.04.59.20\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tMon, 10 Jun 2019 04:59:20 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=zzshOxiZ8TBNq6fxkCqLgbKnOnSaDOyObO1dwSv7zEM=;\n\tb=KQ3K7BVqi7V9UVWZkFg7v/OvHnWxEBTn2ruLGRvkn7sd8gOAMCjwNw3yZWyDNO53nL\n\thQ8BPqEM1mxd1QC1xt+QUrw+VPnjphWe0HzXafeo+PcS1wzhinnqD0s5oa8fsNbx85Ra\n\tHXDREGvJ8Suo4UNbiL6R36zjcoSvzULTTY5PsgF8sEAiKP5KuwqadNlGXFMlXWl7Xdcj\n\tmZMdSOhxAwq4hjR2qFaFYLq0SBBip38mjuk7eueDQiMOS5vtmsjv5+0Blnq3ULt2L7Hy\n\tpsKKHHHXrBRzNxSAC9/8BZl7cehlb5KvrdBDFeWUpo620FJsqNwPGrJJjXH+MNHYSafP\n\tF1/g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=zzshOxiZ8TBNq6fxkCqLgbKnOnSaDOyObO1dwSv7zEM=;\n\tb=jMC1ru1uvNSm/qhurWxUeDMMJthtNeug4qv/MsBG/Ob+gl5/DYAjSVh0lMO6kyp2Wz\n\tAZMllvot4vfuSZN7ly1iuLlYbf/3WjsKrCi/vKEsW2Ok/33tbyYTPETdpRXiRcxp9+xG\n\tItBtxO/h3HM7Fpu/wp0acVly5gZ23eoGxcAcjKzF+nKWBcWKHKZdushE7wOXJhkUwI9+\n\t6xXXLRzKvUUclWxnA26sfBIdJz1kI6kG9Q+F0bEhahZ/cbvolHAR3H5AAvaqEddXuynQ\n\touQFhkSEkTtEvDmrmsrb1hYtptdDjo6WRMQM3DyU8Mo39qC/4S1krrwla6RRSk060EOL\n\tKxug==","X-Gm-Message-State":"APjAAAWLjbMnLkO4iSpnbxIVRyZ3BRycM586IeXuk81Dc5HEx7MY4+rE\n\tPiZq+efqnDcS5yO5JA5lV0awYmrqgqk=","X-Google-Smtp-Source":"APXvYqzvuCXdnbRaRiL3Ai6pLR/BdWuBfi6x8m2nA66Ct7N2nghiGUJZ9sZG6YzNqHlxD6sHH7jSuA==","X-Received":"by 2002:a2e:3913:: with SMTP id\n\tg19mr21344952lja.212.1560167961534; \n\tMon, 10 Jun 2019 04:59:21 -0700 (PDT)","Date":"Mon, 10 Jun 2019 13:59:20 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190610115920.GB1362@bigcity.dyn.berto.se>","References":"<20190605145413.9888-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190605145413.9888-1-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.11.4 (2019-03-13)","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline_handler: Optimise\n\tfactory implementation","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, 10 Jun 2019 11:59:22 -0000"}}]