X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=disk_space_estimator.h;h=f02cb9c616f804003818e522ff4aa001eb72ff8c;hb=bdef311c334b674ba39a931805fb7d32ce8698da;hp=a86ee2e486a799a8de3530488265aa89693d6bdb;hpb=c786b9e247c7169e7a8097b37259dfa6ecd5a953;p=nageru diff --git a/disk_space_estimator.h b/disk_space_estimator.h index a86ee2e..f02cb9c 100644 --- a/disk_space_estimator.h +++ b/disk_space_estimator.h @@ -22,14 +22,11 @@ public: typedef std::function callback_t; DiskSpaceEstimator(callback_t callback); - // Report that a video frame with the given pts has just been written - // to the given file, so the estimator should stat the file and see - // by big it is. (The file is assumed to hold only that single frame, - // unlike in Nageru, where it is a growing file.) + // Report that a video frame with the given pts and size has just been + // written (possibly appended) to the given file. // - // If the filename changed since last time, the estimation is reset. // is taken to be in TIMEBASE units (see timebase.h). - void report_write(const std::string &filename, uint64_t pts); + void report_write(const std::string &filename, size_t bytes, uint64_t pts); private: static constexpr int64_t window_length = 30 * TIMEBASE;