can't connect the "decodebin" to pipeline

David Röthlisberger david at rothlis.net
Wed Mar 26 00:54:16 PDT 2014


On 26 Mar 2014, at 07:40, Dudi.r <dudi017 at gmail.com> wrote:
> Im trying to build pipeline that transmit video, it works fine with
> "gst-launch" but not on code.
> the problem is "decodebin2". I don't know why but it can't be connected.

What is the error message that you get? Do the debug logs say anything
relevant?

>  pipeline = gst_pipeline_new ("pipeline")
> 
>  src = gst_element_factory_make ("filesrc", "src"); 
>  decbin=gst_element_factory_make ("decodebin2", "decbin"); 
>  encoder = gst_element_factory_make ("x264enc", "encoder"); 
>  rtppay = gst_element_factory_make ("rtph264pay", "rtppay"); 
>  sink = gst_element_factory_make ("udpsink", "sink"); 
> 
>  g_object_set(G_OBJECT(src),"location","movie.mp4",NULL);
>  g_object_set(G_OBJECT(sink),"port",61643,NULL);
> 
>  gst_bin_add_many (GST_BIN (pipeline), src, decbin, encoder, rtppay, sink,
> NULL);
> 
>  if (gst_element_link_many ( src, decbin, encoder, rtppay , sink, NULL) !=
> TRUE)    
>   {
>       g_printerr ("Elements could not be linked.\n");
>       gst_object_unref (pipeline);
>       return 0;
>    }


Just checking, do you really need to create & link the elements manually,
or can you use gst_parse_launch?



More information about the gstreamer-devel mailing list