17
Introductio n to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Embed Size (px)

Citation preview

Page 1: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Introduction to the Media Kit

Matt Wronkiewicz

Be Users Group at UIUC

Page 2: 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.

Page 3: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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

Page 4: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Topics of Discussion

Uses Structure Classes Communicating with the Media Kit A simple application

Page 5: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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.

Page 6: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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

Page 7: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Architecture

Kernel Level Drivers

ApplicationMedia Server Media Kit

Library

Add-OnsMedia

Add-Ons

Page 8: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Classes Media Nodes: (Can mix these)

Media Producer (BBufferProducer) Media Consumer

(BBufferConsumer) Time Source (BTimeSource) Media File (BFileInterface)

Media Roster (BMediaRoster)

Page 9: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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

Page 10: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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

Page 11: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Time Source

Can be used to synchronize audio and video

Default time source is the computer’s clock

Example: Satellite transmission

Page 12: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Media File

Accesses data files to provide media

Writes sound and movie files

Page 13: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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

Page 14: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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)

Page 15: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Using the Nodes Together

Sound File

(BBufferProducer, BFileInterface)

High Frequency Filter

(BBufferConsumer, BBufferProducer)

Audio Mixer

(BBufferConsumer)

Page 16: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

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);

}

Page 17: Introduction to the Media Kit Matt Wronkiewicz Be Users Group at UIUC

Summary Media Kit makes it easier to write

multimedia applications Pluggable architecture allows

programs to work together Pre-made add-ons reduce

development time