The iPhone OS Media Layer

PreviousTable of ContentsNext
The iPhone OS Cocoa Touch LayerThe iPhone OS Core Services Layer


Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book

The role of the Media layer is to provide the iPhone OS with audio, video, animation and graphics capabilities. As with the other layers comprising the iPhone OS stack, the Media layer comprises a number of frameworks that can be utilized when developing iPhone apps. In this section we will look at each one in turn.

Core Graphics Framework (CoreGraphics.framework)

<google>IOSBOX</google> The iPhone Core Graphics Framework (otherwise known as the Quartz 2D API) provides a lightweight two dimensional rendering engine. Features of this framework include PDF document creation and presentation, vector based drawing, transparent layers, path based drawing, anti-aliased rendering, color manipulation and management, image rendering and gradients. Those familiar with the Quartz 2D API running on MacOS X will be pleased to learn that the implementation of this API is the same on the iPhone.

Quartz Core Framework (QuartzCore.framework)

The purpose of the Quartz Core framework is to provide animation capabilities on the iPhone. It provides the foundation for the majority of the visual effects and animation used by the UIKit framework and provides an Objective-C based programming interface for creation of specialized animation within iPhone apps.


OpenGL ES framework (OpenGLES.framework)

For many years the industry standard for high performance 2D and 3D graphics drawing has been OpenGL. Originally developed by the now defunct Silicon Graphics, Inc (SGI) during the 1990s in the form of GL, the open version of this technology (OpenGL) is now under the care of a non-profit consortium comprising a number of major companies including Apple, Inc., Intel, Motorola and ARM Holdings.

OpenGL for Embedded Systems (ES) is a light weight version of the full OpenGL specification designed specifically for smaller devices such as the iPhone.

Version 3.0 of the iPhone OS supports both OpenGL ES 1.1 and 2.0 on certain iPhone models (such as the iPhone 3GS). Earlier versions of the iPhone OS and older models support only OpenGL ES version 1.1.

iPhone Audio Support

The iPhone OS is capable of supporting audio in AAC, Apple Lossless (ALAC), A-law, IMA/ADPCM, Linear PCM, µ-law, DVI/Intel IMA ADPCM, Microsoft GSM 6.10 and AES3-2003 formats through the support provided by the following frameworks.

AV Foundation framework (AVFoundation.framework)

An Objective-C based framework designed to allow the playback, recording and management of audio content.

Core Audio Frameworks (CoreAudio.framework, AudioToolbox.framework and AudioUnit.framework)

The frameworks that comprise Core Audio for the iPhone OS define supported audio types, playback and recording of audio files and streams and also provide access to the device’s built-in audio processing units.

Open Audio Library (OpenAL)

OpenAL is a cross platform technology used to provide high-quality, 3D audio effects (also referred to as positional audio). Positional audio can be used in a variety of applications though is typically using to provide sound effects in games.

Media Player framework (MediaPlayer.framework)

The iPhone OS Media Player framework is able to play video in .mov, .mp4, .m4v, and .3gp formats at a variety of compression standards, resolutions and frame rates.

In the next chapter we will explore the frameworks provided by The iPhone OS Core Services Layer.


Learn SwiftUI and take your iOS Development to the Next Level
SwiftUI Essentials – iOS 16 Edition book is now available in Print ($39.99) and eBook ($29.99) editions. Learn more...

Buy Print Preview Book



PreviousTable of ContentsNext
The iPhone OS Cocoa Touch LayerThe iPhone OS Core Services Layer