[recorder] deactivate stopaction upon clicking it, set output framerate to grabbing rate, minors
This commit is contained in:
parent
4011a17f13
commit
09a3a5e3b1
@ -289,8 +289,8 @@ void PylonRecorder::fitToWindow() {
|
|||||||
void PylonRecorder::about() {
|
void PylonRecorder::about() {
|
||||||
QMessageBox::about(this, tr("About Pylon Recorder"),
|
QMessageBox::about(this, tr("About Pylon Recorder"),
|
||||||
tr("<p><b>Pylon Recorder</b><br> Simple recorder for video grabbing from pylon USB3 monochrome camera."
|
tr("<p><b>Pylon Recorder</b><br> Simple recorder for video grabbing from pylon USB3 monochrome camera."
|
||||||
"Usage: In order to grab image, a camera device needs to be opened, press the connect button to do so. Push the reord button to record conituously.</p>"
|
"Usage: In order to grab image, a camera device needs to be opened, press the connect button to do so. Push the record button to record continuously.</p>"
|
||||||
"<p> videos are stored in the same folder as the tool is. Videos are compressed to mp4."
|
"<p> videos are stored in the same folder as the tool is called from. Videos are compressed to mp4."
|
||||||
" As the buffer preassure reaches 100% frames will be lost! You may want to increase the buffer size"
|
" As the buffer preassure reaches 100% frames will be lost! You may want to increase the buffer size"
|
||||||
" or reduce the framerate.</p><p>In order to run you need to install the pylon libraries"
|
" or reduce the framerate.</p><p>In order to run you need to install the pylon libraries"
|
||||||
" and the mp4 video codec avalable for download at <a href='https://www.baslerweb.com/de/'>Basler website</a></p>"
|
" and the mp4 video codec avalable for download at <a href='https://www.baslerweb.com/de/'>Basler website</a></p>"
|
||||||
@ -473,10 +473,10 @@ void PylonRecorder::disconnectCamera() {
|
|||||||
|
|
||||||
void PylonRecorder::startRecording() {
|
void PylonRecorder::startRecording() {
|
||||||
std::string filename = createFilename();
|
std::string filename = createFilename();
|
||||||
std::cerr << filename << std::endl;
|
//std::cerr << filename << std::endl;
|
||||||
fileLabel->setText(QString::fromStdString(filename));
|
fileLabel->setText(QString::fromStdString(filename));
|
||||||
VideoSpecs specs;
|
VideoSpecs specs;
|
||||||
specs.fps = 25;
|
specs.fps = framerateSpinner->value();
|
||||||
specs.filename = filename;
|
specs.filename = filename;
|
||||||
ImageSettings settings = pylon->getImageSettings();
|
ImageSettings settings = pylon->getImageSettings();
|
||||||
specs.width = static_cast<uint32_t>(settings.width);
|
specs.width = static_cast<uint32_t>(settings.width);
|
||||||
@ -512,6 +512,7 @@ void PylonRecorder::stopRecording() {
|
|||||||
writer->requestStop();
|
writer->requestStop();
|
||||||
grabbing = false;
|
grabbing = false;
|
||||||
stopRequest = true;
|
stopRequest = true;
|
||||||
|
grab_stop_action->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,9 +542,9 @@ void PylonRecorder::displaySingleFrame() {
|
|||||||
QImage qimg(static_cast<uchar *>(img.data()), img.width(), img.height(),
|
QImage qimg(static_cast<uchar *>(img.data()), img.width(), img.height(),
|
||||||
QImage::Format::Format_Grayscale8);
|
QImage::Format::Format_Grayscale8);
|
||||||
setImage(qimg);
|
setImage(qimg);
|
||||||
} else {
|
}/* else {
|
||||||
std::cerr << "Error reading last image" << std::endl;
|
std::cerr << "Error reading last image" << std::endl;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor PylonRecorder::progressColor(int value) {
|
QColor PylonRecorder::progressColor(int value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user