screencasting: Close streams when the output is disabled

It's technically possible to keep it somewhat going right now and just
not send frames but it doesn't make much intuitive sense.
master
Aleix Pol Gonzalez 2 years ago committed by Vlad Zahorodnii
parent fff462aed6
commit 4cda16ce3a

@ -22,6 +22,11 @@ OutputScreenCastSource::OutputScreenCastSource(Output *output, QObject *parent)
, m_output(output)
{
connect(m_output, &QObject::destroyed, this, &ScreenCastSource::closed);
connect(m_output, &Output::enabledChanged, this, [this] {
if (!m_output->isEnabled()) {
Q_EMIT closed();
}
});
}
bool OutputScreenCastSource::hasAlphaChannel() const

Loading…
Cancel
Save