| 121 | } |
| 122 | |
| 123 | int VideoInfoManager::getTargetFrameByID(ID id) { |
| 124 | auto iter = videoInfoMap.find(id); |
| 125 | |
| 126 | if (iter != videoInfoMap.end()) { |
| 127 | for (auto pagComposition : iter->second.pagCompositions) { |
| 128 | if (pagComposition == nullptr || pagComposition->parent() == nullptr || |
| 129 | iter->second.preLayer == nullptr) { |
| 130 | continue; |
| 131 | } |
| 132 | if (pagComposition->parent()->contentFrame < 0) { |
| 133 | continue; |
| 134 | } |
| 135 | Frame targetFrame = getTargetFrame(pagComposition, iter->second.preLayer); |
| 136 | if (IsFrameInStaticRange(targetFrame, iter->second.videoSequence->staticTimeRanges)) { |
| 137 | continue; |
| 138 | } |
| 139 | if (iter->second.lastFrame == targetFrame) { |
| 140 | continue; |
| 141 | } |
| 142 | iter->second.lastFrame = targetFrame; |
| 143 | return static_cast<int>(targetFrame); |
| 144 | } |
| 145 | } |
| 146 | return -1; |
| 147 | } |
| 148 | |
| 149 | float VideoInfoManager::getPlaybackRateByID(ID id) { |
| 150 | float playbackRate = 1; |
nothing calls this directly
no test coverage detected