{"id":13365,"url":"https://patchwork.libcamera.org/api/patches/13365/?format=json","web_url":"https://patchwork.libcamera.org/patch/13365/","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":"<20210816043138.957984-8-hiroh@chromium.org>","date":"2021-08-16T04:31:35","name":"[libcamera-devel,RFC,07/10] gstreamer: gstlibcameraallocator: Use offset in creating a buffer","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"1b35bc0758f3ed89216add79071e4fbd9673fdc8","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13365/mbox/","series":[{"id":2359,"url":"https://patchwork.libcamera.org/api/series/2359/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2359","date":"2021-08-16T04:31:28","name":"Add offset to FrameBuffer::Plane","version":1,"mbox":"https://patchwork.libcamera.org/series/2359/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13365/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13365/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 84987BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Aug 2021 04:32:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F797688C4;\n\tMon, 16 Aug 2021 06:32:02 +0200 (CEST)","from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com\n\t[IPv6:2607:f8b0:4864:20::1030])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8C06168892\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Aug 2021 06:31:58 +0200 (CEST)","by mail-pj1-x1030.google.com with SMTP id w14so24477433pjh.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Aug 2021 21:31:58 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:6f5f:1479:a6ab:4229])\n\tby smtp.gmail.com with ESMTPSA id\n\tu10sm2767417pgj.48.2021.08.15.21.31.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 15 Aug 2021 21:31:56 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"YgTTNAX1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=a4AJqyB/WfqVzb/ZaK2PhCQNUXRUhr1JGmbh6yQPpkY=;\n\tb=YgTTNAX1hxb+UReWQCifyV6Cekq7CDqtLKOWb23M+mLTtshi3OWz0IFZTvDQiEieHg\n\tAqhzAO56FRlgzLL/h6awhF3uv987cWgjwxmXip9EWPLBq154AtaCtjbjN+JoAiWo07N4\n\tzVZiBikDgoQXSSxkqEw/pnIfh/rdEvPrxzTVA=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=a4AJqyB/WfqVzb/ZaK2PhCQNUXRUhr1JGmbh6yQPpkY=;\n\tb=k6DTYwPCEGe2BYTjbDW9B3+0qCCjyi/DUzit0ivwbFRbS8w/RryXXAQwJSDZ76OE/8\n\tXPQrIGxlzcvcFKIlcRSV5udH/fQW/93tYuXgWo7o4/OLDKTuLBdVYDhjh1zAua/a2CQ/\n\t5+FrVyr62v/Z3GVl120uma6G9uGTkI/+7MShHxvOVp9+YdoN2OhBP/EuH5KzClfj75pO\n\tsAtY60/visFWFExSgC9I2KnJVKDsq1M2Kk8ncy1HTphX7htk7+UD/71zfaQCcPAXmLBJ\n\tnCDY3BPU6oWziBCv2fuqjWUDMFhmxi42f0yL4yofRP70svW0t0M3amIyu3afLpSpV84V\n\t2AHw==","X-Gm-Message-State":"AOAM5322F6ld1eOwuJXqRoxLyFw0hZkd8+DUNUiC4ZJgf45aYt5AOxJC\n\tMbqP1q3NvMCZXeawtc6DLOg8dWp/v688Nw==","X-Google-Smtp-Source":"ABdhPJxCGlbH44hu3nJ47ivynPtb4RAv0t4KQ3gu9835Wn0u4egRMAl2SsR1orPmoL7ggOR/rOSd5g==","X-Received":"by 2002:a65:608f:: with SMTP id\n\tt15mr14128132pgu.452.1629088316973; \n\tSun, 15 Aug 2021 21:31:56 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 16 Aug 2021 13:31:35 +0900","Message-Id":"<20210816043138.957984-8-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.rc1.237.g0d66db33f3-goog","In-Reply-To":"<20210816043138.957984-1-hiroh@chromium.org>","References":"<20210816043138.957984-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 07/10] gstreamer:\n\tgstlibcameraallocator: Use offset in creating a buffer","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The plane length is the length of the plane size. The buffer length\nto be allocated for a plane is the offset and the length of\nFrameBuffer::Plane.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/gstreamer/gstlibcameraallocator.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\nindex 7bd8ba2d..a3ffec5b 100644\n--- a/src/gstreamer/gstlibcameraallocator.cpp\n+++ b/src/gstreamer/gstlibcameraallocator.cpp\n@@ -52,7 +52,8 @@ FrameWrap::FrameWrap(GstAllocator *allocator, FrameBuffer *buffer,\n \t  outstandingPlanes_(0)\n {\n \tfor (const FrameBuffer::Plane &plane : buffer->planes()) {\n-\t\tGstMemory *mem = gst_fd_allocator_alloc(allocator, plane.fd.fd(), plane.length,\n+\t\tGstMemory *mem = gst_fd_allocator_alloc(allocator, plane.fd.fd(),\n+\t\t\t\t\t\t\tplane.offset + plane.length,\n \t\t\t\t\t\t\tGST_FD_MEMORY_FLAG_DONT_CLOSE);\n \t\tgst_mini_object_set_qdata(GST_MINI_OBJECT(mem), getQuark(), this, nullptr);\n \t\tGST_MINI_OBJECT(mem)->dispose = gst_libcamera_allocator_release;\n","prefixes":["libcamera-devel","RFC","07/10"]}