Open the file and fill the read buffer.
| 50 | |
| 51 | // Open the file and fill the read buffer. |
| 52 | bool 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 | |
| 70 | bool FileSourceAnnexBFile::atEnd() const |
| 71 | { |
nothing calls this directly
no test coverage detected