examples/webrtc-sendrecv: add some dot file dumps on async-done and error messages

Just as a helpful thing if debugging is needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3823>
This commit is contained in:
Matthew Waters 2023-01-27 14:52:07 +11:00 committed by GStreamer Marge Bot
parent 9a300fc501
commit b134433e0b

View file

@ -428,11 +428,20 @@ bus_watch_cb (GstBus * bus, GstMessage * message, gpointer user_data)
GstPipeline *pipeline = user_data;
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ASYNC_DONE:
{
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipe1),
GST_DEBUG_GRAPH_SHOW_ALL, "webrtc-sendrecv.async-done");
break;
}
case GST_MESSAGE_ERROR:
{
GError *error = NULL;
gchar *debug = NULL;
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipe1),
GST_DEBUG_GRAPH_SHOW_ALL, "webrtc-sendrecv.error");
gst_message_parse_error (message, &error, &debug);
cleanup_and_quit_loop ("ERROR: Error on bus", APP_STATE_ERROR);
g_warning ("Error on bus: %s (debug: %s)", error->message, debug);