mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
android: Move buffer mapping to CameraStream
The destination buffer for the post-processing component is currently first mapped in the CameraDevice class and then passed to CameraStream which simply calls the post-processor interface. Move the mapping to CameraStream::process() to tie the buffer mapping to the lifetime of the CameraBuffer instance. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
d5473c9626
commit
a725baf4b3
4 changed files with 16 additions and 18 deletions
|
@ -1857,19 +1857,8 @@ void CameraDevice::requestComplete(Request *request)
|
|||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* \todo Buffer mapping and compression should be moved to a
|
||||
* separate thread.
|
||||
*/
|
||||
|
||||
CameraBuffer dest(*descriptor->buffers_[i].buffer,
|
||||
PROT_READ | PROT_WRITE);
|
||||
if (!dest.isValid()) {
|
||||
LOG(HAL, Error) << "Failed to map android blob buffer";
|
||||
continue;
|
||||
}
|
||||
|
||||
int ret = cameraStream->process(*src, &dest,
|
||||
int ret = cameraStream->process(*src,
|
||||
*descriptor->buffers_[i].buffer,
|
||||
descriptor->settings_,
|
||||
resultMetadata.get());
|
||||
if (ret) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue