mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-16 20:00:01 +01:00
new options
This commit is contained in:
@@ -17,6 +17,7 @@ Playback::Playback(QObject *parent) : QThread(parent) {
|
||||
prev_filter = std::pair<int, int>(0, 0);
|
||||
flip_frame1 = false;
|
||||
flip_frame2 = false;
|
||||
repeat_video = false;
|
||||
}
|
||||
|
||||
void Playback::Play() {
|
||||
@@ -204,6 +205,12 @@ void Playback::run() {
|
||||
while(!stop) {
|
||||
mutex.lock();
|
||||
if(!capture.read(frame)) {
|
||||
if(repeat_video && mode == MODE_VIDEO) {
|
||||
setFrameIndex(0);
|
||||
mutex.unlock();
|
||||
emit resetIndex();
|
||||
continue;
|
||||
}
|
||||
stop = true;
|
||||
mutex.unlock();
|
||||
emit stopRecording();
|
||||
@@ -285,6 +292,17 @@ Playback::~Playback() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void Playback::setFrameIndex(const long &index) {
|
||||
capture.set(CV_CAP_PROP_POS_FRAMES, index);
|
||||
}
|
||||
|
||||
void Playback::enableRepeat(bool re) {
|
||||
mutex.lock();
|
||||
repeat_video = re;
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
void Playback::Clear() {
|
||||
mutex.lock();
|
||||
blend_set = false;
|
||||
|
||||
Reference in New Issue
Block a user