mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
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:
parent
51a07413d0
commit
4abe96918a
2 changed files with 10 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue