Example #1
0
RecorderStatus Recorder::getStatus()
{
    ::GeneralStats captureStats;
    _capture->get_general_stats(&captureStats);

    VTRControl* sourceVTRControl = getSourceVTRControl();
    VTRState sourceVTRState = (sourceVTRControl != 0) ? sourceVTRControl->getState() : NOT_CONNECTED_VTR_STATE;
    VTRControl* digibetaVTRControl = getBackupVTRControl();
    VTRState digibetaVTRState = (digibetaVTRControl != 0) ? digibetaVTRControl->getState() : NOT_CONNECTED_VTR_STATE;
    
    
    RecorderStatus status;
    
    bool vtrOK = sourceVTRState != NOT_CONNECTED_VTR_STATE && sourceVTRState != REMOTE_LOCKOUT_VTR_STATE;
    bool tapeOK = sourceVTRState != TAPE_UNTHREADED_VTR_STATE && sourceVTRState != EJECTING_VTR_STATE;
    if (_videotapeBackup)
    {
        vtrOK = vtrOK && digibetaVTRState != NOT_CONNECTED_VTR_STATE && digibetaVTRState != REMOTE_LOCKOUT_VTR_STATE;
        tapeOK = tapeOK && digibetaVTRState != TAPE_UNTHREADED_VTR_STATE && digibetaVTRState != EJECTING_VTR_STATE;
    }
    
    status.recorderName = _name;
    status.databaseOk = RecorderDatabase::getInstance()->haveConnection();
    status.sdiCardOk = captureStats.video_ok && captureStats.audio_ok;
    status.videoOk = captureStats.video_ok;
    status.audioOk = captureStats.audio_ok;
    status.vtrOk = vtrOK;

    bool sessionActive;
    {
        SESSION_ACCESS_SECTION();
        sessionActive = _session != 0;
    }

    status.sourceVTRState = sourceVTRState;
    status.digibetaVTRState = digibetaVTRState;
    
    status.readyToRecord = !sessionActive && 
        status.sdiCardOk && status.videoOk && status.audioOk && 
        status.databaseOk && 
        status.vtrOk && 
        tapeOK;
    
    {
        REPLAY_ACCESS_SECTION();
    
        status.replayActive = _replay != 0;
        status.replayFilename = (_replay != 0) ? _replay->getStatus().filename : "" ;
    }
    
    return status;
}
Example #2
0
RecorderSystemStatus Recorder::getSystemStatus()
{
    VTRControl* sourceVTRControl = getSourceVTRControl();
    VTRControl* digibetaVTRControl = getBackupVTRControl();
    
    RecorderSystemStatus status;
    
    status.remDiskSpace = getRemainingDiskSpace();
    {
        LOCK_SECTION(_remDurationMutex);
        status.remDuration = status.remDiskSpace / _remDurationFactor;
        status.remDurationIngestFormat = _remDurationIngestFormat;
    }
    status.sourceVTRState = (sourceVTRControl != 0) ? sourceVTRControl->getState() : NOT_CONNECTED_VTR_STATE;
    status.digibetaVTRState = (digibetaVTRControl != 0) ? digibetaVTRControl->getState() : NOT_CONNECTED_VTR_STATE;
    
    return status;
}
Example #3
0
RecorderSystemStatus Recorder::getSystemStatus()
{
    VTRControl* d3VTRControl = getD3VTRControl();
    VTRControl* digibetaVTRControl = getDigibetaVTRControl();
    
    RecorderSystemStatus status;
    
    status.numAudioTracks = _numAudioTracks;
    status.remDiskSpace = getRemainingDiskSpace();
    status.remDuration = status.remDiskSpace / _remDurationFactor;
    status.d3VTRState = (d3VTRControl != 0) ? d3VTRControl->getState() : NOT_CONNECTED_VTR_STATE;
    status.digibetaVTRState = (digibetaVTRControl != 0) ? digibetaVTRControl->getState() : NOT_CONNECTED_VTR_STATE;
    
    return status;
}