]> git.sesse.net Git - nageru/blobdiff - main.cpp
Add a disk space estimator. Code largely borrowed from Nageru.
[nageru] / main.cpp
index dc80bc2edcc3e6ff24efc2033344ca149998ad23..b7ae8f0b9be54d9b9beff73c75379ca7234ba6e6 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -25,6 +25,7 @@ extern "C" {
 #include "clip_list.h"
 #include "context.h"
 #include "defs.h"
+#include "disk_space_estimator.h"
 #include "mainwindow.h"
 #include "ffmpeg_raii.h"
 #include "httpd.h"
@@ -206,6 +207,8 @@ int record_thread_func()
                fwrite(pkt.data, pkt.size, 1, fp);
                fclose(fp);
 
+               global_disk_space_estimator->report_write(filename, pts);
+
                post_to_main_thread([pkt, pts] {
                        if (pkt.stream_index == 0) {
                                global_mainwindow->ui->input1_display->setFrame(pkt.stream_index, pts, /*interpolated=*/false);