https://bugs.kde.org/show_bug.cgi?id=525619

--- Comment #6 from Conn O'Griofa <[email protected]> ---
To rule out issues with frame pacing on the Sunshine/Moonlight side:

* Disabling "frame pacing" in Moonlight -> no improvement.
* Directly passing the pts metadata in Sunshine [1] and keeping "frame pacing"
enabled in Moonlight -> no improvement (but the issue of stale timestamps when
returning from idle is fixed compared to 6.7).

[1]
```
diff --git a/src/platform/linux/pipewire.cpp b/src/platform/linux/pipewire.cpp
index 2714fc5a..b86e64d5 100644
--- a/src/platform/linux/pipewire.cpp
+++ b/src/platform/linux/pipewire.cpp
@@ -402,20 +402,21 @@ namespace pipewire {
      */
     static void fill_img_metadata(egl::img_descriptor_t *img_descriptor,
struct spa_buffer *buf) {
       img_descriptor->frame_timestamp = std::chrono::steady_clock::now();

       struct spa_meta_header *h = static_cast<struct spa_meta_header *>(
         spa_buffer_find_meta_data(buf, SPA_META_Header, sizeof(*h))
       );
       if (h) {
         img_descriptor->seq = h->seq;
         img_descriptor->pts = h->pts;
+        img_descriptor->frame_timestamp =
std::chrono::steady_clock::time_point(std::chrono::nanoseconds(h->pts));
       }

       if (buf->n_datas > 0) {
         img_descriptor->pw_flags = buf->datas[0].chunk->flags;
       }

       struct spa_meta_region *damage = static_cast<struct spa_meta_region *>(
         spa_buffer_find_meta_data(buf, SPA_META_VideoDamage, sizeof(*damage))
       );
       img_descriptor->pw_damage = (damage && damage->region.size.width > 0 &&
damage->region.size.height > 0) ? std::optional<bool>(true) : std::nullopt;
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to