tim at centricular.com
Mon Aug 28 17:50:45 UTC 2017
On Wed, 2017-08-23 at 14:08 +0300, Tonu Jaansoo wrote:
> (snip pipeline)
> Now this commandline has problem. When internet connection fails for
> a second, rtspclientsink tears down everything - also writing to
> files. I want that when internet fails, audio+video is still being
> captured into files. Currently I have different commandline without
> rtspclientsink branches that I use when there is no internet.
> I am trying to rewrite this in C, but so that I intercept
> rtspclientsink having no connection and dynamically unpluging RTSP
> branches of the pipeline.
> Something like this is correct way to do it?
> * wait on bus for error message from rtspclientsink
> * when error comes, set all elements from q1 and q3 to rtspclientsink
> to NULL
> * also remove those elements from bin
> * wait 10s to retry connection
> * dynamically add all elements that were removed
> * set set their status to PLAYING
> I have tried something like this. I get no errors, but no luck
> getting stream going.
There are two parts to this:
1) catching the error message on the bus in your application, and then
doing something smarter than just stopping the entire pipeline; and
2) making sure that a 'flow error' return from rtspclientsink doesn't
make the upstream elements stop streaming.
There is an 'errorignore' element that can do 2. You'll want one of
those in each branch before the rtspclientsink. When an error happens
you should be able to unlink the sink and stop it, and then restart it
and re-link. The errorignore element will make sure the error flow
return is not propagated to the rest of the pipeline.
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
More information about the gstreamer-devel