From patchwork Wed Jun 15 16:26:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Semkowicz X-Patchwork-Id: 16224 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 9D167C3274 for ; Wed, 15 Jun 2022 16:26:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E18BC65637; Wed, 15 Jun 2022 18:26:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1655310407; bh=Rth15gJjGXY9HttBrm5pmAqhlqdqMAWx6LM4ZHUDCF8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=yDDlp+k8L4hO7XxqEWix10aaTaSB5unlkBvR6R33+URguSNjstGSYRzZKj8cioomm Vona1p2DhDviXANxQzA7aK8uk/JM3rSzW+1Hbwu/B+EjU0c8dbMq+wsa2K4OPbSf5P ruMdR4+Ne8vi3HgZWboi7Ia/Qh7yNUP1jgOs/0thh4v5TaphI+p+sON7bb/HJiqryF ezT1o8myGxgGD+TzjJ+YJhmv+0TEwBKnz49QS1qoRcPddwBEL7BF1VQZ6sNPmgL6JH mKo86pPuek7mzFXwcvFvY+Owt6VouxuPREWIsLaiY4n+B4k4drbfQWx81NQ7uQWbpd hooERAk5gO6oQ== Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54E9465631 for ; Wed, 15 Jun 2022 18:26:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=thaumatec-com.20210112.gappssmtp.com header.i=@thaumatec-com.20210112.gappssmtp.com header.b="s+GQyrTn"; dkim-atps=neutral Received: by mail-wr1-x430.google.com with SMTP id o16so16097916wra.4 for ; Wed, 15 Jun 2022 09:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thaumatec-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x5pmzjoZiXuT0DHzxI2DxQ95Z5ycnNU6zzqPLmhAnlU=; b=s+GQyrTniuUhtO44nv0Hkh40UPf1ldcek95NPpnJhsUo71emL+H4TMUYrySuACXGd2 Gnp7chQTFa4F4+A+orKvALHZseD0OO3bLhyUtMs8S3M6qtw5nyb/WWA0UyJvSsE6/emf +deAn3wfoEZ7Y4W067yGO12cvXQAvGHp8nffFCvFzJyxsFKaYLOSEwQlHdsBw1CX/ida 3m7dntTVqt3T/5NiRuIuqb748c+mWyZ/9ClVRqA2R9Ar70A68xbHD8K2iCvmmioApei4 B3BRVLpWKz33QinE0cSCCwS0LXD15XtVRz73yCaYoFuin5NtBuLZWKpxK61mv8lVJFKO I/8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x5pmzjoZiXuT0DHzxI2DxQ95Z5ycnNU6zzqPLmhAnlU=; b=LcRGkf7cxNltiWeylSuXhMDl3dzgWL3pKrXkiGVRdB1krOP3To+Do2f0GpB3VWpk9V GXO+F1/E0LF+uhAXyBcgZPuHajVYVBHPDNrOjs7yqKwH3omY/Tkzg4DjaiWc9vml9OTz JkgTWH8UO7xdZjpBBthBr87bBcpmZEwdU7yIvbXnkD1rhjKMtEmLh0yORi612RgBeVCI D6h7m+v3hsNUf/7LwlM4D05FnB9EEwIUuJTe2PQEtXPSiJYE+blPWvMUJDD58HtCi901 ni7ilSCR9oHyEh+jrkzyfaVbYs16YfRUrIh+eu6UgIvGLYKSJbixF0IJsNeXzHRQFB41 fTvg== X-Gm-Message-State: AJIora8x8W7DBKZXRGjBa7VnEyFx08l/jwoCXuMeLDGBwF6k6hm4cBAq 5M5Tpskbr1dTHVFAyjNHlVH4AMdPnkviQy1E X-Google-Smtp-Source: AGRyM1vZ/3IsA//wkv31dpOCNXq5uSHNfDa5RapeJAYCPEFo8Td8KHMEzwJ70BYPO4Kgj5+kSu2c2A== X-Received: by 2002:adf:f601:0:b0:219:f4e9:cc40 with SMTP id t1-20020adff601000000b00219f4e9cc40mr634217wrp.362.1655310406065; Wed, 15 Jun 2022 09:26:46 -0700 (PDT) Received: from localhost.localdomain (ip092042140082.rev.nessus.at. [92.42.140.82]) by smtp.gmail.com with ESMTPSA id r17-20020a05600c35d100b0039c8d181ac6sm3135772wmq.26.2022.06.15.09.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 09:26:45 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 15 Jun 2022 18:26:00 +0200 Message-Id: <20220615162601.48619-3-dse@thaumatec.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220615162601.48619-1-dse@thaumatec.com> References: <20220615162601.48619-1-dse@thaumatec.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] Documentation: Update code examples to use the Request::reuse() method 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: Daniel Semkowicz via libcamera-devel From: Daniel Semkowicz Reply-To: Daniel Semkowicz Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" After introduction of reuse(), there is no need of manual request reconfiguration. Furthermore, current example code does not work anymore. --- Documentation/guides/application-developer.rst | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index 6ab8b7e5..00bafb10 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -485,21 +485,7 @@ streams, and finally, queue the new capture request to the camera device: .. code:: cpp - request = camera->createRequest(); - if (!request) - { - std::cerr << "Can't create request" << std::endl; - return; - } - - for (auto it = buffers.begin(); it != buffers.end(); ++it) - { - Stream *stream = it->first; - FrameBuffer *buffer = it->second; - - request->addBuffer(stream, buffer); - } - + request->reuse(Request::ReuseBuffers); camera->queueRequest(request); Request queueing