Skip to content

Commit

Permalink
bugfix on mac with QT 5.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jevois committed Oct 25, 2018
1 parent d64abcb commit cbe6e9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions Camera.C
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,7 @@ bool Camera::createCamera(QCameraInfo const & caminfo)

// Send a signal when we start grabbing, to update the modinfo:
connect(m_camera.data(), &QCamera::statusChanged, m_inventor, &JeVoisInventor::updateAfterSetMapping);
/*
[this](QCamera::Status status)
{
Q_UNUSED(status); // unused if debug is off
DEBU("Camera status changed to " << status);
// Note: a lambda singleshot does not work here, gives rise to threading issues
QTimer::singleShot(0, m_inventor, &JeVoisInventor::updateAfterSetMapping);
});
*/

// Connect our probe for fps info and detection of stream start:
m_probe.setSource(m_camera.data());

Expand Down
4 changes: 2 additions & 2 deletions JeVoisInventor.C
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,10 @@ void JeVoisInventor::setMapping(VideoMapping const & v)
// Store the mapping for future use:
m_currmapping = v;

// If the camera is not currently active, start right here; otherwise, first stop it:
// If the camera is active, stop it first, otherwise start it:
if (m_camera.status() == QCamera::ActiveStatus)
{
m_camera.showVideo(false, true);
m_camera.showVideo(false);
stopCamera(); // updateAfterSetMapping() will be called with a stopping status
}
else
Expand Down

0 comments on commit cbe6e9f

Please sign in to comment.