| 547 | } |
| 548 | |
| 549 | ItemLoadingState playlistItemCompressedVideo::needsLoading(int frameIdx, bool loadRawData) |
| 550 | { |
| 551 | if (this->unresolvableError || !this->decodingEnabled) |
| 552 | return ItemLoadingState::LoadingNotNeeded; |
| 553 | |
| 554 | auto videoState = this->video->needsLoading(frameIdx, loadRawData); |
| 555 | if (videoState == ItemLoadingState::LoadingNeeded && this->decodingNotPossibleAfter >= 0 && |
| 556 | frameIdx >= this->decodingNotPossibleAfter && frameIdx >= this->currentFrameIdx[0]) |
| 557 | // The decoder can not decode this frame. |
| 558 | return ItemLoadingState::LoadingNotNeeded; |
| 559 | if (videoState == ItemLoadingState::LoadingNeeded || |
| 560 | this->statisticsData.needsLoading(frameIdx) == ItemLoadingState::LoadingNeeded) |
| 561 | return ItemLoadingState::LoadingNeeded; |
| 562 | return videoState; |
| 563 | } |
| 564 | |
| 565 | void playlistItemCompressedVideo::drawItem(QPainter *painter, |
| 566 | int frameIdx, |