android: camera_device: Simplify FrameBuffer construction from a buffer_handle_t

Move the code which constructs a FrameBuffer from the Android buffer handle
to it's own function to simplify the code flow and readability.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Kieran Bingham 2020-07-01 13:25:38 +01:00
parent 0a9244ed37
commit 74ab442dcf
2 changed files with 20 additions and 16 deletions

View file

@ -70,6 +70,7 @@ private:
int initializeStreamConfigurations();
std::tuple<uint32_t, uint32_t> calculateStaticMetadataSize();
libcamera::FrameBuffer *createFrameBuffer(const buffer_handle_t camera3buffer);
void notifyShutter(uint32_t frameNumber, uint64_t timestamp);
void notifyError(uint32_t frameNumber, camera3_stream_t *stream);
libcamera::PixelFormat toPixelFormat(int format);