MCPcopy Create free account
hub / github.com/MITK/MITK / UpdateVideo

Method UpdateVideo

Modules/QtWidgetsExt/src/QmitkVideoBackground.cpp:191–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void QmitkVideoBackground::UpdateVideo()
192{
193 if (m_renderWindowVectorInfo.size() > 0)
194 {
195 unsigned char *src = nullptr;
196
197 try
198 {
199 src = m_VideoSource->GetVideoTexture();
200 }
201 catch (const std::logic_error &error)
202 {
203 MITK_DEBUG << error.what();
204 emit EndOfVideoSourceReached(m_VideoSource);
205 return;
206 }
207
208 if (src)
209 {
210 for (auto it = m_renderWindowVectorInfo.begin(); it != m_renderWindowVectorInfo.end(); it++)
211 {
212 (*it).videoImport->SetImportVoidPointer(src);
213 (*it).videoImport->Modified();
214 (*it).videoImport->Update();
215 mitk::RenderingManager::GetInstance()->RequestUpdate((*it).renWin);
216 }
217 emit NewFrameAvailable(m_VideoSource);
218 }
219 else
220 MITK_WARN << "No video texture available";
221 }
222}
223
224void QmitkVideoBackground::Modified()
225{

Callers

nothing calls this directly

Calls 7

whatMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
ModifiedMethod · 0.45
UpdateMethod · 0.45
RequestUpdateMethod · 0.45

Tested by

no test coverage detected