[plasma/krdp] src: VideoStream: create the progressive source stream by node id on the portal path

David Edmundson <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit bcb2a0156b5bdf4a79ce22f6b5122552072af809 by David Edmundson, on behalf of Shouvik Kar.
Committed on 03/08/2026 at 15:05.
Pushed by davidedmundson into branch 'master'.

VideoStream: create the progressive source stream by node id on the portal path

When the progressive (raster) encoding mode is used over the XDG desktop portal, the source stream was created by casting the node id to a quint64 and calling createStream(objectSerial). The portal supplies a PipeWire node id, not an object serial, so PipeWire looked up a target object by a serial that does not exist: the stream never received any frames (PipeWire error -2, "target not found") and the client only saw a black screen.

Create the stream by object serial only when one was actually provided (the Plasma screencast path); otherwise create it by node id, matching what setPipeWireSource() and the H.264 path already do.

M  +7    -1    src/VideoStream.cpp

https://invent.kde.org/plasma/krdp/-/commit/bcb2a0156b5bdf4a79ce22f6b5122552072af809

diff --git a/src/VideoStream.cpp b/src/VideoStream.cpp
index ce0f68e..ddc3d2c 100644
--- a/src/VideoStream.cpp
+++ b/src/VideoStream.cpp
@@ -308,7 +308,13 @@ void VideoStream::setActiveEncodingMode(EncodingMode mode)
             Qt::QueuedConnection);
 
         if (d->nodeId != 0 && d->pipeWireFd) {
-            if (!d->sourceStream->createStream(static_cast<quint64>(d->nodeId), d->pipeWireFd)) {
+            bool created = false;
+            if (d->objectSerial != quint64(-1)) {
+                created = d->sourceStream->createStream(d->objectSerial, d->pipeWireFd);
+            } else {
+                created = d->sourceStream->createStream(d->nodeId, d->pipeWireFd);
+            }
+            if (!created) {
                 qCWarning(KRDP) << "Could not create PipeWire source stream" << d->sourceStream->error();
                 d->session->close(RdpConnection::CloseReason::VideoInitFailed);
                 return;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.