<div dir="ltr">When I try to get the name of the pad, it says EMPTY.<div>I do not know how do we find that a pad has been created or not.</div><div><br></div><div>Rajvi</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 10:45 PM, Ian Davidson [via GStreamer-devel] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4681624&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I may be way off course here - but when you are notified that a pad has
<br>been added, don't you want to find the name of the PAD, not the name of
<br>the CAPS?
<br><br>(See
<br><a href="https://gstreamer.freedesktop.org/documentation/application-development/basics/pads.html" rel="nofollow" link="external" target="_blank">https://gstreamer.freedesktop.<wbr>org/documentation/application-<wbr>development/basics/pads.html</a>)
<br><br>Ian
<br><br><br>On 24/01/2017 14:45, rajvik wrote:
<br>> SNIP SNIP
<br><div><div class="h5"><div class="m_624516158085767003shrinkable-quote"><div class='shrinkable-quote'><br>> Any idea as to how to move forward with this?
<br>> Code snippet:
<br>>
<br>> GstElement *audioQueue, *videoQueue;
<br>> GstElement *source, *audio, *video, *convert, *pipeline, *audioDepay,
<br>> *audioParse, *audioDecode, *audioConvert, *audioResample,
<br>> *audioSink, *videoDepay, *videoParser, *videoDecode, *videoConvert,
<br>> *videoScale, *videoSink;
<br>>
<br>> static void onPadAdded(GstElement *element, GstPad *pad, gpointer data)
<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_print("name of caps struct string: %s \n", name);
<br>> capsName = gst_caps_to_string(caps);
<br>> g_print("name of caps string: %s \n", capsName);
<br>> if (g_strrstr(capsName,"audio"))
<br>> {
<br>> GstPad *dynamic_pad =
<br>> gst_element_get_static_pad(<wbr>audioQueue, "sink");
<br>> gst_pad_link(pad, dynamic_pad);
<br>> }
<br>>
<br>> else if (g_strrstr(capsName, "video"))
<br>> {
<br>> GstPad *video_dynamic_pad =
<br>> gst_element_get_static_pad(<wbr>videoQueue, "sink");
<br>> gst_pad_link(pad, video_dynamic_pad);
<br>> }
<br>> g_free(capsName);
<br>>
<br>>
</div></div><br></div></div><span class="">______________________________<wbr>_________________
<br>gstreamer-devel mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=4681620&i=0" 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-<wbr>devel</a><br>
<br>
<br>
<hr noshade size="1" color="#cccccc">
</span><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><span class="">
<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-tp4681595p4681620.html" target="_blank" rel="nofollow" link="external">http://gstreamer-devel.966125.<wbr>n4.nabble.com/Gstreamer-RTSP-<wbr>src-element-name-<wbr>tp4681595p4681620.html</a>
</div><div class="HOEnZb"><div class="h5">
<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 href="" target="_blank" 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" target="_blank" link="external">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-tp4681595p4681624.html">Re: Gstreamer RTSP src element name</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>