Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qvsp2blendingdevice.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QVSP2BLENDINGDEVICE_H
5#define QVSP2BLENDINGDEVICE_H
6
7#include <QtCore/QList>
8#include <QtCore/QRect>
9#include <QtCore/qglobal.h>
10
11#include "qlinuxmediadevice.h"
12
14
15class QSize;
16
18{
19public:
20 QVsp2BlendingDevice(const QSize& screenSize); //TODO: add support for output format as well?
21 bool enableInput(int i, const QRect &bufferGeometry, uint drmFormat, uint bytesPerLine);
22 int enableInput(const QRect &bufferGeometry, uint drmFormat, uint bytesPerLine);
23 bool disableInput(int i);
24 bool setInputBuffer(int index, int dmabufFd);
25 bool setInputPosition(int index, const QPoint &position);
26 bool setInputAlpha(int index, qreal alpha);
27 bool blend(int outputDmabufFd);
28 int numInputs() const;
29 bool isDirty() const { return m_dirty; }
30 bool hasContinuousLayers() const;
31private:
32 bool streamOn();
33 bool streamOff();
34 bool setInputFormat(int i, const QRect &bufferGeometry, uint pixelFormat, uint bytesPerLine);
35 QLinuxMediaDevice m_mediaDevice;
36 QLinuxMediaDevice::CaptureSubDevice *m_wpfOutput = nullptr; // wpf output
37 struct Input {
38 bool enabled = false;
39 QRect geometry;
40 qreal alpha = 1;
41 struct {
42 int fd = -1;
43 uint bytesUsed = 0;
44 uint length = 0;
45 } dmabuf;
46 struct media_link *linkToBru = nullptr; //rpf.x:1 -> bru:x
47 struct media_pad *inputFormatPad = nullptr; // rpf.x:0
48 struct media_pad *outputFormatPad = nullptr; // rpf.x:1
49 int outputFormatFd = -1; // rpf.x:1 (again, because v4l2_subdev_* doesn't have a way to set alpha)
50 struct media_pad *bruInputFormatPad = nullptr; // bru:x
51 QLinuxMediaDevice::OutputSubDevice *rpfInput = nullptr; // rpf.x input
52 };
53 QList<struct Input> m_inputs;
54 const QSize m_screenSize;
55 bool m_dirty = true;
56};
57
59
60#endif // QVSP2BLENDINGDEVICE
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
QVsp2BlendingDevice(const QSize &screenSize)
bool blend(int outputDmabufFd)
bool setInputBuffer(int index, int dmabufFd)
bool enableInput(int i, const QRect &bufferGeometry, uint drmFormat, uint bytesPerLine)
bool setInputPosition(int index, const QPoint &position)
bool setInputAlpha(int index, qreal alpha)
Combined button and popup list for selecting options.
GLuint index
[2]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint64 GLenum GLint fd
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
unsigned int uint
Definition qtypes.h:34
double qreal
Definition qtypes.h:187