| 508 | } |
| 509 | |
| 510 | void playlistItemRawFile::loadRawData(int frameIdx) |
| 511 | { |
| 512 | if (!this->video->isFormatValid()) |
| 513 | return; |
| 514 | |
| 515 | auto nrBytes = this->video->getBytesPerFrame(); |
| 516 | |
| 517 | // Load the raw data for the given frameIdx from file and set it in the video |
| 518 | int64_t fileStartPos; |
| 519 | if (this->isY4MFile) |
| 520 | fileStartPos = this->y4mFrameIndices.at(frameIdx); |
| 521 | else |
| 522 | fileStartPos = frameIdx * nrBytes; |
| 523 | |
| 524 | DEBUG_RAWFILE("playlistItemRawFile::loadRawData Start loading frame " << frameIdx << " bytes " |
| 525 | << int(nrBytes)); |
| 526 | if (this->dataSource.readBytes(this->video->rawData, fileStartPos, nrBytes) < nrBytes) |
| 527 | return; // Error |
| 528 | this->video->rawData_frameIndex = frameIdx; |
| 529 | |
| 530 | DEBUG_RAWFILE("playlistItemRawFile::loadRawData Frame " << frameIdx << " loaded"); |
| 531 | } |
| 532 | |
| 533 | void playlistItemRawFile::slotVideoPropertiesChanged() |
| 534 | { |
nothing calls this directly
no test coverage detected