{"id":13450,"url":"https://patchwork.libcamera.org/api/1.1/patches/13450/?format=json","web_url":"https://patchwork.libcamera.org/patch/13450/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20210823131221.1034059-8-hiroh@chromium.org>","date":"2021-08-23T13:12:18","name":"[libcamera-devel,RFC,v2,07/10] gstreamer: gstlibcameraallocator: Use offset in creating a buffer","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2499ed8f8a7c7552983c7a2b82037be2514e30cc","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/1.1/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13450/mbox/","series":[{"id":2386,"url":"https://patchwork.libcamera.org/api/1.1/series/2386/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2386","date":"2021-08-23T13:12:11","name":"Add offset to FrameBuffer::Plane","version":2,"mbox":"https://patchwork.libcamera.org/series/2386/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13450/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13450/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 9412CBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Aug 2021 13:12:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A46D688CA;\n\tMon, 23 Aug 2021 15:12:49 +0200 (CEST)","from mail-pf1-x429.google.com (mail-pf1-x429.google.com\n\t[IPv6:2607:f8b0:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F64768920\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Aug 2021 15:12:47 +0200 (CEST)","by mail-pf1-x429.google.com with SMTP id w68so15314259pfd.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Aug 2021 06:12:47 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:184e:5d20:8fcb:dfcd])\n\tby smtp.gmail.com with ESMTPSA id\n\tj4sm18596891pgi.6.2021.08.23.06.12.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 23 Aug 2021 06:12:45 -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=\"eJ9u8zLd\"; 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=9PbGK38tT8uYeY88oZKwqMNsbfemhDMMeb9o2l6F2uA=;\n\tb=eJ9u8zLdh4twOwWYRCb+XHAVIZcsqGKgi9nGtola0aPwTuXTrAVGxfN2zx/m2cuFqv\n\tcGjiVO2iBFGdCWLeq3y5wnmFTDMdTzjCaVIcElTvltShQDj3BxvtdU7CxAT9PFCJmJYd\n\ten4k3IxyNVpqUjOkjykEZ2t5Arxbvqovql4tc=","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=9PbGK38tT8uYeY88oZKwqMNsbfemhDMMeb9o2l6F2uA=;\n\tb=eqQyK5OSRFPuHIfFVrEhWxKg3Z+sleVgNT7DxuL54eo4c2R7F2Zk/n51x7h3RCk5p5\n\teerWQv3h8TWbpYoQ96Vi4brfxhOnVXmYRQLbLrzJl3YfOA+Pd8T4xXoUZvUYYnADTWWP\n\tDBuHLDVOic+KMTDueHQ6r+mPB/2NuGH6b/1vMIVnQAOt/LAbqIohiJbIzUd7NormfU9L\n\tsLX78/PTGv3fle0g5fvCWKHlORs8TWsJwCGWXGFwreqUD8M+PnmCVkWjRkFoX/PJT9zt\n\tIDMoIDBN93gDQY7y6QvwQRlfwyB0y4nBWiyfgBgoN6UoE/REB4nRMtniWNa8c+4hgOw5\n\tIE7A==","X-Gm-Message-State":"AOAM533JSuMd2cuEq6qHwwzqIXq1j1IvFxUtV/rntSZsNiFlADfGLN4K\n\tGV2+SiVVa5UQb2CsMyXgF+KdDN0ehpBNkg==","X-Google-Smtp-Source":"ABdhPJzIrOFv7D/k+mBv7p7+1oHyknh6O9vX2hCknQHRVDLE2sJAIOEKJ4HfxHS3Hq/QAk2ipGCnbw==","X-Received":"by 2002:a05:6a00:805:b0:3e2:f682:1b32 with SMTP id\n\tm5-20020a056a00080500b003e2f6821b32mr26740531pfk.60.1629724365492; \n\tMon, 23 Aug 2021 06:12:45 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 23 Aug 2021 22:12:18 +0900","Message-Id":"<20210823131221.1034059-8-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.rc2.250.ged5fa647cd-goog","In-Reply-To":"<20210823131221.1034059-1-hiroh@chromium.org>","References":"<20210823131221.1034059-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH v2 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 | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)","diff":"diff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\nindex 7bd8ba2d..60ead273 100644\n--- a/src/gstreamer/gstlibcameraallocator.cpp\n+++ b/src/gstreamer/gstlibcameraallocator.cpp\n@@ -52,8 +52,10 @@ 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_memory_resize(mem, plane.offset, plane.length);\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 \t\tg_object_unref(mem->allocator);\n","prefixes":["libcamera-devel","RFC","v2","07/10"]}