rtspsrc - pad-added signal - correct handling
Bill Klein
bill at orbit.org
Mon Nov 4 14:01:00 UTC 2019
I am using a pipeline with an rtsp src in C code. Everything has been
working mostly wonderfully, but recent issues have led me to believe that I
am doing something wrong in certain situations. Specifically, I am
wondering if I am handling the *pad-added* signal correctly.
My pad-added handler is something simple like (simplified for the sake of
readability):
void on_pad_added(GstElement* element, GstPad* pad, void *data) {
GstPad* sinkpad = gst_element_get_static_pad(depay_el, "sink");
if(!sinkpad) ... // handle error
auto r = gst_pad_link(pad, sinkpad);
auto padnm = gst_pad_get_name(pad);
log("on_pad_added - "+padnm+" result:"+getPadLinkRespStr(rs));
// free paddnm...
gst_object_unref(sinkpad);
}
A few questions about this:
- Is the above correct/sufficient?
- Sometimes gst_pad_link returns GST_PAD_LINK_NOFORMAT. Is that
expected/normal? Do I need to perform additional handling in that case (ex
unrefing the element)?
- Sometimes gst_pad_link returns GST_PAD_LINK_WAS_LINKED. Is that
expected/normal? Do I need to perform additional handling in that case (ex
unrefing the element)?
- For some networks/rtsp cameras, I see only a few pad-added signals
called. In others, I see 100s (recv_rtp_src_***). Is that normal?
Thank you!
- Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191104/634d5884/attachment.html>
More information about the gstreamer-devel
mailing list