Commit 2e12e0d5 authored by Stephen Thompson's avatar Stephen Thompson

Issue #5344 added check for backend in start playback

parent e69a67f1
......@@ -595,18 +595,26 @@ void IGIDataSourceManager::StartPlayback(const QString& directoryPrefix,
mitkThrow() << "Cannot play source=" << nameOfSource.toStdString()
<< ", using factory=" << nameOfFactory.toStdString() << ".";
}
m_Sources[sourceNumber]->SetRecordingLocation(directoryPrefix);
m_Sources[sourceNumber]->SetPlaybackSourceName(nameOfSource);
canDo = m_Sources[sourceNumber]->ProbeRecordedData(&startTime, &endTime);
if (canDo)
//here we need to check we've got the right backend for the source
//at present we throw at ProbeRecordedData
if ( m_Sources[sourceNumber]->GetFactoryName() != nameOfFactory )
{
MITK_INFO << nameOfSource.toStdString() << " does not use " << m_Sources[sourceNumber]->GetFactoryName().toStdString() << " factory.";
}
else
{
overallStartTime = std::min(overallStartTime, startTime);
overallEndTime = std::max(overallEndTime, endTime);
dir2NameMap.erase(iter);
goodSources.push_back(m_Sources[sourceNumber]);
break;
m_Sources[sourceNumber]->SetRecordingLocation(directoryPrefix);
m_Sources[sourceNumber]->SetPlaybackSourceName(nameOfSource);
canDo = m_Sources[sourceNumber]->ProbeRecordedData(&startTime, &endTime);
if (canDo)
{
overallStartTime = std::min(overallStartTime, startTime);
overallEndTime = std::max(overallEndTime, endTime);
dir2NameMap.erase(iter);
goodSources.push_back(m_Sources[sourceNumber]);
break;
}
}
} // end for each name in map
} // end for each source
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment