x_slot->webrtc = x_webrtc; \
} while (0)
-#define GENERATE_DOT(x_webrtc, x_fmt, x_arg...) \
+#define GENERATE_DOT(x_webrtc, x_pipeline, x_fmt, x_arg...) \
do { \
gchar *dot_name; \
if (!x_webrtc->ini.general.generate_dot) \
break; \
dot_name = g_strdup_printf(""x_fmt"", x_arg); \
- _generate_dot(x_webrtc, dot_name); \
+ _generate_dot(x_pipeline, dot_name); \
g_free(dot_name); \
} while (0)
void _track_build_context_destroy_cb(gpointer data);
void _sink_slot_destroy_cb(gpointer data);
void _source_slot_destroy_cb(gpointer data);
-void _generate_dot(webrtc_s *webrtc, const gchar *name);
+void _generate_dot(GstElement *pipeline, const gchar *name);
GstStructure* _get_structure_from_data_channel_options(bundle *options);
}
}
-void _generate_dot(webrtc_s *webrtc, const gchar *name)
+void _generate_dot(GstElement *pipeline, const gchar *name)
{
gchar *dot_name;
- RET_IF(webrtc == NULL, "webrtc is NULL");
- RET_IF(webrtc->gst.pipeline == NULL, "pipeline is NULL");
+ RET_IF(pipeline == NULL, "pipeline is NULL");
+ RET_IF(name == NULL, "name is NULL");
- if (!name)
- dot_name = g_strdup(DEFAULT_DOT_FILE_NAME_PREFIX);
- else
- dot_name = g_strconcat(DEFAULT_DOT_FILE_NAME_PREFIX, ".", name, NULL);
+ dot_name = g_strconcat(DEFAULT_DOT_FILE_NAME_PREFIX, ".", name, NULL);
- GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(webrtc->gst.pipeline), GST_DEBUG_GRAPH_SHOW_ALL, dot_name);
+ GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(pipeline), GST_DEBUG_GRAPH_SHOW_ALL, dot_name);
- LOG_INFO("dot file[%s] is generated", dot_name);
+ LOG_WARNING("dot file[%s] is generated", dot_name);
g_free(dot_name);
}
if (new == WEBRTC_STATE_PLAYING)
_set_stats_timer(webrtc);
- GENERATE_DOT(webrtc, "STATE_%s", __state_str[webrtc->state]);
+ GENERATE_DOT(webrtc, webrtc->gst.pipeline, "STATE_%s", __state_str[webrtc->state]);
}
static void __invoke_error_cb(webrtc_s *webrtc, webrtc_error_e error)
RET_IF(ret != WEBRTC_ERROR_NONE, "failed to _add_rendering_sink_bin()");
}
- GENERATE_DOT(webrtc, "webrtcbin_%s", GST_PAD_NAME(new_pad));
+ GENERATE_DOT(webrtc, webrtc->gst.pipeline, "webrtcbin_%s", GST_PAD_NAME(new_pad));
}
static void __webrtcbin_no_more_pads_cb(GstElement *webrtcbin, gpointer user_data)
_post_error_cb_in_idle(webrtc, ret);
}
- GENERATE_DOT(webrtc, "%s", GST_ELEMENT_NAME(decodebin));
+ GENERATE_DOT(webrtc, webrtc->gst.pipeline, "%s", GST_ELEMENT_NAME(decodebin));
}
static bool __is_factory_name_for_hw(gchar *factory_name)