[gst-devel] RFC: cooperating osssrc/osssink

Erik Walthinsen omega at temple-baptist.com
Sun May 13 09:20:02 CEST 2001


With a lot of drivers, it's not possible to open /dev/dsp once for reading
and once for writing, at the same time.  In most cases it *is* legal
however to open the device once and set it to FULLDUPLEX mode.

So my thought is for osssrc and osssink to cooperate, identifying when any
combination of sources and sinks are set to use the same device.  At that
point, the first element to go to READY is responsible for open()'ing it
and setting things up as necessary.  Futher elements in READY acquire the
filedescriptor, and cooperate in accessing it.  If there is only one
source and sink, they can proceed blissfully unaware of each other (I
think), just read()ing and write()ing.

A more interesting (though maybe not useful?) case is multiple sources
and/or sinks.  In that case, whichever one gets to the device first in any
instant in time would squirrel away the buffer in a queue so others can
pull copies of them.

Anyway, I'll just be happy enough getting shared src/sink working.  Would
probably have to have a plugin-level data structure shared between the two
elementfactories, and a hash from device pathname to element attached.

Anyone want to give it a try?

      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