if (new == WEBRTC_STATE_PLAYING)
_set_stats_timer(webrtc);
- GENERATE_DOT(webrtc, webrtc->gst.pipeline, "STATE_%s", __state_str[webrtc->state]);
+ GENERATE_DOT(webrtc, webrtc->gst.pipeline, "%s.state_%s", GST_ELEMENT_NAME(webrtc->gst.pipeline), __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, webrtc->gst.pipeline, "webrtcbin_%s", GST_PAD_NAME(new_pad));
+ GENERATE_DOT(webrtc, webrtc->gst.pipeline, "%s.webrtcbin-%s", GST_ELEMENT_NAME(webrtc->gst.pipeline), GST_PAD_NAME(new_pad));
}
static void __webrtcbin_no_more_pads_cb(GstElement *webrtcbin, gpointer user_data)
{
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
- webrtc->gst.pipeline = gst_pipeline_new("webrtc-pipeline");
+ webrtc->gst.pipeline = gst_pipeline_new("main-pipeline");
RET_VAL_IF(webrtc->gst.pipeline == NULL, WEBRTC_ERROR_INVALID_OPERATION, "pipeline is NULL");
if (!(webrtc->gst.bus = gst_pipeline_get_bus(GST_PIPELINE(webrtc->gst.pipeline)))) {
source->av[av_idx].render.need_decoding = true;
source->av[av_idx].render.appsrc_caps = gst_pad_get_current_caps(pad);
__add_probe_to_pad_for_render(source, av_idx, gst_element_get_static_pad(queue, "src"), __source_data_probe_cb);
+
+ GENERATE_DOT(source->webrtc, source->filesrc_pipeline, "%s.%s-%s",
+ GST_ELEMENT_NAME(source->filesrc_pipeline), GST_ELEMENT_NAME(element), GST_PAD_NAME(pad));
}
static GstAutoplugSelectResult __filesrc_pipeline_decodebin_autoplug_select_cb(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory* factory, gpointer udata)
{
GstElement *filesrc = NULL;
GstElement *decodebin = NULL;
+ gchar *pipeline_name;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
RET_VAL_IF(source->bin == NULL, WEBRTC_ERROR_INVALID_OPERATION, "bin is NULL");
- source->filesrc_pipeline = gst_pipeline_new("filesrc-pipeline");
+ pipeline_name = g_strdup_printf("filesrc-pipeline-for-source_%u", source->id);
+ source->filesrc_pipeline = gst_pipeline_new(pipeline_name);
+ g_free(pipeline_name);
RET_VAL_IF(source->filesrc_pipeline == NULL, WEBRTC_ERROR_INVALID_OPERATION, "pipeline is NULL");
if (!(source->filesrc_bus = gst_pipeline_get_bus(GST_PIPELINE(source->filesrc_pipeline)))) {
ret = __build_loopback_audiosink(source, decodebin);
if (ret != WEBRTC_ERROR_NONE)
SAFE_GST_OBJECT_UNREF(source->av[AV_IDX_AUDIO].render.pipeline);
+ else
+ GENERATE_DOT(source->webrtc, source->av[AV_IDX_AUDIO].render.pipeline, "%s.%s-%s",
+ GST_ELEMENT_NAME(source->av[AV_IDX_AUDIO].render.pipeline), GST_ELEMENT_NAME(decodebin), GST_PAD_NAME(new_pad));
} else if (g_strrstr(media_type, "video")) {
ret = __build_loopback_videosink(source, decodebin);
if (ret != WEBRTC_ERROR_NONE)
SAFE_GST_OBJECT_UNREF(source->av[AV_IDX_VIDEO].render.pipeline);
+ else
+ GENERATE_DOT(source->webrtc, source->av[AV_IDX_VIDEO].render.pipeline, "%s.%s-%s",
+ GST_ELEMENT_NAME(source->av[AV_IDX_VIDEO].render.pipeline), GST_ELEMENT_NAME(decodebin), GST_PAD_NAME(new_pad));
} else {
LOG_ERROR("not supported media type[%s]", media_type);
RET_VAL_IF(source->display->surface == NULL, WEBRTC_ERROR_INVALID_OPERATION, "display->surface is NULL");
}
- pipeline_name = g_strdup_printf("webrtc-source_%u-%s-render-pipeline", source->id, GET_MEDIA_TYPE_NAME(type == MEDIA_TYPE_AUDIO));
+ pipeline_name = g_strdup_printf("loopback-pipeline-for-source_%u", source->id);
source->av[idx].render.pipeline = gst_pipeline_new(pipeline_name);
g_free(pipeline_name);
RET_VAL_IF(source->av[idx].render.pipeline == NULL, WEBRTC_ERROR_INVALID_OPERATION, "render_pipeline is NULL");
if (track_id)
*track_id = source->av[idx].render.track_id;
+ if (!source->av[idx].render.need_decoding)
+ GENERATE_DOT(webrtc, source->av[idx].render.pipeline, "%s", GST_ELEMENT_NAME(source->av[idx].render.pipeline));
+
return WEBRTC_ERROR_NONE;
error: