Commit 039ead33 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): little fixes for qml profiler

parent 36e43fe3
...@@ -156,12 +156,11 @@ void App::initContentApp () { ...@@ -156,12 +156,11 @@ void App::initContentApp () {
// Load splashscreen. // Load splashscreen.
activeSplashScreen(this); activeSplashScreen(this);
CoreManager *core = CoreManager::getInstance(); QObject::connect(
CoreManager::getInstance(),
if (m_parser.isSet("selftest")) &CoreManager::linphoneCoreCreated,
QObject::connect(core, &CoreManager::linphoneCoreCreated, this, &App::quit); this, m_parser.isSet("selftest") ? &App::quit : &App::openAppAfterInit
else );
QObject::connect(core, &CoreManager::linphoneCoreCreated, this, &App::openAppAfterInit);
QObject::connect( QObject::connect(
this, &App::receivedMessage, this, [this](int, QByteArray message) { this, &App::receivedMessage, this, [this](int, QByteArray message) {
......
...@@ -69,13 +69,7 @@ void CoreManager::init (QObject *parent, const QString &config_path) { ...@@ -69,13 +69,7 @@ void CoreManager::init (QObject *parent, const QString &config_path) {
QTimer *timer = m_instance->m_cbs_timer = new QTimer(m_instance); QTimer *timer = m_instance->m_cbs_timer = new QTimer(m_instance);
timer->setInterval(20); timer->setInterval(20);
QObject::connect( QObject::connect(timer, &QTimer::timeout, m_instance, &CoreManager::iterate);
timer, &QTimer::timeout, m_instance, []() {
m_instance->lockVideoRender();
m_instance->m_core->iterate();
m_instance->unlockVideoRender();
}
);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -136,3 +130,11 @@ void CoreManager::createLinphoneCore (const QString &config_path) { ...@@ -136,3 +130,11 @@ void CoreManager::createLinphoneCore (const QString &config_path) {
setDatabasesPaths(); setDatabasesPaths();
setOtherPaths(); setOtherPaths();
} }
// -----------------------------------------------------------------------------
void CoreManager::iterate () {
m_instance->lockVideoRender();
m_instance->m_core->iterate();
m_instance->unlockVideoRender();
}
...@@ -116,6 +116,8 @@ private: ...@@ -116,6 +116,8 @@ private:
void createLinphoneCore (const QString &config_path); void createLinphoneCore (const QString &config_path);
void iterate ();
std::shared_ptr<linphone::Core> m_core; std::shared_ptr<linphone::Core> m_core;
std::shared_ptr<CoreHandlers> m_handlers; std::shared_ptr<CoreHandlers> m_handlers;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment