Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qv4l2filedescriptor_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QV4L2FILEDESCRIPTOR_P_H
5#define QV4L2FILEDESCRIPTOR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qtclasshelpermacros.h>
19#include <QtCore/private/quniquehandle_types_p.h>
20#include <QtCore/private/qexpected_p.h>
21
22#include <QtMultimedia/private/qtmultimediaglobal_p.h>
23
24#include <linux/videodev2.h>
25
26#include <system_error>
27
28QT_BEGIN_NAMESPACE
29
30namespace QtV4L2 {
31
33{
34public:
35 explicit QV4L2FileDescriptor(QUniqueFileDescriptorHandle descriptor);
36
38
39 q23::expected<int, std::error_code> call(int request, void *arg) const;
40
41 q23::expected<int, std::error_code> requestBuffers(v4l2_memory memoryType,
42 uint32_t bufferCount) const;
43 q23::expected<void, std::error_code> releaseAllBuffers(v4l2_memory) const;
44
45 bool startStream();
46
47 bool stopStream();
48
49 bool streamStarted() const { return m_streamStarted; }
50
51private:
52 bool m_streamStarted = false;
53};
54
55} // namespace QtV4L2
56
57QT_END_NAMESPACE
58
59#endif // QV4L2FILEDESCRIPTOR_P_H
q23::expected< int, std::error_code > requestBuffers(v4l2_memory memoryType, uint32_t bufferCount) const
q23::expected< void, std::error_code > releaseAllBuffers(v4l2_memory) const
QV4L2FileDescriptor(QUniqueFileDescriptorHandle descriptor)
Combined button and popup list for selecting options.