Patch Detail
Show a patch.
GET /api/patches/504/?format=api
{ "id": 504, "url": "https://patchwork.libcamera.org/api/patches/504/?format=api", "web_url": "https://patchwork.libcamera.org/patch/504/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20190205000702.15370-2-niklas.soderlund@ragnatech.se>", "date": "2019-02-05T00:06:56", "name": "[libcamera-devel,RFC,1/7] libcamera: pipelines: implement start and stop of a camera", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "74af2d65a2a0e6f7ddfc4375c758e7d70304ad28", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": { "id": 16, "url": "https://patchwork.libcamera.org/api/users/16/?format=api", "username": "neg", "first_name": "Niklas", "last_name": "Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "mbox": "https://patchwork.libcamera.org/patch/504/mbox/", "series": [ { "id": 168, "url": "https://patchwork.libcamera.org/api/series/168/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=168", "date": "2019-02-05T00:06:55", "name": "libcamera: extend camera and pipeline to support requests", "version": 1, "mbox": "https://patchwork.libcamera.org/series/168/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/504/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/504/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 58C0160DB8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 5 Feb 2019 01:07:52 +0100 (CET)", "from localhost.localdomain (unknown [81.164.19.127])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 12e273c5-28da-11e9-b530-005056917a89;\n\tTue, 05 Feb 2019 01:07:49 +0100 (CET)" ], "X-Halon-ID": "12e273c5-28da-11e9-b530-005056917a89", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 5 Feb 2019 01:06:56 +0100", "Message-Id": "<20190205000702.15370-2-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190205000702.15370-1-niklas.soderlund@ragnatech.se>", "References": "<20190205000702.15370-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 1/7] libcamera: pipelines: implement start\n\tand stop of a camera", "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": "Tue, 05 Feb 2019 00:07:52 -0000" }, "content": "The camera need methods to start and stop capturing once it have been\nconfigured. Extend the pipeline API to provide this and implement stubs\nin all pipeline handlers.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/include/pipeline_handler.h | 3 +++\n src/libcamera/pipeline/ipu3/ipu3.cpp | 14 ++++++++++++\n src/libcamera/pipeline/uvcvideo.cpp | 14 ++++++++++++\n src/libcamera/pipeline/vimc.cpp | 14 ++++++++++++\n src/libcamera/pipeline_handler.cpp | 27 ++++++++++++++++++++++++\n 5 files changed, 72 insertions(+)", "diff": "diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\nindex b4321f0fa0f765be..4bfe45aaf78e34ab 100644\n--- a/src/libcamera/include/pipeline_handler.h\n+++ b/src/libcamera/include/pipeline_handler.h\n@@ -45,6 +45,9 @@ public:\n \tvirtual int configureStreams(Camera *camera,\n \t\t\t\t std::map<Stream *, StreamConfiguration> &config) = 0;\n \n+\tvirtual int start(const Camera *camera) = 0;\n+\tvirtual void stop(const Camera *camera) = 0;\n+\n \tvirtual bool match(DeviceEnumerator *enumerator) = 0;\n \n protected:\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 7823bbb55d9bde16..3bf196051f2ebdbc 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -34,6 +34,9 @@ public:\n \tint configureStreams(Camera *camera,\n \t\t\t std::map<Stream *, StreamConfiguration> &config) override;\n \n+\tint start(const Camera *camera) override;\n+\tvoid stop(const Camera *camera) override;\n+\n \tbool match(DeviceEnumerator *enumerator);\n \n private:\n@@ -104,6 +107,17 @@ int PipelineHandlerIPU3::configureStreams(Camera *camera,\n \treturn 0;\n }\n \n+int PipelineHandlerIPU3::start(const Camera *camera)\n+{\n+\tLOG(IPU3, Error) << \"TODO: start camera\";\n+\treturn 0;\n+}\n+\n+void PipelineHandlerIPU3::stop(const Camera *camera)\n+{\n+\tLOG(IPU3, Error) << \"TODO: stop camera\";\n+}\n+\n bool PipelineHandlerIPU3::match(DeviceEnumerator *enumerator)\n {\n \tDeviceMatch cio2_dm(\"ipu3-cio2\");\ndiff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\nindex ad4d45d0698519b6..e6a15c58a63cf76b 100644\n--- a/src/libcamera/pipeline/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo.cpp\n@@ -30,6 +30,9 @@ public:\n \tint configureStreams(Camera *camera,\n \t\t\t std::map<Stream *, StreamConfiguration> &config) override;\n \n+\tint start(const Camera *camera) override;\n+\tvoid stop(const Camera *camera) override;\n+\n \tbool match(DeviceEnumerator *enumerator);\n \n private:\n@@ -82,6 +85,17 @@ int PipelineHandlerUVC::configureStreams(Camera *camera,\n \treturn 0;\n }\n \n+int PipelineHandlerUVC::start(const Camera *camera)\n+{\n+\tLOG(UVC, Error) << \"TODO: start camera\";\n+\treturn 0;\n+}\n+\n+void PipelineHandlerUVC::stop(const Camera *camera)\n+{\n+\tLOG(UVC, Error) << \"TODO: stop camera\";\n+}\n+\n bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n {\n \tDeviceMatch dm(\"uvcvideo\");\ndiff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\nindex 900477e257232b70..11eca0cd4d9a6e0c 100644\n--- a/src/libcamera/pipeline/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc.cpp\n@@ -30,6 +30,9 @@ public:\n \tint configureStreams(Camera *camera,\n \t\t\t std::map<Stream *, StreamConfiguration> &config) override;\n \n+\tint start(const Camera *camera) override;\n+\tvoid stop(const Camera *camera) override;\n+\n \tbool match(DeviceEnumerator *enumerator);\n \n private:\n@@ -77,6 +80,17 @@ int PipeHandlerVimc::configureStreams(Camera *camera,\n \treturn 0;\n }\n \n+int PipeHandlerVimc::start(const Camera *camera)\n+{\n+\tLOG(VIMC, Error) << \"TODO: start camera\";\n+\treturn 0;\n+}\n+\n+void PipeHandlerVimc::stop(const Camera *camera)\n+{\n+\tLOG(VIMC, Error) << \"TODO: stop camera\";\n+}\n+\n bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)\n {\n \tDeviceMatch dm(\"vimc\");\ndiff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex 3a560e10c442717f..fa5f780cea34fc8f 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -109,6 +109,33 @@ PipelineHandler::~PipelineHandler()\n * \\return 0 on success or a negative error code on error.\n */\n \n+/**\n+ * \\fn PipelineHandler::start()\n+ * \\brief Start capturing from a group of streams\n+ * \\param[in] camera The camera to start\n+ *\n+ * Start the group of streams that have been configured for capture by\n+ * \\a configureStreams(). The intended caller of this interface is\n+ * the Camera class which will in turn will receive the call from the\n+ * application to indicate that it's done configuring the streams\n+ * and are ready to capture.\n+ *\n+ * \\return 0 on success or a negative error code on error.\n+ */\n+\n+/**\n+ * \\fn PipelineHandler::stop()\n+ * \\brief Stop capturing from all running streams\n+ * \\param[in] camera The camera to stop\n+ *\n+ * Stop processing requests, finish processing all already queued requests\n+ * and once all buffers on all streams have been dequeued stop capturing\n+ * from all running streams. Finish processing of queued requests do not\n+ * necessarily involve processing them by the capture hardware but notifying\n+ * the application that a queued request was not processed due to the fact\n+ * that the camera was stopped before they could be processed.\n+ */\n+\n /**\n * \\fn PipelineHandler::match(DeviceEnumerator *enumerator)\n * \\brief Match media devices and create camera instances\n", "prefixes": [ "libcamera-devel", "RFC", "1/7" ] }