v4l2: use dll to track rate difference

Track the difference between the configured and real framerate and use
that as the rate correction to adjust the next_nsec clock field.
This commit is contained in:
Wim Taymans 2024-11-26 17:14:26 +01:00
parent 043245ca11
commit 41e35c7b17
5 changed files with 40 additions and 5 deletions

View file

@ -19,6 +19,7 @@
#include <spa/utils/result.h>
#include <spa/utils/string.h>
#include <spa/utils/ringbuffer.h>
#include <spa/utils/dll.h>
#include <spa/monitor/device.h>
#include <spa/node/node.h>
#include <spa/node/io.h>
@ -167,6 +168,8 @@ struct impl {
impl(spa_log *log, spa_loop *data_loop, spa_system *system,
std::shared_ptr<CameraManager> manager, std::shared_ptr<Camera> camera, std::string device_id);
struct spa_dll dll;
};
}