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
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// Qt-Security score:significant reason:default
4
5#ifndef QVSP2BLENDINGDEVICE_H
6#define QVSP2BLENDINGDEVICE_H
7
8#include <QtCore/QList>
9#include <QtCore/QRect>
10#include <QtCore/qglobal.h>
11
13
15
16class QSize;
17
19{
20public:
21 QVsp2BlendingDevice(const QSize& screenSize); //TODO: add support for output format as well?
22 bool enableInput(int i, const QRect &bufferGeometry, uint drmFormat, uint bytesPerLine);
23 int enableInput(const QRect &bufferGeometry, uint drmFormat, uint bytesPerLine);
24 bool disableInput(int i);
25 bool setInputBuffer(int index, int dmabufFd);
26 bool setInputPosition(int index, const QPoint &position);
27 bool setInputAlpha(int index, qreal alpha);
28 bool blend(int outputDmabufFd);
29 int numInputs() const;
30 bool isDirty() const { return m_dirty; }
31 bool hasContinuousLayers() const;
32private:
33 bool streamOn();
34 bool streamOff();
35 bool setInputFormat(int i, const QRect &bufferGeometry, uint pixelFormat, uint bytesPerLine);
36 QLinuxMediaDevice m_mediaDevice;
37 QLinuxMediaDevice::CaptureSubDevice *m_wpfOutput = nullptr; // wpf output
38 struct Input {
39 bool enabled = false;
40 QRect geometry;
41 qreal alpha = 1;
42 struct {
43 int fd = -1;
44 uint bytesUsed = 0;
45 uint length = 0;
46 } dmabuf;
47 struct media_link *linkToBru = nullptr; //rpf.x:1 -> bru:x
48 struct media_pad *inputFormatPad = nullptr; // rpf.x:0
49 struct media_pad *outputFormatPad = nullptr; // rpf.x:1
50 int outputFormatFd = -1; // rpf.x:1 (again, because v4l2_subdev_* doesn't have a way to set alpha)
51 struct media_pad *bruInputFormatPad = nullptr; // bru:x
52 QLinuxMediaDevice::OutputSubDevice *rpfInput = nullptr; // rpf.x input
53 };
54 QList<struct Input> m_inputs;
55 const QSize m_screenSize;
56 bool m_dirty = true;
57};
58
59QT_END_NAMESPACE
60
61#endif // QVSP2BLENDINGDEVICE
gbm_device * gbmDevice() const
void * nativeDisplay() const override
QEglFSKmsVsp2Device(QKmsScreenConfig *screenConfig, const QString &path)
void registerScreenCloning(QPlatformScreen *screen, QPlatformScreen *screenThisScreenClones, const QList< QPlatformScreen * > &screensCloningThisScreen) override
QPlatformScreen * createHeadlessScreen() override
QPlatformScreen * createScreen(const QKmsOutput &output) override
bool removeLayer(int id) override
void setLayerPosition(int id, const QPoint &position) override
gbm_surface * createSurface()
void setLayerBuffer(int id, int dmabufFd) override
void addBlendListener(void(*callback)()) override
int addLayer(int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine) override
void setLayerAlpha(int id, qreal alpha) override
QEglFSKmsVsp2Screen(QEglFSKmsDevice *device, const QKmsOutput &output)
QVsp2BlendingDevice(const QSize &screenSize)
int enableInput(const QRect &bufferGeometry, uint drmFormat, uint bytesPerLine)
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.