I created in main next elements and I am trying to link them to play video,
but result of gst_element_link_many is always FALSE. GstElement *pipeline, *videosrc, *videoenc, *muxer, *sink; pipeline = gst_pipeline_new ("video-player"); videosrc = gst_element_factory_make ("filesrc", "videosrc"); muxer = gst_element_factory_make ("qtdemux", "mux"); videoenc = gst_element_factory_make ("avdec_mpeg4", "videoenc"); sink = gst_element_factory_make ("autovideosink", "sink"); g_object_set (G_OBJECT (videosrc), "location", argv[1], NULL); gst_bin_add_many (GST_BIN (pipeline), videosrc, muxer, videoenc, sink, NULL); /* link the elements together */ int resLinkMany = gst_element_link_many (videosrc, muxer, videoenc, sink, NULL); printf(" resLinkMany = %d \n", resLinkMany); //I get 0 In general I am trying to launch video, but it didn't work because of incorrect linking. Here is the full code of my program: https://pastebin.com/BER1BZDU -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
qtdemux has sometime pads on source side (look at 'gst-inspect-1.0'). See in the documentation how to link sometime pads. Bernhard -----Ursprüngliche Nachricht----- Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von VVcbvb Gesendet: Sonntag, 29. Oktober 2017 14:41 An: [hidden email] Betreff: Can not link elements from GStreamer library with function gst_element_link_many I created in main next elements and I am trying to link them to play video, but result of gst_element_link_many is always FALSE. GstElement *pipeline, *videosrc, *videoenc, *muxer, *sink; pipeline = gst_pipeline_new ("video-player"); videosrc = gst_element_factory_make ("filesrc", "videosrc"); muxer = gst_element_factory_make ("qtdemux", "mux"); videoenc = gst_element_factory_make ("avdec_mpeg4", "videoenc"); sink = gst_element_factory_make ("autovideosink", "sink"); g_object_set (G_OBJECT (videosrc), "location", argv[1], NULL); gst_bin_add_many (GST_BIN (pipeline), videosrc, muxer, videoenc, sink, NULL); /* link the elements together */ int resLinkMany = gst_element_link_many (videosrc, muxer, videoenc, sink, NULL); printf(" resLinkMany = %d \n", resLinkMany); //I get 0 In general I am trying to launch video, but it didn't work because of incorrect linking. Here is the full code of my program: https://pastebin.com/BER1BZDU -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by VVcbvb
Hi,
please refer the URL https://gstreamer.freedesktop.org/documentation/application-development/basics/pads.html Good luck -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |