Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5174

Camera board • Re: When using libcamera accessing the camera buffer is very slow.

$
0
0
That really helped a lot, thanks.

However upon looking through the rest of the rpicam-app source I find that in the 'requestComplete' function they are also doing:

Code:

struct dma_buf_sync dma_sync {};dma_sync.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ;for (auto const &buffer_map : request->buffers()){auto it = mapped_buffers_.find(buffer_map.second);if (it == mapped_buffers_.end())throw std::runtime_error("failed to identify request complete buffer");int ret = ::ioctl(buffer_map.second->planes()[0].fd.get(), DMA_BUF_IOCTL_SYNC, &dma_sync);if (ret)throw std::runtime_error("failed to sync dma buf on request complete");}
What is the purpose of this and is it needed. Note that I did not add this to my project and I still seemed to be access the frame buffer data.

Statistics: Posted by John Gaby — Wed Jan 17, 2024 2:57 am



Viewing all articles
Browse latest Browse all 5174

Trending Articles