diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-10-19 15:20:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-10-19 15:20:58 +0200 |
| commit | fa1d847967f8189ba28db83bd1e38e49bfd8428a (patch) | |
| tree | 67b8cbfa0d9a4a09e823b4d5d30c600c2ce44733 | |
| parent | 2c26dd2573977a940d003a58f2ccd408a5657aab (diff) | |
Log/hash data coming out of FileGroup.debug-corruption
| -rw-r--r-- | src/lib/file_group.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 56a5c2c59..3ec25ad20 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -27,6 +27,8 @@ #include "compose.hpp" #include "cross.h" #include "dcpomatic_assert.h" +#include "dcpomatic_log.h" +#include "digester.h" #include "exceptions.h" #include "file_group.h" #include <dcp/filesystem.h> @@ -88,6 +90,7 @@ FileGroup::ensure_open_path (size_t p) const if (!file) { throw OpenFileError(_paths[p], file.open_error(), OpenFileError::READ); } + LOG_GENERAL("%1 open %2", reinterpret_cast<uint64_t>(this), _paths[p]); _current_path = p; _current_file = std::move(file); @@ -98,6 +101,8 @@ FileGroup::ensure_open_path (size_t p) const int64_t FileGroup::seek (int64_t pos, int whence) const { + LOG_GENERAL("%1 seek %2 %3", reinterpret_cast<uint64_t>(this), pos, whence); + switch (whence) { case SEEK_SET: _position = pos; @@ -181,6 +186,10 @@ FileGroup::read (uint8_t* buffer, int amount) const } } + Digester digester; + digester.add(buffer, amount); + LOG_GENERAL("%1 read %2 %3 %4", reinterpret_cast<uint64_t>(this), amount, read, digester.get()); + return { read, false }; } |
