PipeWireBaseEncodedStream moves the PipeWireProduce into another thread. It is
therefore it's responsiblity to ensure that any calls into PipeWireProduce are
run in the correct thread.
This addresses a warning about timers.
Gbp-Pq: Name upstream_9fe7a568_Adjust-timers-from-the-correct-thread.patch
}
d->m_maxFramerate = framerate;
- if (d->m_produce) {
- d->m_produce->setMaxFramerate(d->m_maxFramerate);
- }
+ // produce runs in another thread
+ QMetaObject::invokeMethod(
+ d->m_produce.get(),
+ [produce = d->m_produce.get(), framerate]() {
+ produce->setMaxFramerate(framerate);
+ },
+ Qt::QueuedConnection);
Q_EMIT maxFramerateChanged();
}