X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=db.h;h=f8032c0e43d3502360fc74346de0ea87684a26f5;hb=ce2e0615420b706e1ff2405fffcedfba37a9adac;hp=40a6602d937f1945995ad5d34c2b020f9de92b3e;hpb=00e811e10c5b812e7fe77af16822edd8e429a45e;p=nageru diff --git a/db.h b/db.h index 40a6602..f8032c0 100644 --- a/db.h +++ b/db.h @@ -5,6 +5,9 @@ #include #include +#include + +#include "frame_on_disk.h" class DB { public: @@ -14,6 +17,14 @@ public: StateProto get_state(); void store_state(const StateProto &state); + struct FrameOnDiskAndStreamIdx { + FrameOnDisk frame; + unsigned stream_idx; + }; + std::vector load_frame_file(const std::string &filename, size_t size, unsigned frame_idx); // Empty = none found, or there were no frames. + void store_frame_file(const std::string &filename, size_t size, const std::vector &frames); + void clean_unused_frame_files(const std::vector &used_filenames); + private: StateProto state; sqlite3 *db;