mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-05 14:30:03 +01:00
updated
This commit is contained in:
@@ -166,8 +166,6 @@ void ImageWindow::video_Set() {
|
||||
}
|
||||
|
||||
void ImageWindow::video_Clr() {
|
||||
if(ac::v_cap.isOpened()) {
|
||||
ac::v_cap.release();
|
||||
if(playback->VideoRelease())
|
||||
lbl_video->setText("Video closed..");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,17 @@ Playback::Playback(QObject *parent) : QThread(parent) {
|
||||
filter_map_ex = filter_map;
|
||||
}
|
||||
|
||||
bool Playback::VideoRelease() {
|
||||
bool ret = false;
|
||||
mutex.lock();
|
||||
if(ac::v_cap.isOpened()) {
|
||||
ac::v_cap.release();
|
||||
ret = true;
|
||||
}
|
||||
mutex.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Playback::setCustomCycle(bool b) {
|
||||
_custom_cycle = b;
|
||||
_custom_cycle_index = 0;
|
||||
|
||||
@@ -74,6 +74,7 @@ public:
|
||||
void Play();
|
||||
void Stop();
|
||||
void Release();
|
||||
bool VideoRelease();
|
||||
void SetFlip(bool f1, bool f2);
|
||||
void setVideo(cv::VideoCapture cap, cv::VideoWriter writer, bool record, bool record_png);
|
||||
bool setVideoCamera(std::string name, int type, int device, int res, cv::VideoWriter writer, bool record);
|
||||
|
||||
Reference in New Issue
Block a user