Improve timesync
Initial timesync algorithm assumed that latency was symmetrical, but it appears that it is not. Add a mechanism to estimate where latency happens, which leads to much more stable values: about 200µs variation between estimations.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
||||
class VideoEncoderFFMPEG : public VideoEncoder
|
||||
class VideoEncoderFFMPEG : public xrt::drivers::wivrn::VideoEncoder
|
||||
{
|
||||
public:
|
||||
using Codec = xrt::drivers::wivrn::video_codec;
|
||||
|
||||
@@ -106,7 +106,7 @@ get_render_device(vk_bundle * vk)
|
||||
|
||||
} // namespace
|
||||
|
||||
VideoEncoderVA::VideoEncoderVA(vk_bundle * vk, const encoder_settings & settings, float fps) :
|
||||
VideoEncoderVA::VideoEncoderVA(vk_bundle * vk, const xrt::drivers::wivrn::encoder_settings & settings, float fps) :
|
||||
vk(vk), width(settings.width), height(settings.height), offset_x(settings.offset_x), offset_y(settings.offset_y)
|
||||
{
|
||||
codec = settings.codec;
|
||||
|
||||
@@ -36,7 +36,7 @@ struct AVFilterContext;
|
||||
class VideoEncoderVA : public VideoEncoderFFMPEG
|
||||
{
|
||||
public:
|
||||
VideoEncoderVA(vk_bundle * vk, const encoder_settings & settings, float fps);
|
||||
VideoEncoderVA(vk_bundle * vk, const xrt::drivers::wivrn::encoder_settings & settings, float fps);
|
||||
|
||||
void
|
||||
SetImages(int width,
|
||||
|
||||
Reference in New Issue
Block a user