Best strategy to handle failing streams?

Stirling Westrup swestrup at gmail.com
Thu Jun 13 10:10:09 PDT 2013


In my experience the pipeline gets confused when you try to change the
state of members of the pipeline, even if they aren't currently linked to
anything. The only solution I've found to that is to remove the element (or
bin) from the pipeline first, and *then* set its state.



On Wed, Jun 12, 2013 at 8:24 AM, Axel Philipsenburg <
philipsenburg at papaya-cms.com> wrote:

> Hi everybody,
>
> I need some help in finding the right directions for my evaluation of
> gstreamer.
>
> Short question:
>
> How do I keep a pipeline running if one input source fails?
>
> Long question:
>
> Right now, I have a file source feeding a video/audio stream into the
> pipeline and an RTMP source fetching a live video that's going to be
> mixed with the other video.
>
> As live network sources are unreliable I need a way to keep the pipeline
> running to show the video file even if the network stream for the live
> source breaks.
>
> What I did so far is, I create two source bins and one "mixing" bin that
> connect
> via GhostPads. Then I would listen for error messages on the bus and
> wait for the
> live source bin to send a message.
>
> The message does appear and, as explained from the "Dynamically changing
> the pipeline" chapter
> in the manual, I try to unlink and set the source bin to NULL state.
>
> The problem is, that the rest of the pipeline seems to freeze even
> though I don't see any state
> change messages. The file source playback also freezes when the RTMP src
> is buffering.
>
> What I'd like to know is, how should I go about to remove sources that
> throw error messages without
> affecting the rest of the pipeline?
>
> Is using the bus messages enough? Or do I need to work with (blocking?)
> pad probes?
>
> Thanks in advance!
>
> Axel
>
> ----------------------------------------------------------------------
>
> Mit freundlichen Gruessen / best regards
> papaya Software GmbH
>
> i.A. Axel Philipsenburg
>
> --
> papaya Software GmbH | Im MediaPark 5 | 50670 Koeln | Germany
> Tel./Ph.: +49-221-5743-8072 | Fax: +49-221-5743-8099
> mailto:philipsenburg at papaya-cms.com | http://www.papaya-cms.com/
> --
> Geschaeftsfuehrer: André Schnitzler, Daniel Schäfer
> Sitz & Registergericht: Koeln | HRB 60030 | USt.-Id.-Nr.: DE 255642963
> --
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



-- 
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130613/74032a3a/attachment.html>


More information about the gstreamer-devel mailing list