screen-cast: Add some debug logging

Will potentially help debugging issues without needing to recompile.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
This commit is contained in:
Jonas Ådahl 2022-12-01 22:18:32 +01:00 committed by Marge Bot
parent 8b8b06e12e
commit 7cc10c86e4

View File

@ -634,6 +634,9 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src,
timeout_us = min_interval_us - time_since_last_frame_us;
maybe_schedule_follow_up_frame (src, timeout_us);
meta_topic (META_DEBUG_SCREEN_CAST,
"Skipped recording frame on stream %u, too early",
priv->node_id);
return;
}
}
@ -641,6 +644,9 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src,
if (!priv->pipewire_stream)
return;
meta_topic (META_DEBUG_SCREEN_CAST, "Recording frame on stream %u",
priv->node_id);
buffer = pw_stream_dequeue_buffer (priv->pipewire_stream);
if (!buffer)
{
@ -785,6 +791,11 @@ on_stream_state_changed (void *data,
MetaScreenCastStreamSrcPrivate *priv =
meta_screen_cast_stream_src_get_instance_private (src);
meta_topic (META_DEBUG_SCREEN_CAST,
"New PipeWire stream (%u) state '%s'",
priv->node_id,
pw_stream_state_as_string (state));
switch (state)
{
case PW_STREAM_STATE_ERROR: