From patchwork Fri May 3 15:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1152 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B931F60003 for ; Fri, 3 May 2019 17:34:10 +0200 (CEST) Received: from Q.Home (unknown [IPv6:2a02:c7f:1887:5d00:c990:5ff4:193b:c9b8]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1974031E; Fri, 3 May 2019 17:34:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1556897649; bh=q+gCtE+m3YmcdcT6AIUc3Xy7NWNbvhQ8erpG/Thx4kk=; h=From:To:Cc:Subject:Date:From; b=KKcqIIOv5JWGFF6fo/idatCCTj/XPu27rM4OBCVh1qgRs8U/WKw/QCHU5RBZx+5su 4gyGAmYf2C+Qvoc8Z8GyQ7p96PWKkg9DGSKl4kl2Xrkr+XoB+ITZ14DCiBpzJ5Glsq pvapiKI/oQmFLIorn9z7QAsWX61167XCaXUbz3Go= From: Kieran Bingham To: LibCamera Devel Date: Fri, 3 May 2019 16:34:01 +0100 Message-Id: <20190503153403.8728-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] V4L2Device Try format support X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2019 15:34:11 -0000 Extend V4L2Device to provide a tryFormat function. This can be used to check a format against a V4L2 Device to determine a suitable configuration. Utilise this in the UVC pipeline handler so that we can provide a valid default configuration on any UVC web cam. Kieran Bingham (2): libcamera: v4l2_device: Add tryFormat support libcamera: pipeline: uvc: Try a default format against the device src/libcamera/include/v4l2_device.h | 7 +++++-- src/libcamera/pipeline/uvcvideo.cpp | 11 +++++++++-- src/libcamera/v4l2_device.cpp | 29 +++++++++++++++++++++++------ 3 files changed, 37 insertions(+), 10 deletions(-)