Resuming rtsp stream on receiving EOS signal on message bus using re-connection timer
Federico Zamperini
fzamperini at tiscali.it
Wed Feb 6 23:50:24 PST 2013
Setting a pipeline's state to NULL is equivalent to stopping it (the
resources are released means files, sockets, buffers etc., not the
elements in the pipeline).
Setting a pipeline's state to PLAYING is equivalent to starting it --
the pipeline goes through all the necessary states, that is READY,
PAUSED etc.
So yes, don't quit the main loop on EOS, just stop the pipeline; rtspsrc
posts an EOS when he decides that the RTP src went away (see
http://gstreamer-devel.966125.n4.nabble.com/Detecting-Network-Failure-on-RtpSrc-RtpBin-tp4542644p4658204.html
and
http://lists.freedesktop.org/archives/gstreamer-devel/2011-February/030575.html).
Then check periodically if the RTSP transmitter is back, that is: start
the pipeline setting its state to PLAYING; if the transmitter is alive
the pipeline starts correctly, if it's not it posts an error on the bus.
Don't be discouraged if the transmitter is alive yet you get an error,
it takes some time to get back online, that's why you have to try more
than once (unfortunately I had no time to go deeper on this).
And finally: I don't reinitialize the pipeline with all bins, I just
setup the pipeline once.
Federico
Il 07/02/2013 00:21, enthusiastic geek ha scritto:
> Yes that is correct. I shut down rtsp server which is on a different node,
> not the src element. I am not using pad blocking or valves on the pipeline
> itself.
>
>
> If you look in the message bus event handler, I tried doing per your
> suggestion when I receive EOS with now commented (this
> "this->stopStream(index);" was un-commented before)
> this->stopStream(index);
> You think I should not quit main loop while in NULL state in EOS. Right?
>
> In the timer callback, on timeout I try to resume playing
> this->playStream(index);
>
>
> but I get "Error: Could not read from resource." when clearly the resource
> is present.
>
> I receive an event as EOS so I tried the above
>
> Wouldn't setting the pipeline to NULL release all resources? Will this
> effect pipeline such that I receive an error. Do I have to reinitialize
> pipeline with all bins (which I think I should)?
>
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Resuming-rtsp-stream-on-receiving-EOS-signal-on-message-bus-using-re-connection-timer-tp4658402p4658407.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
More information about the gstreamer-devel
mailing list