streaming video file
Brendan Long
self at brendanlong.com
Mon Feb 3 08:39:08 PST 2014
On Sat, 2014-02-01 at 03:02 -0800, d wrote:
> GstElement *pipeline, *src, *encoder, *parse, *rtp, *sink;
>
> src = gst_element_factory_make ("decodebin2", "src"); // videotestsrc
> encoder = gst_element_factory_make ("x264enc","encoder");
> rtp = gst_element_factory_make ("rtph264pay", "rtp");
> sink = gst_element_factory_make ("udpsink", "sink");
>
> g_object_set(G_OBJECT(src), "filesrc location", "sintel.mkv", NULL);
>
> gst_bin_add_many (GST_BIN (pipeline), src, encoder, rtp, sink, NULL);
>
> if (gst_element_link_many (src, encoder, rtp, sink, NULL) != TRUE) {
> g_printerr ("Elements could not be linked.\n");
> gst_object_unref (pipeline);
> return -1;
> }
>
>
> I get the error "Elements could not be linked"
> how can stream video file?
It looks like you never initialize "pipeline". If you have trouble after
fixing that, make sure none of the other elements are null.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140203/6b90337f/attachment-0001.html>
More information about the gstreamer-devel
mailing list