[mutter] screen-cast-stream: Timestamp buffers
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] screen-cast-stream: Timestamp buffers
- Date: Thu, 21 Jul 2022 22:51:27 +0000 (UTC)
commit b17a510309821867c5074970304f8c7b551945a9
Author: columbarius <co1umbarius protonmail com>
Date: Fri Jul 15 09:34:00 2022 +0200
screen-cast-stream: Timestamp buffers
With spa_meta_header we can timestamp our buffers so clients can relate
and synchronize media from different sources.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2516>
src/backends/meta-screen-cast-stream-src.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
index 8d0e449557..5f91b66028 100644
--- a/src/backends/meta-screen-cast-stream-src.c
+++ b/src/backends/meta-screen-cast-stream-src.c
@@ -710,7 +710,10 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src,
priv->last_frame_timestamp_us = now_us;
if (header)
- header->flags = 0;
+ {
+ header->pts = now_us * SPA_NSEC_PER_USEC;
+ header->flags = 0;
+ }
pw_stream_queue_buffer (priv->pipewire_stream, buffer);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]