| 142 | } |
| 143 | |
| 144 | bool PAGDecoder::checkFrameChanged(int index) { |
| 145 | std::lock_guard<std::mutex> autoLock(locker); |
| 146 | if (index < 0 || index >= _numFrames) { |
| 147 | LOGE("PAGDecoder::readFrame() The index is out of range!"); |
| 148 | return false; |
| 149 | } |
| 150 | checkCompositionChange(getComposition()); |
| 151 | if (index == lastReadIndex) { |
| 152 | return false; |
| 153 | } |
| 154 | auto timeRange = GetTimeRangeContains(staticTimeRanges, index); |
| 155 | return !timeRange.contains(lastReadIndex); |
| 156 | } |
| 157 | |
| 158 | bool PAGDecoder::readFrame(int index, void* pixels, size_t rowBytes, ColorType colorType, |
| 159 | AlphaType alphaType) { |