docs/manual/advanced-autoplugging.xml: Add fakesink to example code to close the pipeline graph. This prevents the p...

Original commit message from CVS:
* docs/manual/advanced-autoplugging.xml: Add fakesink to example
code to close the pipeline graph.  This prevents the program from
printing internal data flow errors.
This commit is contained in:
Rene Stadler 2008-07-24 12:36:20 +00:00
parent 51a07413d0
commit 4abe96918a
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2008-07-24 Rene Stadler <mail@renestadler.de>
* docs/manual/advanced-autoplugging.xml: Add fakesink to example
code to close the pipeline graph. This prevents the program from
printing internal data flow errors.
2008-07-23 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* docs/manual/basics-bus.xml:

View file

@ -185,7 +185,7 @@ main (gint argc,
gchar *argv[])
{
GMainLoop *loop;
GstElement *pipeline, *filesrc, *typefind;
GstElement *pipeline, *filesrc, *typefind, *fakesink;
GstBus *bus;
/* init GStreamer */
@ -210,10 +210,11 @@ main (gint argc,
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
typefind = gst_element_factory_make ("typefind", "typefinder");
g_signal_connect (typefind, "have-type", G_CALLBACK (cb_typefound), loop);
fakesink = gst_element_factory_make ("fakesink", "sink");
/* setup */
gst_bin_add_many (GST_BIN (pipeline), filesrc, typefind, NULL);
gst_element_link (filesrc, typefind);
gst_bin_add_many (GST_BIN (pipeline), filesrc, typefind, fakesink, NULL);
gst_element_link_many (filesrc, typefind, fakesink, NULL);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
g_main_loop_run (loop);