Professional Documents
Culture Documents
Abstractions From Multimedia Hardware
Abstractions From Multimedia Hardware
Chapter 5.3: Abstractions for Programming Page 1 Chapter 5.3: Abstractions for Programming Page 2
acb.channel = AAPI_CHNA
Object-oriented Higher acb.mode = AAPI_PLAY
programming programming ...
languages languages
aud_init(&acb) /* acb is the audio control block */
...
Frameworks audrc = fab_open(AudioFullFileName,AAFB_OPEN,AAFB_EXNO, 0,&fab,0,0,0,0);
System software fork(START in PARALLEL)
aud_strt(&acb)
Libraries displayPosition(RelativeStarttime, Duration)
...
Device drivers for continuous media
Device
Chapter 5.3: Abstractions for Programming Page 3 Chapter 5.3: Abstractions for Programming Page 4
Lehrstuhl für Informatik 4 Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme Kommunikation und verteilte Systeme
2D and 3D graphics API developed by Silicon Graphics Device access becomes part of the operating system:
• Basic idea: “write applications once, deploy across many platforms”: • Data as time capsules (file extensions)
PCs Each Logical Data Unit (LDU) carries in its time capsule its data type, actual
Workstations value and valid life span
Super Computers Useful concept for video, where each frame has a valid life span of 40ms (rate
of read access during a normal presentation)
• Benefits:
Presentation rate is changed for VCR (Video Cassette Recorder) functions like
Stable fast forward, slow forward or fast rewind by
Reliable and Portable • Changing the presentation life span of a LDU
Evolving • Skipping of LDUs or repetition of LDUs
Scalable (Features like Zoom, Rectangle handling ...)
• Data as streams
Well documented and easy to use
A stream denotes the continuous flow of audio and video data between a
• Integrated with: source and a sink
Windows 95/NT/2000/XP Prior to the flow the stream is established equivalent to the setup of a
UNIX X Window System connection in a networked environment
Chapter 5.3: Abstractions for Programming Page 5 Chapter 5.3: Abstractions for Programming Page 6
Windows Media Control Interface (MCI): Low-level APIs and libraries for high-performance applications
• Especially games - formerly known as the "Game SDK"
Direct access to hardware services
• E.g. audio & video cards, hardware accelerators
• “DirectX” = “direct access”
MMSYSTEM library for • Strong relationship/interaction with ActiveX/DCOM
extensibility and device
independence
Chapter 5.3: Abstractions for Programming Page 7 Chapter 5.3: Abstractions for Programming Page 8
Lehrstuhl für Informatik 4 Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme Kommunikation und verteilte Systeme
Chapter 5.3: Abstractions for Programming Page 9 Chapter 5.3: Abstractions for Programming Page 10
Media as files: instead of considering continuous media as data types they can be
considered as files: Media as processes: it is possible to map continuous media to processes and
file_h1 = open(MICROPHONE_1,...) integrate them into a high-level language:
file_h2 = open(MICROPHONE_2,...)
file_h3 = open(SPEAKER, ...)
PROCESS cont_process_a; This process implements a set of actions
... (“set-volume”, “set-loudness”)
...
on_message_do
read(file_h1)
set_volume ...
read(file_h2)
set_loudness ...
mix(file_h3, file_h1, file_h2) ...
activate(file_h1, file_h2, file_h3) ...
... [main]
deactivate(file_h1, file_h2, file_h3) pid = create(cont_process_a)
... send(pid, set_volume, 3)
rc1 = close(file_h1) send(pid, set_loudness)
rc2 = close(file_h2) ...
rc3 = close(file_h3)
Chapter 5.3: Abstractions for Programming Page 13 Chapter 5.3: Abstractions for Programming Page 14
The high-level language should support parallel processing, because the processing
of continuous data is Basic ideas of object-oriented programming is data encapsulation in connection with
class and object definitions
• controlled by the language through pure asynchronous instructions
• Abstract Type Definition (definition of data types through abstract interfaces)
• an integral part of a program through the identification of media
• Class (implementation of a abstract data type)
Different processes must be able to communicate through an inter-process
• Object (instance of a class)
communication mechanism, which must be able to:
• Understand a priori and/or implicitly specified time requirements (QoS parameters or Other important properties of object-oriented systems are:
extracted from the data type) • Inheritance
• Transmit the continuous data according to the requirements • Polymorphism
• Initiate the processing of the received continuous process on time
Chapter 5.3: Abstractions for Programming Page 15 Chapter 5.3: Abstractions for Programming Page 16
Lehrstuhl für Informatik 4 Lehrstuhl für Informatik 4
Kommunikation und verteilte Systeme Kommunikation und verteilte Systeme
Chapter 5.3: Abstractions for Programming Page 17 Chapter 5.3: Abstractions for Programming Page 18