http://www.be.com/documentation/be_book/MediaKit/intro.html (Amiga Plus Extra No. 5/97, 05/1997)
The Media Kit gives you tools that let you generate, examine, manipulate, and realize (or
render) medium-specific data in real-time. It also lets you synchronize the transmission of
data to different media devices, allowing you to build applications that can easily
incorporate and coordinate audio and video (for example).
There are three layers in the Media Kit:
- Through the classes provided by the module layer, you create data-generating and -
manipulating modules that can be plugged into each other to create an ever-narrowing data-processing tree. The tree terminates at a global scheduling object.
Every application can have its own processing tree, or it can share branches or even
individual modules with other applications. Synchronization between data from different media is handled by the scheduler: All you have to do is define and hook
up the data-processing modules.
- At the subscriber layer are classes that let you talk directly to the media servers that
are provided by the Kit. For each distinct medium there's a distinct server--but
there's only one server per medium per computer. Corresponding to each server is a
BSubscriber-derived class. Through instances of these classes you can receive and
send data to the server.
- The stream layer lets you access the "data-streaming" facilities of the Kit. A data
stream (as used by the Kit) is a sequence of programming entities that each get
access to a set of data buffers. There are no servers or other media-specific constraints at this layer; you can actually use the classes in the stream layer to
design a streamlined, intra-computer, data-transmission application (currently,
streams can't broadcast over a network).
These three layers are interconnected: The module layer is built on top of the subscriber
layer, which is built on top of the stream layer. Most high-level media applications will
want to use the module layer exclusively. If you need more control or greater efficiency,
head for the subscriber layer. The stream layer is the least useful to media applications,
but, as mentioned above, it may find a home in applications--media-specific or not
--that want to set up an efficient, real-time data pipeline.
Currently, only the subscriber and stream layers of the Media Kit are implemented, and, in
this release, only the subscriber layer is documented.
At the subscriber layer, the Kit provides two classes:
- BSubscriber defines the basic rules to which all subscribers must adhere. If you
want to use the subscriber layer, this is where you start to learn about it.
- BAudioSubscriber provides additional functionality that speaks directly to the
Audio Server. The Audio Server is a background application that manages sound
data that arrives through the microphone or line-in jacks, and that sends sound data
to the internal speaker and line-out jacks. All subscribers that you create, for now,
will be instances of BAudioSubscriber.
The Kit also provides a BSoundFile class that lets you read the data in a sound file, and
global functions that let you play sound files.
The Be Book, HTML Edition, for Developer Release 8 of the Be Operating System.
Copyright © 1996 Be, Inc. All rights reserved.
Be, the Be logo, BeBox, BeOS, BeWare, and GeekPort are trademarks of Be, Inc.
Last modified September 6, 1996.