MCPcopy Create free account
hub / github.com/IENT/YUView / playbackStarted

Method playbackStarted

YUViewLib/src/ui/views/SplitViewWidget.cpp:1476–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1474}
1475
1476void splitViewWidget::playbackStarted(int nextFrameIdx)
1477{
1478 if (!this->isMasterView)
1479 return;
1480
1481 assert(nextFrameIdx >= 0);
1482
1483 auto item = playlist->getSelectedItems();
1484 int frameIdx = playback->getCurrentFrame();
1485 if (item[0])
1486 {
1487 if (item[0]->needsLoading(nextFrameIdx, false) == ItemLoadingState::LoadingNeeded)
1488 {
1489 // The current frame is loaded but the double buffer is not loaded yet. Start loading it.
1490 DEBUG_LOAD_DRAW("splitViewWidget::playbackStarted item 0 load frame " << frameIdx);
1491 cache->loadFrame(item[0], frameIdx, 0);
1492 }
1493 }
1494 if (isSplitting() && item[1])
1495 {
1496 if (item[1]->needsLoading(nextFrameIdx, false) == ItemLoadingState::LoadingNeeded)
1497 {
1498 // The current frame is loaded but the double buffer is not loaded yet. Start loading it.
1499 DEBUG_LOAD_DRAW("splitViewWidget::playbackStarted item 1 load frame " << frameIdx);
1500 cache->loadFrame(item[1], frameIdx, 1);
1501 }
1502 }
1503}
1504
1505void splitViewWidget::update(bool newFrame, bool itemRedraw)
1506{

Callers 1

startPlaybackMethod · 0.80

Calls 4

getSelectedItemsMethod · 0.80
getCurrentFrameMethod · 0.80
needsLoadingMethod · 0.45
loadFrameMethod · 0.45

Tested by

no test coverage detected