{"id":18090,"url":"https://patchwork.libcamera.org/api/patches/18090/?format=json","web_url":"https://patchwork.libcamera.org/patch/18090/","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":"<20230105043726.679968-5-chenghaoyang@google.com>","date":"2023-01-05T04:37:21","name":"[libcamera-devel,v3,4/9] libcamera: Add MediaDeviceVirtual","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"8796ef379713214eca45e8552d0aa8dbbba7056a","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/?format=json","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18090/mbox/","series":[{"id":3700,"url":"https://patchwork.libcamera.org/api/series/3700/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3700","date":"2023-01-05T04:37:17","name":"Virtual pipeline handler","version":3,"mbox":"https://patchwork.libcamera.org/series/3700/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18090/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18090/checks/","tags":{},"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 C8E0EC322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Jan 2023 04:38:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B54D625EC;\n\tThu,  5 Jan 2023 05:38:03 +0100 (CET)","from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com\n\t[IPv6:2607:f8b0:4864:20::1031])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6C001625E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Jan 2023 05:37:59 +0100 (CET)","by mail-pj1-x1031.google.com with SMTP id\n\to8-20020a17090a9f8800b00223de0364beso840675pjp.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 04 Jan 2023 20:37:59 -0800 (PST)","from chenghaoyang-low.c.googlers.com.com\n\t(46.165.189.35.bc.googleusercontent.com. [35.189.165.46])\n\tby smtp.gmail.com with ESMTPSA id\n\tx23-20020a170902b41700b00188c5f0f9e9sm25015200plr.199.2023.01.04.20.37.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 04 Jan 2023 20:37:57 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1672893483;\n\tbh=GuNBnM8YIli9LjDmGBD2BKFpxdW99EHNF6km73MzBEI=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=u1/es4ChIgZtCt9EpCE3YapZIRfEMY8Yne92OQBPvV9P+HjMC+dAFo6njLQuEWhl6\n\tP5O1vYaLdRhFVCQaKhmqsae9Y43TH7csvUPkaSmS/1yYnt38TpwZWongig3vPuLS5J\n\t8aJ8a+EI6JPwPFzrFJ8FSez+QxoD30/SvfI3GOIxMd1L3lvQ45cBtSrYjhOeZDLQT5\n\tY89K4h8viLNiuz+/M97badTCIVyifxj3unMsTM/swrSZra30fDBs64ZefI7YP6bcDr\n\tHilVM6u+an8tox90fRtCMIprx5u8F/tBySy7oAl0EEN3yErFLY6dwU+23GPUcMeqDh\n\teIOAx1p82Onzg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Mg6Iz7qLMP0weZtSTHRkUsspe/eNv2wxFErm5THQt1M=;\n\tb=FvOQpoWhCU7f3uF8oZKbJvOCvKj8kmWkNYAU+pseX/U7h5BdFPgEryZIRkBP13TLQ6\n\tkXnikD+buvsqqQTHdmuw331ZkredczNA7VPO7x8CyYP7kInY27+bU86eDaxrMJv1RuAr\n\tIfBFe7vSxoTUQOOTA3gW/35LLv+bfcpuMT7AI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"FvOQpoWh\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=Mg6Iz7qLMP0weZtSTHRkUsspe/eNv2wxFErm5THQt1M=;\n\tb=jpS69gus/hVdP6LUAPLjUeUZhw3CCVlg2WdzbXAu3i3gfjO5Gpv8hMPdt/C/6XFZpx\n\tJlFLNJqgSQbiDy64IHWJwqHuh0hxrbBlkSzXjy9GtBPrBrZsXbBFXgeAlM926ulCYZOn\n\tKyHTiXLKcrl9TJWwjLh96OCbZe6Jrm+kW9oFNdgZlbWO41XDrx3K7zhX6wbVa8BcQFNt\n\tBkl+D5eYhSWJp89U3T3kdyMZCsos2BjrOogc+BXC4+9KBo/wzA70QuT+VqKgDsnUhWv7\n\tHJXoujz8kDY9KrPyL+1HPt0rvdpDjm4e2Mn5DKAPL2lt2Cl7rbLhtiBoFE+Mf2YIsO/x\n\tP1TQ==","X-Gm-Message-State":"AFqh2kqRAPQCGV4u2XxYDKqR6u/0XPNN1hbFHhnBcoKxRUKQVadv60sV\n\tmJucqrnDQKVly/cCG0a2jvufetzpOo7xoliF","X-Google-Smtp-Source":"AMrXdXs3lDNnYgemXmBtGBAx681x2UDcEf5dYsJa8qLN76tVCU1ZEaVfCevhedisAvpp/QP3TUpt3g==","X-Received":"by 2002:a17:902:ccc1:b0:189:5ff5:eb92 with SMTP id\n\tz1-20020a170902ccc100b001895ff5eb92mr66563977ple.39.1672893477838; \n\tWed, 04 Jan 2023 20:37:57 -0800 (PST)","X-Google-Original-From":"Harvey Yang <chenghaoyang@google.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  5 Jan 2023 04:37:21 +0000","Message-Id":"<20230105043726.679968-5-chenghaoyang@google.com>","X-Mailer":"git-send-email 2.39.0.314.g84b9a713c41-goog","In-Reply-To":"<20230105043726.679968-1-chenghaoyang@google.com>","References":"<20230105043726.679968-1-chenghaoyang@google.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 4/9] libcamera: Add MediaDeviceVirtual","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>","From":"Harvey Yang via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Harvey Yang <chenghaoyang@chromium.org>","Cc":"Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a dummy class MediaDeviceVirtual, which will be used in the virtual\npipeline handler and unit tests.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n .../libcamera/internal/media_device_virtual.h | 21 ++++++++++++++++++\n include/libcamera/internal/meson.build        |  1 +\n src/libcamera/media_device_virtual.cpp        | 22 +++++++++++++++++++\n src/libcamera/meson.build                     |  1 +\n 4 files changed, 45 insertions(+)\n create mode 100644 include/libcamera/internal/media_device_virtual.h\n create mode 100644 src/libcamera/media_device_virtual.cpp","diff":"diff --git a/include/libcamera/internal/media_device_virtual.h b/include/libcamera/internal/media_device_virtual.h\nnew file mode 100644\nindex 00000000..f1b48b20\n--- /dev/null\n+++ b/include/libcamera/internal/media_device_virtual.h\n@@ -0,0 +1,21 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2022, Google Inc.\n+ *\n+ * media_device.h - Media device handler\n+ */\n+\n+#pragma once\n+\n+#include \"libcamera/internal/media_device_base.h\"\n+\n+namespace libcamera {\n+\n+class MediaDeviceVirtual : public MediaDeviceBase\n+{\n+public:\n+\tMediaDeviceVirtual(const std::string &deviceNode);\n+\t~MediaDeviceVirtual();\n+};\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\nindex 826a241c..9deebd01 100644\n--- a/include/libcamera/internal/meson.build\n+++ b/include/libcamera/internal/meson.build\n@@ -32,6 +32,7 @@ libcamera_internal_headers = files([\n     'mapped_framebuffer.h',\n     'media_device.h',\n     'media_device_base.h',\n+    'media_device_virtual.h',\n     'media_object.h',\n     'pipeline_handler.h',\n     'process.h',\ndiff --git a/src/libcamera/media_device_virtual.cpp b/src/libcamera/media_device_virtual.cpp\nnew file mode 100644\nindex 00000000..ce06a0da\n--- /dev/null\n+++ b/src/libcamera/media_device_virtual.cpp\n@@ -0,0 +1,22 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2022, Google Inc.\n+ *\n+ * media_device.h - Media device handler\n+ */\n+\n+#include \"libcamera/internal/media_device_virtual.h\"\n+\n+namespace libcamera {\n+\n+LOG_DEFINE_CATEGORY(MediaDeviceVirtual)\n+\n+MediaDeviceVirtual::MediaDeviceVirtual(const std::string &deviceNode)\n+\t: MediaDeviceBase(deviceNode)\n+{\n+\tdriver_ = \"virtual\";\n+}\n+\n+MediaDeviceVirtual::~MediaDeviceVirtual() = default;\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex ce4c1a29..e0927aee 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -33,6 +33,7 @@ libcamera_sources = files([\n     'mapped_framebuffer.cpp',\n     'media_device.cpp',\n     'media_device_base.cpp',\n+    'media_device_virtual.cpp',\n     'media_object.cpp',\n     'pipeline_handler.cpp',\n     'pixel_format.cpp',\n","prefixes":["libcamera-devel","v3","4/9"]}