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

Method loadRawData

YUViewLib/src/playlistitem/playlistItemRawFile.cpp:510–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void 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
533void playlistItemRawFile::slotVideoPropertiesChanged()
534{

Callers

nothing calls this directly

Calls 4

isFormatValidMethod · 0.45
getBytesPerFrameMethod · 0.45
atMethod · 0.45
readBytesMethod · 0.45

Tested by

no test coverage detected