Cleanup and improve stability of FrameGrabber

This commit is contained in:
Bruno
2021-08-11 20:48:18 +02:00
parent b37d22ba47
commit fe72c9b829
5 changed files with 22 additions and 31 deletions

View File

@@ -108,13 +108,13 @@ void PNGRecorder::terminate()
Log::Notify("PNG Capture %s is ready.", filename_.c_str());
}
void PNGRecorder::addFrame(GstBuffer *buffer, GstCaps *caps, float dt)
void PNGRecorder::addFrame(GstBuffer *buffer, GstCaps *caps)
{
FrameGrabber::addFrame(buffer, caps, dt);
FrameGrabber::addFrame(buffer, caps);
// PNG Recorder specific :
// stop after one frame
if (timestamp_ > 0) {
if (frame_count_ > 0) {
stop();
}
}