mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-17 20:30:00 +01:00
added file size in status bar
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
#include "main_window.h"
|
#include "main_window.h"
|
||||||
#include<mutex>
|
#include<mutex>
|
||||||
#include"plugin.h"
|
#include"plugin.h"
|
||||||
|
#include<sys/stat.h>
|
||||||
|
|
||||||
std::unordered_map<std::string, std::pair<int, int>> filter_map;
|
std::unordered_map<std::string, std::pair<int, int>> filter_map;
|
||||||
|
|
||||||
@@ -610,7 +610,13 @@ void AC_MainWindow::updateFrame(QImage img) {
|
|||||||
frame_index++;
|
frame_index++;
|
||||||
QString frame_string;
|
QString frame_string;
|
||||||
QTextStream frame_stream(&frame_string);
|
QTextStream frame_stream(&frame_string);
|
||||||
|
if(!recording) {
|
||||||
frame_stream << "(Current/Total Frames/Seconds) - (" << frame_index << "/" << video_frames << "/" << (unsigned int)(frame_index/video_fps) << ") ";
|
frame_stream << "(Current/Total Frames/Seconds) - (" << frame_index << "/" << video_frames << "/" << (unsigned int)(frame_index/video_fps) << ") ";
|
||||||
|
} else {
|
||||||
|
struct stat buf;
|
||||||
|
stat(video_file_name.toStdString().c_str(), &buf);
|
||||||
|
frame_stream << "(Current/Total Frames/Seconds,Size) - (" << frame_index << "/" << video_frames << "/" << (unsigned int)(frame_index/video_fps) << "/" << ((buf.st_size/1024)/1024) << " MB) ";
|
||||||
|
}
|
||||||
if(programMode == MODE_VIDEO) {
|
if(programMode == MODE_VIDEO) {
|
||||||
|
|
||||||
float index = frame_index;
|
float index = frame_index;
|
||||||
@@ -651,14 +657,21 @@ void AC_MainWindow::stopRecording() {
|
|||||||
controls_step->setEnabled(false);
|
controls_step->setEnabled(false);
|
||||||
controls_snapshot->setEnabled(false);
|
controls_snapshot->setEnabled(false);
|
||||||
progress_bar->hide();
|
progress_bar->hide();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AC_MainWindow::frameInc() {
|
void AC_MainWindow::frameInc() {
|
||||||
frame_index++;
|
frame_index++;
|
||||||
QString frame_string;
|
QString frame_string;
|
||||||
QTextStream frame_stream(&frame_string);
|
QTextStream frame_stream(&frame_string);
|
||||||
frame_stream << "(Current/Total Frames/Seconds) - (" << frame_index << "/" << video_frames << "/" << (unsigned int)(frame_index/video_fps) << ") ";
|
|
||||||
|
if(!recording) {
|
||||||
|
frame_stream << "(Current/Total Frames/Seconds) - (" << frame_index << "/" << video_frames << "/" << (unsigned int)(frame_index/video_fps) << ") ";
|
||||||
|
} else {
|
||||||
|
struct stat buf;
|
||||||
|
stat(video_file_name.toStdString().c_str(), &buf);
|
||||||
|
frame_stream << "(Current/Total Frames/Seconds/Size) - (" << frame_index << "/" << video_frames << "/" << (unsigned int)(frame_index/video_fps) << "/" << ((buf.st_size/1024)/1024) << " MB) ";
|
||||||
|
|
||||||
|
}
|
||||||
if(programMode == MODE_VIDEO) {
|
if(programMode == MODE_VIDEO) {
|
||||||
float index = frame_index;
|
float index = frame_index;
|
||||||
float max_frames = video_frames;
|
float max_frames = video_frames;
|
||||||
|
|||||||
@@ -3,6 +3,4 @@
|
|||||||
|
|
||||||
#include "qtheaders.h"
|
#include "qtheaders.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user