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 bool subscribeToRequestResponse(
const QString &handleToken);
71 void unsubscribeFromRequestResponse();
72 void createInterface();
74 void selectSources(
const QDBusObjectPath &sessionHandle);
76 void updateStreams(
const QDBusArgument &streamsInfo);
77 void openPipeWireRemote();
87 QVideoFrame m_currentFrame;
88 QVideoFrameFormat m_videoFrameFormat;
89 QVideoFrameFormat::PixelFormat m_pixelFormat{};
92 PwCoreConnectionHandle m_core;
94 PwRegistryHandle m_registry =
nullptr;
96 PwStreamHandle m_stream =
nullptr;
97 spa_hook m_streamListener = {};
99 spa_video_info m_format{};
102 bool m_ignoreStateChange =
false;
103 pw_stream_state m_streamState{};
104 bool m_processed =
false;
106 QString m_pendingRequestPath;
107 QDBusObjectPath m_sessionHandle;
108 std::unique_ptr<QDBusInterface> m_sessionInterface;
116 QVector<StreamInfo> m_streams;
118 std::unique_ptr<QDBusInterface> m_screenCastInterface;
120 enum OperationState { NoOperation, CreateSession, SelectSources, StartStream, OpenPipeWireRemote };
121 OperationState m_operationState = NoOperation;
123 enum State { NoState, Starting, Streaming, Stopping };
124 State m_state = NoState;