[gst-devel] Dynamic autoplugger scenario

Erik Walthinsen omega at temple-baptist.com
Thu May 3 22:04:01 CEST 2001


The static autoplugger may be near the end of its life, with incsched
being merged into HEAD soon.

I'll describe the renderer case of autoplugging, since it's the most
complex one.  It starts with an application creating a Pipeline and a
DiskSrc.  The application instantiates an autoplugger, which takes the
form of a Bin with a NULL-caps REQUEST pad.

Inside the Bin resides a autoplug-cache element, which is responsible for
making sure that the autoplugger doesn't ever drop any data.  It stores
them up and can repeatedly dish them out as needed, but only when the
autoplugger has deemed itself successful does this element get removed.

When the autoplugger is connected to the disksrc, negotiation occurs, and
usually that will quickly in NULL caps, which will cause the autoplugger
to immediately put a TypeFind element on the sink side of the
autoplug-cache.

When the pipeline is put into PLAYING, data is pushed from the disksrc (or
whatever source it is) into the autoplug Bin, which goes immediately into
the autoplug-cache.  It will be initially configured to push straight
through into the TypeFind.  The TypeFind takes as many buffers as it needs
until it finally sets its caps, which the autoplug-cache proxies straight
through to the attached source, and all is well.

At this point a signal files stating that the TypeFind is done, and the
autoplugger disconnects the TypeFind, then uses some mechanism to decide
which element(s) to attach to the autoplug-cache.  It hits 'rewind' on the
cache exits the signal handler.  The cache sees that it's been rewound,
starts back at the beginning, and pushes those same buffers off into the
new elements attached at its output.  If data keeps going beyond what it's
already got internally, it goes off and pulls more.  However, if the
elements added end up in a sink, the autoplugger is done, and when it
finishes its own internal cache, it fires a signal and is bodily removed
from the pipeline.  If the resulting elements end up in more unknowns,
more autoplug-cache elements are attached and the process repeats.

I haven't thought much about the state transitions in this process, that's
next.  But I want to get this out there for people to think about and poke
holes in.

      Erik Walthinsen <omega at temple-baptist.com> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_










More information about the gstreamer-devel mailing list