void AviVideoCapturing::RenderFrame() { if (IsCapturing()) { if (!aviGenerator->readOpenglPixelDataThreaded()) { StopCapturing(); } // LOG("Saved avi frame size %i %i", ih->biWidth, ih->biHeight); } }
int IPCameraCapture::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: abort(); break; case 1: readyRead((*reinterpret_cast< const QHttpResponseHeader(*)>(_a[1]))); break; case 2: requestFinished((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; case 3: ConnectToCamera((*reinterpret_cast< Camera_t*(*)>(_a[1]))); break; case 4: StopCapturing(); break; case 5: httpStateChanged((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } _id -= 6; } return _id; }
void MyFrame::OnButtonStop(wxCommandEvent& WXUNUSED(event)) { Debug.Write("Stop button clicked\n"); StopCapturing(); }
/* * OnExposeComplete is the dispatch routine that is called when an image has been taken * by the background thread. * * It: * - causes the image to be redrawn by calling pGuider->UpateImageDisplay() * - calls the routine to update the guider state (which may do nothing) * - calls any other appropriate state update routine depending upon the current state * - updates button state based on appropriate state variables * - schedules another exposure if CaptureActive is stil true * */ void MyFrame::OnExposeComplete(usImage *pNewFrame, bool err) { try { Debug.Write("Processing an image\n"); m_exposurePending = false; if (pGuider->GetPauseType() == PAUSE_FULL) { delete pNewFrame; Debug.Write("guider is paused, ignoring frame, not scheduling exposure\n"); return; } if (err) { Debug.Write("OnExposeComplete(): Capture Error reported\n"); delete pNewFrame; StopCapturing(); if (pGuider->IsCalibratingOrGuiding()) { pGuider->StopGuiding(); pGuider->UpdateImageDisplay(); } pGuider->Reset(false); CaptureActive = m_continueCapturing; UpdateButtonsStatus(); PhdController::AbortController("Error reported capturing image"); SetStatusText(_("Stopped.")); // some camera drivers disconnect the camera on error if (!pCamera->Connected) SetStatusText(wxEmptyString, 2); throw ERROR_INFO("Error reported capturing image"); } ++m_frameCounter; if (m_rawImageMode && !m_rawImageModeWarningDone) { WarnRawImageMode(); m_rawImageModeWarningDone = true; } // check for dark frame compatibility in case the frame size changed (binning changed) if (pCamera->DarkFrameSize() != m_prevDarkFrameSize) { CheckDarkFrameGeometry(); } pGuider->UpdateGuideState(pNewFrame, !m_continueCapturing); pNewFrame = NULL; // the guider owns it now PhdController::UpdateControllerState(); Debug.Write(wxString::Format("OnExposeCompete: CaptureActive=%d m_continueCapturing=%d\n", CaptureActive, m_continueCapturing)); CaptureActive = m_continueCapturing; if (CaptureActive) { ScheduleExposure(); } else { FinishStop(); } } catch (wxString Msg) { POSSIBLY_UNUSED(Msg); UpdateButtonsStatus(); } }
VideoInput::~VideoInput(void) { StopCapturing(); UninitDevice(); CloseDevice(); }
HP_IOCycleTelemetry::~HP_IOCycleTelemetry() { StopCapturing(); }
void MyFrame::OnButtonStop(wxCommandEvent& WXUNUSED(event)) { StopCapturing(); }