Fix webcam build
This commit is contained in:
parent
0ed3448c6a
commit
1c283db3ec
3 changed files with 17 additions and 7 deletions
|
@ -36,6 +36,16 @@ Canon::Canon() {
|
|||
|
||||
Canon::~Canon() {}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void Canon::onImageReady(const bool& status) { m_converterSucceeded = status; }
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void Canon::onFinished() { l_quitLoop = true; }
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
#ifdef WITH_CANON
|
||||
EdsError Canon::initializeCanonSDK() {
|
||||
m_error = EdsInitializeSDK();
|
||||
|
@ -1163,12 +1173,6 @@ bool Canon::downloadEVFData() {
|
|||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void Canon::onImageReady(const bool& status) { m_converterSucceeded = status; }
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
void Canon::onFinished() { l_quitLoop = true; }
|
||||
|
||||
EdsError Canon::focusNear() {
|
||||
EdsError err = EDS_ERR_OK;
|
||||
err = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
|
||||
|
|
|
@ -268,7 +268,9 @@ StopMotion::StopMotion() {
|
|||
|
||||
StopMotion::~StopMotion() {
|
||||
disconnectAllCameras();
|
||||
#ifdef WITH_CANON
|
||||
m_canon->closeAll();
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -321,11 +323,13 @@ void StopMotion::onSceneSwitched() {
|
|||
//-----------------------------------------------------------------
|
||||
|
||||
void StopMotion::disconnectAllCameras() {
|
||||
#ifdef WITH_CANON
|
||||
if (m_liveViewStatus > LiveViewClosed) {
|
||||
m_canon->resetCanon(true);
|
||||
} else {
|
||||
m_canon->resetCanon(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_usingWebcam) {
|
||||
m_webcam->releaseWebcam();
|
||||
|
@ -1649,7 +1653,7 @@ void StopMotion::captureImage() {
|
|||
return;
|
||||
}
|
||||
if (m_usingWebcam) {
|
||||
if (!m_hasLiveViewImage) {
|
||||
if (!m_hasLiveViewImage || m_liveViewStatus != LiveViewOpen) {
|
||||
DVGui::warning(
|
||||
tr("Cannot capture webcam image unless live view is active."));
|
||||
return;
|
||||
|
|
|
@ -1149,7 +1149,9 @@ void StopMotionController::setPage(int index) {
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
void StopMotionController::onScaleFullSizeImagesChanged(int checked) {
|
||||
#ifdef WITH_CANON
|
||||
m_stopMotion->m_canon->setUseScaledImages(checked > 0 ? true : false);
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue