libcamera  v0.1.0+127-8e215127
Supporting cameras in Linux since 2019
Public Member Functions | List of all members
libcamera::V4L2M2MDevice Class Reference

Memory-to-Memory video device. More...

Public Member Functions

 V4L2M2MDevice (const std::string &deviceNode)
 Create a new V4L2M2MDevice from the deviceNode. More...
int open ()
 Open a V4L2 Memory to Memory device. More...
void close ()
 Close the memory-to-memory device, releasing any resources acquired by open()
V4L2VideoDeviceoutput ()
 Retrieve the output V4L2VideoDevice instance. More...
V4L2VideoDevicecapture ()
 Retrieve the capture V4L2VideoDevice instance. More...

Detailed Description

Memory-to-Memory video device.

The V4L2M2MDevice manages two V4L2VideoDevice instances on the same deviceNode which operate together using two queues to implement the V4L2 Memory to Memory API.

The two devices should be opened by calling open() on the V4L2M2MDevice, and can be closed by calling close on the V4L2M2MDevice.

Calling V4L2VideoDevice::open() and V4L2VideoDevice::close() on the capture or output V4L2VideoDevice is not permitted.

Constructor & Destructor Documentation

◆ V4L2M2MDevice()

libcamera::V4L2M2MDevice::V4L2M2MDevice ( const std::string &  deviceNode)

Create a new V4L2M2MDevice from the deviceNode.

[in]deviceNodeThe file-system path to the video device node

Member Function Documentation

◆ capture()

libcamera::V4L2M2MDevice::capture ( )

Retrieve the capture V4L2VideoDevice instance.

The capture V4L2VideoDevice instance

◆ open()

int libcamera::V4L2M2MDevice::open ( )

Open a V4L2 Memory to Memory device.

Open the device node and prepare the two V4L2VideoDevice instances to handle their respective buffer queues.

0 on success or a negative error code otherwise

◆ output()

libcamera::V4L2M2MDevice::output ( )

Retrieve the output V4L2VideoDevice instance.

The output V4L2VideoDevice instance

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