From patchwork Mon Sep 9 05:34:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21200 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 774ADBF415 for ; Mon, 9 Sep 2024 05:34:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 45CE5634F4; Mon, 9 Sep 2024 07:34:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="L9PJEmeg"; dkim-atps=neutral Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 00BAF618F3 for ; Mon, 9 Sep 2024 07:34:31 +0200 (CEST) Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2d86f713557so2573276a91.2 for ; Sun, 08 Sep 2024 22:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1725860069; x=1726464869; 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=rehFMwW4+BdjvhkxY3Rz4PT0hq32lSEnVkVCylbtHgs=; b=L9PJEmegNpnxgYeeeccVUwrFdxn96UjJqnr4njGOrXggLHvnJ3D8/KeJZkvVzed9eW YJFtck9vmdH9kfy/aT+putTLQS5P3+Gg/y/ZM+t8/5tjVDhM1DHsB1fWVxQMUNj7Ks7b /iEZjFBh6zQx6nS8JNte6cuLoNKWntrqPJ/8M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725860069; x=1726464869; 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=rehFMwW4+BdjvhkxY3Rz4PT0hq32lSEnVkVCylbtHgs=; b=wAa2fl8Ex74/P6+JQH+KXnhP32jr9Qn9eQNg8lubiINZuZ3TQnFfXPp3138TfTM/x/ +rMVpZ6oLXo7IWMoaefEVzrLVXPkmXGe2Fyn9UwQuv3Wyjcjg9F3DaKMnItugmqiawJM hdDMctjN1hkhR4W0djbiaCweOJEmJvC7ZqrnMchNW5NC/CT9PuPuXcGZu35DQnR2BmoX fqp4ctZ5KJJsPe/f0mHxbizUdbSKW4dZwVOVFBi+cqSL8vdaagAikY5YE6RK5QyWuMDN J7aJcm/vMuqWBv13OeE6B38jTFhOs+tv4RWald3TZDUk27K0P7onuel1o21I5Btzd2NL 1/0Q== X-Gm-Message-State: AOJu0YxxTLTcsu329ngbIJ+GhfRDd9gPNvkEFmsFuCp2xspmpuzMlGOB vp5T0v+avX3WlgfcD8V95b34GFGNxvq/vj+IkWsaVDrBPZSRn53ZKeWukXYEjIDRYmyF3U01scM = X-Google-Smtp-Source: AGHT+IGkumPClh4K54120RpLVPKw3ACnvZ4GfIIAwXszSAMyd4KRvNBiYCg5blHdGtjDvho6EbJrNA== X-Received: by 2002:a17:90b:196:b0:2d3:c664:e253 with SMTP id 98e67ed59e1d1-2dad4ef6033mr13757495a91.10.1725860069496; Sun, 08 Sep 2024 22:34:29 -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-2db043c0750sm3562440a91.23.2024.09.08.22.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2024 22:34:29 -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 v2] libcamera: Make FrameBuffer status default to FrameSuccess Date: Mon, 9 Sep 2024 05:34:19 +0000 Message-ID: <20240909053425.3075699-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 solve issues when platforms not following V4L2 spec and frame buffers not going through V4L2VideoDevice, setting default values to FrameMetadata's member variables. 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..8dae747c 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 = FrameSuccess; + unsigned int sequence = 0; + uint64_t timestamp = 0; Span planes() { return planes_; } Span planes() const { return planes_; }