Hi everyone,
I have some trouble with dynamic pipeline. I have so far been unsuccessfull to resolve it. I am using an imx6 solution with gstreamer 0.10. I have a main live pipeline used to catch snapshot of video then 3 bin: the first one is just to encode the video in h264, the 2nd one to stream it using udpsink, the 3rd one to save it on a usb device using filesink. Bin2 and Bin3 need Bin 1. Bin 1 is created whenever Bin 2 or/and 3 is/are needed. When i record a video using Bin1 and 3 it works fine. When i stream a video using Bin1 and 2 it works fine. When i record a video using Bin1 and 3, then activate stream using Bin2 it works fine. When i stream a video using Bin1 and 2, then activate video rec using Bin3, stream still works fine but the recorded video is uncorrect. I get a correctly formated avi file with just black screen... The only way I have succeeded to make it works was to set my pipeline to RESET_STATE prior to attach my Rec Bin 3 then back to PLAYING_STATE but then my stream gets interrupted for few secs... Attached is the structure of my pipeline. I am open to any suggestion... Thanks for your help |
Are you running the dynamic pipeline in your own app? when you change the pipeline layout you need to do a latency renegotiation to correct any added delay that an extended branch may add. Look at this for an idea on how to do it correctly: Doing the recalculation after the latency query is generally important to ensure that the pipeline has been configured correctly and a new latency calculation is possible. Make sure you are receiving the message on the bus!https://github.com/GStreamer/gstreamer/blob/master/tools/gst-launch.c#L746 On Thu, Feb 9, 2017 at 1:28 PM, ltramart <[hidden email]> wrote: Hi everyone, _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks for the taking the time to reply.
Yes i'm a running dynamics pipeline in my own application in a single thread. On the bus i am not getting any GST_MESSAGE_LATENCY. The only messages i get are NEW_CLOCK when starting my live pipe, then the usual STATE_CHANGED and STREAM_STATUS messages, and some ASYNC-DONE. To my understanding, only elements may request a latency change, correct? It looks like my RecBin is not properly initialized once connected then set in PLAYING state. Is there a way to force synchronization/initialization of a new connected bin to an already existing playing pipeline? Perhaps, i am not setting up my elements correctly? Here are my steps to connect RecBin (Bin3) to VpuBin (Bin1): -add RecBin (Bin3) to VpuBin (Bin1) -request src_pad from tee of VpuBin -request sink_pad from RecBin sink pad (ghot pad) -link both pad -unblock src_pad -Set Pipepine to PLAYING state. This work well if streaming is off, otherwise i get this black screen on my records :-( The avi file is only playable with VLC not with WMP ; length of file is OK so EOS is working OK but garbage data inside. Any hint is welcome :-) Thanks for your help Ludo. |
Is there a way to force synchronization/initialization of a new connected bin to an already existing playing pipeline? gst_element_sync_state_with_parent The set of operations to add the element seem correct. One thing to note is that you are using a tee. The event handling for tees is not the best. Primarily because figuring out how a pipeline should be handled after a tee is a bit complex and implementation specific. You might have to send a set of events downstream to start up the pipeline correctly. Off the top of my head that would be a stream_start and a segment event. The segment should start from the first buffer that will be sent downstream to ensure there is no gap at the start of the recording, i.e. if you connect the pipe at second 5 and you don't set a correct segment, then the recording will have 5 seconds of black video/silence and then the video will start playing. Dimitrios
On Fri, Feb 10, 2017 at 11:03 AM, ltramart <[hidden email]> wrote: Thanks for the taking the time to reply. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |