Gstreamer RTSP src element name
Tarun Tej K
tarun4690 at gmail.com
Wed Jan 25 04:50:22 UTC 2017
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" <kamdar.rajvi at gmail.com> 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
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170125/284013e9/attachment-0001.html>
More information about the gstreamer-devel
mailing list