mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
cleanup
This commit is contained in:
parent
15851604cd
commit
20b7fb0c67
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -78,11 +78,6 @@ private:
|
|||
QThread* workerThread;
|
||||
CameraWorker* worker;
|
||||
|
||||
QList<QSize> resolutions;
|
||||
|
||||
static Camera* instance;
|
||||
bool needsInit;
|
||||
|
||||
private slots:
|
||||
void onNewFrameAvailable(const VideoFrame frame);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user