Try below:<br><br>gst_element_set_state( recording_branch, GST_STATE_PAUSED );<br>gst_bin_add( GST_BIN(pipeline), recording_branch );<br>
gst_element_link( tee, recording_branch );<br>
gst_element_set_state( recording_branch, GST_STATE_PLAYING );<br><br>You may also want to move the first line to before and after element link line.<br><br>Justin<br><br><br><br><div class="gmail_quote">On Mon, Jul 20, 2009 at 5:02 AM, machinegodzilla <span dir="ltr">&lt;<a href="mailto:machinegodzilla@gmail.com">machinegodzilla@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi,<br>
<br>
Is it possible to add or remove elements to/from a tee dynamically?<br>
<br>
My pipeline looks like that:<br>
<br>
                 /  [ queue | decodebin | autovideosink ]<br>
(playing_branch)<br>
filesrc | tee<br>
                 \  [ queue | filesink ]<br>
(recording_branch)<br>
<br>
When I start the pipeline only the playing_branch is connected. After a<br>
while I connect the recording_branch in the following way:<br>
<br>
gst_bin_add( GST_BIN(pipeline), recording_branch );<br>
gst_element_link( tee, recording_branch );<br>
gst_element_set_state( recording_branch, GST_STATE_PLAYING );<br>
<br>
This, however, results only in a 0 bytes file being created and nothing<br>
else.<br>
<br>
Is there anything missing here, or is this approach wrong?<br>
--<br>
View this message in context: <a href="http://www.nabble.com/Dynamically-adding-and-removing-branches-of-a-tee...-tp24568543p24568543.html" target="_blank">http://www.nabble.com/Dynamically-adding-and-removing-branches-of-a-tee...-tp24568543p24568543.html</a><br>

Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>