docs/manual/: Fix docs to use _bin_add() before _link(), which fixes the examples with recent core versions (reported...

Original commit message from CVS:
* docs/manual/advanced-dataaccess.xml:
* docs/manual/basics-helloworld.xml:
Fix docs to use _bin_add() before _link(), which fixes the examples
with recent core versions (reported by Madhan Raj M
<raj_madan@rediffmail.com>, #313199).
This commit is contained in:
Ronald S. Bultje 2005-08-16 12:15:46 +00:00
parent 01ace6b592
commit efa8cddb95
3 changed files with 14 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2005-08-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* docs/manual/advanced-dataaccess.xml:
* docs/manual/basics-helloworld.xml:
Fix docs to use _bin_add() before _link(), which fixes the examples
with recent core versions (reported by Madhan Raj M
<raj_madan@rediffmail.com>, #313199).
2005-08-16 Wim Taymans <wim@fluendo.com> 2005-08-16 Wim Taymans <wim@fluendo.com>
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite): * check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):

View file

@ -78,8 +78,8 @@ main (gint argc,
filter = gst_element_factory_make ("capsfilter", "filter"); filter = gst_element_factory_make ("capsfilter", "filter");
csp = gst_element_factory_make ("ffmpegcolorspace", "csp"); csp = gst_element_factory_make ("ffmpegcolorspace", "csp");
sink = gst_element_factory_make ("xvimagesink", "sink"); sink = gst_element_factory_make ("xvimagesink", "sink");
gst_element_link_many (src, filter, csp, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, filter, csp, sink, NULL); gst_bin_add_many (GST_BIN (pipeline), src, filter, csp, sink, NULL);
gst_element_link_many (src, filter, csp, sink, NULL);
g_object_set (G_OBJECT (filter), "filter-caps", g_object_set (G_OBJECT (filter), "filter-caps",
gst_caps_new_simple ("video/x-raw-rgb", gst_caps_new_simple ("video/x-raw-rgb",
"width", G_TYPE_INT, 384, "width", G_TYPE_INT, 384,
@ -244,8 +244,8 @@ main (gint argc,
"depth", G_TYPE_INT, 16, "depth", G_TYPE_INT, 16,
"endianness", G_TYPE_INT, G_BYTE_ORDER, "endianness", G_TYPE_INT, G_BYTE_ORDER,
NULL), NULL); NULL), NULL);
gst_element_link_many (fakesrc, flt, conv, videosink, NULL);
gst_bin_add_many (GST_BIN (pipeline), fakesrc, flt, conv, videosink, NULL); gst_bin_add_many (GST_BIN (pipeline), fakesrc, flt, conv, videosink, NULL);
gst_element_link_many (fakesrc, flt, conv, videosink, NULL);
/* setup fake source */ /* setup fake source */
g_object_set (G_OBJECT (fakesrc), g_object_set (G_OBJECT (fakesrc),

View file

@ -143,6 +143,10 @@ main (int argc,
gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (pipeline)), gst_bus_add_watch (gst_pipeline_get_bus (GST_PIPELINE (pipeline)),
bus_call, loop); bus_call, loop);
/* put all elements in a bin */
gst_bin_add_many (GST_BIN (pipeline),
source, parser, decoder, conv, sink, NULL);
/* link together - note that we cannot link the parser and /* link together - note that we cannot link the parser and
* decoder yet, becuse the parser uses dynamic pads. For that, * decoder yet, becuse the parser uses dynamic pads. For that,
* we set a pad-added signal handler. */ * we set a pad-added signal handler. */
@ -150,10 +154,6 @@ main (int argc,
gst_element_link_many (decoder, conv, sink, NULL); gst_element_link_many (decoder, conv, sink, NULL);
g_signal_connect (parser, "pad-added", G_CALLBACK (new_pad), NULL); g_signal_connect (parser, "pad-added", G_CALLBACK (new_pad), NULL);
/* put all elements in a bin */
gst_bin_add_many (GST_BIN (pipeline),
source, parser, decoder, conv, sink, NULL);
/* Now set to playing and iterate. */ /* Now set to playing and iterate. */
g_print ("Setting to PLAYING\n"); g_print ("Setting to PLAYING\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);