I&#39;m using python gst bindings to create a Speakers Corner/Video Diary application.  I started with the webcamera tutorial for python/gst here:<br><br><a href="http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html">http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html</a><br>
<br>This is a simple gtk gui that allows you to push a button to start and stop the webcam.  I&#39;m modifying it to:<br>-Start with the camera playing.<br>-Use the &quot;Start/Stop&quot; button to start and stop and encode operation.<br>
<br>So, after the v4l2src I add a tee element, where one branch is exactly as before, and the other branch feeds and sequence of encoder elements (queue -&gt; theora -&gt; ogg -&gt; file).<br><br>To allow for easily adding and removing the encode path I have 2 Bins.  One Bin contains the v4l2src -&gt; tee -&gt; autovideosink, with a ghost src pad for the other branch of the Tee element.  The other Bin is the encode path with a ghost sink pad for the input to the theora element.<br>
<br>The code for this can be found here <a href="http://pastebin.com/XbjVsbqC">http://pastebin.com/XbjVsbqC</a><br><br>So I want to push &quot;Start&quot; and have the Encode path run, and stop will remove the encode path.  Initially I fully stopped the Pipeline, and restarted it with the encodeBin added, and this worked fine.  This was not ideal.  I wanted to keep the pipeline running.  So I found this thread about pad blocking:<br>
<br><a href="http://n4.nabble.com/Any-ways-to-add-remove-branches-to-from-a-running-pipeline-td973959.html#a973959">http://n4.nabble.com/Any-ways-to-add-remove-branches-to-from-a-running-pipeline-td973959.html#a973959</a><br>
<br>I believe I understand what they&#39;re getting at, but I don&#39;t seem to be able to make it work. <br><br>-If I start the pipeline with the encoder running it works fine.  And if I push &quot;stop&quot; to remove the encode operation, the ogv file ceases to be written.<br>
-If I start the pipeline with the encoder stopped, and then push &quot;start&quot; to add the encoder, the viewfinder continues to show my webcam video, but the ogv file does not get written to.<br><br>Am I using the pad blocking incorrectly?<br>
<br>Thanks in advance.<br><br><br>P.S. I see mention made of a camerabin element.  I can&#39;t for the life of me figure out why that element is not installed on my machine (Ubuntu 9.04), or even how to get it there.  It would probably do what I needed as well, although I&#39;d still be curious about what I&#39;m doing wrong.<br>
<br>