KPipewire
            
 
   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 
   38    Q_PROPERTY(StreamState state READ state NOTIFY stateChanged)
 
   41    Q_PROPERTY(uint nodeId READ nodeId WRITE setNodeId NOTIFY nodeIdChanged)
 
   48    Q_PROPERTY(uint fd READ fd WRITE setFd NOTIFY fdChanged RESET resetFd)
 
   54    Q_PROPERTY(QSize streamSize READ streamSize NOTIFY streamSizeChanged)
 
   59    Q_PROPERTY(
bool allowDmaBuf READ allowDmaBuf WRITE setAllowDmaBuf)
 
   61    Q_PROPERTY(
bool usingDmaBuf READ usingDmaBuf NOTIFY usingDmaBufChanged)
 
   66    Q_PROPERTY(
bool ready READ isReady NOTIFY readyChanged)
 
   69    enum class StreamState { 
Error, Unconnected, 
Connecting, Paused, Streaming };
 
   72    PipeWireSourceItem(QQuickItem *parent = 
nullptr);
 
   73    ~PipeWireSourceItem() 
override;
 
   75    QSGNode *
updatePaintNode(QSGNode *node, UpdatePaintNodeData *data) 
override;
 
   76    Q_SCRIPTABLE QString 
error() 
const;
 
   78    void setNodeId(uint nodeId);
 
   85    QSize streamSize() 
const;
 
   87    bool usingDmaBuf() 
const;
 
   88    bool allowDmaBuf() 
const;
 
   89    void setAllowDmaBuf(
bool allowed);
 
   96    StreamState 
state() 
const;
 
   99    void nodeIdChanged(uint nodeId);
 
  100    void fdChanged(uint fd);
 
  101    void streamSizeChanged();
 
  103    void usingDmaBufChanged();
 
  107    void itemChange(ItemChange change, 
const ItemChangeData &data) 
override;
 
  108    void processFrame(
const PipeWireFrame &frame);
 
  109    void updateTextureDmaBuf(
const DmaBufAttributes &attribs, spa_video_format format);
 
  110    void updateTextureImage(
const std::shared_ptr<PipeWireFrameData> &data);
 
  112    void setReady(
bool ready);
 
  114    QScopedPointer<PipeWireSourceItemPrivate> d;
 
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-2025 The KDE developers.
  Generated on Fri May 2 2025 12:00:27 by
  
doxygen 1.13.2 written
  by 
Dimitri van Heesch, © 1997-2006
  
  KDE's Doxygen guidelines are available online.