Player: Simplify creating engine
This commit is contained in:
parent
975d0dff25
commit
4b0b0aa989
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue