Difference between revisions of "Kinds of Reggae classes"

From MorphOS Library

(Decoders: Contents.)
(Filters: Contents added.)
Line 20: Line 20:
  
 
==Filters==
 
==Filters==
 +
A Reggae filter accepts data in one of Reggae [[common formats]], performs some transformation on data and deliver them in the same or other Reggae common format. Most filter has the same format on inputs and outputs, but it is not the rule. Imagine a filter generating visualisations for audio player, it will accept audio and generate video.
  
 
==Encoders==
 
==Encoders==

Revision as of 19:55, 16 August 2010

Grzegorz Kraszewski

Multimedia.class

This is the master class of Reggae. It estabilishes basic methods and attributes. It also performs Reggae initialization when opened the first time after boot. All other classes are subclasses of multimedia.class. This class is also responsible for data formats detection and automatic building of decoding tree. It also provides secondary functionality like event logging, metadata support, AltiVec friendly memory allocations and more. Because of all these features multimedia.class is the one and only Reggae class having shared library API except of BOOPSI (object) one.

Streams

Streams form input data abstraction layer of Reggae. A stream is always the first object in any Reggae processing structure. It has one output port. All streams have common set of attributes and methods for data fetching and control. Currently available streams are:

  • memory.stream for accessing data in memory: buffered, generated or embedded in application code.
  • file.stream for reading files via dos.library.
  • http.stream is easy to use yet powerful implementation of HTTP/1.1 protocol client. It can fetch any network resource available via HTTP GET request.

While memory.stream and file.stream are relatively simple wrappers, http.stream is a component useful stadalone as well as a Reggae data source. Any application can just use it for easy data downloading via HTTP, without even touching sockets API and dealing with HTTP internals.

Demuxers

Every media format recognized by Reggae has its own demuxer. Demuxer class is responsible for format recognition, header decoding, metadata extraction and demultiplexing (hence the name) media streams to separate output ports. While there is no real demultiplexing in simple audio or image formats, splitting functionality between demuxer and decoder allows for code reusing, as multiple demuxers may use the same decoder class (for example all demuxers for audio formats using uncompressed PCM, use audiopcm.decoder).

There are also a few "general" demuxers not associated with particular data format. They either handle some common metadata (like id3tag.demuxer), or common compression schemes at datastream level (xpk.demuxer). Such demuxers are usually the first stage of demuxer cascade.

Decoders

A decoder takes a single, demuxed media stream and converts it to one of Reggae common formats. This conversion usually means decompression and decoding of stream. Some decoders are dedicated to one particular media format, some are more general and used with many demuxers.

Filters

A Reggae filter accepts data in one of Reggae common formats, performs some transformation on data and deliver them in the same or other Reggae common format. Most filter has the same format on inputs and outputs, but it is not the rule. Imagine a filter generating visualisations for audio player, it will accept audio and generate video.

Encoders

Muxers

Outputs

Internal classes