summaryrefslogtreecommitdiff
path: root/src/lib/frame_info.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-16 01:58:57 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-26 17:20:25 +0100
commit24728b74693bb84d79474e014cdb952abc8a79f2 (patch)
treeb18a95441b7fcf53232958b364c84bcee67f1695 /src/lib/frame_info.h
parentd7f6ab91208cb4a562ccd668ca2cc8135f124053 (diff)
Give ownership of info files to ReelWriters (#2912).v2.18.2
The motivation here is to stop a pattern where we create a file, close it, and then re-open it (many times) as I think there are problems on Windows when a virus scanner sees the new file, opens it for checking, and then we can't re-open it. This also makes things a fair bit simpler, as a lock is removed and we don't try to differentiate read/write cases by opening the file in different ways; it's now always writeable.
Diffstat (limited to 'src/lib/frame_info.h')
-rw-r--r--src/lib/frame_info.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/frame_info.h b/src/lib/frame_info.h
index a5a22bd9e..da9503248 100644
--- a/src/lib/frame_info.h
+++ b/src/lib/frame_info.h
@@ -29,9 +29,15 @@ class J2KFrameInfo : public dcp::J2KFrameInfo
public:
J2KFrameInfo(dcp::J2KFrameInfo const& info);
J2KFrameInfo(uint64_t offset_, uint64_t size_, std::string hash_);
- J2KFrameInfo(std::shared_ptr<InfoFileHandle> info_file, Frame frame, Eyes eyes);
-
- void write(std::shared_ptr<InfoFileHandle> info_file, Frame frame, Eyes eyes) const;
+ /** Seek to the required position in info_file and read the info for
+ * the given frame and eyes.
+ */
+ J2KFrameInfo(dcp::File& info_file, Frame frame, Eyes eyes);
+
+ /** Seek to the required position in info_file and write the info for
+ * the given frame and eyes.
+ */
+ void write(dcp::File& info_file, Frame frame, Eyes eyes) const;
static int size_on_disk() {
return _size_on_disk;