1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
krepa098 2014-10-23 22:11:12 +02:00
parent 15851604cd
commit 20b7fb0c67
2 changed files with 2 additions and 10 deletions

View File

@ -20,8 +20,6 @@
#include <QThread>
#include <QMutexLocker>
Camera* Camera::instance = nullptr;
Camera::Camera()
: refcount(0)
, workerThread(nullptr)
@ -150,8 +148,7 @@ void Camera::onNewFrameAvailable(const VideoFrame frame)
Camera* Camera::getInstance()
{
if (!instance)
instance = new Camera();
static Camera instance;
return instance;
return &instance;
}

View File

@ -78,11 +78,6 @@ private:
QThread* workerThread;
CameraWorker* worker;
QList<QSize> resolutions;
static Camera* instance;
bool needsInit;
private slots:
void onNewFrameAvailable(const VideoFrame frame);