Gstreamer RTSP src element name

rajvik kamdar.rajvi at gmail.com
Wed Jan 25 05:15:48 UTC 2017


Getting same error even if linking with audio and video depay
error logs:

0:00:00.526193431  2163 0xb440e180 WARN         rtpjitterbuffer
rtpjitterbuffer.c:185:rtp_jitter_buffer_set_clock_rate: Clock rate changed
from 0 to 90000
0:00:00.552156505  2163 0xb440e230 WARN         rtpjitterbuffer
rtpjitterbuffer.c:185:rtp_jitter_buffer_set_clock_rate: Clock rate changed
from 0 to 44100
name of caps struct string: application/x-rtp
name of caps string: application/x-rtp, media=(string)video,
payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264,
packetization-mode=(string)1, profile-level-id=(string)42801e,
sprop-parameter-sets=(str
ing)"Z0KAHpZWDY/yf/gACAAKhAAAD6QAA6mDgAAC3GAAFuNvxjg7QsXc\,aMqNSA\=\=",
a-tool=(string)"vlc\ 2.1.6", a-recvonly=(string)"",
a-type=(string)broadcast, a-charset=(string)UTF-8, ssrc=(uint)3625393740,
clock-base=(uint)27
09244179, seqnum-base=(uint)46478, npt-start=(guint64)60293455191000,
play-speed=(double)1, play-scale=(double)1
name of caps struct string: application/x-rtp
name of caps string: application/x-rtp, media=(string)audio,
payload=(int)96, clock-rate=(int)44100,
encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)2,
streamtype=(string)5, profile-level-id=(string)15, m
ode=(string)AAC-hbr, config=(string)1210, sizelength=(string)13,
indexlength=(string)3, indexdeltalength=(string)3, profile=(string)1,
a-tool=(string)"vlc\ 2.1.6", a-recvonly=(string)"",
a-type=(string)broadcast, a-ch
arset=(string)UTF-8, ssrc=(uint)3051532542, clock-base=(uint)3346164277,
seqnum-base=(uint)2401, npt-start=(guint64)60293455191000,
play-speed=(double)1, play-scale=(double)1
here .....2
here .....1
0:00:00.714840440  2163 0xb440e180 WARN                 basesrc
gstbasesrc.c:2933:gst_base_src_loop:<udpsrc4> error: Internal data flow
error.
0:00:00.733348867  2163 0xb440e180 WARN                 basesrc
gstbasesrc.c:2933:gst_base_src_loop:<udpsrc4> error: streaming task paused,
reason not-linked (-1)
^C


code snippet:
static void onPadAdded(GstElement *element, GstPad *pad, gpointer data)
{
#if 1
        GstCaps *caps;
        const char *name;
        char *capsName;
        caps = gst_pad_get_current_caps(pad);
        GstStructure *str = gst_caps_get_structure(caps, 0);
        name = gst_structure_get_name(str);
        g_print("name of caps struct string: %s \n", name);
        capsName = gst_caps_to_string(caps);
        g_print("name of caps string: %s \n", capsName);
#endif
        if (g_strrstr(capsName,"audio"))
        {
                g_print("here .....1 \n");
                GstPad *dynamic_pad =
gst_element_get_static_pad(audioDepay, "sink");
                gst_pad_link(pad, dynamic_pad);
        }

        else if (g_strrstr(capsName, "video"))
        {
                g_print("here .....2 \n");
                GstPad *video_dynamic_pad=
gst_element_get_static_pad(videoDepay, "sink");
                gst_pad_link(pad, video_dynamic_pad);
        }
        g_free(capsName);

}

On Wed, Jan 25, 2017 at 10:30 AM, Tarun Tej K [via GStreamer-devel] <
ml-node+s966125n4681625h83 at n4.nabble.com> wrote:

> The pad gets created and that is what you see after the 'name of caps
> string' in your debug info.
>
> In the code snippet  you've linked audioQueue and videoQueue with the
> pads. Have you tried linking the respective pads with audioDepay and
> videoDepay directly without using the queues at all? Since you're not
> reading the audio and video into different sinks (audiosink and
> ximagesink), we don't need the queue anymore. Us
> e the pads of rtspsrc to link with the respective depayloders.
>
> Tarun
>
>
>
> On 25-Jan-2017 9:33 AM, "rajvik" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4681625&i=0>> wrote:
>
> When I try to get the name of the pad, it says EMPTY.
> I do not know how do we find that a pad has been created or not.
>
> Rajvi
>
> On Tue, Jan 24, 2017 at 10:45 PM, Ian Davidson [via GStreamer-devel] <[hidden
> email] <http:///user/SendEmail.jtp?type=node&node=4681624&i=0>> wrote:
>
>> I may be way off course here - but when you are notified that a pad has
>> been added, don't you want to find the name of the PAD, not the name of
>> the CAPS?
>>
>> (See
>> https://gstreamer.freedesktop.org/documentation/application-
>> development/basics/pads.html)
>>
>> Ian
>>
>>
>> On 24/01/2017 14:45, rajvik wrote:
>> > SNIP SNIP
>>
>> > Any idea as to how to move forward with this?
>> > Code snippet:
>> >
>> > GstElement *audioQueue, *videoQueue;
>> > GstElement *source, *audio, *video, *convert, *pipeline, *audioDepay,
>> >            *audioParse, *audioDecode, *audioConvert, *audioResample,
>> > *audioSink, *videoDepay, *videoParser, *videoDecode, *videoConvert,
>> > *videoScale, *videoSink;
>> >
>> > static void onPadAdded(GstElement *element, GstPad *pad, gpointer data)
>> > {
>> >         GstCaps *caps;
>> >         const char *name;
>> >         char *capsName;
>> >         caps = gst_pad_get_current_caps(pad);
>> >         GstStructure *str = gst_caps_get_structure(caps, 0);
>> >         name = gst_structure_get_name(str);
>> >         g_print("name of caps struct string: %s \n", name);
>> >         capsName = gst_caps_to_string(caps);
>> >         g_print("name of caps string: %s \n", capsName);
>> >         if (g_strrstr(capsName,"audio"))
>> >         {
>> >                 GstPad *dynamic_pad =
>> > gst_element_get_static_pad(audioQueue, "sink");
>> >                 gst_pad_link(pad, dynamic_pad);
>> >         }
>> >
>> >         else if (g_strrstr(capsName, "video"))
>> >         {
>> >                 GstPad *video_dynamic_pad =
>> > gst_element_get_static_pad(videoQueue, "sink");
>> >                 gst_pad_link(pad, video_dynamic_pad);
>> >         }
>> >         g_free(capsName);
>> >
>> >
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4681620&i=0>
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-s
>> rc-element-name-tp4681595p4681620.html
>> To unsubscribe from Gstreamer RTSP src element name, 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: Gstreamer RTSP src element name
> <http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-src-element-name-tp4681595p4681624.html>
> Sent from the GStreamer-devel mailing list archive
> <http://gstreamer-devel.966125.n4.nabble.com/> at Nabble.com.
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4681625&i=1>
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4681625&i=2>
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-
> src-element-name-tp4681595p4681625.html
> To unsubscribe from Gstreamer RTSP src element name, click here
> <http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4681595&code=a2FtZGFyLnJhanZpQGdtYWlsLmNvbXw0NjgxNTk1fDExNjQ0OTk2Mjk=>
> .
> 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/Gstreamer-RTSP-src-element-name-tp4681595p4681626.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170124/d5af22be/attachment.html>


More information about the gstreamer-devel mailing list