<div dir="ltr"><div><div>Thank you Sebastion,<br><br></div>I've changed the pad added callback as you said;<br><br>static GstPad *oldSrcRTSPSRC = NULL;<br>static void rtspsrc_pad_added_callback(GstElement* e, GstPad *pad, gpointer<br>
data)<br>
{<br>
    gchar *name;<br>
    GstCaps *caps;<br>
    gchar *desc;<br>
    GstElement *depayloader;<br></div><div>   
GstPad *sinkDepayloader;<br></div><div><br>
    name = gst_pad_get_name(pad);<br>
    g_print("New pad %s was created", name);<br>
<br>
    caps = gst_pad_get_pad_template_caps(pad);<br>
    desc = gst_caps_to_string(caps);<br>
    g_print("\n%s\n", desc);<br>
    g_free(desc);<br>
<br>
    depayloader = GST_ELEMENT(data);<br></div><div>    sinkDepayloader = gst_element_get_static_pad(depayloader, "sink");<br></div>    if (gst_pad_is_linked(sinkDepayloader))<br>    {<br>        if (gst_pad_unlink(oldSrcRtspsrc, sinkDepayloader) == FALSE)<br>        {<br>            g_print("'rtph264depay' sink pad's old link can't be removed\n");<br>        }<br>        else<br>            g_print("'rpth264depay' sink pad's old link removed\n");<br>    }<br>    else<br>    {<br>        g_print("'rtph264depay' sink pad is linking for the first time\n");<br>    }<br><div><br>
    if (gst_element_link_pads(e, name, depayloader, "sink") == FALSE)<br>
    {<br>
        g_print("'rtspsrc' and 'rtph264depay' did not linked\nProgram<br>
ending...\n");<br>
        exit(0);<br>
    }<br>
    else<br>
    {<br>        oldSrcRTSPSRC = pad;<br>
        g_print("'rtspsrc' and 'rtph264depay' linked\n");<br>
    }<br>
}<br><br></div><div>but it's still same its ouput;<br><br></div><div>New pad 'pad name' was created <br><br>application/x-rtp; application/x-rdt<br><br>'rpth264depay' sink pad's old link removed<br><br>'rtspsrc' and 'rtph264depay' did not linked<br>Program ending...<br><br></div><div>I'm new in GStreamer and I don't know how can I enable debug ingormation without command line. I'm going to search for it. Thanks again<br><br></div><div>Orkun<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-26 12:29 GMT+02:00 Sebastian Dröge-3 [via GStreamer-devel] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4675044&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span>:<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"><span class="">

        On Do, 2015-12-24 at 06:55 -0800, Orkun wrote:
</span><div><div><span class=""><div class='shrinkable-quote'><br>> Hello,
<br>> 
<br>> I'm trying to get ip cam streams and saving png images in some period
<br>> and I'm also doing it on command line with "gst-launch1.0 rtspsrc
<br>> location=usr:pw@<ip>/cam/realmonitor... ! rtph264depay ! h264parse !
<br>> omxh264dec ! videorate ! video/x-raw,framerate=1/1 ! pngenc !
<br>> multifilesink
<br>> location=/home/pi/im_%03d.png". I'm also created all elements and
<br>> pipeline and linked them with a for loop without rtspsrc-
<br>> >rtph264depay and videorate -> filter -> pngenc and before that for
<br>> loop linked rtspsrc to rtph264depay with a callback as what ADM 1.6.2
<br>> page 30 subject 8.1.1 says. The link was created for first time but
<br>> then it's not linking. 
</div></span>> [...]
<br><span class="">>     if (gst_element_link_pads(e, name, depayloader, "sink") == FALSE)
<br>>     {
<br>>         g_print("'rtspsrc' and 'rtph264depay' did not linked\nProgram
<br>> ending...\n");
</span></div></div><span class="">If I understand you correctly, this is what fails? But what happens
<br>here according to your logs seems to be that multiple srcpads are added
<br>on the rtspsrc but you link them always to the same rtph264depay. That
<br>can't work, you can only link a pad once and need to unlink it first
<br>otherwise.
<br><br>From the GStreamer debug logs you should first of all check why rtspsrc
<br>is adding multiple srcpads, it seems like this is already unexpected in
<br>your case. And once that is known we can try to find a solution for
<br>that.
<br><br>-- 
<br>Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="nofollow" link="external" target="_blank">http://www.centricular.com</a><br><br><br></span>_______________________________________________
<br>gstreamer-devel mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=4675040&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="nofollow" link="external" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><div><br><img src="http://gstreamer-devel.966125.n4.nabble.com/images/icon_attachment.gif"> <strong>signature.asc</strong> (968 bytes) <a href="http://gstreamer-devel.966125.n4.nabble.com/attachment/4675040/0/signature.asc" rel="nofollow" link="external" target="_blank">Download Attachment</a></div>

        
        
        
        <br>
        <br>
        <hr color="#cccccc" noshade size="1">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://gstreamer-devel.966125.n4.nabble.com/GstRTSPSrc-dynamic-pad-iteration-problem-tp4675018p4675040.html" target="_blank" rel="nofollow" link="external">http://gstreamer-devel.966125.n4.nabble.com/GstRTSPSrc-dynamic-pad-iteration-problem-tp4675018p4675040.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from GstRTSPSrc dynamic pad iteration problem, <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></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/GstRTSPSrc-dynamic-pad-iteration-problem-tp4675018p4675044.html">Re: GstRTSPSrc dynamic pad iteration problem</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>