Updated: October 28, 2024 |
Retrieve one or more location properties for a given camera
#include <camera/camera_api.h>
#define camera_get_location_property(unit, args...)
For the args argument, you can provide one or more property-value pairs using a camera_location_prop_t value as the name of each property and a pointer to the correct type, such as an int or double, for the associated value. Location information can help you to properly identify where each camera is located on the device.
There is no type-checking performed by the compiler. Therefore, you must ensure that the value you provide for each property matches the expected data type. Data type mismatches can result in undefined behavior and cause your application to crash.
camera_get_location_property(CAMERA_UNIT_1, CAMERA_LOCATION_NAME, nameString, CAMERA_LOCATION_ORIENTATION, &orientation);
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.