diff --git a/assignment-client/src/AssignmentClient.cpp b/assignment-client/src/AssignmentClient.cpp index 40d3adab62..3b209f2e57 100644 --- a/assignment-client/src/AssignmentClient.cpp +++ b/assignment-client/src/AssignmentClient.cpp @@ -174,9 +174,6 @@ void AssignmentClient::assignmentCompleted() { NodeList* nodeList = NodeList::getInstance(); - // move the NodeList back to our thread - nodeList->moveToThread(thread()); - // reset our NodeList by switching back to unassigned and clearing the list nodeList->setOwnerType(NODE_TYPE_UNASSIGNED); nodeList->reset(); diff --git a/assignment-client/src/metavoxels/MetavoxelServer.cpp b/assignment-client/src/metavoxels/MetavoxelServer.cpp index bb3787137d..af982abf9b 100644 --- a/assignment-client/src/metavoxels/MetavoxelServer.cpp +++ b/assignment-client/src/metavoxels/MetavoxelServer.cpp @@ -29,7 +29,7 @@ void MetavoxelServer::removeSession(const QUuid& sessionId) { delete _sessions.take(sessionId); } -const char METAVOXEL_SERVER_LOGGING_NAME[] = "avatar-mixer"; +const char METAVOXEL_SERVER_LOGGING_NAME[] = "metavoxel-server"; void MetavoxelServer::run() { commonInit(METAVOXEL_SERVER_LOGGING_NAME, NODE_TYPE_METAVOXEL_SERVER); diff --git a/interface/src/devices/Webcam.cpp b/interface/src/devices/Webcam.cpp index 79e5c109cb..787da8b577 100644 --- a/interface/src/devices/Webcam.cpp +++ b/interface/src/devices/Webcam.cpp @@ -86,7 +86,7 @@ void Webcam::reset() { } void Webcam::renderPreview(int screenWidth, int screenHeight) { -#ifdef HAVE_LIBVPX +#ifdef HAVE_LIBVPX if (_enabled) { glEnable(GL_TEXTURE_2D); glColor3f(1.0f, 1.0f, 1.0f); @@ -431,9 +431,7 @@ static SimpleBlobDetector::Params createBlobDetectorParams() { FrameGrabber::FrameGrabber() : _initialized(false), _videoSendMode(FULL_FRAME_VIDEO), _depthOnly(false), _ledTrackingOn(false), _capture(0), _searchWindow(0, 0, 0, 0), _smoothedMidFaceDepth(UNINITIALIZED_FACE_DEPTH), -#ifdef HAVE_LIBVPX _colorCodec(), _depthCodec(), -#endif _frameCount(0), _blobDetector(createBlobDetectorParams()) { } @@ -575,7 +573,6 @@ static Point clip(const Point& point, const Rect& bounds) { } void FrameGrabber::grabFrame() { -#ifdef HAVE_LIBVPX if (!(_initialized || init())) { return; } @@ -957,7 +954,6 @@ void FrameGrabber::grabFrame() { Q_ARG(cv::Mat, color), Q_ARG(int, format), Q_ARG(cv::Mat, _grayDepthFrame), Q_ARG(float, _smoothedMidFaceDepth), Q_ARG(float, aspectRatio), Q_ARG(cv::RotatedRect, _smoothedFaceRect), Q_ARG(bool, !payload.isEmpty()), Q_ARG(JointVector, joints), Q_ARG(KeyPointVector, keyPoints)); -#endif } bool FrameGrabber::init() { @@ -1037,7 +1033,6 @@ void FrameGrabber::updateHSVFrame(const Mat& frame, int format) { } void FrameGrabber::destroyCodecs() { -#ifdef HAVE_LIBVPX if (_colorCodec.name != 0) { vpx_codec_destroy(&_colorCodec); _colorCodec.name = 0; @@ -1046,7 +1041,6 @@ void FrameGrabber::destroyCodecs() { vpx_codec_destroy(&_depthCodec); _depthCodec.name = 0; } -#endif } diff --git a/interface/src/devices/Webcam.h b/interface/src/devices/Webcam.h index cbc7807254..d25299000b 100644 --- a/interface/src/devices/Webcam.h +++ b/interface/src/devices/Webcam.h @@ -152,10 +152,8 @@ private: cv::Mat _grayDepthFrame; float _smoothedMidFaceDepth; -#ifdef HAVE_LIBVPX vpx_codec_ctx_t _colorCodec; vpx_codec_ctx_t _depthCodec; -#endif int _frameCount; cv::Mat _faceColor; cv::Mat _faceDepth; diff --git a/libraries/avatars/src/HandData.cpp b/libraries/avatars/src/HandData.cpp index b8704777de..1b942e8f07 100644 --- a/libraries/avatars/src/HandData.cpp +++ b/libraries/avatars/src/HandData.cpp @@ -41,7 +41,7 @@ PalmData& HandData::addNewPalm() { const PalmData* HandData::getPalm(int sixSenseID) const { // the palms are not necessarily added in left-right order, // so we have to search for the right SixSenseID - for (int i = 0; i < _palms.size(); i++) { + for (unsigned int i = 0; i < _palms.size(); i++) { const PalmData* palm = &(_palms[i]); if (palm->getSixenseID() == sixSenseID) { return palm->isActive() ? palm : NULL; diff --git a/libraries/shared/src/ThreadedAssignment.cpp b/libraries/shared/src/ThreadedAssignment.cpp index 8411c26fc6..7c7e07863a 100644 --- a/libraries/shared/src/ThreadedAssignment.cpp +++ b/libraries/shared/src/ThreadedAssignment.cpp @@ -6,7 +6,8 @@ // Copyright (c) 2013 HighFidelity, Inc. All rights reserved. // -#include +#include +#include #include "Logging.h" #include "ThreadedAssignment.h" @@ -18,6 +19,12 @@ ThreadedAssignment::ThreadedAssignment(const unsigned char* dataBuffer, int numB } +void ThreadedAssignment::deleteLater() { + // move the NodeList back to the QCoreApplication instance's thread + NodeList::getInstance()->moveToThread(QCoreApplication::instance()->thread()); + QObject::deleteLater(); +} + void ThreadedAssignment::setFinished(bool isFinished) { _isFinished = isFinished; diff --git a/libraries/shared/src/ThreadedAssignment.h b/libraries/shared/src/ThreadedAssignment.h index 0dfd8a320f..301a81bcf3 100644 --- a/libraries/shared/src/ThreadedAssignment.h +++ b/libraries/shared/src/ThreadedAssignment.h @@ -21,6 +21,8 @@ public slots: /// threaded run of assignment virtual void run() = 0; + virtual void deleteLater(); + virtual void processDatagram(const QByteArray& dataByteArray, const HifiSockAddr& senderSockAddr) = 0; protected: void commonInit(const char* targetName, NODE_TYPE nodeType);