|
|
@ -86,8 +86,7 @@ CoreAV::CoreAV(std::unique_ptr<ToxAV, ToxAVDeleter> toxav) |
|
|
|
|
|
|
|
|
|
|
|
connect(iterateTimer, &QTimer::timeout, this, &CoreAV::process); |
|
|
|
connect(iterateTimer, &QTimer::timeout, this, &CoreAV::process); |
|
|
|
connect(coreavThread.get(), &QThread::finished, iterateTimer, &QTimer::stop); |
|
|
|
connect(coreavThread.get(), &QThread::finished, iterateTimer, &QTimer::stop); |
|
|
|
|
|
|
|
connect(coreavThread.get(), &QThread::started, this, &CoreAV::process); |
|
|
|
coreavThread->start(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CoreAV::connectCallbacks(ToxAV& toxav) |
|
|
|
void CoreAV::connectCallbacks(ToxAV& toxav) |
|
|
@ -164,10 +163,7 @@ CoreAV::~CoreAV() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void CoreAV::start() |
|
|
|
void CoreAV::start() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Timers can only be touched from their own thread
|
|
|
|
coreavThread->start(); |
|
|
|
if (QThread::currentThread() != coreavThread.get()) |
|
|
|
|
|
|
|
return (void)QMetaObject::invokeMethod(this, "start", Qt::BlockingQueuedConnection); |
|
|
|
|
|
|
|
iterateTimer->start(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CoreAV::process() |
|
|
|
void CoreAV::process() |
|
|
|