Message ID | 20250611013245.133785-8-bryan.odonoghue@linaro.org |
---|---|
State | New |
Headers | show
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 [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B430DC3240 for <parsemail@patchwork.libcamera.org>; Wed, 11 Jun 2025 01:33:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 436F268DCE; Wed, 11 Jun 2025 03:33:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="YDi4+18p"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7319D68DC7 for <libcamera-devel@lists.libcamera.org>; Wed, 11 Jun 2025 03:33:22 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43edecbfb94so73698915e9.1 for <libcamera-devel@lists.libcamera.org>; Tue, 10 Jun 2025 18:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749605602; x=1750210402; darn=lists.libcamera.org; 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=6KiB9ywII9IRXnqC57gNGQqpupTJTpps3EfWunIFuPk=; b=YDi4+18phhX9mkXb/aXPo0QBS4lVbYp2kdf1eM3OzQjBa0+JO86EO9Xl/whRHRSchq 19qI/qyIJhHm1AaQ5QLoyJTyHgnW1s7bAAQafog8EtLGCjAkbXCbTi8hVvZvwuruMhgs q71GQhRn4TcgI7GQ4aVkdo4k+deK1v/CCeSZB+ChfPOzdBtdvp3S29bDERQvZaxPYrz6 f/F1L0O5hw3AvCZoL9hweszH6qpdMdgLkwc9C90N6nphhO52eX4UqcGpaYFSDfWvPuW7 tKaYGJTnVer9r79SSCVKhKBzViHOKJwgx6gkTt2NCQj5B7JG/pihE/+5gTTKXhfVsWEx nXZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749605602; x=1750210402; 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=6KiB9ywII9IRXnqC57gNGQqpupTJTpps3EfWunIFuPk=; b=dpMECGqpQoGvoryZnIabsBL5u3niiQsXo0Q3WTZMIKLkfJiTxsqA7BPdFbokmRmE3y 9+kCpsYBsDP3yn2SBvC3kShBWqy7gKjrI2/zt9QPhOMbN8KesSURYEYi0nofwe9+oXNg zV0C/DV+3FSujH/Ee+Q768XDtFEpmsNkQZat2lyxYVUj1ft74+8PqFvWWI+5u7FKXh3l zlKDEU4nYnR+kot2gX8SeanWWZWbLVQzqPaCM5e4DkMZxTvJHf80w2PrAljp689GQYSI ZwN5pW8EEEP2kSM3nIyAffqhWYsoADfGGhNuxhPnFUPnEgyPTu9w/rOJQ0j3bhmkdx1q JC4Q== X-Gm-Message-State: AOJu0YzeNWMAIrkNtK4vUpkPIc6WOZagAJjGgtk4DwKm1qKL4dtWyfl0 TCLkfMkMVCI0HnkPpz2WmqeRL/ctPhkBoAoCa6l09GtTOfXBRFAac8+ijdeFAMHW8j+m6njAr+h kiNHApyE= X-Gm-Gg: ASbGnctbw8aR/IY2bYTJasr/TpaZed9V7EkKCdlKMShXna1qqapsVAftx7MdprizruI /LA1tq3jzfg48HN68BQMCmfGsM28DVawkFRCOTkY8QW0Y6V+Mr9hMPkm613SwcM0VlAjq5rrU05 +JHz8gN6w1rFEyXir68hMD8KIh7/v/j8644Xm53Whth96+3BsHrDXDrXiCG9TfWEA78mSFSiRl4 h7/mrXAycOoLxcBvdENGboHf6qYX/py/fB6S4YoucqNbHnoqDCI5x3QY3FPfRUTQrWqX85gSdfW nUfVFaVSQ95pROIQ0ag3gYpjK+et30rV3oTm63dTk46chQP4L1gXjAt/JfvTteLuMtmDEusj/Fq YAj6B2rYMVy5J6SPFTxT8kYjGpqAH7FWxy6n0RetF2l9JDKkbct5K X-Google-Smtp-Source: AGHT+IHG6o1lWgKjFkO65nblYC4PBeJ+oTxVgOtKzceZofNTsuR8EJP7WC81gyuvynQ6g/3WQUu3dg== X-Received: by 2002:a05:600c:1986:b0:43c:fda5:41e9 with SMTP id 5b1f17b1804b1-453248f424amr9771575e9.31.1749605601733; Tue, 10 Jun 2025 18:33:21 -0700 (PDT) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532514138asm5680625e9.3.2025.06.10.18.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jun 2025 18:33:21 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Subject: [PATCH 07/35] libcamera: MappedFrameBuffer: Add MappedFrameBuffer::getPlaneFD() Date: Wed, 11 Jun 2025 02:32:17 +0100 Message-ID: <20250611013245.133785-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250611013245.133785-1-bryan.odonoghue@linaro.org> References: <20250611013245.133785-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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>, <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>, <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> |
Series |
|
Related |
show
|
diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h index 75ac2c8f..9a5355c7 100644 --- a/include/libcamera/internal/mapped_framebuffer.h +++ b/include/libcamera/internal/mapped_framebuffer.h @@ -55,6 +55,7 @@ public: using MapFlags = Flags<MapFlag>; MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags); + int getPlaneFD(int plane); private: const FrameBuffer *buffer_; diff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp index f5ee770c..d5f347d4 100644 --- a/src/libcamera/mapped_framebuffer.cpp +++ b/src/libcamera/mapped_framebuffer.cpp @@ -242,4 +242,9 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags) buffer_ = buffer; } +int MappedFrameBuffer::getPlaneFD(int plane) +{ + return buffer_->planes()[plane].fd.get(); +} + } /* namespace libcamera */
Add MappedFrameBuffer::getPlaneFD() which takes a plane index and returns the file descriptor associated with it. This fd will be used to feed into eglCreateImageKHR for both texture creation on upload and directly render-to-texture where the texture buffer comes from the fd given to eglCreateImageKHR. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- include/libcamera/internal/mapped_framebuffer.h | 1 + src/libcamera/mapped_framebuffer.cpp | 5 +++++ 2 files changed, 6 insertions(+)