<div dir="auto"><div>Try g_strstr instead of <span style="font-family:sans-serif">g_str_has_prefix</span></div><div dir="auto"><font face="sans-serif"><br></font><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On 24-Jan-2017 6:16 PM, "rajvik" <<a href="mailto:kamdar.rajvi@gmail.com">kamdar.rajvi@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The problem is it is not getting into the if else statement. <div><br><div><div> if (g_str_has_prefix(capsName,"<wbr>audio"))</div><div> {</div><div> g_print("Here 6th .....\n");</div><div class="quoted-text"><div> GstPad *dynamic_pad = gst_element_get_static_pad(<wbr>audioQueue, "sink");</div><div> gst_pad_link(pad, dynamic_pad);</div><div> }</div><div><br></div><div> else if (g_str_has_prefix(capsName, "video"))</div><div> {</div></div><div> g_print("Here 7th .....\n");</div><div class="quoted-text"><div> GstPad *video_dynamic_pad = gst_element_get_static_pad(<wbr>videoQueue, "sink");</div><div> gst_pad_link(pad, video_dynamic_pad);</div><div> }</div><div> g_free(capsName);</div></div></div></div><div><br></div><div>Reason being the prefix of capsName is :</div><div><div>name of caps string: application/x-rtp, media=(string)audio, payload=(int)96, clock-rate=(int)44100, encoding-name=(string)MPEG4-<wbr>GENERIC, encoding-params=(string)2, streamtype=(string)5, profile-level-id=(string)15, m</div><div>ode=(string)AAC-hbr, config=(string)1210, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3, profile=(string)1, a-tool=(string)"vlc\ 2.1.6", a-recvonly=(string)"", a-type=(string)broadcast, a-ch</div><div>arset=(string)UTF-8, ssrc=(uint)398000458, clock-base=(uint)687408962, seqnum-base=(uint)15402, npt-start=(guint64)4219024000, play-speed=(double)1, play-scale=(double)1</div></div><div><br></div><div>Any API which would do a string compare for 1 word from the whole string?</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div class="quoted-text">On Tue, Jan 24, 2017 at 5:14 PM, Tarun Tej K [via GStreamer-devel] <span dir="ltr"><<a href="http:///user/SendEmail.jtp?type=node&node=4681616&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br></div><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote">
<div dir="auto"><div class="quoted-text"><div>I am not sure, but can you try without having the queues? Can you please see how it works when link the pads with audioDepay and videoDepay directly?</div><div dir="auto"><br></div></div><div dir="auto">Tarun<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote"><div class="elided-text"><span>On 24-Jan-2017 4:31 PM, "rajvik" <<a href="http:///user/SendEmail.jtp?type=node&node=4681615&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:<br type="attribution"></span></div><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="m_2795237902432481461m_4296490131976660006quote"><div class="elided-text"><span>Thank you so much for the insights. I did incorporate what you asked me to,<br>
but still I am getting error:<br></span>
*0:00:00.602211533 2055 0x188380 WARN basesrc<span><br>
gstbasesrc.c:2933:gst_base_src<wbr>_loop:<udpsrc3> error: Internal data flow<br>
error.<br>
0:00:00.618291500 2055 0x188380 WARN basesrc<br>
gstbasesrc.c:2933:gst_base_src<wbr>_loop:<udpsrc3> error: streaming task paused,<br>
reason not-linked (-1)<br>
0:00:00.638866649 2055 0x188430 WARN basesrc<br>
gstbasesrc.c:2933:gst_base_src<wbr>_loop:<udpsrc0> error: Internal data flow<br>
error.<br>
0:00:00.655050073 2055 0x188430 WARN basesrc<br>
gstbasesrc.c:2933:gst_base_src<wbr>_loop:<udpsrc0> error: streaming task paused,<br></span>
reason not-linked (-1)*<span><br>
<br>
Please find the below code snippet:<br>
<br></span>
*Taken audioQueue and VideoQueue as global variables and find the below cb<br>
function: *<span><br>
<br>
static void onPadAdded(GstElement *element, GstPad *pad, gpointer data)<br>
{<br>
<br>
GstCaps *caps;<br>
const char *name;<br>
char *capsName;<br>
caps = gst_pad_get_current_caps(pad);<br>
GstStructure *str = gst_caps_get_structure(caps, 0);<br>
name = gst_structure_get_name(str);<br>
g_debug("name of caps struct string: %s", name);<br>
capsName = gst_caps_to_string(caps);<br>
g_debug("name of caps string: %s", capsName);<br>
<br>
if (g_str_has_prefix(capsName,"au<wbr>dio"))<br>
{<br>
GstPad *dynamic_pad = gst_element_get_static_pad(aud<wbr>ioQueue,<br>
"sink");<br>
gst_pad_link(pad, dynamic_pad);<br>
}<br>
<br>
else if (g_str_has_prefix(capsName, "video"))<br>
{<br>
GstPad *video_dynamic_pad =<br>
gst_element_get_static_pad(vid<wbr>eoQueue, "sink");<br>
gst_pad_link(pad, video_dynamic_pad);<br>
}<br>
g_free(capsName);<br>
<br>
}<br>
<br></span>
*Following is the g_signal_connect operation:*<div><div class="m_2795237902432481461h5"><br>
<br>
gst_bin_add(GST_BIN(pipeline), source);<br>
gst_bin_add_many(GST_BIN(pipel<wbr>ine),<br>
<div class="m_2795237902432481461m_4296490131976660006quoted-text"> audioQueue, audioDepay, audioParse, audioDecode,<br>
audioConvert, audioResample, audioSink,<br>
</div><div class="m_2795237902432481461m_4296490131976660006quoted-text"> videoQueue, videoDepay, videoParser, videoDecode,<br>
videoConvert, videoScale, videoSink, NULL);<br>
<br>
</div> if (!gst_element_link_many(audioQ<wbr>ueue, audioDepay, NULL ))<br>
{<br>
g_printerr("Cannot link audioqueue and audioDepay \n");<br>
return 0;<br>
}<br>
if (!gst_element_link_many(audioP<wbr>arse, audioDecode,NULL ))<br>
{<br>
g_printerr("Cannot link audioParse and audiodecode \n");<br>
return 0;<br>
}<br>
if (!gst_element_link_many(audioC<wbr>onvert, audioResample, audioSink,<br>
NULL ))<br>
{<br>
g_printerr("Cannot link audioConvert, audioParse, audioSink<br>
\n");<br>
return 0;<br>
<div class="m_2795237902432481461m_4296490131976660006quoted-text"> }<br>
<br>
<br>
/*Linking filter element to videoScale and videoSink */<br>
link_ok = gst_element_link_filtered(vide<wbr>oScale,videoSink,<br>
capsFilter);<br>
gst_caps_unref (capsFilter);<br>
if (!link_ok) {<br>
g_warning ("Failed to link element1 and element2!");<br>
}<br>
/* Linking video elements internally */<br>
</div> if (!gst_element_link_many(videoQ<wbr>ueue, videoDepay, NULL))<br>
{<br>
g_printerr("Cannot link videoQueue and videoDepay \n");<br>
return 0;<br>
}<br>
if (!gst_element_link_many( videoParser, videoDecode, videoConvert,<br>
NULL))<br>
{<br>
g_printerr("Cannot link videoParser, videoDecode,<br>
videoConvert \n");<br>
return 0;<br>
}<br>
g_signal_connect(source, "pad-added", G_CALLBACK(onPadAdded), NULL);<br>
<br>
<br>
<br>
<br></div></div>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-src-element-name-tp4681595p4681613.html" rel="nofollow" link="external" target="_blank">http://gstreamer-devel.966125.<wbr>n4.nabble.com/Gstreamer-RTSP-s<wbr>rc-element-name-tp4681595p4681<wbr>613.html</a></div><span><br>
<div class="m_2795237902432481461m_4296490131976660006elided-text"><div class="elided-text">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
</div><a href="http:///user/SendEmail.jtp?type=node&node=4681615&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="nofollow" link="external" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-dev<wbr>el</a><br>
</div></span></blockquote></div><br></div></div></div><span>
<br>______________________________<wbr>_________________
<br>gstreamer-devel mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=4681615&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="nofollow" link="external" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-dev<wbr>el</a><br>
<br>
<br>
</span><hr noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><span>
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
</span><a href="http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-src-element-name-tp4681595p4681615.html" rel="nofollow" link="external" target="_blank">http://gstreamer-devel.966125.<wbr>n4.nabble.com/Gstreamer-RTSP-s<wbr>rc-element-name-tp4681595p4681<wbr>615.html</a>
</div><div class="m_2795237902432481461HOEnZb"><div class="m_2795237902432481461h5">
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from Gstreamer RTSP src element name, <a rel="nofollow" link="external">click here</a>.<br>
<a href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" link="external" target="_blank">NAML</a>
</div></div></div></blockquote></div><br></div>
<br><hr align="left" width="300">
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-src-element-name-tp4681595p4681616.html" target="_blank">Re: Gstreamer RTSP src element name</a><div class="elided-text"><br>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/" target="_blank">GStreamer-devel mailing list archive</a> at Nabble.com.<br></div><br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div></div></div>