mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
docs/manual/advanced-autoplugging.xml: Fix autoplugging example.
Original commit message from CVS: * docs/manual/advanced-autoplugging.xml: Fix autoplugging example.
This commit is contained in:
parent
92865101cc
commit
e8dd138e62
2 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-06-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* docs/manual/advanced-autoplugging.xml:
|
||||||
|
Fix autoplugging example.
|
||||||
|
|
||||||
2005-06-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-06-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* docs/manual/advanced-autoplugging.xml:
|
* docs/manual/advanced-autoplugging.xml:
|
||||||
|
|
|
@ -354,11 +354,14 @@ close_link (GstPad *srcpad,
|
||||||
|
|
||||||
/* add the element to the pipeline and set correct state */
|
/* add the element to the pipeline and set correct state */
|
||||||
if (sinkelement != audiosink) {
|
if (sinkelement != audiosink) {
|
||||||
gst_element_set_state (sinkelement, GST_STATE_PAUSED);
|
|
||||||
gst_bin_add (GST_BIN (pipeline), sinkelement);
|
gst_bin_add (GST_BIN (pipeline), sinkelement);
|
||||||
|
gst_element_set_state (sinkelement, GST_STATE_READY);
|
||||||
}
|
}
|
||||||
pad = gst_element_get_pad (sinkelement, padname);
|
pad = gst_element_get_pad (sinkelement, padname);
|
||||||
gst_pad_link (srcpad, pad);
|
gst_pad_link (srcpad, pad);
|
||||||
|
if (sinkelement != audiosink) {
|
||||||
|
gst_element_set_state (sinkelement, GST_STATE_PAUSED);
|
||||||
|
}
|
||||||
gst_object_unref (GST_OBJECT (pad));
|
gst_object_unref (GST_OBJECT (pad));
|
||||||
|
|
||||||
/* if we have static source pads, link those. If we have dynamic
|
/* if we have static source pads, link those. If we have dynamic
|
||||||
|
@ -540,7 +543,7 @@ main (gint argc,
|
||||||
gchar *argv[])
|
gchar *argv[])
|
||||||
{
|
{
|
||||||
GMainLoop *loop;
|
GMainLoop *loop;
|
||||||
GstElement *typefind;
|
GstElement *typefind, *realsink;
|
||||||
gchar *p;
|
gchar *p;
|
||||||
|
|
||||||
/* init GStreamer and ourselves */
|
/* init GStreamer and ourselves */
|
||||||
|
@ -563,8 +566,10 @@ main (gint argc,
|
||||||
typefind = gst_bin_get_by_name (GST_BIN (pipeline), "tf");
|
typefind = gst_bin_get_by_name (GST_BIN (pipeline), "tf");
|
||||||
g_signal_connect (typefind, "have-type", G_CALLBACK (cb_typefound), NULL);
|
g_signal_connect (typefind, "have-type", G_CALLBACK (cb_typefound), NULL);
|
||||||
gst_object_unref (GST_OBJECT (typefind));
|
gst_object_unref (GST_OBJECT (typefind));
|
||||||
audiosink = gst_element_factory_make ("alsasink", "audiosink");
|
audiosink = gst_element_factory_make ("audioconvert", "aconv");
|
||||||
gst_bin_add (GST_BIN (pipeline), audiosink);
|
realsink = gst_element_factory_make ("alsasink", "audiosink");
|
||||||
|
gst_bin_add_many (GST_BIN (pipeline), audiosink, realsink, NULL);
|
||||||
|
gst_element_link (audiosink, realsink);
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
|
||||||
/* run */
|
/* run */
|
||||||
|
|
Loading…
Reference in a new issue