From patchwork Wed Sep 8 08:14:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13765 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 1D848BDB1D for ; Wed, 8 Sep 2021 08:15:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C438C69173; Wed, 8 Sep 2021 10:15:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="HmlknNCQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D1A1B69170 for ; Wed, 8 Sep 2021 10:15:01 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6C91A993; Wed, 8 Sep 2021 10:15:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1631088901; bh=e7+qOd+O9USS3T6+ar5OyTHz/eAJRBVO3xZ1nNRxWr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HmlknNCQ4KkCx8r8oQP0hbu5GRq16HJ+eqgKYAd2PCU7YGRj2KGNT4kNMpKBzAY9N y4uicTfKyxXU3oddX0D53FCocmchjItAfK62Nrqc7FYdF6QFgHYmpMK+rVfCbBNyI2 614gv6rEIxeC+RA3jCLEMy32IaQ9TBxwEOUB0TYw= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Wed, 8 Sep 2021 17:14:36 +0900 Message-Id: <20210908081437.4022697-7-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210908081437.4022697-1-paul.elder@ideasonboard.com> References: <20210908081437.4022697-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 6/7] v4l2: v4l2_camera_proxy: Set the compressed flag in enum_fmt 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" Set the compressed flag in ENUM_FMT if the format is MJPEG. As the only compressed format that libcamera currently supports is MJPEG, this should be sufficient. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_camera_proxy.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 5fbfcdd7..9de94fa1 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -276,8 +276,7 @@ int V4L2CameraProxy::vidioc_enum_fmt(V4L2CameraFile *file, struct v4l2_fmtdesc * PixelFormat format = streamConfig_.formats().pixelformats()[arg->index]; const V4L2PixelFormat &v4l2Format = V4L2PixelFormat::fromPixelFormat(format); - /* \todo Set V4L2_FMT_FLAG_COMPRESSED for compressed formats. */ - arg->flags = 0; + arg->flags = format == formats::MJPEG ? V4L2_FMT_FLAG_COMPRESSED : 0; utils::strlcpy(reinterpret_cast(arg->description), v4l2Format.toDescription(), sizeof(arg->description)); arg->pixelformat = v4l2Format;