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>
This commit is contained in:
columbarius 2022-07-15 09:34:00 +02:00 committed by Marge Bot
parent 30b5229e0e
commit b17a510309

View File

@ -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);
}