From patchwork Fri Jun 27 07:42:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 23668 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 4F03DC3237 for ; Fri, 27 Jun 2025 07:42:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E7A9468DF6; Fri, 27 Jun 2025 09:42:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="Sll0k2/r"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7162668DF4 for ; Fri, 27 Jun 2025 09:42:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a1Xmdj9ijfPTE4pTOVmDStBvRF+6V2d30DjE9ufS3z0=; b=Sll0k2/rnupdmSDOuQYMAHGTTx R3iebhzXNPAAuKHKXTM7pc4AzChQpRA9RHG/nR3CjexSfV+uEPIT65U5mGju0pOisXVhNMXHMgR16 nd0zdSbPwKHCf0vqRMKbThU2dKomqomw+4A91jxLxNX50K9ANlCF4YvGVMeGqANQ7wi2qt7UG+oVm DptzKCS5r1Yop9iV5bucPNzmikt5YZ9GRWZ2jLIETeZhYou9G2VHEzUcmfJj0Gm+yvv2g5Q1ixwvk +1BypuHSdkWcQPvQJNNsYgamtohldCKWvUxx33AW04Dq9hhS5GvFfGCmbe5pwM3SYGmsvjDXV0vaC v3PGOjWg==; Received: from [49.36.69.141] (helo=uajain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1uV3in-009IWh-Ns; Fri, 27 Jun 2025 09:42:06 +0200 From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Giacomo Cappellini , Nicolas Dufresne , Umang Jain Subject: [PATCH 0/2] gstreamer: Report mounting-rotation of camera sensor Date: Fri, 27 Jun 2025 13:12:06 +0530 Message-ID: <20250627074208.49872-1-uajain@igalia.com> X-Mailer: git-send-email 2.50.0 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" Following patches support reporting mounting rotation of the camera sensor in libcamerasrc. These are now reported as GstDevice properties. Patch 1/2 provides a public helper to derive a std::string for Orientation enum. Patch 2/2 plumbs the libcamera's 'property::Rotation' in libcamerasrc. It provides a human readable string in case the rotation is in multiple of 90, otherwise, simply reports the value of rotation property as a string. --- [~/src/libcamera]$ gst-device-monitor-1.0 Probing devices... [3:27:26.441195043] [47803] INFO Camera camera_manager.cpp:326 libcamera v0.5.1+33-6c802a4d Device found: name : \_SB_.PC00.XHCI.RHUB.HS04-4:1.0-04f2:b7e0 class : Source/Video caps : image/jpeg, width=640, height=360 image/jpeg, width=640, height=480 image/jpeg, width=848, height=480 image/jpeg, width=960, height=540 image/jpeg, width=1280, height=720 image/jpeg, width=1920, height=1080 video/x-raw, format=YUY2, width=640, height=360 video/x-raw, format=YUY2, width=640, height=480 properties: mounting-rotation = Rotate0 gst-launch-1.0 libcamerasrc camera-name="\\_SB_.PC00.XHCI.RHUB.HS04-4:1.0-04f2:b7e0" ! ... --- Umang Jain (2): libcamera: orientation: Provide a orientationToString() helper libcamera: gstreamer: Report mounting-rotation of camera sensor include/libcamera/orientation.h | 1 + src/gstreamer/gstlibcameraprovider.cpp | 14 ++++++++++++++ src/libcamera/orientation.cpp | 14 ++++++++++++++ 3 files changed, 29 insertions(+)