From fa1d847967f8189ba28db83bd1e38e49bfd8428a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 19 Oct 2024 15:20:58 +0200 Subject: Log/hash data coming out of FileGroup. --- src/lib/file_group.cc | 9 +++++++++ 1 file changed, 9 insertions(+) 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 @@ -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(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(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(this), amount, read, digester.get()); + return { read, false }; } -- cgit v1.2.3