From patchwork Wed Mar 15 10:22:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 18403 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C1FF0C3263 for ; Wed, 15 Mar 2023 10:23:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4F2C762710; Wed, 15 Mar 2023 11:23:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1678875790; bh=2cvQaGtnoIqMdmnYnTkS9L5wb/oeWw5111IC9HCyQCA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=g6tORs6W3qF6R3JhFCh8Sfrq5nW5wsKuqLp24nCBeNkA8SxuecRvvm9sm7NFwWssW GcbJMKG3f4EyX9vFm1U3m3r6uDmSUKTp3Z49lKAmOY/0CxDJkpCXiPdKzDOICfoav9 8MT3k6uCldMGWkNjJ0NhT6qCmEEhNMu9AnpFI6Zierwn8Fl3e1AVnjYOHx08gSPYz/ eh+EtgdK4tvZ77XfQW8ESbnmgX93bQ31h/INMHacBUwQskrQJXqWue2KzX39+8kneX cRwVooGK5Nhu4A39J4Nj5ogzhd+AHGGxsOdJIgSL/9d/KTWJQYmJAPPjNnyqd9uKrL DAANMSCS00yNg== Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A562461ED2 for ; Wed, 15 Mar 2023 11:23:08 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="esh382bq"; dkim-atps=neutral Received: by mail-pj1-x102a.google.com with SMTP id om3-20020a17090b3a8300b0023efab0e3bfso1188761pjb.3 for ; Wed, 15 Mar 2023 03:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1678875787; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E1+F3oSK6UpV4JEY1nZu+MgbDhGpFB/0GAG68op+4Lo=; b=esh382bqvS5e190fQDlGtZGVM4I49bDmkxztIMc6rR3LCz3/bOzV/AYZVPWGcnZak+ af5EnWagyl4skTJfu5H9Zi0DAIpocpbvL711UFLJTTMMxMo1nGP7rgVkbfV1eEmG8e7E GV4Oj3VMdG/mdhQqfb3viLH1irxkz5CBTiXJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678875787; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E1+F3oSK6UpV4JEY1nZu+MgbDhGpFB/0GAG68op+4Lo=; b=ZBf5o5lQDXS9msS6d/r885lfWKRpaHtB1/6QbKHEVybBXKi+Q+bt3bUwIUdPB8hO02 yy54IZ3CU02CzfLlKMteYNCjK2JXIVCAadOpIttVFA7J1VWM7vmFRI8s+KRilxNvLwGl ACp4vJisDPM28nfxYSszBWbewDXxV5SVb+4RlKX6sIzrWGBOe8G0V6O6SZ39mnT1T7vJ Bj2EwQyScZ+O6KIuB9sIKgBT9s7Ls+F8X58mabz2eMxDu4WiwxKcsFBWV/hdgHZgwHSa thySCaTcQdkExy8Pm4B0ewXo5RYWCWL3TRHQ0UJpegzRSxROb6BAvD4HINbNIWK0qFrH vaJQ== X-Gm-Message-State: AO0yUKXaHGgIKIzIsB5LAba25mnIdcaWSyTY5ZGW3uELidVAxEGxPjKe +zpUJtrLS29xsry7kb306mubw77+mP6qnrHb7kc= X-Google-Smtp-Source: AK7set9H/aB2AE0onUgoV6Eq4pVg+UhsgLbWzabjMnJDeWusaH3zYY59umpF6JUkIepH0xPatNQGQg== X-Received: by 2002:a17:903:283:b0:1a1:78e6:d600 with SMTP id j3-20020a170903028300b001a178e6d600mr1722493plr.10.1678875787020; Wed, 15 Mar 2023 03:23:07 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (112.157.221.35.bc.googleusercontent.com. [35.221.157.112]) by smtp.gmail.com with ESMTPSA id f11-20020a17090274cb00b001a0450da45csm3262786plt.185.2023.03.15.03.23.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 03:23:06 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Wed, 15 Mar 2023 10:22:55 +0000 Message-Id: <20230315102300.2265491-2-chenghaoyang@google.com> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230315102300.2265491-1-chenghaoyang@google.com> References: <20230315102300.2265491-1-chenghaoyang@google.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 1/6] libcamera: pipeline: Accept a camera having no MediaDevice X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Harvey Yang via libcamera-devel From: Harvey Yang Reply-To: Harvey Yang Cc: Harvey Yang , Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Fatal check of having at least one MediaDevice was to prevent pipeline handler implementations searching and owning media devices with custom conventions, instead of using the base function |acquireMediaDevice|. It also has the assumption that there's at least one media device to make a camera work. Now that the assumption will be broken by the virtual pipeline handler added in the following patches, and developers should be aware of the available functions in the base class to handle media devices, the Fatal check is no longer needed. Signed-off-by: Harvey Yang --- src/libcamera/pipeline_handler.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index f72613b8..21979ea5 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -604,10 +604,6 @@ void PipelineHandler::registerCamera(std::shared_ptr camera) { cameras_.push_back(camera); - if (mediaDevices_.empty()) - LOG(Pipeline, Fatal) - << "Registering camera with no media devices!"; - /* * Walk the entity list and map the devnums of all capture video nodes * to the camera.