Commit graph

4 commits

Author SHA1 Message Date
Jacopo Mondi
160bb0998b android: camera_stream: Construct with Android stream
Pass the android camera3_stream_t, and a libcamera::StreamConfiguration
to identify the source and destination parameters of this stream.

Pass a CameraDevice pointer to the CameraStream constructor to allow
retrieval of the StreamConfiguration associated with the CameraStream.

Also change the format on which the CameraDevice performs checks to
decide if post-processing is required, as the libcamera facing format is
not meaningful anymore, but the Android requested format should be used
instead.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-07 16:07:44 +02:00
Jacopo Mondi
3c84d88193 android: camera_stream: Delegate Encoder construction
Delegate the construction of the encoder to the CameraStream class
for streams that need post-processing.

Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-07 16:07:44 +02:00
Jacopo Mondi
94c4d49ebe android: camera_stream: Add CameraStream::Type
Define the CameraStream::Type enumeration and assign it to
each CameraStream instance at construction time.

The CameraStream type will be used to decide if memory needs to be
allocated on its behalf or if the stream is backed by memory externally
allocated by the Android framework.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-07 16:07:44 +02:00
Jacopo Mondi
5cf64b26a2 android: camera_stream: Break out CameraStream
Break CameraStream out of the CameraDevice class.

No functional changes, only the code is moved.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-10-07 16:07:43 +02:00