mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-17 20:30:00 +01:00
removed sleep
This commit is contained in:
@@ -361,7 +361,7 @@ void Playback::drawFilter(cv::Mat &frame, FilterValue &f) {
|
|||||||
|
|
||||||
void Playback::run() {
|
void Playback::run() {
|
||||||
|
|
||||||
int duration = 1000/ac::fps;
|
//int duration = 1000/ac::fps;
|
||||||
|
|
||||||
while(!stop) {
|
while(!stop) {
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
@@ -446,7 +446,7 @@ void Playback::run() {
|
|||||||
ac::in_custom = false;
|
ac::in_custom = false;
|
||||||
drawFilter(frame, current_filter);
|
drawFilter(frame, current_filter);
|
||||||
drawEffects(frame);
|
drawEffects(frame);
|
||||||
msleep(duration);
|
//msleep(duration);
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
} else if(cur.size()>0) {
|
} else if(cur.size()>0) {
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
@@ -456,7 +456,7 @@ void Playback::run() {
|
|||||||
if(i == cur.size()-1)
|
if(i == cur.size()-1)
|
||||||
ac::in_custom = false;
|
ac::in_custom = false;
|
||||||
drawFilter(frame, cur[i]);
|
drawFilter(frame, cur[i]);
|
||||||
msleep(duration);
|
//msleep(duration);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(_custom_cycle_index > static_cast<int>(cur.size()-1))
|
if(_custom_cycle_index > static_cast<int>(cur.size()-1))
|
||||||
@@ -464,7 +464,7 @@ void Playback::run() {
|
|||||||
|
|
||||||
if(_custom_cycle_index >= 0 && _custom_cycle_index < static_cast<int>(cur.size())) {
|
if(_custom_cycle_index >= 0 && _custom_cycle_index < static_cast<int>(cur.size())) {
|
||||||
drawFilter(frame, cur[_custom_cycle_index]);
|
drawFilter(frame, cur[_custom_cycle_index]);
|
||||||
msleep(duration);
|
//msleep(duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
drawEffects(frame);
|
drawEffects(frame);
|
||||||
@@ -478,7 +478,7 @@ void Playback::run() {
|
|||||||
}
|
}
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
} else {
|
} else {
|
||||||
msleep(duration);
|
//msleep(duration);
|
||||||
}
|
}
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user