[gst-devel] How to dynamically add and remove branch to a "tee" element?
newptcai at gmail.com
Fri Nov 6 15:37:45 CET 2009
After a lot of search, I found this is not quite simple as I used to
think. The coding following only work when 2 sink is linked to the
When the 3rd comes, all 3 sink doesn't work.
What is the correct way to add and remove branch to a "tee"?
On IRC, I was told to try these
1. setting sink "asycn = FALSE"
2. add a queue between tee and sink
3. use pad instead of gst_element_link
None of them works.
GstElement* dd = gst_element_factory_make("directdrawsink", NULL);
g_object_set(dd, "async", FALSE, NULL);
gst_element_set_state (dd, GST_STATE_PAUSED);
gst_bin_add(GST_BIN (self->priv->pipeline), dd);
if(!gst_element_link (self->priv->tee, dd))
vivs_warning("Can not link tee to directdrawsink");
if(self->priv->sink_num == 1)
gst_element_set_state (self->priv->pipeline, GST_STATE_PLAYING);
gst_element_set_state (dd, GST_STATE_PLAYING);
self->priv->sink_num += 1
look to the things around you,the immediate world around you, if you
are alive,it will mean something to you ——Paul Strand
More information about the gstreamer-devel