1 #ifndef _FRAME_ON_DISK_H
2 #define _FRAME_ON_DISK_H 1
12 extern std::mutex frame_mu;
14 int64_t pts = -1; // -1 means empty.
16 unsigned filename_idx;
17 uint32_t size; // Not using size_t saves a few bytes; we can have so many frames.
19 extern std::vector<FrameOnDisk> frames[MAX_STREAMS]; // Under frame_mu.
20 extern std::vector<std::string> frame_filenames; // Under frame_mu.
22 // A helper class to read frames from disk. It caches the file descriptor
23 // so that the kernel has a better chance of doing readahead when it sees
24 // the sequential reads. (For this reason, each display has a private
25 // FrameReader. Thus, we can easily keep multiple open file descriptors around
26 // for a single .frames file.)
30 std::string read_frame(FrameOnDisk frame);
34 int last_filename_idx = -1;
37 #endif // !defined(_FRAME_ON_DISK_H)