mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 04:39:59 +01:00
changed setFrameIndex to public, unlocked mutex
This commit is contained in:
@@ -206,8 +206,8 @@ void Playback::run() {
|
|||||||
mutex.lock();
|
mutex.lock();
|
||||||
if(!capture.read(frame)) {
|
if(!capture.read(frame)) {
|
||||||
if(repeat_video && mode == MODE_VIDEO) {
|
if(repeat_video && mode == MODE_VIDEO) {
|
||||||
setFrameIndex(0);
|
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
setFrameIndex(0);
|
||||||
emit resetIndex();
|
emit resetIndex();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -293,7 +293,9 @@ Playback::~Playback() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Playback::setFrameIndex(const long &index) {
|
void Playback::setFrameIndex(const long &index) {
|
||||||
|
mutex.lock();
|
||||||
capture.set(CV_CAP_PROP_POS_FRAMES, index);
|
capture.set(CV_CAP_PROP_POS_FRAMES, index);
|
||||||
|
mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Playback::enableRepeat(bool re) {
|
void Playback::enableRepeat(bool re) {
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ private:
|
|||||||
double alpha;
|
double alpha;
|
||||||
bool flip_frame1, flip_frame2;
|
bool flip_frame1, flip_frame2;
|
||||||
bool repeat_video;
|
bool repeat_video;
|
||||||
void setFrameIndex(const long &index);
|
|
||||||
public:
|
public:
|
||||||
Playback(QObject *parent = 0);
|
Playback(QObject *parent = 0);
|
||||||
~Playback();
|
~Playback();
|
||||||
|
void setFrameIndex(const long &index);
|
||||||
void setRGB(int r, int g, int b);
|
void setRGB(int r, int g, int b);
|
||||||
void setColorOptions(int b, int g, int s);
|
void setColorOptions(int b, int g, int s);
|
||||||
void setColorMap(int c);
|
void setColorMap(int c);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#ifndef _QT_HEADERS__
|
#ifndef _QT_HEADERS__
|
||||||
#define _QT_HEADERS__
|
#define _QT_HEADERS__
|
||||||
#define ac_version "v1.17.3"
|
#define ac_version "v1.18.0"
|
||||||
#include<QApplication>
|
#include<QApplication>
|
||||||
#include<QMainWindow>
|
#include<QMainWindow>
|
||||||
#include<QDialog>
|
#include<QDialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user