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.
This commit is contained in:
Michael Tretter 2024-06-19 17:37:33 +02:00 committed by Wim Taymans
parent 4d14531444
commit 3b581b2417

View file

@ -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: