libcamera  v0.0.0+100-debian/0_git20200629+e7aa92a-8-9-g77f5237c-dirty (2021-05-05T16:20:29+01:00)
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::MappedFrameBuffer Class Reference

Map a FrameBuffer using the MappedBuffer interface. More...

Inheritance diagram for libcamera::MappedFrameBuffer:
libcamera::MappedBuffer

Public Member Functions

 MappedFrameBuffer (const FrameBuffer *buffer, int flags)
 Map all planes of a FrameBuffer. More...
 
- Public Member Functions inherited from libcamera::MappedBuffer
 MappedBuffer (MappedBuffer &&other)
 Move constructor, construct the MappedBuffer with the contents of other using move semantics. More...
 
MappedBufferoperator= (MappedBuffer &&other)
 Move assignment operator, replace the mappings with those of other. More...
 
bool isValid () const
 Check if the MappedBuffer instance is valid. More...
 
int error () const
 Retrieve the map error status. More...
 
const std::vector< Plane > & maps () const
 Retrieve the mapped planes. More...
 

Additional Inherited Members

- Public Types inherited from libcamera::MappedBuffer
using Plane = Span< uint8_t >
 A mapped region of memory accessible to the CPU. More...
 
- Protected Member Functions inherited from libcamera::MappedBuffer
 MappedBuffer ()
 Construct an empty MappedBuffer.
 
- Protected Attributes inherited from libcamera::MappedBuffer
int error_
 Stores the error value if present. More...
 
std::vector< Planemaps_
 Stores the internal mapped planes. More...
 

Detailed Description

Map a FrameBuffer using the MappedBuffer interface.

Constructor & Destructor Documentation

◆ MappedFrameBuffer()

libcamera::MappedFrameBuffer::MappedFrameBuffer ( const FrameBuffer buffer,
int  flags 
)

Map all planes of a FrameBuffer.

Parameters
[in]bufferFrameBuffer to be mapped
[in]flagsProtection flags to apply to map

Construct an object to map a frame buffer for CPU access. The flags are passed directly to mmap and should be either PROT_READ, PROT_WRITE, or a bitwise-or combination of both.


The documentation for this class was generated from the following files: