libcamera: camera: Introduce Orientation
Introduce the Orientation enumeration which describes the possible 2D transformations that can be applied to an image using two basic plane transformations. Add to the CameraConfiguration class a new member 'orientation' which is used to specify the image orientation in the memory buffers delivered to applications. The enumeration values follow the ones defined by the EXIF specification at revision 2.32, Tag 274 'orientation'. The newly introduced field is meant to replace CameraConfiguration::transform which is not removed yet not to break compilation. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
042649f044
commit
cc65629b68
@@ -291,7 +291,8 @@ bool SensorConfiguration::isValid() const
|
||||
* \brief Create an empty camera configuration
|
||||
*/
|
||||
CameraConfiguration::CameraConfiguration()
|
||||
: transform(Transform::Identity), config_({})
|
||||
: transform(Transform::Identity), orientation(Orientation::Rotate0),
|
||||
config_({})
|
||||
{
|
||||
}
|
||||
|
||||
@@ -552,6 +553,21 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF
|
||||
* may adjust this field at its discretion if the selection is not supported.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \var CameraConfiguration::orientation
|
||||
* \brief The desired orientation of the images produced by the camera
|
||||
*
|
||||
* The orientation field is a user-specified 2D plane transformation that
|
||||
* specifies how the application wants the camera images to be rotated in
|
||||
* the memory buffers.
|
||||
*
|
||||
* If the orientation requested by the application cannot be obtained, the
|
||||
* camera will not rotate or flip the images, and the validate() function will
|
||||
* Adjust this value to the native image orientation produced by the camera.
|
||||
*
|
||||
* By default the orientation field is set to Orientation::Rotate0.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \var CameraConfiguration::config_
|
||||
* \brief The vector of stream configurations
|
||||
|
||||
Reference in New Issue
Block a user