From 3b581b241756e79a4417432a92db7d2574472ba6 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Wed, 19 Jun 2024 17:37:33 +0200 Subject: [PATCH] gst: pipewiresink: print stream state as string Print the state of the stream not only as the numeric value, but also print the name of the state to help the reader. While at it, add the sink element to the log output to be able to identify the sink that received the state change. --- src/gst/gstpipewiresink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c index 85a78bca4..2d3ca398d 100644 --- a/src/gst/gstpipewiresink.c +++ b/src/gst/gstpipewiresink.c @@ -543,7 +543,8 @@ on_state_changed (void *data, enum pw_stream_state old, enum pw_stream_state sta { GstPipeWireSink *pwsink = data; - GST_DEBUG ("got stream state %d", state); + GST_DEBUG_OBJECT (pwsink, "got stream state \"%s\" (%d)", + pw_stream_state_as_string(state), state); switch (state) { case PW_STREAM_STATE_UNCONNECTED: