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