mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-17 12:20:00 +01:00
updated
This commit is contained in:
@@ -393,12 +393,10 @@ void Playback::run() {
|
|||||||
frame = temp_frame;
|
frame = temp_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex.unlock();
|
|
||||||
static std::vector<FilterValue> cur;
|
static std::vector<FilterValue> cur;
|
||||||
mutex_shown.lock();
|
|
||||||
cur = current;
|
cur = current;
|
||||||
mutex_shown.unlock();
|
|
||||||
ac::orig_frame = frame.clone();
|
ac::orig_frame = frame.clone();
|
||||||
|
mutex.unlock();
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if(cycle_on > 0) {
|
if(cycle_on > 0) {
|
||||||
cv::Mat *cycle_image = 0;
|
cv::Mat *cycle_image = 0;
|
||||||
@@ -437,9 +435,11 @@ void Playback::run() {
|
|||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
|
||||||
if(single_mode == true && alpha > 0) {
|
if(single_mode == true && alpha > 0) {
|
||||||
|
mutex.lock();
|
||||||
if(fadefilter == true) filterFade(frame, current_filter, prev_filter, alpha);
|
if(fadefilter == true) filterFade(frame, current_filter, prev_filter, alpha);
|
||||||
drawEffects(frame);
|
drawEffects(frame);
|
||||||
alpha -= 0.08;
|
alpha -= 0.08;
|
||||||
|
mutex.unlock();
|
||||||
} else if(single_mode == true) {
|
} else if(single_mode == true) {
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
ac::setSubFilter(-1);
|
ac::setSubFilter(-1);
|
||||||
|
|||||||
@@ -23,35 +23,35 @@ private:
|
|||||||
QWaitCondition condition;
|
QWaitCondition condition;
|
||||||
cv::Mat frame;
|
cv::Mat frame;
|
||||||
double frame_rate;
|
double frame_rate;
|
||||||
bool recording;
|
std::atomic<bool> recording;
|
||||||
cv::VideoCapture capture;
|
cv::VideoCapture capture;
|
||||||
cv::VideoWriter writer;
|
cv::VideoWriter writer;
|
||||||
cv::Mat rgb_frame;
|
cv::Mat rgb_frame;
|
||||||
QImage img;
|
QImage img;
|
||||||
std::vector<FilterValue> current;
|
std::vector<FilterValue> current;
|
||||||
bool isPaused, isStep;
|
std::atomic<bool> isPaused, isStep;
|
||||||
bool record_png;
|
std::atomic<bool> record_png;
|
||||||
int png_index;
|
std::atomic<int> png_index;
|
||||||
std::string png_path;
|
std::string png_path;
|
||||||
VideoMode mode;
|
VideoMode mode;
|
||||||
int device_num;
|
std::atomic<int> device_num;
|
||||||
std::string file_name_png;
|
std::string file_name_png;
|
||||||
unsigned long *frame_index;
|
unsigned long *frame_index;
|
||||||
unsigned int red, green, blue;
|
std::atomic<unsigned int> red, green, blue;
|
||||||
unsigned int bright_, gamma_, saturation_;
|
std::atomic<unsigned int> bright_, gamma_, saturation_;
|
||||||
bool single_mode;
|
std::atomic<bool> single_mode;
|
||||||
FilterValue current_filter, prev_filter;
|
FilterValue current_filter, prev_filter;
|
||||||
double alpha;
|
double alpha;
|
||||||
bool flip_frame1, flip_frame2;
|
std::atomic<bool> flip_frame1, flip_frame2;
|
||||||
bool repeat_video;
|
std::atomic<bool> repeat_video;
|
||||||
bool fadefilter;
|
std::atomic<bool> fadefilter;
|
||||||
std::vector<cv::Mat> cycle_values;
|
std::vector<cv::Mat> cycle_values;
|
||||||
int cycle_on;
|
std::atomic<int> cycle_on;
|
||||||
int cycle_index;
|
std::atomic<int> cycle_index;
|
||||||
int frame_num;
|
std::atomic<int> frame_num;
|
||||||
bool _custom_cycle;
|
std::atomic<bool> _custom_cycle;
|
||||||
int _custom_cycle_index;
|
std::atomic<int> _custom_cycle_index;
|
||||||
int fps_delay;
|
std::atomic<int> fps_delay;
|
||||||
public:
|
public:
|
||||||
Playback(QObject *parent = 0);
|
Playback(QObject *parent = 0);
|
||||||
~Playback();
|
~Playback();
|
||||||
|
|||||||
Reference in New Issue
Block a user