From a12665bbd158fb33bd3afd5d39d95402c66179b7 Mon Sep 17 00:00:00 2001 From: evgeny Date: Tue, 13 Oct 2026 23:30:06 +0200 Subject: [PATCH] Drive desktop ring playback from corrected history and physical audio time --- tools/chatgui/src/streamplayer_window.cpp | 299 +++++++++++----------- 1 file changed, 147 insertions(+), 152 deletions(-) diff --git a/tools/chatgui/src/streamplayer_window.cpp b/tools/chatgui/src/streamplayer_window.cpp index 769ab689..4fff1d50 100644 --- a/tools/chatgui/src/streamplayer_window.cpp +++ b/tools/chatgui/src/streamplayer_window.cpp @@ -14,15 +14,15 @@ #include #include #include -#include #include #include #include extern "C" { #include "../../../lib/debug_config.h" -#include "../../../lib/opus_codec.h" #include "../../../src/stream/stream.h" +#include "../../../src/stream/stream_playback_clock.h" +#include "../../../src/stream/stream_playback_audio.h" #ifdef HAVE_FFMPEG #include #include @@ -39,7 +39,6 @@ QString text(const char* value) { return QCoreApplication::translate("ChatGui", struct StreamPlayerWindow::Playback { struct Video { QImage image; int64_t pts; }; - struct Audio { std::array pcm; int64_t pts; unsigned offset = 0; }; uint64_t id = ++nextId, group = 0, source = 0, epoch = 0; std::atomic running{true}, audioAvailable{false}; std::atomic volume{1.0f}; @@ -47,14 +46,27 @@ struct StreamPlayerWindow::Playback { std::mutex lock; std::deque