stream: Set the object name to the stream id

Makes it more meaningful in debug logs (instead of streamNNNNN)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1187>
This commit is contained in:
Edward Hervey 2021-05-28 07:54:32 +02:00 committed by GStreamer Marge Bot
parent c95a7ab1ca
commit 08dc5d2961

View file

@ -241,6 +241,10 @@ gst_stream_set_stream_id (GstStream * stream, const gchar * stream_id)
g_random_int (), g_random_int ());
}
/* We hold the object lock, replace directly */
g_free (GST_OBJECT_NAME (stream));
GST_OBJECT_NAME (stream) = g_strdup (stream->stream_id);
GST_OBJECT_UNLOCK (stream);
if (!stream_id)