mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix crash on windows (camera)
This commit is contained in:
parent
625715f505
commit
5f649d6f85
|
@ -10,11 +10,13 @@ Camera::Camera()
|
|||
camera->setCaptureMode(QCamera::CaptureVideo);
|
||||
camera->setViewfinder(this);
|
||||
|
||||
/* CRASHES ON WINDOWS !
|
||||
QMediaService *m = camera->service();
|
||||
QVideoEncoderSettingsControl *enc = m->requestControl<QVideoEncoderSettingsControl*>();
|
||||
QVideoEncoderSettings sets = enc->videoSettings();
|
||||
sets.setResolution(640, 480);
|
||||
enc->setVideoSettings(sets);
|
||||
*/
|
||||
|
||||
connect(camera, SIGNAL(error(QCamera::Error)), this, SLOT(onCameraError(QCamera::Error)));
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ Widget::Widget(QWidget *parent) :
|
|||
qRegisterMetaType<ToxFile::FileDirection>("ToxFile::FileDirection");
|
||||
|
||||
core = new Core(camera);
|
||||
core = new Core(nullptr);
|
||||
coreThread = new QThread(this);
|
||||
core->moveToThread(coreThread);
|
||||
connect(coreThread, &QThread::started, core, &Core::start);
|
||||
|
|
Loading…
Reference in New Issue
Block a user