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>
This commit is contained in:
Jacopo Mondi 2020-10-02 19:40:42 +02:00
parent 94c4d49ebe
commit 3c84d88193
3 changed files with 26 additions and 17 deletions

View file

@ -100,7 +100,7 @@ public:
Mapped,
};
CameraStream(libcamera::PixelFormat format, libcamera::Size size,
Type type, unsigned int index, Encoder *encoder = nullptr);
Type type, unsigned int index);
const libcamera::PixelFormat &format() const { return format_; }
const libcamera::Size &size() const { return size_; }
@ -108,6 +108,8 @@ public:
unsigned int index() const { return index_; }
Encoder *encoder() const { return encoder_.get(); }
int configure(const libcamera::StreamConfiguration &cfg);
private:
libcamera::PixelFormat format_;
libcamera::Size size_;