{
GstElement *found_element = NULL;
const gchar *new_pad_type = NULL;
+ GstCaps *caps = NULL;
+ gchar *caps_str = NULL;
ms_debug_fenter();
found_element = __ms_combine_next_element(found_element, NULL, ms_streamer->transform_bin, MEDIA_STREAMER_NODE_TYPE_MUXER);
found_element = __ms_combine_next_element(found_element, NULL, ms_streamer->sink_bin, MEDIA_STREAMER_NODE_TYPE_SINK);
} else {
- found_element = __ms_combine_next_element(found_element, src_pad, ms_streamer->transform_bin, MEDIA_STREAMER_NODE_TYPE_VIDEO_CONVERTER);
- found_element = __ms_combine_next_element(found_element, NULL, ms_streamer->sink_bin, MEDIA_STREAMER_NODE_TYPE_SINK);
+ caps = gst_pad_query_caps (src_pad, NULL);
+ caps_str = gst_caps_to_string(caps);
+ if (caps_str && (g_strrstr(caps_str, "ST12") || g_strrstr(caps_str, "SN12") ||
+ g_strrstr(caps_str, "SN21") || g_strrstr(caps_str, "S420") || g_strrstr(caps_str, "SR32"))){
+ found_element = __ms_combine_next_element(found_element, src_pad, ms_streamer->sink_bin, MEDIA_STREAMER_NODE_TYPE_SINK);
+ } else {
+ found_element = __ms_combine_next_element(found_element, src_pad, ms_streamer->transform_bin, MEDIA_STREAMER_NODE_TYPE_VIDEO_CONVERTER);
+ found_element = __ms_combine_next_element(found_element, NULL, ms_streamer->sink_bin, MEDIA_STREAMER_NODE_TYPE_SINK);
+ }
+ MS_SAFE_GFREE(caps_str);
+ gst_caps_unref(caps);
}
} else if (MS_ELEMENT_IS_AUDIO(new_pad_type)) {
if (sink_bin_type == MEDIA_STREAMER_SINK_BIN_RTP_SERVER) {