diff --git a/ChangeLog b/ChangeLog index a8bfd92405..a25e505aa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-07-26 Tim-Philipp Müller + + * docs/manual/basics-elements.xml: + Fix gst_element_link() example. + + * gst/gstutils.c: + Mention in API docs that one should usually gst_bin_add() + elements to a bin or pipeline before doing the linking. + 2006-07-26 Wim Taymans * gst/gstbuffer.c: (gst_buffer_get_type), (gst_buffer_new), diff --git a/docs/manual/basics-elements.xml b/docs/manual/basics-elements.xml index eccd6f9d93..41dffa2bcb 100644 --- a/docs/manual/basics-elements.xml +++ b/docs/manual/basics-elements.xml @@ -430,18 +430,27 @@ int main (int argc, char *argv[]) { + GstElement *pipeline; GstElement *source, *filter, *sink; /* init */ gst_init (&argc, &argv); + /* create pipeline */ + pipeline = gst_pipeline_new ("my-pipeline"); + /* create elements */ source = gst_element_factory_make ("fakesrc", "source"); filter = gst_element_factory_make ("identity", "filter"); sink = gst_element_factory_make ("fakesink", "sink"); + /* must add elements to pipeline before linking them */ + gst_bin_add_many (GST_BIN (pipeline), source, filter, sink, NULL); + /* link */ - gst_element_link_many (source, filter, sink, NULL); + if (!gst_element_link_many (source, filter, sink, NULL)) { + g_warning ("Failed to link elements!"); + } [..]