mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 12:50:07 +01:00
noticed it freezes when using the XviD codec on 1080p video when recording with mulitple filters.
This commit is contained in:
@@ -83,9 +83,7 @@ void Playback::setOptions(bool n, int c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Playback::run() {
|
void Playback::run() {
|
||||||
|
while(!stop) {
|
||||||
int delay = (1000/frame_rate);
|
|
||||||
while(!stop) {
|
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if(!capture.read(frame)) {
|
if(!capture.read(frame)) {
|
||||||
stop = true;
|
stop = true;
|
||||||
@@ -111,11 +109,11 @@ void Playback::run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stop == false && recording && writer.isOpened()) {
|
if(recording && writer.isOpened()) {
|
||||||
writer.write(frame);
|
writer.write(frame);
|
||||||
}
|
}
|
||||||
mutex.unlock();
|
|
||||||
|
|
||||||
|
mutex.unlock();
|
||||||
if(frame.channels()==3) {
|
if(frame.channels()==3) {
|
||||||
cv::cvtColor(frame, rgb_frame, CV_BGR2RGB);
|
cv::cvtColor(frame, rgb_frame, CV_BGR2RGB);
|
||||||
img = QImage((const unsigned char*)(rgb_frame.data), rgb_frame.cols, rgb_frame.rows, QImage::Format_RGB888);
|
img = QImage((const unsigned char*)(rgb_frame.data), rgb_frame.cols, rgb_frame.rows, QImage::Format_RGB888);
|
||||||
@@ -123,9 +121,7 @@ void Playback::run() {
|
|||||||
img = QImage((const unsigned char*)(frame.data), frame.cols, frame.rows, QImage::Format_Indexed8);
|
img = QImage((const unsigned char*)(frame.data), frame.cols, frame.rows, QImage::Format_Indexed8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit procImage(img);
|
emit procImage(img);
|
||||||
this->msleep(delay);
|
|
||||||
if(isStep == true) {
|
if(isStep == true) {
|
||||||
isStep = false;
|
isStep = false;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user