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