kbingham / libcamera

libcamera - Making complex cameras easy. This is a personal fork, please use the upstream repository at https://git.libcamera.org/libcamera/libcamera.git/
https://libcamera.org
Other
173 stars 69 forks source link

MappedFrameBuffer class not accessible #91

Closed junoirt closed 8 months ago

junoirt commented 8 months ago

Currently the MappedFrameBuffer class is not accessible using #include <libcamera/libcamera.h>, the class needs to be manually added from the source of libcamera.

error: ‘MappedFrameBuffer’ is not a member of ‘libcamera’; did you mean ‘FrameBuffer’?
86.04   181 |                 libcamera::MappedFrameBuffer mappedBuffer(buffer, libcamera::MappedFrameBuffer::MapFlag::Read);
86.04       |                            ^~~~~~~~~~~~~~~~~
86.04       |                            FrameBuffer
kbingham commented 8 months ago

MappedFrameBuffer is not a part of the public libcamera API.

If you'd like to use it, and you are using open source software, you can simply copy the implementation. Otherwise, you can implement mapping of the buffer yourself.

I've tried to push this to public-api before, but it was rejected. Hopefully we'll have other concepts in the future for mapping an 'Image', but we don't have that now.