[0/2] gstreamer: Report mounting-rotation of camera sensor
mbox series

Message ID 20250627074208.49872-1-uajain@igalia.com
Headers show
Series
  • gstreamer: Report mounting-rotation of camera sensor
Related show

Message

Umang Jain June 27, 2025, 7:42 a.m. UTC
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(+)