Re: [linux-audio-dev] Toward a modularization of audio component

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Toward a modularization of audio component
From: Erik Walthinsen (omega_AT_temple-baptist.com)
Date: Fri May 04 2001 - 01:16:08 EEST


On Fri, 4 May 2001, Abramo Bagnara wrote:

> The short resume is:
> - every audio producer (a synthesizer, an mp3 file decoder, an hardware
> capture stream, a .wav reader, etc.) have a PCM capture API
> - every audio consumer (an mp3 file encoder, a .voc writer, an hardware
> playback stream, etc.) have a PCM playback API
>
> Now, suppose to rewrite aplay: it become a trivial application that copy
> audio data from an audio producer to an audio consumer, but try to
> imagine what it's able to do now:
> - mp3 decoder/player (like mpg123)
> - file converter (like sox)
> - midi converter/player (like timidity)
> - drop free sound recorder
> - and everything you can imagine assembling our bricks
>
> All that using perfectly reusable software modules (shared object).
> The guideline is: we are no longer developing an application but an
> object with a well known API.

This is exactly what GStreamer has done. It's a component system that
allows you to connect arbitrary sets of filters into arbitrary graphs.
http://gstreamer.net/mega.png is a good example of that (sorta). We even
have a (still non-functional, I need to finish it) LADSPA wrapper. Audio
I/O plugins exist for OSS and ESD right now, along with some
not-very-functional ALSA ones. I'm personally interested in the ALSA
source and sink because I have a Hammerfall...

This structure isn't just capable of audio, either. An example I just ran
is:

./gstreamer-launch disksrc location=~/media/thx.vob ! mpeg2parse video_00!
queue ! \{ mpeg2dec ! aasink \}

This plays the video from a .vob file (mpeg2) out through an ascii-art
sink. If -launch was capable of creating an X window properly, I could
replace aasink with videosinnk and see the complete video.

> Ok, but what about legacy application, xmms by example, how to transform
> it in an audio producer?
We happen to have a plugin that wrapps the XMMS plugins, so you can use
most xmms plugins from gstreamer. The more generic problem of taking an
arbitrary program and wrapping it could be accomplished the same way
esddsp works. GStreamer has a pipefilter that will talk to apps like sox
via stdin,stdout, but we can extend that idea to overload
open,read,write,etc. just like esddsp to read/write audio over a pair of
pipes, which translate into GStreamer connections. I will write that
tonight <g>

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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri May 04 2001 - 02:41:33 EEST