
Reggae is the new approach to media streams processing in MorphOS operating system. Unlike old datatypes system, Reggae has full support of streaming and is highly modularized. Streaming support means that media stream is not buffered in the memory as the whole. Small portions of data are passed through a chain of connected objects (called a pipeline). This way the library can deal with extremely big media objects (or continuous streams) keeping memory footprint low.
The modularity contributes to the low memory usage too. An old datatype class contained format recognition, demultiplexer (if any), decoder and sometimes encoder in one shared library. Reggae divides functionality into small modules loaded independently. This way an application loads only modules it really needs (so for example a player need not to load usually big encoder module).
Another advantage over datatypes is stream abstraction. Stream handlers are separate modules now, and the system can be easily expanded with new types of streams. Programmers are no more limited to file and clipboard streams (these are of course supported too).
The library is able to handle compound streams, for example video ones. A demultiplexer splits audio and video data, then every stream has its own decoder (loaded as a separate module), filters and renderer. All the decoding structure can be built automatically, including format and subformats recognition, with a single API call.
Filters is another new concept compared to datatypes. Datatypes were leaving decoded data processing to the application. Reggae filters allows for code reuse of common audio and video processing algorithms. Reggae filters take advantage of AltiVec vector processing unit available in G4 processors, which makes them very fast. Another nice feature is built-in debugging system making programmer work easier.