6 Programming And Development Tools

Multimedia Computing · Unit 6

Programming and Development Tools

Exam-focused notes for Programming and Development Tools (Multimedia Computing, BIT356): what the TU syllabus asks and how it has actually been tested, with 2 solved past questions from this unit.

Programming and Development Tools in short

Writing multimedia programs from scratch is hard, because audio, video and graphics devices are complex. Libraries, toolkits and layers of abstraction hide this complexity. This chapter explains these layers and the common tools.

Programming and Development Tools: notes

Multimedia programming libraries

A library is a collection of ready-made functions that a program can call. Multimedia libraries give access to graphics, sound, video and input devices without writing hardware code.

LibraryPurpose
OpenGLCross-platform 2D and 3D graphics
DirectX (Direct3D, DirectSound)Microsoft API for graphics, sound and input on Windows
SDLSimple cross-platform access to window, graphics, audio and input; common in games
OpenAL3D positional audio
FFmpegEncode, decode and convert audio and video files
GStreamerFramework to build pipelines for playing and processing media
PygamePython library for games and simple multimedia

Example (Python, Pygame). This draws a window and a moving circle.

import pygame

pygame.init()
screen = pygame.display.set_mode((400, 300))
clock = pygame.time.Clock()
x = 0
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    screen.fill((0, 0, 0))
    pygame.draw.circle(screen, (255, 0, 0), (x, 150), 20)
    x = (x + 5) % 400
    pygame.display.flip()
    clock.tick(30)
pygame.quit()

The loop draws a frame, updates the position, and waits so the speed is 30 frames per second.

What this unit covers

  • Multimedia programming libraries
  • Multimedia toolkits
  • Abstraction levels of multimedia programming
  • Programming frameworks and APIs

Abstraction levels of multimedia programming

2081 · 5 marks

Describe the abstraction levels of the programming of multimedia systems. [5]

Show solved answer

Abstraction Levels of Programming Multimedia Systems

Answer

Multimedia systems programming operates across multiple abstraction levels, each providing different degrees of control and complexity management:

1. Hardware Level (Low-level)

  • Direct interaction with physical devices (graphics cards, sound cards, cameras, displays)
  • Involves device drivers and firmware
  • Provides maximum control but requires detailed hardware knowledge
  • Examples: GPU register manipulation, direct memory access (DMA)

2. Operating System Level

  • Manages hardware resources through system calls and APIs
  • Provides device abstraction and resource scheduling
  • Handles interrupts, memory management, and I/O operations
  • Examples: Windows DirectX, Linux kernel multimedia subsystems

3. Middleware/Framework Level

  • Libraries and frameworks that simplify multimedia operations
  • Abstracts OS-specific details into common interfaces
  • Provides standardized functions for audio, video, and graphics processing
  • Examples: OpenGL, SDL (Simple DirectMedia Layer), FFmpeg, GStreamer

4. Application Programming Interface (API) Level

  • High-level interfaces for developers
  • Hides implementation complexity
  • Provides ready-made functions for common multimedia tasks
  • Examples: Web APIs (Canvas, WebGL), game engines (Unity, Unreal)

5. Application Level (High-level)

  • End-user applications built using lower-level abstractions
  • Focuses on functionality and user experience
  • Minimal concern with underlying hardware details
  • Examples: Video players, image editors, multimedia authoring tools

Significance

Each level trades off between control (lower levels) and ease of use (higher levels). Programmers select appropriate abstraction levels based on performance requirements and development complexity.

Open this answer on its own page →

Multimedia programming libraries

0 · 5 marks

Discuss the libraries and toolkits used while programming multimedia systems. [5]

Multimedia systems programming requires specialized libraries and toolkits to handle audio, video, graphics, and animation. The following are key categories and examples: - OpenGL: A cross-platform graphics library for 2D and 3D rendering. Provides low-level control over graphics pipeline and is ...

Open this answer on its own page →