[gst-devel] Partial state fun

Erik Walthinsen omega at cse.ogi.edu
Thu Nov 23 23:39:13 CET 2000


Consider a MPEG system stream pipeline:

			/-> vqueue [ -> mpegdec -> videosink ]
disksrc  ->  mpeg1parse
			\-> aqueue [ -> mpg123 -> audiosink ]

What if the sound card is unavailable?  On ->READY, you're going to set
the disksrc and mpeg1parse to READY without hassle.  The vqueue, mpegdec,
and videosink will set properly, as will the aqueue, and mpg123.  But the
audiosink fails because it can't open the sound card.  Immediately the
thread containing that and mpg123 will rollback to the NULL state.  This
might trickle back through the aqueue and all the way to mpeg1parse. 

Here's the optimization: don't fail, simply disable the audio pad on
mpeg1parse.  Then mpeg1parse can save time by not bothering to even handle
it (barely useful in this example), and/or the pad can simply not pass the
buffer along. 

That would mean we'd have to have states for the pads as well, which is
tricky.  State management would go through the roof....

         Erik Walthinsen <omega at cse.ogi.edu> - Staff Programmer @ OGI
        Quasar project - http://www.cse.ogi.edu/DISC/projects/quasar/
   Video4Linux Two drivers and stuff - http://www.cse.ogi.edu/~omega/v4l2/
        __
       /  \             SEUL: Simple End-User Linux - http://www.seul.org/
      |    | M E G A           Helping Linux become THE choice
      _\  /_                          for the home or office user





More information about the gstreamer-devel mailing list