GstEnginePipeline: Add separate set state async function

This commit is contained in:
Jonas Kvinge
2024-11-10 01:36:48 +01:00
parent 0a361bfb3b
commit 70d0772e04
3 changed files with 19 additions and 12 deletions

View File

@@ -349,7 +349,7 @@ void GstEngine::Pause() {
StartFadeoutPause();
}
else {
current_pipeline_->SetStateAsync(GST_STATE_PAUSED);
current_pipeline_->SetState(GST_STATE_PAUSED);
Q_EMIT StateChanged(State::Paused);
StopTimers();
}
@@ -371,7 +371,7 @@ void GstEngine::Unpause() {
has_faded_out_to_pause_ = false;
}
current_pipeline_->SetStateAsync(GST_STATE_PLAYING);
current_pipeline_->SetState(GST_STATE_PLAYING);
Q_EMIT StateChanged(State::Playing);
@@ -688,7 +688,7 @@ void GstEngine::FadeoutPauseFinished() {
if (!fadeout_pause_pipeline_) return;
fadeout_pause_pipeline_->SetStateAsync(GST_STATE_PAUSED);
fadeout_pause_pipeline_->SetState(GST_STATE_PAUSED);
Q_EMIT StateChanged(State::Paused);
StopTimers();
has_faded_out_to_pause_ = true;