49 bool open(QDBusUnixFileDescriptor);
61 void onStateChanged(pw_stream_state old, pw_stream_state state,
const char *error);
63 void onParamChanged(uint32_t id,
const struct spa_pod *param);
65 void recreateStream();
66 void destroyStream(
bool waitForStreamEnd);
68 void signalLoop(
bool onProcessDone,
bool err);
70 QString allocateToken();
71 bool subscribeToRequestResponse(
const QString &handleToken);
72 void unsubscribeFromRequestResponse();
73 void createInterface();
75 void selectSources(
const QDBusObjectPath &sessionHandle);
77 void updateStreams(
const QDBusArgument &streamsInfo);
78 void openPipeWireRemote();
88 QVideoFrame m_currentFrame;
89 QVideoFrameFormat m_videoFrameFormat;
90 QVideoFrameFormat::PixelFormat m_pixelFormat{};
93 PwCoreConnectionHandle m_core;
95 PwRegistryHandle m_registry =
nullptr;
97 PwStreamHandle m_stream =
nullptr;
98 spa_hook m_streamListener = {};
100 spa_video_info m_format{};
103 bool m_ignoreStateChange =
false;
104 pw_stream_state m_streamState{};
105 bool m_processed =
false;
107 const QString m_requestTokenPrefix;
108 quint64 m_tokenCounter = 0;
109 QString m_pendingRequestPath;
110 QDBusObjectPath m_sessionHandle;
111 std::unique_ptr<QDBusInterface> m_sessionInterface;
119 QVector<StreamInfo> m_streams;
121 std::unique_ptr<QDBusInterface> m_screenCastInterface;
123 enum OperationState { NoOperation, CreateSession, SelectSources, StartStream, OpenPipeWireRemote };
124 OperationState m_operationState = NoOperation;
126 enum State { NoState, Starting, Streaming, Stopping };
127 State m_state = NoState;