Can not link elements from GStreamer library with function gst_element_link_many

VVcbvb vbvbvb43435 at mail.ru
Sun Oct 29 13:41:22 UTC 2017


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/


More information about the gstreamer-devel mailing list