mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-13 18:30:02 +01:00
fixed setting of a video
This commit is contained in:
@@ -137,12 +137,11 @@ void ImageWindow::video_Set() {
|
|||||||
|
|
||||||
|
|
||||||
std::string vname = file_name.toStdString();
|
std::string vname = file_name.toStdString();
|
||||||
ac::v_cap.open(vname);
|
if(playback->openVideo(vname) == true) {
|
||||||
if(ac::v_cap.isOpened() == false) {
|
|
||||||
QMessageBox::information(this, "Error could not open file", "File not supported");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lbl_video->setText("File Opened and Active");
|
lbl_video->setText("File Opened and Active");
|
||||||
|
} else {
|
||||||
|
QMessageBox::information(this, "Error could not open file", "File not supported");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageWindow::video_Clr() {
|
void ImageWindow::video_Clr() {
|
||||||
|
|||||||
@@ -117,6 +117,17 @@ bool Playback::setVideoCamera(std::string name, int type, int device, int res, c
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Playback::openVideo(std::string vname) {
|
||||||
|
mutex.lock();
|
||||||
|
ac::v_cap.open(vname);
|
||||||
|
if(ac::v_cap.isOpened() == false) {
|
||||||
|
mutex.unlock();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
mutex.unlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void Playback::setVector(std::vector<FilterValue> v) {
|
void Playback::setVector(std::vector<FilterValue> v) {
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
// here:
|
// here:
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ public:
|
|||||||
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);
|
||||||
|
bool openVideo(std::string video);
|
||||||
bool isStopped() const;
|
bool isStopped() const;
|
||||||
void run();
|
void run();
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user