Gstreamer RTSP src element name
rajvik
kamdar.rajvi at gmail.com
Wed Jan 25 03:51:39 UTC 2017
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] <
ml-node+s966125n4681620h28 at n4.nabble.com> 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-
> src-element-name-tp4681595p4681620.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-tp4681595p4681624.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/940f4075/attachment.html>
More information about the gstreamer-devel
mailing list