libcamera v0.7.0+1-4ceceb68
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
v4l2_request.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2025, Ideas On Board
4 *
5 * V4L2 Request
6 */
7
8#pragma once
9
10#include <string>
11
12#include <linux/videodev2.h>
13
15#include <libcamera/base/log.h>
18
19namespace libcamera {
20
21class V4L2Request : protected Loggable
22{
23public:
24 bool isValid() const { return fd_.isValid(); }
25 int fd() const { return fd_.get(); }
26
27 int reinit();
28 int queue();
29
31
33
34private:
36
37 void requestReady();
38 std::string logPrefix() const override;
39
40 UniqueFD fd_;
41 EventNotifier fdNotifier_;
42};
43
44} /* namespace libcamera */
#define LIBCAMERA_DISABLE_COPY_AND_MOVE(klass)
Disable copy and move construction and assignment of the klass.
Definition class.h:29
Notify of activity on a file descriptor.
Definition event_notifier.h:20
Base class to support log message extensions.
Definition log.h:92
Generic signal and slot communication mechanism.
Definition signal.h:39
unique_ptr-like wrapper for a file descriptor
Definition unique_fd.h:17
int get() const
Retrieve the managed file descriptor.
Definition unique_fd.h:59
bool isValid() const
Check if the UniqueFD owns a valid file descriptor.
Definition unique_fd.h:60
V4L2Request object and API.
Definition v4l2_request.h:22
Signal< V4L2Request * > requestDone
Signal that is emitted when the request is done.
Definition v4l2_request.h:32
bool isValid() const
Check if the request is valid.
Definition v4l2_request.h:24
int queue()
Queue the request.
Definition v4l2_request.cpp:102
int reinit()
Reinit the request.
Definition v4l2_request.cpp:85
int fd() const
Get the file descriptor.
Definition v4l2_request.h:25
File descriptor event notifier.
Logging infrastructure.
Top-level libcamera namespace.
Definition backtrace.h:17
Signal & slot implementation.
File descriptor wrapper that owns a file descriptor.