Upload
angela-baker
View
215
Download
0
Embed Size (px)
Citation preview
Introduction to the Media Kit
Matt Wronkiewicz
Be Users Group at UIUC
Introduction This presentation gives an
overview of the structure and use of the new Media Kit, part of BeOS R4.
What is the BeOS?
Multimedia OS Can run with Windows or MacOS
on the same computer Designed for video and audio
professionals Newer and more efficient than
other operating systems Easy to program
Topics of Discussion
Uses Structure Classes Communicating with the Media Kit A simple application
Uses Allows you to write video and audio
players and editors. Reads audio from files and sound
cards Reads video from files (QuickTime,
MPEG, AVI) Simplifies development of applications. Example: The Media Kit can be used to
write a DVD disk player.
Structure Media Kit provides translators and
the foundation for writing players and editors
Translator add-ons read media files such as MPEG movies from disk
Allows you to create your own translators and filters
Applications can use translators and filters to play video and sound
Architecture
Kernel Level Drivers
ApplicationMedia Server Media Kit
Library
Add-OnsMedia
Add-Ons
Classes Media Nodes: (Can mix these)
Media Producer (BBufferProducer) Media Consumer
(BBufferConsumer) Time Source (BTimeSource) Media File (BFileInterface)
Media Roster (BMediaRoster)
Media Producer
Sends audio or video data to other objects
Represents a file or piece of hardware like a sound card
Connects to Media Consumers Example: Sound generator
Media Consumer
Receives A/V data from Media Producers
Can be paired with a Media Consumer to create a filter
Example: Audio mixer Example: Video player
Time Source
Can be used to synchronize audio and video
Default time source is the computer’s clock
Example: Satellite transmission
Media File
Accesses data files to provide media
Writes sound and movie files
Media Roster
Keeps track of media translators and filters
Supplies media nodes for requested format
Supplies default audio and video sources and the audio mixer
Communicating with the Media Kit Subclass media node classes to
create new nodes Link Producers with Consumers
(BBufferProducer::Connect) Ask the Media Roster to provide
system and third-party nodes Put a media node in a user-
installable add-on (BMediaAddOn)
Using the Nodes Together
Sound File
(BBufferProducer, BFileInterface)
High Frequency Filter
(BBufferConsumer, BBufferProducer)
Audio Mixer
(BBufferConsumer)
Sample Audio Player
void playsound(entry_ref* file) {BSound sound(&file);BSoundPlayer player;player.Start();player.SetVolume(1.0);BSoundPlayer::play_id id;id = player.StartPlaying(sound);player.WaitForSound(id);
}
Summary Media Kit makes it easier to write
multimedia applications Pluggable architecture allows
programs to work together Pre-made add-ons reduce
development time