0% found this document useful (0 votes)
150 views18 pages

CH - 7 Abstractions For Programming

The document discusses different abstraction levels in programming multimedia systems, including libraries, system software, toolkits, higher programming languages, and object-oriented approaches. Libraries provide the simplest abstraction level through functions for controlling hardware. System software provides operating system support. Toolkits and languages provide higher-level abstractions that hide lower-level details.

Uploaded by

Amrit Sapkota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views18 pages

CH - 7 Abstractions For Programming

The document discusses different abstraction levels in programming multimedia systems, including libraries, system software, toolkits, higher programming languages, and object-oriented approaches. Libraries provide the simplest abstraction level through functions for controlling hardware. System software provides operating system support. Toolkits and languages provide higher-level abstractions that hide lower-level details.

Uploaded by

Amrit Sapkota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Abstraction for Programming

Abstractions Levels
Libraries
System Software
Toolkits
Higher Programming Languages
Object –oriented approaches

Multimedia System by Ishwar Dhungana 1


State of the Art of the Programming
• Programming in the past & present:
- In the past, Multimedia applications are implemented in structural language i.e. based on procedure like c
- Multimedia specific functions were called, and respectively controlled, through hardware specific libraries or
device drivers.
• Now / Present scenario:
- Well defined abstractions in higher programming languages can be found in the form of data types (e.g. float, int in
C), which hides the actual hardware configuration.
- In research, OOP approaches to the programming of multimedia systems and especially applications have been
used.
- Multimedia objects help for fast integration in the environment; are used,
- Libraries, system software, toolkits etc. are emerging.
- For the representation/accessing and manipulation of data, the details of several defined approaches are use
for Abstraction levels in programming.
- It deals with hiding concepts of the multimedia program from the actual hardware configuration.

Multimedia System by Ishwar Dhungana 2


Block Diagram of Different Abstraction Level of Multimedia
Abstraction levels in programming define different approaches with a
varying degree of detail for representing, accessing and manipulating
data.
Device:A separate component in a computer that is used for processing
continuous media.
Library:Simplest abstraction level, which includes the necessary
functions for controlling the corresponding hardware with specific
device access operations.
Device drivers:It is used for bounding the multimedia devices.
System software: It does the processing of continuous data. So, for this
several properties are required like-schedulers (can be monotonic
scheduler or earliest deadline-first scheduler).
Higher procedural programming language:Language used to
implement multimedia applications contains abstractions of multimedia
data.
Object-oriented programming language:Provides the application with
a class hierarchy for the manipulation of multimedia.
Multimedia System by Ishwar Dhungana 3
Libraries
• The processing of continuous media is based on a set of function which is
embedded into libraries.
• Libraries are considered as a usual solution for programming multimedia data.
• Libraries are provided together with corresponding hardware.
• The device driver and or library which controls all available functions and
supports each device.
• Some libraries can be considered as extension of the graphical user interface &
others libraries consists of control instructions passed as control blocks to the
corresponding driver eg : Libraries use in AVC ( Audio Video Connection)
• Libraries did not address about which functions should be supported however
they are useful at O/S levels.
• The condition where neither sufficient OS support nor integrated programming
environment exists, we can use libraries.
Multimedia System by Ishwar Dhungana 4
Example of Libraries: Open GL

Multimedia System by Ishwar Dhungana 5


System Software
Instead of implementing access to multimedia devices through individual libraries, the device access can become part of the
operating system
- E.g.: Nemo system. - The Nemo trusted supervisor call (NTSC) code implements the functions required by user mode
processes.
- It provides support for three types of processes.
- a) System process: Implements the majority of the services provided by the operating system.
- b) Device driver processes: similar to system processes, but are distinguished by the fact that they are attached to
device interrupts stubs which execute in supervisor mode.
- c) Application process: Contains user programs.
- Processes interact with each other through the system abstraction-Inter Process Communication (IPC).
- Data as time capsule:
- Time capsules can relate to file system in multimedia.
- Serves as storage, modification, and access for continuous media.
- Each LDU (Logical Data Unit) carries in its time capsule, in addition to its data type and actual value, its valid life
span.
- More useful technique for video than Audio.
- Data as a Stream:
- A stream denotes the continuous flow of audio and video data.
- A stream is established between source and sink before the flow.
- Operation on a stream can be performed such as play, fast forward, rewind and stop.
- In Microsoft windows, a media control interface (MCI) provides the interface for processing multimedia data.
- It allows the access to continuous media streams and their corresponding devices. 6
Multimedia System by Ishwar Dhungana
System Software:Windows Media Control Interface

Multimedia System by Ishwar Dhungana 7


System Software: DirectX

Multimedia System by Ishwar Dhungana 8


Toolkits
• Toolkits are used for controlling the audio and video data processing in a
programming environment.
• Toolkits are used to:
• a) Abstract from the actual physical layer.
• b) Allow uniform interface for communication with different devices of continuous
media.
• c) Introduce the client –server paradigm
• d) Toolkits also hide process structure.
• e) Toolkits should represent interface at the system software level.
• Example:
• Animoto, iMovie, Quicktime etc.

Multimedia System by Ishwar Dhungana 9


Higher Programming Languages
• In the higher programming languages, the processing of continuous media data is
influenced by a group of similar constructed functions.
• These calls are mostly hardware and driver independent.
• The programs in an HLL either directly access multimedia data structures, or communicate
directly with, the active processes in the real-time environment.
• The processing devices are controlled through corresponding device drivers.
• Media as types
• Media as files
• Media as processes

Multimedia System by Ishwar Dhungana 10


Media as Type

Multimedia System by Ishwar Dhungana 11


Media as File

Multimedia System by Ishwar Dhungana 12


Media as a process

Multimedia System by Ishwar Dhungana 13


Programming language requirements

Multimedia System by Ishwar Dhungana 14


Object Oriented Programming Approaches
3. Object:It is an instance of the class. objects, derived from the
same class include the same operations as an interface to the
outside world. Object includes a set of operations, which are
called methods. Object communicates among each other
through the exchange of messages.
4. Inheritance: Classes contains root and leaves of the
hierarchy, and also the super classes and subclasses (fathers
and sons). Inheritance can be simple and multi inheritance.
5. Polymorphism: It is related to the property of inheritance
indicating when the same name of a method is defined in
Object oriented approach is used to reduce the complexity in
several classes (& objects) with different implementation
the s/w development. and functionalities. Polymorphism can cause programming
1. Abstract type definition: The definition of data errors that are difficult to find.
types through abstract interfaces is called abstract type
definitions. Abstract type definition is understood as an
interface specification without a knowledge and • This can be implemented as :
implementation of internal algorithms. Data abstraction
• Device as a classes
hides the used algorithms.
• Processing Unit as a Classess
2. Class: The implementation of abstract data types is done
through classes. A class specification includes an • Media as a Classess
interface provided to the outside world.
Multimedia System by Ishwar Dhungana 15
Multimedia System by Ishwar Dhungana 16
Multimedia System by Ishwar Dhungana 17
Multimedia System by Ishwar Dhungana 18

You might also like