コード例 #1
0
ファイル: AviVideoCapturing.cpp プロジェクト: nixtux/spring
void AviVideoCapturing::RenderFrame() {
	if (IsCapturing()) {
		if (!aviGenerator->readOpenglPixelDataThreaded()) {
			StopCapturing();
		}
//		LOG("Saved avi frame size %i %i", ih->biWidth, ih->biHeight);
	}
}
コード例 #2
0
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;
}
コード例 #3
0
ファイル: myframe_events.cpp プロジェクト: xeqtr1982/phd2
void MyFrame::OnButtonStop(wxCommandEvent& WXUNUSED(event))
{
    Debug.Write("Stop button clicked\n");
    StopCapturing();
}
コード例 #4
0
ファイル: myframe_events.cpp プロジェクト: xeqtr1982/phd2
/*
 * 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();
    }
}
コード例 #5
0
VideoInput::~VideoInput(void)
{
	StopCapturing();
	UninitDevice();
	CloseDevice();
}
コード例 #6
0
HP_IOCycleTelemetry::~HP_IOCycleTelemetry()
{
    StopCapturing();
}
コード例 #7
0
void MyFrame::OnButtonStop(wxCommandEvent& WXUNUSED(event))
{
    StopCapturing();
}