From patchwork Mon Sep 9 09:14:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 21201 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 CCCFFC324C for ; Mon, 9 Sep 2024 09:14:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 60B16634F7; Mon, 9 Sep 2024 11:14:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OdPWlziH"; dkim-atps=neutral Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AB054634E4 for ; Mon, 9 Sep 2024 11:14:37 +0200 (CEST) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2d8b679d7f2so3218518a91.1 for ; Mon, 09 Sep 2024 02:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1725873276; x=1726478076; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KiXtHgF+ZgjV/hrHXVdJzSFyP9QVE0fRDNll+nwWCKQ=; b=OdPWlziHPjDmcys2I8/cER/LkIObZmIyo+FZBubSIllk+xsqkDviAzDXlK49Dbiv5Z aVypzShTuu9R4lI3oDrOAuEYmkQTxf1K5qrWfEd0XDYpPgyWn56MaKdJcIoJB6hnFvXr N6gSDNaP6drA5rg5x7dycrk9LnE4uZf1cv2js= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725873276; x=1726478076; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KiXtHgF+ZgjV/hrHXVdJzSFyP9QVE0fRDNll+nwWCKQ=; b=cS79oY1beIquMDGhoTZS6uwU5ND2qYDi99ntPhzVvzxMjldfDOTVXlKksQqKKPGGPj qntDSZ23PKGgTkSQsrBM4Uf05T6F+V8sMmAtuqOdDxm9FQ9W2wOQE12Myg+INKFrvl6f WLj5zlD2Ty6qACep9TmxvKf5nkCe0WcF6tReD7SDDr+Fe2qCUwojvAo+o+pr/BVVnsD/ XA+mmaprY8XYBzpTlcn4+7ezKHWmgCgR541fkLmqc11K/9OGhHuBfabym2rZ0CU85/nE sSWwDy5DObaBbqskzUQLcfbNDmwWfoXpa0T+PlTucVLgLrpq9TqtEEjoKGIN755D626y 58IQ== X-Gm-Message-State: AOJu0YzDFxYFd+GUBYbacIHN82RpzfRyvB75UE6+maN+1VDLz2SVcLtb EP9Zr4DGCqlSnDIUN7DKagrt4rJechLuf01cML2bcG0FUBONup4loDWy9a0Tw1TB67FMV2itxjQ = X-Google-Smtp-Source: AGHT+IFXukipr0CS64xASssHs7Bs1ztnxfZW7nImsyQVDpSOw+TeOroxeNBZ9UsgEO2hNzoX2nKAEQ== X-Received: by 2002:a17:90a:a414:b0:2d8:efd1:22e4 with SMTP id 98e67ed59e1d1-2dad50c99f5mr13286066a91.26.1725873275661; Mon, 09 Sep 2024 02:14:35 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (0.223.81.34.bc.googleusercontent.com. [34.81.223.0]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadc110504sm6119025a91.38.2024.09.09.02.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 02:14:35 -0700 (PDT) From: Harvey Yang X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Han-Lin Chen , Harvey Yang Subject: [PATCH v3] libcamera: Make FrameBuffer status default to FrameError Date: Mon, 9 Sep 2024 09:14:29 +0000 Message-ID: <20240909091431.3688159-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Han-Lin Chen To make sure platforms follow V4L2 spec and frame buffers go through V4L2VideoDevice, setting default values to FrameMetadata's member variables. Especially, status is defaulted to be FrameError. Signed-off-by: Han-Lin Chen Co-developed-by: Harvey Yang --- include/libcamera/framebuffer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h index ff839243..ececc123 100644 --- a/include/libcamera/framebuffer.h +++ b/include/libcamera/framebuffer.h @@ -32,9 +32,9 @@ struct FrameMetadata { unsigned int bytesused; }; - Status status; - unsigned int sequence; - uint64_t timestamp; + Status status = FrameError; + unsigned int sequence = 0; + uint64_t timestamp = 0; Span planes() { return planes_; } Span planes() const { return planes_; }