15#include <pipewire/pipewire.h>
16#include <spa/param/format-utils.h>
17#include <spa/param/props.h>
18#include <spa/param/video/format-utils.h>
20#include <kpipewire_export.h>
22struct DmaBufAttributes;
23class PipeWireSourceStream;
25class PipeWireFrameData;
28typedef void *EGLImage;
30class PipeWireSourceItemPrivate;
32class KPIPEWIRE_EXPORT PipeWireSourceItem :
public QQuickItem
37 Q_PROPERTY(StreamState state READ state NOTIFY stateChanged)
40 Q_PROPERTY(uint nodeId READ nodeId WRITE setNodeId NOTIFY nodeIdChanged)
47 Q_PROPERTY(uint fd READ fd WRITE setFd NOTIFY fdChanged RESET resetFd)
58 Q_PROPERTY(
bool allowDmaBuf READ allowDmaBuf WRITE setAllowDmaBuf)
60 Q_PROPERTY(
bool usingDmaBuf READ usingDmaBuf NOTIFY usingDmaBufChanged)
65 Q_PROPERTY(
bool ready READ isReady NOTIFY readyChanged)
68 enum class StreamState {
Error, Unconnected,
Connecting, Paused, Streaming };
71 PipeWireSourceItem(
QQuickItem *parent =
nullptr);
72 ~PipeWireSourceItem()
override;
77 void setNodeId(uint nodeId);
84 QSize streamSize()
const;
86 bool usingDmaBuf()
const;
87 bool allowDmaBuf()
const;
88 void setAllowDmaBuf(
bool allowed);
95 StreamState
state()
const;
98 void nodeIdChanged(uint nodeId);
99 void fdChanged(uint fd);
100 void streamSizeChanged();
102 void usingDmaBufChanged();
106 void itemChange(ItemChange change,
const ItemChangeData &data)
override;
107 void processFrame(
const PipeWireFrame &frame);
108 void updateTextureDmaBuf(
const DmaBufAttributes &attribs, spa_video_format format);
109 void updateTextureImage(
const std::shared_ptr<PipeWireFrameData> &data);
111 void setReady(
bool ready);
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
virtual void componentComplete() override
virtual void itemChange(ItemChange change, const ItemChangeData &value)
virtual void releaseResources()
virtual QSGNode * updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:17 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.