<br>Hello!<br><br>I have a problem with a video saving pipeline. We want to add an RTP sending bin to the pipeline, then later remove it. <br>The pipeline while saving:<br>&nbsp;| v4lsrc | --- | encoder | --- | tee | --- | saving bin |<br>
The RTP sending bin is connected to the tee. Both the saving and RTP sending bins contain queue.<br><br><br>We are trying the addition the following way:<br>&nbsp;1. Put the pipeline to State1<br>&nbsp;2. Add the bin to the pipeline.<br>
&nbsp;3. Link the bin to the tee<br>&nbsp;4. Put the pipeline to the PLAYING state.<br><br>The way of deletion:<br>&nbsp;1. Put the pipeline to State2<br>&nbsp;2. Unlink the bin from the tee.<br>&nbsp;3. Release the tee&#39;s request pad<br>&nbsp;4. Remove the bin from the pipeline<br>
&nbsp;5. Set the bin&#39;s state to NULL<br>&nbsp;6. Unref the bin.<br>&nbsp;7. Set the state of the pipeline back to PLAYING<br><br>I&#39;m not sure what should State1 and State2 be.<br><br>If I use READY the mux fails:<br>avimux and matroskamux dies with Gstreamer-critical error when the pipeline is returned to PLAYING state, ffmux_mp4 simply stops saving.<br>
<br>If I use PAUSED state at the addition case, the pipeline sometimes stuck in ASYNC state when tries to return to playing.<br>At the deletion case if I use individual elements instead of a single bin, the call to put the elements to NULL state not returns. If I use bin, changing to NULL state works.<br>
<br>In the projects there are much more complex pipelines. The common problem is the addition and deletion elements. All additions and deletions are performed at a tee.<br><br>My questions are:<br>What should State1 and State2 be? If it is READY how can I manage to keep the saving working? <br>
Are the lists above correct or I do something wrong?<br><br>Thanks,<br>Csaba Varró<br><br>