CSC330 ยท 2081 ยท 10 marks
Explain the abstraction levels of programming use in multimedia system with diagram.
Explain the abstraction levels of programming use in multimedia system with diagram.[10]
Quick answer
Abstraction levels in programming define different approaches with a varying degree of detail for representing, accessing, and manipulating data in a multimedia system. A multimedia application may access each level depending on its requirements. These levels range from direct hardware access at the lowest level to high-level object-oriented environments at the highest level.
Abstraction Levels of Programming in Multimedia Systems
Introduction
Diagram: Abstraction Levels in Multimedia Programming
+--------------------------------------------------+
| Object-Oriented Environment | <-- Highest Level
+--------------------------------------------------+
| Higher Programming Languages (HLL) |
| (Media as Types / Media as Files) |
+--------------------------------------------------+
| Toolkits |
+--------------------------------------------------+
| System Software |
| (Data as Time Capsules / Data as Streams) |
+--------------------------------------------------+
| Libraries |
+--------------------------------------------------+
| Device Drivers |
+--------------------------------------------------+
| Hardware / Device | <-- Lowest Level
+--------------------------------------------------+
^
|
Multimedia Application can access any level
Detailed Explanation of Each Level
1. Hardware / Device Level
- A device is not part of the operating system but is directly accessible to every component and application.
- This is the lowest level where physical audio/video hardware (sound cards, cameras, microphones) resides.
- Direct hardware access is rarely used by application programmers due to complexity.
2. Device Drivers
- Device drivers are simply the implementation of device access and scheduling.
- They act as a bridge between the hardware and the software layers above.
- They handle low-level communication with hardware devices and expose a simplified interface to upper layers.
3. Libraries
- A library is the simplest abstraction level and includes the necessary functions for controlling the corresponding hardware with specific device access operations.
- The processing of continuous media (audio and video) is based on a function or set of functions embedded into libraries.
- Libraries are provided together with the corresponding hardware (e.g., audio/video hardware cards come with their own libraries).
- Libraries differ in their degree of abstraction.
- Libraries are very useful at the operating system level; however, there is no universal agreement over which functions are best, leading to a variety of interfaces and different libraries.
4. System Software
System software directly interacts with computer hardware and provides efficient management. At this level, two important abstractions are used:
a) Data as Time Capsules
- Each Logical Data Unit (LDU) carries its time capsule along with:
- Data type
- Actual value
- Valid life span
- This concept is especially useful for video, where each frame has a valid span of 40 ms.
- Presentation rate can be changed for VCR functions (fast forward, slow forward, rewind) by:
- Changing the presentation life span of an LDU
- Skipping or repeating LDUs
b) Data as Streams
- A stream denotes the continuous flow of audio and video text.
- The stream is established between source(s) and sink(s), equivalent to a connection setup in a networked environment.
- Operations on a stream include: play, fast forward, rewind, and stop.
- In Microsoft Windows, the Media Control Interface (MCI) provides the interface for processing multimedia data, allowing access to continuous media streams and their corresponding devices.
5. Toolkits
- Toolkits provide a simpler approach than direct system software interface for controlling audio and video data processing.
- Toolkits are used to:
- Abstract from the actual physical layer
- Allow a uniform interface for communication with all different devices of continuous media
- Introduce the client-server paradigm
- Hide process structures
- Toolkits represent interfaces at the system software level and can be embedded into programming languages or object-oriented environments.
6. Higher Programming Languages (HLL)
- In HLL, the processing of continuous data is influenced by a group of similarly constructed functions.
- These calls are mostly hardware and driver-independent.
- Their integration in HLLs leads to:
- Better abstraction
- Better programming style
- Increased productivity
Two important concepts at this level are:
a) Media as Types
- Data types for video and audio are defined (similar to how
characteris a type for text). - A program can address media through functions and sometimes directly through operators.
- Operations include: copy, compare, delete, create, read from file, or store.
- The smallest unit can be the LDU.
b) Media as Files
- Continuous media is treated as files rather than data types.
- Media streams are read and written as file-based continuous data.
- Continuous data are often played from functions based on sources of non-persistent data (e.g., microphone and camera).
7. Object-Oriented Environment (Highest Level)
- An object-oriented environment provides the most flexibility for programmers.
- Multimedia data (audio, video, images) are encapsulated as objects with methods and properties.
- This level supports reusability, modularity, and extensibility in multimedia application development.
Summary Table
| Level | Abstraction | Example |
|---|---|---|
| Hardware | Lowest | Sound card, Camera |
| Device Drivers | Low | Audio driver |
| Libraries | Medium-Low | Hardware-specific API |
| System Software | Medium | MCI, Streams, LDU |
| Toolkits | Medium-High | Multimedia toolkits |
| HLL | High | Media as Types/Files |
| Object-Oriented | Highest | OOP multimedia frameworks |
Conclusion
The abstraction levels of programming in multimedia systems provide a structured hierarchy from raw hardware access to high-level object-oriented programming. A multimedia application may access each level depending on the requirement, but higher levels offer greater flexibility, portability, and ease of programming, while lower levels offer more direct control over hardware resources.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.