{"id":433,"url":"https://patchwork.libcamera.org/api/patches/433/?format=json","web_url":"https://patchwork.libcamera.org/patch/433/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190129020048.16774-2-niklas.soderlund@ragnatech.se>","date":"2019-01-29T02:00:43","name":"[libcamera-devel,v4,1/6] libcamera: stream: add initial Stream class","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"5a8808cef8515f4bdd0b952ce47a3729d466b4e4","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/433/mbox/","series":[{"id":153,"url":"https://patchwork.libcamera.org/api/series/153/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=153","date":"2019-01-29T02:00:43","name":"libcamera: add basic support for streams and format configuration","version":4,"mbox":"https://patchwork.libcamera.org/series/153/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/433/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/433/checks/","tags":{},"headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6AC6D60C78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Jan 2019 03:00:57 +0100 (CET)","from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid b661710e-2369-11e9-874f-005056917f90;\n\tTue, 29 Jan 2019 03:00:55 +0100 (CET)"],"X-Halon-ID":"b661710e-2369-11e9-874f-005056917f90","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, 29 Jan 2019 03:00:43 +0100","Message-Id":"<20190129020048.16774-2-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20190129020048.16774-1-niklas.soderlund@ragnatech.se>","References":"<20190129020048.16774-1-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 1/6] libcamera: stream: add initial\n\tStream class","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, 29 Jan 2019 02:00:57 -0000"},"content":"Add an initial Stream implementation. The idea is that once capability\nsupport is added to the library each stream will describe its\ncapabilities using this class. An application will then select one or\nmore streams based on these capabilities and use them to configure the\ncamera and capture.\n\nAt this stage the Stream class is empty as capabilities are yet to be\nadded. The class is still useful as it will be used to communicate how\nmany streams a Camera object provides.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/libcamera.h |  1 +\n include/libcamera/meson.build |  1 +\n include/libcamera/stream.h    | 18 +++++++++++++\n src/libcamera/meson.build     |  1 +\n src/libcamera/stream.cpp      | 51 +++++++++++++++++++++++++++++++++++\n 5 files changed, 72 insertions(+)\n create mode 100644 include/libcamera/stream.h\n create mode 100644 src/libcamera/stream.cpp","diff":"diff --git a/include/libcamera/libcamera.h b/include/libcamera/libcamera.h\nindex c0511cf6d662b63f..272dfd5e4a67d5de 100644\n--- a/include/libcamera/libcamera.h\n+++ b/include/libcamera/libcamera.h\n@@ -12,6 +12,7 @@\n #include <libcamera/event_dispatcher.h>\n #include <libcamera/event_notifier.h>\n #include <libcamera/signal.h>\n+#include <libcamera/stream.h>\n #include <libcamera/timer.h>\n \n #endif /* __LIBCAMERA_LIBCAMERA_H__ */\ndiff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex d7cb55ba4a49e1e8..54a680787e5c17aa 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -5,6 +5,7 @@ libcamera_api = files([\n     'event_notifier.h',\n     'libcamera.h',\n     'signal.h',\n+    'stream.h',\n     'timer.h',\n ])\n \ndiff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nnew file mode 100644\nindex 0000000000000000..4f47d85ed6382b36\n--- /dev/null\n+++ b/include/libcamera/stream.h\n@@ -0,0 +1,18 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * stream.h - Video stream for a Camera\n+ */\n+#ifndef __LIBCAMERA_STREAM_H__\n+#define __LIBCAMERA_STREAM_H__\n+\n+namespace libcamera {\n+\n+class Stream final\n+{\n+};\n+\n+} /* namespace libcamera */\n+\n+#endif /* __LIBCAMERA_STREAM_H__ */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex f9f25c0ecf1564cc..9f6ff99eebe2f5bc 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -10,6 +10,7 @@ libcamera_sources = files([\n     'media_object.cpp',\n     'pipeline_handler.cpp',\n     'signal.cpp',\n+    'stream.cpp',\n     'timer.cpp',\n     'v4l2_device.cpp',\n ])\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nnew file mode 100644\nindex 0000000000000000..01f4e5008af8ac46\n--- /dev/null\n+++ b/src/libcamera/stream.cpp\n@@ -0,0 +1,51 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * stream.cpp - Video stream for a Camera\n+ */\n+\n+#include <libcamera/stream.h>\n+\n+/**\n+ * \\file stream.h\n+ * \\brief Video stream for a Camera\n+ *\n+ * A camera device can provide frames in different resolutions and formats\n+ * concurrently from a single image source. The Stream class represents\n+ * one of the multiple concurrent streams.\n+ *\n+ * All streams exposed by a camera device share the same image source and are\n+ * thus not fully independent. Parameters related to the image source, such as\n+ * the exposure time or flash control, are common to all streams. Other\n+ * parameters, such as format or resolution, may be specified per-stream,\n+ * depending on the capabilities of the camera device.\n+ *\n+ * Camera devices expose at least one stream, and may expose additional streams\n+ * based on the device capabilities. This can be used, for instance, to\n+ * implement concurrent viewfinder and video capture, or concurrent viewfinder,\n+ * video capture and still image capture.\n+ */\n+\n+namespace libcamera {\n+\n+/**\n+ * \\class Stream\n+ * \\brief Video stream for a camera\n+ *\n+ * The Stream class models of all static information which are associated\n+ * with a single video stream. Stream are exposed by the Camera object they\n+ * belong to.\n+ *\n+ * Some cameras are capable of supplying more then one stream from the same\n+ * video source. In such cases an application can inspect all available streams\n+ * and select the ones that best fit its use case.\n+ *\n+ * \\todo Add capabilities to the stream API. Without this the Stream class only\n+ * serves to reveal how many streams of unknown capabilities a camera supports.\n+ * This in itself is productive as it allows applications to configure and\n+ * capture from one or more streams even if they won't be able to select the\n+ * optimal stream for the task.\n+ */\n+\n+} /* namespace libcamera */\n","prefixes":["libcamera-devel","v4","1/6"]}