diff options
| author | John Hurst <jhurst@cinecert.com> | 2021-08-27 07:44:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-27 07:44:04 -0700 |
| commit | b8dea7232f134cc54f516e1f0f914d626594eaa4 (patch) | |
| tree | ab1fcf6f04c89caecb086e2c8964e346425fe6ff /src/KM_fileio.cpp | |
| parent | 9b1a901aef79dfe022c54dfdb1e0c1c1b4a451a8 (diff) | |
| parent | 404ae7e7645525b0ac846ab1c4f08a2867cfc680 (diff) | |
Merge pull request #2 from DolbyLaboratories/dolby/atmos_storage/asdcplib_integration/as02info_as02unwrap_iab
Merge dolby/atmos_storage/asdcplib_integration/as02info_as02unwrap_iab (contains also FileReader pluggable at runtime) to master
Diffstat (limited to 'src/KM_fileio.cpp')
| -rw-r--r-- | src/KM_fileio.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index a8b5f3f..4d50722 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -762,6 +762,16 @@ Kumu::FileWriter::Writev(const byte_t* buf, ui32_t buf_len) return RESULT_OK; } +Kumu::FileReader::FileReader() +{ + m_Handle = INVALID_HANDLE_VALUE; + assert(sizeof(off_t) <= sizeof(int64_t)); +} + +Kumu::FileReader::~FileReader() +{ + Kumu::FileReader::Close(); +} #ifdef KM_WIN32 #ifdef KM_WIN32_UTF8 @@ -1066,6 +1076,7 @@ Kumu::FileWriter::Write(const byte_t* buf, ui32_t buf_len, ui32_t* bytes_written // POSIX // + Kumu::Result_t Kumu::FileReader::OpenRead(const std::string& filename) const { @@ -1140,7 +1151,6 @@ Kumu::FileReader::Read(byte_t* buf, ui32_t buf_len, ui32_t* read_count) const return (tmp_count == 0 ? RESULT_ENDOFFILE : RESULT_OK); } - //------------------------------------------------------------------------------------------ // @@ -1233,6 +1243,11 @@ Kumu::FileWriter::Write(const byte_t* buf, ui32_t buf_len, ui32_t* bytes_written //------------------------------------------------------------------------------------------ +// +IFileReader* FileReaderFactory::CreateFileReader() const +{ + return new FileReader(); +} // Kumu::Result_t |
