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.
This commit is contained in:
parent
fff462aed6
commit
4cda16ce3a
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue