Chapter 7 Abstractions for programming
Chapter 7 Abstractions for programming
programming
• Abstractions Levels • Toolkits
• Libraries • Higher Programming Languages
• System Software • Object –oriented approaches
The state of the art of programming
• Most of the current commercially available multimedia applications
are implemented in procedure‐oriented programming languages.
• Application code is still highly dependent on hardware Change of
multimedia devices still often requires re‐ implementation.
• Common operating system extensions try to attack these problems.
• Different programming possibilities for accessing and representing
multimedia data.
ABSTRACTIONS LEVELS
• Abstraction levels in programming define different approaches with a
varying degree of detail for representing, accessing and manipulating
data.
• The abstraction levels with respect to multimedia data and their
relations among each other shown in figure in next slide.
Abstraction Levels of the Programming of
Multimedia Systems
ABSTRACTIONS LEVELS
• A device for processing continuous media can exit as a separate
component in a computer. In this case, a device is not part of the OS,
but is directly accessible to every component and application.
• A library, the simplest abstraction level, includes the necessary for
controlling the corresponding hardware with specific device access
operations.
• Libraries are very useful at the OS level, but there is no agreement
over which function are best for different drivers.
• As with any device, multimedia devices can be bound through a
device driver, respectively with the OS
ABSTRACTIONS LEVELS
• The processing of the continuous data become part of the system
software.
• For the continuous data processing requires appropriate schedulers,
such as rate monotonic scheduler or earliest deadline first scheduler.
• Multimedia device driver embedded in OS simply considerably the
implementation of device access and scheduling.
• A simpler approach in a programming environment than the system
software interface for the control of the audio and video data
processing can be taken by using toolkits. Toolkits can also hide
process structures.
ABSTRACTIONS LEVELS
• Language used to implement multimedia application contains
abstractions of multimedia data known as higher procedural
programming language.
• The object-oriented approach was the first introduce as a method for
the reduction of complexity in the software development and it is
used mainly with this today.
• Provides the application with a class hierarchy for the manipulation of
multimedia.
Abstractions from Multimedia
Hardware
Strong hardware dependency may cause
problems with:
• Portability
• Reusability
• Coding efficiency
Abstraction Levels
• Common operating system extensions try to
solve this problem
• Different programming possibilities for
accessing and representing multimedia data
Libraries
Processing of continuous media based on
functions embedded in libraries
• Libraries differ in their degree of abstraction
Libraries ‐ OpenGL
2D and 3D graphics API developed by Silicon Graphics
• Basic idea: “write applications once, deploy across many platforms”:
✓ PCs
✓ Workstations
✓ Super Computers
• Benefits:
✓ Stable
✓ Reliable and Portable
✓ Evolving
✓ Scalable (Features like Zoom, Rectangle handling ...)
✓ Well documented and easy to use
• Integrated with:
✓ Windows 95/NT/2000/XP
✓ UNIX X Window System
System Software
❑ Device access becomes part of the operating system:
❑ Data as time capsules (file extensions)
• Each Logical Data Unit (LDU) carries in its time capsule its data type, actual
• value and valid life span
• Useful concept for video, where each frame has a valid life span of 40ms (rate
• of read access during a normal presentation)
• Presentation rate is changed for VCR (Video Cassette Recorder) functions like
• fast forward, slow forward or fast rewind by
• ‐ Changing the presentation life span of a LDU
• ‐Skipping of LDUs or repetition of LDUs
❑ Data as streams
• ‐ a stream denotes the continuous flow of audio and video data between a source and a sink
• ‐ Prior to the flow the stream is established equivalent to the setup of a connection in a networked
environment
System Software: Windows Media
Control Interface (MCI):
• Multimedia object
✓ Basic Multimedia Classes (BMCs) / Basic Multimedia Objects
(BMOs)
✓ Compound Multimedia Classes (CMCs) / Compound Multimedia
Objects (CMO), which are compound of BMCs / BMOs and other
CMCs/CMOs
✓ BMOs and CMOs can be distributed over different computer nodes
Object‐Oriented Approaches
Media as classes:
• Media Class Hierarchies define hierarchical
relations for different media
• Different class hierarchies are better suited for
different applications
Object‐Oriented Approaches‐Media as
Class