Player: Simplify creating engine

This commit is contained in:
Jonas Kvinge 2024-11-10 00:16:04 +01:00
parent 975d0dff25
commit 4b0b0aa989
1 changed files with 2 additions and 2 deletions

View File

@ -64,6 +64,7 @@
#include "analyzer/analyzercontainer.h" #include "analyzer/analyzercontainer.h"
using namespace std::chrono_literals; using namespace std::chrono_literals;
using std::make_unique;
namespace { namespace {
constexpr char kSettingsGroup[] = "Player"; constexpr char kSettingsGroup[] = "Player";
@ -125,8 +126,7 @@ EngineBase::Type Player::CreateEngine(EngineBase::Type enginetype) {
case EngineBase::Type::None: case EngineBase::Type::None:
case EngineBase::Type::GStreamer:{ case EngineBase::Type::GStreamer:{
use_enginetype=EngineBase::Type::GStreamer; use_enginetype=EngineBase::Type::GStreamer;
ScopedPtr<GstEngine> gst_engine(new GstEngine(task_manager_)); engine_ = make_unique<GstEngine>(task_manager_);
engine_.reset(gst_engine.release());
break; break;
} }
default: default: