libcamera v0.6.0 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
libcamera::V4L2Request Class Reference

V4L2Request object and API. More...

Inheritance diagram for libcamera::V4L2Request:
[legend]
Collaboration diagram for libcamera::V4L2Request:
[legend]

## Public Member Functions
bool | isValid () const
| Check if the request is valid.
int | fd () const
| Get the file descriptor.
int | reinit ()
| Reinit the request.
int | queue ()
| Queue the request.
| V4L2Request (UniqueFD &&fd)
| Construct a V4L2Request.

## Public Attributes
Signal< V4L2Request * > | requestDone
| Signal that is emitted when the request is done.

## Additional Inherited Members
Protected Member Functions inherited from libcamera::Loggable
LogMessage | _log (const LogCategory &category, LogSeverity severity, const char *fileName=__builtin_FILE(), unsigned int line=__builtin_LINE()) const
| Create a temporary LogMessage object to log a message.

## Detailed Description

V4L2Request object and API.

The V4L2Request class wraps a V4L2 request fd and provides some convenience functions to handle request.

It is usually constructed by calling MediaDevice::allocateRequests().

A request can then be passed to the V4L2Device::setControls(), V4L2Device::getControls() and V4L2VideoDevice::queueBuffer().

## Constructor & Destructor Documentation

## ◆ V4L2Request()

libcamera::V4L2Request::V4L2Request | ( | UniqueFD && | fd | ) |

Construct a V4L2Request.

Parameters

  [in] | fd | The request fd

## Member Function Documentation

## ◆ fd()

int libcamera::V4L2Request::fd | ( |  | ) | const
| inline

Get the file descriptor.

Returns
  The file descriptor wrapped by this V4L2Request

## ◆ isValid()

bool libcamera::V4L2Request::isValid | ( |  | ) | const
| inline

Check if the request is valid.

Checks if the underlying fd is valid.

Returns
  True if the request is valid, false otherwise

## ◆ queue()

int libcamera::V4L2Request::queue | ( |  | ) |

Queue the request.

Calls MEDIA_REQUEST_IOC_QUEUE on the request fd.

Returns
  0 on success or a negative error code otherwise

## ◆ reinit()

int libcamera::V4L2Request::reinit | ( |  | ) |

Reinit the request.

Calls MEDIA_REQUEST_IOC_REINIT on the request fd.

Returns
  0 on success or a negative error code otherwise

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

- include/libcamera/internal/v4l2_request.h
- src/libcamera/v4l2_request.cpp