GstRTSPSrc dynamic pad iteration problem
OrkUn Kasapoglu
orkun.kasapoglu at gmail.com
Sat Dec 26 04:50:35 PST 2015
I remembered that we can pass arguments for our application while calling
it from terminal so passing --debug-info=4 is working
0:00:10.755245098 6410 0xf51db0 WARN rtpjitterbuffer
rtpjitterbuffer.c:185:rtp_jitter_buffer_set_clock_rate: Clock rate changed
from 0 to 8000
0:00:10.756242384 6410 0xf8e8c0 INFO GST_EVENT
gstevent.c:678:gst_event_new_caps: creating caps event application/x-rtp,
media=(string)audio, payload=(int)8, clock-rate=(int)8000,
encoding-name=(string)PCMA, a-packetization-supported=(string)DH,
a-recvonly=(string)"", ssrc=(uint)3232776733, clock-base=(uint)299521784,
seqnum-base=(uint)30405, npt-start=(guint64)0, play-speed=(double)1,
play-scale=(double)1
0:00:10.756734464 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:643:gst_element_add_pad:<rtpptdemux1> adding pad 'src_8'
0:00:10.756438841 6410 0xf51db0 INFO GST_EVENT
gstevent.c:678:gst_event_new_caps: creating caps event application/x-rtp,
media=(string)audio, payload=(int)8, clock-rate=(int)8000,
encoding-name=(string)PCMA, a-packetization-supported=(string)DH,
a-recvonly=(string)"", ssrc=(uint)3232776733, clock-base=(uint)299521784,
seqnum-base=(uint)30405, npt-start=(guint64)0, play-speed=(double)1,
play-scale=(double)1
0:00:10.757248420 6410 0xf8e8c0 INFO GST_PADS
gstpad.c:2186:gst_pad_link_prepare: trying to link rtpptdemux1:src_8 and
recv_rtp_src_1_3232776733_8:proxypad8
0:00:10.757412325 6410 0xf8e8c0 INFO GST_PADS
gstpad.c:2388:gst_pad_link_full: linked rtpptdemux1:src_8 and
recv_rtp_src_1_3232776733_8:proxypad8, successful
0:00:10.757525762 6410 0xf8e8c0 INFO GST_EVENT
gstevent.c:1373:gst_event_new_reconfigure: creating reconfigure event
0:00:10.757853208 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:643:gst_element_add_pad:<manager> adding pad
'recv_rtp_src_1_3232776733_8'
0:00:10.757748729 6410 0xf51db0 INFO GST_EVENT
gstevent.c:678:gst_event_new_caps: creating caps event application/x-rtp,
media=(string)audio, payload=(int)8, clock-rate=(int)8000,
encoding-name=(string)PCMA, a-packetization-supported=(string)DH,
a-recvonly=(string)"", ssrc=(uint)3232776733, clock-base=(uint)299521784,
seqnum-base=(uint)30405, npt-start=(guint64)0, play-speed=(double)1,
play-scale=(double)1
0:00:10.758414715 6410 0xf8e8c0 INFO GST_PADS
gstpad.c:2186:gst_pad_link_prepare: trying to link
manager:recv_rtp_src_1_3232776733_8 and
recv_rtp_src_1_3232776733_8:proxypad9
0:00:10.758588203 6410 0xf8e8c0 INFO GST_PADS
gstpad.c:2388:gst_pad_link_full: linked manager:recv_rtp_src_1_3232776733_8
and recv_rtp_src_1_3232776733_8:proxypad9, successful
0:00:10.758724088 6410 0xf8e8c0 INFO GST_EVENT
gstevent.c:1373:gst_event_new_reconfigure: creating reconfigure event
0:00:10.759078304 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:643:gst_element_add_pad:<source> adding pad
'recv_rtp_src_1_3232776733_8'
Yeni pad recv_rtp_src_1_3232776733_8 olusturuluyor...
application/x-rtp; application/x-rdt
0:00:10.759575072 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:895:gst_element_get_static_pad: found pad depay:sink
0:00:10.759744446 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:895:gst_element_get_static_pad: found pad
source:recv_rtp_src_0_2310044623_96
0:00:10.759852935 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:895:gst_element_get_static_pad: found pad depay:sink
0:00:10.759950435 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstpad.c:1943:gst_pad_unlink: unlinking
source:recv_rtp_src_0_2310044623_96(0xf6acf0) and depay:sink(0xf0d018)
0:00:10.760123038 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstpad.c:1997:gst_pad_unlink: unlinked source:recv_rtp_src_0_2310044623_96
and depay:sink
0:00:10.760163767 6410 0xf84f20 INFO task
gsttask.c:300:gst_task_func:<rtpjitterbuffer0:src> Task going to paused
'rpth264depay' sink pad's old link removed
Normal RTPH264DEPAY adres: f0c0d8
Callback RTPHDEPAY adres: f0c0d8
0:00:10.760443505 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstutils.c:1545:gst_element_link_pads_full: trying to link element
source:recv_rtp_src_1_3232776733_8 to element depay:sink
0:00:10.760667305 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:895:gst_element_get_static_pad: found pad
source:recv_rtp_src_1_3232776733_8
0:00:10.760771055 6410 0xf8e8c0 INFO GST_ELEMENT_PADS
gstelement.c:895:gst_element_get_static_pad: found pad depay:sink
0:00:10.760858398 6410 0xf8e8c0 INFO GST_PADS
gstutils.c:1445:prepare_link_maybe_ghosting: source and depay in same bin,
no need for ghost pads
0:00:10.760991106 6410 0xf8e8c0 INFO GST_PADS
gstpad.c:2186:gst_pad_link_prepare: trying to link
source:recv_rtp_src_1_3232776733_8 and depay:sink
0:00:10.761298656 6410 0xf8e8c0 INFO GST_PADS
gstpad.c:2242:gst_pad_link_prepare: caps are incompatible
It's seen caps are incompatible but why and how can I solve it or deal with
that I don't know. Shoul/Can I add another compatible sink pad to
rtph264depay?
Thanks
Orkun
2015-12-26 14:04 GMT+02:00 Orkun <orkun.kasapoglu at gmail.com>:
> Thank you Sebastion,
>
> I've changed the pad added callback as you said;
>
> static GstPad *oldSrcRTSPSRC = NULL;
> static void rtspsrc_pad_added_callback(GstElement* e, GstPad *pad, gpointer
> data)
> {
> gchar *name;
> GstCaps *caps;
> gchar *desc;
> GstElement *depayloader;
> GstPad *sinkDepayloader;
>
> name = gst_pad_get_name(pad);
> g_print("New pad %s was created", name);
>
> caps = gst_pad_get_pad_template_caps(pad);
> desc = gst_caps_to_string(caps);
> g_print("\n%s\n", desc);
> g_free(desc);
>
> depayloader = GST_ELEMENT(data);
> sinkDepayloader = gst_element_get_static_pad(depayloader, "sink");
> if (gst_pad_is_linked(sinkDepayloader))
> {
> if (gst_pad_unlink(oldSrcRtspsrc, sinkDepayloader) == FALSE)
> {
> g_print("'rtph264depay' sink pad's old link can't be
> removed\n");
> }
> else
> g_print("'rpth264depay' sink pad's old link removed\n");
> }
> else
> {
> g_print("'rtph264depay' sink pad is linking for the first time\n");
> }
>
> if (gst_element_link_pads(e, name, depayloader, "sink") == FALSE)
> {
> g_print("'rtspsrc' and 'rtph264depay' did not linked\nProgram
> ending...\n");
> exit(0);
> }
> else
> {
> oldSrcRTSPSRC = pad;
> g_print("'rtspsrc' and 'rtph264depay' linked\n");
> }
> }
>
> but it's still same its ouput;
>
> New pad 'pad name' was created
>
> application/x-rtp; application/x-rdt
>
> 'rpth264depay' sink pad's old link removed
>
> 'rtspsrc' and 'rtph264depay' did not linked
> Program ending...
>
> 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
>
> Orkun
>
> 2015-12-26 12:29 GMT+02:00 Sebastian Dröge-3 [via GStreamer-devel] <[hidden
> email] <http:///user/SendEmail.jtp?type=node&node=4675044&i=0>>:
>
>> On Do, 2015-12-24 at 06:55 -0800, Orkun wrote:
>>
>> > Hello,
>> >
>> > I'm trying to get ip cam streams and saving png images in some period
>> > and I'm also doing it on command line with "gst-launch1.0 rtspsrc
>> > location=usr:pw@<ip>/cam/realmonitor... ! rtph264depay ! h264parse !
>> > omxh264dec ! videorate ! video/x-raw,framerate=1/1 ! pngenc !
>> > multifilesink
>> > location=/home/pi/im_%03d.png". I'm also created all elements and
>> > pipeline and linked them with a for loop without rtspsrc-
>> > >rtph264depay and videorate -> filter -> pngenc and before that for
>> > loop linked rtspsrc to rtph264depay with a callback as what ADM 1.6.2
>> > page 30 subject 8.1.1 says. The link was created for first time but
>> > then it's not linking.
>> > [...]
>> > if (gst_element_link_pads(e, name, depayloader, "sink") == FALSE)
>> > {
>> > g_print("'rtspsrc' and 'rtph264depay' did not linked\nProgram
>> > ending...\n");
>> If I understand you correctly, this is what fails? But what happens
>> here according to your logs seems to be that multiple srcpads are added
>> on the rtspsrc but you link them always to the same rtph264depay. That
>> can't work, you can only link a pad once and need to unlink it first
>> otherwise.
>>
>> From the GStreamer debug logs you should first of all check why rtspsrc
>> is adding multiple srcpads, it seems like this is already unexpected in
>> your case. And once that is known we can try to find a solution for
>> that.
>>
>> --
>> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4675040&i=0>
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>> *signature.asc* (968 bytes) Download Attachment
>> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4675040/0/signature.asc>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://gstreamer-devel.966125.n4.nabble.com/GstRTSPSrc-dynamic-pad-iteration-problem-tp4675018p4675040.html
>> To unsubscribe from GstRTSPSrc dynamic pad iteration problem, click here.
>> NAML
>> <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>
>>
>
>
> ------------------------------
> View this message in context: Re: GstRTSPSrc dynamic pad iteration problem
> <http://gstreamer-devel.966125.n4.nabble.com/GstRTSPSrc-dynamic-pad-iteration-problem-tp4675018p4675044.html>
>
> Sent from the GStreamer-devel mailing list archive
> <http://gstreamer-devel.966125.n4.nabble.com/> at Nabble.com.
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151226/8346cfe7/attachment-0001.html>
More information about the gstreamer-devel
mailing list