]> git.sesse.net Git - nageru/blobdiff - futatabi/frame_on_disk.h
Simplify progress calculation.
[nageru] / futatabi / frame_on_disk.h
index 47fcb32d349d1b132835500374cb12d14dd98235..7807c52b4a69cdb2a08819bb10636f9e59bdc44e 100644 (file)
@@ -20,6 +20,14 @@ struct FrameOnDisk {
 extern std::vector<FrameOnDisk> frames[MAX_STREAMS];  // Under frame_mu.
 extern std::vector<std::string> frame_filenames;  // Under frame_mu.
 
+static bool inline operator==(const FrameOnDisk &a, const FrameOnDisk &b)
+{
+       return a.pts == b.pts &&
+               a.offset == b.offset &&
+               a.filename_idx == b.filename_idx &&
+               a.size == b.size;
+}
+
 // A helper class to read frames from disk. It caches the file descriptor
 // so that the kernel has a better chance of doing readahead when it sees
 // the sequential reads. (For this reason, each display has a private
@@ -27,6 +35,7 @@ extern std::vector<std::string> frame_filenames;  // Under frame_mu.
 // for a single .frames file.)
 class FrameReader {
 public:
+       FrameReader();
        ~FrameReader();
        std::string read_frame(FrameOnDisk frame);