mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45:31 +00:00
sip: media-pipeline: Use debug macros to allow graphing pipelines
If the environment variable GST_DEBUG_DUMP_DOT_DIR is set, a graph of the send and receive pipelines will be written to disk. To generate a png from the exported dot files graphviz can be used like this: `dot -Tpng -oimage.png graph.dot`
This commit is contained in:
parent
69106910f8
commit
be9471cc03
1 changed files with 22 additions and 0 deletions
|
@ -167,6 +167,12 @@ static void
|
||||||
set_state (CallsSipMediaPipeline *self,
|
set_state (CallsSipMediaPipeline *self,
|
||||||
CallsMediaPipelineState state)
|
CallsMediaPipelineState state)
|
||||||
{
|
{
|
||||||
|
g_autoptr (GEnumClass) enum_class = NULL;
|
||||||
|
GEnumValue *enum_val;
|
||||||
|
|
||||||
|
g_autofree char *recv_fname = NULL;
|
||||||
|
g_autofree char *send_fname = NULL;
|
||||||
|
|
||||||
g_assert (CALLS_SIP_MEDIA_PIPELINE (self));
|
g_assert (CALLS_SIP_MEDIA_PIPELINE (self));
|
||||||
|
|
||||||
if (self->state == state)
|
if (self->state == state)
|
||||||
|
@ -176,6 +182,22 @@ set_state (CallsSipMediaPipeline *self,
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_STATE]);
|
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_STATE]);
|
||||||
|
|
||||||
self->emitted_sending_signal = FALSE;
|
self->emitted_sending_signal = FALSE;
|
||||||
|
|
||||||
|
if (state == CALLS_MEDIA_PIPELINE_STATE_INITIALIZING)
|
||||||
|
return;
|
||||||
|
|
||||||
|
enum_class = g_type_class_ref (CALLS_TYPE_MEDIA_PIPELINE_STATE);
|
||||||
|
enum_val = g_enum_get_value (enum_class, state);
|
||||||
|
|
||||||
|
recv_fname = g_strdup_printf ("recv-%s", enum_val->value_nick);
|
||||||
|
send_fname = g_strdup_printf ("send-%s", enum_val->value_nick);
|
||||||
|
|
||||||
|
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (self->recv_pipeline),
|
||||||
|
GST_DEBUG_GRAPH_SHOW_ALL,
|
||||||
|
recv_fname);
|
||||||
|
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (self->send_pipeline),
|
||||||
|
GST_DEBUG_GRAPH_SHOW_ALL,
|
||||||
|
send_fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue