Make clazy happy

This commit is contained in:
Nicolas Werner 2024-01-08 01:30:12 +01:00
parent eed23cdf11
commit 8214e8dcf2
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -29,22 +29,24 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
static_cast<int>(error), static_cast<int>(error),
errorString.toStdString()); errorString.toStdString());
}); });
connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) { connect(
nhlog::ui()->info("Media player status {} and error {}", this, &MxcMediaProxy::mediaStatusChanged, this, [this](QMediaPlayer::MediaStatus status) {
static_cast<int>(status), nhlog::ui()->info("Media player status {} and error {}",
static_cast<int>(this->error())); static_cast<int>(status),
}); static_cast<int>(this->error()));
connect(this, &MxcMediaProxy::playbackStateChanged, [this](QMediaPlayer::PlaybackState status) { });
// We only set the output when starting the playback because otherwise the audio device connect(
// lookup takes about 500ms, which causes a lot of stutter... this, &MxcMediaProxy::playbackStateChanged, this, [this](QMediaPlayer::PlaybackState status) {
if (status == QMediaPlayer::PlayingState && !audioOutput()) { // We only set the output when starting the playback because otherwise the audio device
nhlog::ui()->debug("Set audio output"); // lookup takes about 500ms, which causes a lot of stutter...
auto newOut = new QAudioOutput(this); if (status == QMediaPlayer::PlayingState && !audioOutput()) {
newOut->setMuted(muted_); nhlog::ui()->debug("Set audio output");
newOut->setVolume(volume_); auto newOut = new QAudioOutput(this);
setAudioOutput(newOut); newOut->setMuted(muted_);
} newOut->setVolume(volume_);
}); setAudioOutput(newOut);
}
});
connect(this, &MxcMediaProxy::metaDataChanged, [this]() { emit orientationChanged(); }); connect(this, &MxcMediaProxy::metaDataChanged, [this]() { emit orientationChanged(); });
connect(ChatPage::instance()->timelineManager()->rooms(), connect(ChatPage::instance()->timelineManager()->rooms(),