GstRTSPSrc dynamic pad iteration problem
Orkun
orkun.kasapoglu at gmail.com
Sat Dec 26 04:04:54 PST 2015
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] <
ml-node+s966125n4675040h0 at n4.nabble.com>:
> 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
> <http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4675018&code=b3JrdW4ua2FzYXBvZ2x1QGdtYWlsLmNvbXw0Njc1MDE4fC00MzQxNTQ3NzM=>
> .
> 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: http://gstreamer-devel.966125.n4.nabble.com/GstRTSPSrc-dynamic-pad-iteration-problem-tp4675018p4675044.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151226/ab21bf73/attachment.html>
More information about the gstreamer-devel
mailing list