diff options
author | Iliyan Malchev <malchev@google.com> | 2011-07-26 15:47:56 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-07-26 15:56:03 -0700 |
commit | 2280003113fec21d89fdd44a086e8d602df7c105 (patch) | |
tree | 5cf2f3ec994f2f910057fb32db6dacfdef9c240f | |
parent | 56ea0109622d6df4bbec25e32c0976a6965c203d (diff) | |
download | libhardware-2280003113fec21d89fdd44a086e8d602df7c105.tar.gz |
camera HAL: add optional put_parameters callback
Change-Id: I2b2436c68b3095e840458059f8533dc897e1ca87
Signed-off-by: Iliyan Malchev <malchev@google.com>
-rw-r--r-- | include/hardware/camera.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/hardware/camera.h b/include/hardware/camera.h index b47e0115..8a8ca179 100644 --- a/include/hardware/camera.h +++ b/include/hardware/camera.h @@ -267,9 +267,19 @@ typedef struct camera_device_ops { */ int (*set_parameters)(struct camera_device *, const char *parms); - /** Return the camera parameters. */ + /** Retrieve the camera parameters. The buffer returned by the camera HAL + must be returned back to it with put_parameters, if put_parameters + is not NULL. + */ char *(*get_parameters)(struct camera_device *); + /** The camera HAL uses its own memory to pass us the parameters when we + call get_parameters. Use this function to return the memory back to + the camera HAL, if put_parameters is not NULL. If put_parameters + is NULL, then you have to use free() to release the memory. + */ + void (*put_parameters)(struct camera_device *, char *); + /** * Send command to camera driver. */ |