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

Method openFile

YUViewLib/src/filesource/FileSourceAnnexBFile.cpp:52–68  ·  view source on GitHub ↗

Open the file and fill the read buffer.

Source from the content-addressed store, hash-verified

50
51// Open the file and fill the read buffer.
52bool FileSourceAnnexBFile::openFile(const QString &fileName)
53{
54 DEBUG_ANNEXBFILE("FileSourceAnnexBFile::openFile fileName " << fileName);
55
56 // Open the input file (again)
57 FileSource::openFile(fileName);
58
59 // Fill the buffer
60 this->fileBufferSize = srcFile.read(this->fileBuffer.data(), BUFFERSIZE);
61 if (this->fileBufferSize == 0)
62 // The file is empty of there was an error reading from the file.
63 return false;
64
65 // Discard all bytes until we find a start code
66 this->seekToFirstNAL();
67 return true;
68}
69
70bool FileSourceAnnexBFile::atEnd() const
71{

Callers

nothing calls this directly

Calls 2

seekToFirstNALMethod · 0.95
dataMethod · 0.45

Tested by

no test coverage detected