[libcamera-devel] [PATCH 0/2] gstreamer: src: Add transform property

Robert Mader robert.mader at collabora.com
Tue Jun 13 12:34:48 CEST 2023


This allows users to request a transform using the Gstreamer
equivalent. If the combined transform of the requested one and a
possible rotation from the camera properties is not fully supported by
the sensor, the remaining transform will be passed down to downstream
elements as tag.

The later is common for 90/270 degree rotations. Thus, a side effect of
this feature is that libcamerasrc now behaves similar to pipewiresrc in
regards to rotated cameras in e.g. phones, allowing apps to compensate
accordingly.

To test the transform property:
gst-launch-1.0 libcamerasrc transform=90r ! videoconvert ! videoflip video-direction=auto ! gtksink

To test cameras with rotation not supported by sensor, such as the ones of the Pinephone Pro,
compare the out put of the following:
gst-launch-1.0 libcamerasrc ! videoconvert ! videoflip video-direction=auto ! gtksink
gst-launch-1.0 pipewiresrc ! videoconvert ! videoflip video-direction=auto ! gtksink

Robert Mader (2):
  gstreamer: src: Style change
  gstreamer: src: Add transform property

 src/gstreamer/gstlibcamera-utils.cpp | 72 ++++++++++++++++++++++++++++
 src/gstreamer/gstlibcamera-utils.h   |  5 ++
 src/gstreamer/gstlibcamerasrc.cpp    | 56 ++++++++++++++++++----
 3 files changed, 125 insertions(+), 8 deletions(-)

-- 
2.41.0



More information about the libcamera-devel mailing list